NSLU2-Linux
view · edit · print · history

An ObeseSlug is an NSLU2 that has been modified with 16MB of flash and 256MB of RAM. These are the maximum sizes we believe to be possible (or at least practical).

We are aware of two ObeseSlugs in existence. For the 16MB flash, an Intel 28F128J3A chip was used. For the 256MB RAM, please see the FatSlug page details.

Use the following modifications to RedBoot to make it support 16MB flash:

 bash-3.2$ diff -a stockredboot.hex newredboot.hex
 1534c1534
 < 0000cf50  e2 45 c8 06 e3 5c 08 7a  21 a0 40 00 3a 00 00 03  |.E...\.z!.@.:...|
 ---
 > 0000cf50  e2 45 c8 06 e3 5c 08 fa  21 a0 40 00 3a 00 00 03  |.E...\..!.@.:...|
 1540c1540
 < 0000cfb0  e3 a0 15 02 e1 a0 20 08  eb 00 68 8e e3 50 00 00  |...... ...h..P..|
 ---
 > 0000cfb0  e3 a0 14 01 e1 a0 20 08  eb 00 68 8e e3 50 00 00  |...... ...h..P..|
 1548,1549c1548,1549
 < 0000d030  e3 a0 18 7a e1 a0 20 08  eb 00 68 6e e3 50 00 00  |...z.. ...hn.P..|
 < 0000d040  1a 00 00 13 e2 45 c8 06  e3 5c 08 7a 23 a0 40 00  |.....E...\.z#.@.|
 ---
 > 0000d030  e3 a0 18 fa e1 a0 20 08  eb 00 68 6e e3 50 00 00  |...... ...hn.P..|
 > 0000d040  1a 00 00 13 e2 45 c8 06  e3 5c 08 fa 23 a0 40 00  |.....E...\..#.@.|
 1559,1564c1559,1564
 < 0000d0e0  eb 00 4d 3f e5 1b c0 44  e3 e0 32 fa e2 43 35 3e  |..M?...D..2..C5>|
 < 0000d0f0  e1 d3 30 b0 e3 cc c8 ff  e3 cc cc ff e1 8c c4 03  |..0.............|
 < 0000d100  e5 0b c0 44 e3 e0 32 da  e5 1b c0 40 e2 43 35 3e  |...D..2....@.C5>|
 < 0000d110  e1 d3 30 b0 e3 cc c8 ff  e3 cc cc ff e1 8c c4 03  |..0.............|
 < 0000d120  e5 0b c0 40 e3 e0 32 ba  e5 1b c0 38 e2 43 35 3e  |...@..2....8.C5>|
 < 0000d130  e1 d3 30 b0 e3 cc c8 ff  e3 cc cc ff e1 8c c4 03  |..0.............|
 ---
 > 0000d0e0  eb 00 4d 3f e5 1b c0 44  e3 e0 34 af e3 e0 34 af  |..M?...D..4...4.|
 > 0000d0f0  e1 53 20 bf e3 cc c8 ff  e3 cc cc ff e1 8c c4 02  |.S .............|
 > 0000d100  e5 0b c0 44 e3 e0 34 af  e5 1b c0 40 e1 53 20 bd  |...D..4....@.S .|
 > 0000d110  e1 53 20 bd e3 cc c8 ff  e3 cc cc ff e1 8c c4 02  |.S .............|
 > 0000d120  e5 0b c0 40 e3 e0 34 af  e5 1b c0 38 e1 53 20 bb  |...@..4....8.S .|
 > 0000d130  e1 53 20 bb e3 cc c8 ff  e3 cc cc ff e1 8c c4 02  |.S .............|
 1637c1637
 < 0000d5c0  e2 44 48 16 e3 54 08 7a  e5 9f 40 98 e1 a0 08 00  |.DH..T.z..@.....|
 ---
 > 0000d5c0  e2 44 48 16 e3 54 08 fa  e5 9f 40 98 e1 a0 08 00  |.DH..T....@.....|
 1693,1694c1693,1694
 < 0000d940  50 16 00 10 e1 a0 c0 0d  e3 e0 02 7a e9 2d d8 30  |P..........z.-.0|
 < 0000d950  e5 9f 11 40 e2 4c b0 04  e2 40 05 3e e3 a0 20 06  |...@.L...@.>.. .|
 ---
 > 0000d940  50 16 00 10 e1 a0 c0 0d  e3 e0 04 af e9 2d d8 30  |P............-.0|
 > 0000d950  e5 9f 11 40 e2 4c b0 04  e2 40 00 07 e3 a0 20 06  |...@.L...@.... .|



