NSLU2-Linux
view · edit · print · history

HowTo.BuildYourOwnRedBoot History

Hide minor edits - Show changes to markup

March 06, 2010, at 11:25 PM by Steve Bennett --
Changed lines 29-30 from:
  • Note* ftp.linksys.com is no longer available. See here: http://www.linksysbycisco.com/gpl
to:

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

March 06, 2010, at 11:24 PM by Steve Bennett -- Update nslu2 source location
Added lines 29-30:
  • Note* ftp.linksys.com is no longer available. See here: http://www.linksysbycisco.com/gpl
October 23, 2007, at 11:28 PM by fcarolo -- formatting
Changed lines 72-73 from:

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

to:

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

Changed lines 82-83 from:

Use [[http://www.wienand.org/junkcode/python/padredboot.py | padredboot.py] to pad out the redboot.bin to the required 256K and write in a MAC address. Usage is

to:

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

October 23, 2007, at 11:26 PM by fcarolo -- updated link
Changed lines 27-31 from:
  • http://www1.linksys.com/support/opensourcecode/nslu2/2.3R29/nslu2_2.3R29.zip

[ link for the source on 10/22/2007: http://www.linksys.com/servlet/Satellite?c=L_Content_C1&childpagename=US%2FLayout&cid=1115416836002&pagename=Linksys%2FCommon%2FVisitorWrapper ]

to:
October 23, 2007, at 03:19 AM by Don Hayford -- Updated link to linksys source
Changed lines 28-31 from:
to:

[ link for the source on 10/22/2007: http://www.linksys.com/servlet/Satellite?c=L_Content_C1&childpagename=US%2FLayout&cid=1115416836002&pagename=Linksys%2FCommon%2FVisitorWrapper ]

July 20, 2006, at 12:06 AM by IanWienand --
Changed lines 82-83 from:

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

to:

Use [[http://www.wienand.org/junkcode/python/padredboot.py | padredboot.py] to pad out the redboot.bin to the required 256K and write in a MAC address. Usage is

July 20, 2006, at 12:04 AM by IanWienand --
Changed lines 87-88 from:

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

to:

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

July 20, 2006, at 12:04 AM by IanWienand --
Changed lines 7-8 from:
to:
Changed lines 27-28 from:
 * http://www1.linksys.com/support/opensourcecode/nslu2/2.3R29/nslu2_2.3R29.zip
to:
  • http://www1.linksys.com/support/opensourcecode/nslu2/2.3R29/nslu2_2.3R29.zip
July 20, 2006, at 12:03 AM by IanWienand --
Added lines 1-124:

Build Your Own RedBoot

Download and install toolchain

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

 * ftp://ftp.ges.redhat.com/private/gnupro-xscale-030422/i686-pc-linux-gnulibc2.2-x-xscale-elf.tar.Z

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

PATH=/opt/redhat/xscale-030422/H-i686-pc-linux-gnulibc2.2/bin:$PATH
export PATH

Get Linksys sources

Get the linksys source

 * http://www1.linksys.com/support/opensourcecode/nslu2/2.3R29/nslu2_2.3R29.zip

extract & patch

ianw@jj:/tmp$ unzip ~/programs/slug/nslu2_2.3R29.zip
[unzipping]
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]

Build

(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" (SercommRedBootTrailer?). 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 NLU2? 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 192.168.0.100 reboot-padded.bin
Using default protocol (TFTP)
-
Raw file loaded 0x01000000-0x0103ffff, assumed entry at 0x01000000

Write to flash

CAUTION: THIS HAS THE POTENTIAL TO MAKE A BRICK OF YOUR NSLU2

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

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: 192.168.0.100/255.255.255.0, Gateway: 192.168.0.1
Default server: 0.0.0.0, DNS server IP: 0.0.0.0
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 11:25 PM