This description assumes that you compile APEX on a PC; you'll need a standard cross-compilation environment (gcc, binutils etc). It is also possible to compile it natively on the NSLU2; that may be simpler but is not described here.
$ wget ftp://ftp.buici.com/pub/apex/apex-1.4.7.tar.gz $ tar xzf apex-1.4.7.tar.gz $ cd apex-1.4.7
APEX uses something like the Linux kernel configuration system. This copies the default NSLU2 config to ./.config.
$ make debian-nslu2-arm_config
Now make the necessary changes:
$ make menuconfig
Build. Not sure if ARCH=arm is needed.
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnu-
Now swap the endianness of the binary file. Endianness is complex in the NSLU2 boot process!
$ devio '<<apex.bin' >apex_swapped.bin 'xp $$,4'
We need a prepend a 16-byte header indicating the length of the binary:
$ ls -l apex_swapped.bin -rw-r--r-- 1 phil staff 41536 2006-11-25 22:50 apex_swapped.bin
41536 dec = A240 hex
$ printf '\x00\x00\xA2\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' > a240hdr.bin $ cat a240hdr.bin apex_swapped.bin > new_mtd2.bin
For later Apex, it's best to pad with 0xFF at the end so that the apex environment can be changed. An alternative to the steps from devio to here is to use the Python script http://tech.groups.yahoo.com/group/nslu2-linux/files/Custom%20Executables/pad.py which will swap the endianness, prepend the header and pad it with 0xFF. This script can be run on the PC or on the Slug:
$ pad.py apex.bin new_mtd2.bin
Copy this to the NSLU2:
$ scp new_mtd2.bin slug:/tmp
On the NSLU2 below here
APEX is in flash block 2 - look in /proc/mtd
$ od -x /tmp/new_mtd2.bin $ od -x /dev/mtdblock2
Do the first and last bits look vaguely similar?
Now program it into the flash
# cat /tmp/new_mtd2.bin > /dev/mtdblock2
# cmp /dev/mtdblock2 /tmp/new_mtd2.bin
Should EOF on /tmp/new_mtd2.bin, since it doesn't occupy the whole region
Now reboot, and see if it works.
can confirm this works... the new apex loader can also be flashed from Redboot if needed.
i am offering a pre-built padded but no env set apex.flash ( 131072 bytes ) ready for a Debian ( Little Endian ) on my website from my slug (http://gt-four.bounceme.net/files/apex.flash(approve sites)).
this as mentioned above can be flashed from the NSLU2 itself or from Redboot. its version 1.5.6, ready for anyone with a FatSlug.
To confirm that the additional RAM is working properly please run:
fatslug:~# memtest all
This will not work with a 128MB Slug since there is still Bug 7760 "Page Allocation Failure on ixp4xx (nslu2) with 128MB RAM"
Please check and report otherwise! (btw with 64MB enabled memtest works fine.)