added by Rob Lockhart below

Note that I was unable to determine the best method for actually performing the operation above, other than manually using a Hex Editor. I would suggest AGAINST that, as there are tools that can easily accomplish this. Plus, for those of us that aren't regular software programmers, I ended up reproducing my manual results. Perhaps if a binary 'diff' is needed in the future, this method can be used. What I did is shown below. RedBoot.orig is the original RedBoot for 8MB flash, and RedBoot.16M was copied from RedBoot.orig and modified appropriately per the above differences with hexedit.

 $ xxd RedBoot.orig >RedBoot.orig.hex
 $ xxd RedBoot.16M >RedBoot.16M.hex
 $ diff RedBoot.orig.hex RedBoot.16M.hex >RedBoot.16M.patch
 $ patch -p0 -o RedBoot.patched.hex RedBoot.orig.hex RedBoot.16M.patch
 $ xxd -r RedBoot.patched.hex RedBoot.patched

Note that I am only giving the commands above to show how to perform this, in case anyone else needs this in the future. If you want to use the above patch, then copy/paste the text below to a file, call it RedBoot.16M.patch :

3318c3318
< 000cf50: e245 c806 e35c 087a 21a0 4000 3a00 0003  .E...\.z!.@.:...
---
> 000cf50: e245 c806 e35c 08fa 21a0 4000 3a00 0003  .E...\..!.@.:...
3324c3324
< 000cfb0: e3a0 1502 e1a0 2008 eb00 688e e350 0000  ...... ...h..P..
---
> 000cfb0: e3a0 1401 e1a0 2008 eb00 688e e350 0000  ...... ...h..P..
3332,3333c3332,3333
< 000d030: e3a0 187a e1a0 2008 eb00 686e e350 0000  ...z.. ...hn.P..
< 000d040: 1a00 0013 e245 c806 e35c 087a 23a0 4000  .....E...\.z#.@.
---
> 000d030: e3a0 18fa e1a0 2008 eb00 686e e350 0000  ...... ...hn.P..
> 000d040: 1a00 0013 e245 c806 e35c 08fa 23a0 4000  .....E...\..#.@.
3343,3348c3343,3348
< 000d0e0: eb00 4d3f e51b c044 e3e0 32fa e243 353e  ..M?...D..2..C5>
< 000d0f0: e1d3 30b0 e3cc c8ff e3cc ccff e18c c403  ..0.............
< 000d100: e50b c044 e3e0 32da e51b c040 e243 353e  ...D..2....@.C5>
< 000d110: e1d3 30b0 e3cc c8ff e3cc ccff e18c c403  ..0.............
< 000d120: e50b c040 e3e0 32ba e51b c038 e243 353e  ...@..2....8.C5>
< 000d130: e1d3 30b0 e3cc c8ff e3cc ccff e18c c403  ..0.............
---
> 000d0e0: eb00 4d3f e51b c044 e3e0 34af e3e0 34af  ..M?...D..4...4.
> 000d0f0: e153 20bf e3cc c8ff e3cc ccff e18c c402  .S .............
> 000d100: e50b c044 e3e0 34af e51b c040 e153 20bd  ...D..4....@.S .
> 000d110: e153 20bd e3cc c8ff e3cc ccff e18c c402  .S .............
> 000d120: e50b c040 e3e0 34af e51b c038 e153 20bb  ...@..4....8.S .
> 000d130: e153 20bb e3cc c8ff e3cc ccff e18c c402  .S .............
3421c3421
< 000d5c0: e244 4816 e354 087a e59f 4098 e1a0 0800  .DH..T.z..@.....
---
> 000d5c0: e244 4816 e354 08fa e59f 4098 e1a0 0800  .DH..T....@.....
3477,3478c3477,3478
< 000d940: 5016 0010 e1a0 c00d e3e0 027a e92d d830  P..........z.-.0
< 000d950: e59f 1140 e24c b004 e240 053e e3a0 2006  ...@.L...@.>.. .
---
> 000d940: 5016 0010 e1a0 c00d e3e0 04af e92d d830  P............-.0
> 000d950: e59f 1140 e24c b004 e240 0007 e3a0 2006  ...@.L...@.... .

