view · edit · print · history

Build Your Own RedBoot

Download and install toolchain

From ftp://ftp.ges.redhat.com/private/gnupro-xscale-030422/

Then to install

sudo apt-get install ncompress
tar xvfz i686-pc-linux-gnulibc2.2-x-xscale-elf.tar.Z

sudo ./Install --tape=i686-pc-linux-gnulibc2.2-x-xscale-elf.tar.Z

This installs a bunch of stuff to /opt/redhat; get it in your path

export PATH

Get Linksys sources

Get the linksys source

Note: ftp.linksys.com is no longer available. See here: http://www.linksysbycisco.com/gpl(approve sites)

extract & patch

ianw@jj:/tmp$ unzip ~/programs/slug/nslu2_2.3R29.zip
ianw@jj:/tmp$ cd NSLU2/
ianw@jj:/tmp/NSLU2$ cd source/
ianw@jj:/tmp/NSLU2/source$ tar xfz ./redboot-intel-xscale.tar.gz
ianw@jj:/tmp/NSLU2/source$ cd ..
ianw@jj:/tmp/NSLU2$ cd Diff/
ianw@jj:/tmp/NSLU2/Diff$ bunzip2 redboot-intel-xscale.diff.bz2
ianw@jj:/tmp/NSLU2/Diff$ cd ..
ianw@jj:/tmp/NSLU2$ cd source/redboot-intel-xscale
ianw@jj:/tmp/NSLU2/source/redboot-intel-xscale$ patch -p1 < ../../Diff/redboot-intel-xscale.diff
[patch lots of files]


(in the redboot-intel-xscale directory)

$ export ECOS_REPOSITORY=`pwd`/packages
$ mkdir build
$ cd build
$ ecosconfig new ixdp425 redboot
$ ecosconfig import ../packages/hal/arm/xscale/ixdp425/current/misc/redboot_ROMRAM.ecm
$ ecosconfig add CYGPKG_DEVS_ETH_ARM_IXDP425_NPE
$ ecosconfig add CYGPKG_DEVS_ETH_INTEL_NPE
$ ecosconfig tree
$ make

the build should whizz by, and install/bin/redboot.bin is almost ready to go

Edit default values

The file ecos.ecc in the build directory can be edited to override default values, such as the boot script and the IP address/port to listen on by default. Run ecosconfig tree after editing to update, and then rebuild

Getting it to boot

In a few words, we should be able to just copy over the new redboot image and overwrite the old one.

Redboot needs to live in the 256K from 0x50000000 -> 0x50040000 (thus, the redboot image must be less than 256K!)

The last 80 bytes (0x5003FFB0 -> 0x5004000) are the "Sercomm trailer" (Sercomm RedBoot trailer). This seems unimportant but for one component; the MAC address, which must live in the six bytes from 0x5003FFB0. For example, in RedBoot

RedBoot> dump -b 0x5003FFB0 -l 6
5003FFB0: 00 14 BF D0 7C C5                                 |....|.          |

If this MAC address isn't available or is wrong, Linux (at least) does not boot and will sit around with a flashing amber light (XXX: why?).

Pad the redboot image and write in the MAC

Use padredboot.py to pad out the redboot.bin to the required 256K and write in a MAC address. Usage is

python ./padreboot.py redboot.bin 00:14:bf:d0:7c:c5 redboot-padded.bin

The base of the NSLU2 has the MAC address; LKG becomes 00:14:bf and then the last 3 bytes as written on the sticker

Copy the new image over TFTP

Firstly, copy the padded redboot-padded.bin over TFTP into memory on the NSLU2

RedBoot> load -r -v -b 0x01000000 -h reboot-padded.bin
Using default protocol (TFTP)
Raw file loaded 0x01000000-0x0103ffff, assumed entry at 0x01000000

Write to flash


If you've never heard of JTAG, then don't do this!

Then, write this into flash (keep fingers crossed it works)

RedBoot> fis write -f 0x50000000 -b 0x01000000 -l 0x40000
* CAUTION * about to program FLASH
            at 0x50000000..0x5003ffff from 0x01000000 - continue (y/n)? y
... Erase from 0x50000000-0x50040000: ..


Reboot! You should have your new RedBoot

RedBoot> set_npe_mac
NPE eth0 mac: de:ad:be:ef:ff:ff
NPE eth1 mac: de:ad:be:ef:ff:00
RedBoot> ip_addr
IP:, Gateway:
Default server:, DNS server IP:
view · edit · print · history · Last edited by Steve Bennett.
Based on work by Steve Bennett, fcarolo, Don Hayford, and IanWienand.
Originally by IanWienand.
Page last modified on March 06, 2010, at 03:25 PM