Now, take your original RedBoot binary image file, call it RedBoot.orig and run these commands:

 $ xxd RedBoot.orig >RedBoot.orig.hex
 $ patch -p0 -o RedBoot.patched.hex RedBoot.orig.hex RedBoot.16M.patch
 $ xxd -r RedBoot.patched.hex RedBoot.patched

Then I presume you'll need to specify this special RedBoot.patched file using the extra parameters "-b RedBoot.patched". I did all the above with cygwin just to make sure it would work. Plus, my older work laptop (WinXP) has a parallel-port and my home laptop does not.

Then, with cygwin, I programmed the blank part with UrJTAG from the RecoverFromABadFlashUsingJTAG page.

end of parts added by Rob Lockhart

Use the -F switch on slugimage to create a 16MB image:

 bash-3.2$ ./slugimage -F -o fatslug.bin -p -r Flashdisk:Flashdisk -L apex-slugos-nslu2-16mb-arm-1.5.8.bin
 Read 0x00040000 bytes from "RedBoot" into <RedBoot> (2 blocks / 2 blocks)
 Read 0x00020000 bytes from "SysConf" into <SysConf> (1 blocks / 1 blocks)
 Read 0x0000B91C bytes from "apex-slugos-nslu2-16mb-arm-1.5.8.bin" into <Loader> (1 blocks / 1 blocks)
 Read 0x000FF214 bytes from "vmlinuz" into <Kernel> (8 blocks / 8 blocks)
 Read 0x00660000 bytes from "Flashdisk" into <Flashdisk> (51 blocks / 51 blocks)
 Read 0x00002EBC bytes from "NPE-B" into <Microcode> (0x02ECC bytes / 0x03000 bytes)
 Read 0x00000010 bytes from "Trailer" into <Trailer> (0x00010 bytes / 0x00010 bytes)
 Wrote  2 blocks (0x00000000 to 0x00040000) from <RedBoot> into "fatslug.bin"
 Wrote  1 blocks (0x00040000 to 0x00060000) from <SysConf> into "fatslug.bin"
 Wrote  1 blocks (0x00060000 to 0x00080000) from <Loader> into "fatslug.bin"
 Wrote  8 blocks (0x00080000 to 0x00180000) from <Kernel> into "fatslug.bin"
 Wrote 115 blocks (0x00180000 to 0x00FE0000) from <Flashdisk> into "fatslug.bin"
 Wrote  1 blocks (0x00FE0000 to 0x01000000) from <FIS directory> into "fatslug.bin"
 Wrote 0x03000 bytes (0x00FFC000 to 0x00FFF000) from <Microcode> into "fatslug.bin"
 Wrote 0x00010 bytes (0x00FFFFF0 to 0x01000000) from <Trailer> into "fatslug.bin"

Note that we also use a special version of Apex to support the 16MB flash on the nslu2. You will also need Apex to do the extra ram detection.

Then load that 16MB image into flash:

 RedBoot> ip_address -h 192.168.1.254 -l 192.168.1.6
 RedBoot> load -r -v -b 0x00080000 fatslug.bin
 RedBoot> fis write -f 0x50060000 -b 0x000e0000 -l 0xfa0000

If you want to install Debian on an ObeseSlug with a large disk, you will need to restrict the memory size to 64MiB during the installation. You can do this with the command:

 memscan -u +64m

in Apex. For some reason, enabling more than 64MiB during the installation phase causes the formatting of the largest ext3 partition to hang the machine (possibly due to the outstanding out of memory interfering with DMA problem). It could also be that the installer sees more than 64MiB of memory, and doesn't run the smaller, leaner installer. It is recommended to install Debian with 64MiB, and then switch over to higher amounts after the install has completed.

view · edit · print · history · Last edited by Rob Lockhart.
Based on work by Rob Lockhart, fcarolo, and rwhitby.
Originally by rwhitby.
Page last modified on June 10, 2008, at 02:55 AM