[BACK]Return to README CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / arch / evbarm / nslu2

Annotation of src/sys/arch/evbarm/nslu2/README, Revision 1.5.10.1

1.5.10.1! ad          1: $NetBSD: README,v 1.6 2007/01/17 16:00:20 imp Exp $
1.1       scw         2:
                      3: NetBSD for the Linksys NSLU2 (a.k.a. "Slug")
                      4: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                      5:
                      6: The NSLU2 (Network Storage Link for USB 2.0 Disk Drives) is a small, cheap
                      7: NAS device consisting of an Intel IXP420 (Xscale) CPU, a 10/100mbit Ethernet
                      8: port, and two USB 2.0 ports. It has 32MB of SDRAM and 8MB of Flash memory,
                      9: and runs RedBoot/Linux out of the box.
                     10:
                     11: It is eminently hackable.
                     12:
                     13: The guys over at http://www.nslu2-linux.org/ have done a good job of
                     14: documenting just about every aspect of the hardware and original firmware.
                     15: They also provide a custom "Unslung" Linux distribution to replace the
                     16: original hobbled kernel/userland.
                     17:
                     18: Because of the amount of documentation available, and the fact that Slugs
                     19: are available so cheaply (I paid just over UKP 50 for mine, brand new) I
                     20: decided to buy one and port NetBSD to it.
                     21:
                     22: This is the result of that effort.
                     23:
                     24: Note: The Slug's IXP420 CPU runs in big-endian mode, so when building a
                     25: cross toolchain you must pass "-m evbarm -a armeb" to build.sh.
                     26:
                     27:
                     28:
                     29: Current status
                     30: ==============
                     31:
                     32: The following bits of Slug hardware are not (yet?) supported:
                     33:
                     34:  - Flash ROM
                     35:    You can write gzboot kernels (when support is added) to Flash using
                     36:    RedBoot, so all is not lost.
                     37:
                     38:  - Buzzer
                     39:    In the absence of a decent API to expose the onboard buzzer to userland,
                     40:    this is not yet supported. I envisage using timer1 to generate an
1.4       lukem      41:    interrupt at the required rate (1-2 kHz). The handler will toggle the
1.1       scw        42:    buzzer GPIO pin. Obviously timer1 will be configured only when necessary
1.4       lukem      43:    as a 1-2 kHz interrupt rate will sap a fair bit of CPU horsepower.
1.1       scw        44:
                     45: Everything else is fully supported, including the power/reset buttons and
                     46: disk activity/status LEDs.
                     47:
                     48: Non-hardware items on the TODO list include:
                     49:
                     50:  - gzboot support.
1.3       scw        51:    The Slug's 8MB of Flash is split into 5 segments:
                     52:
                     53:     1 0x50000000-0x5003ffff: RedBoot (with some additional bits at the end).
                     54:     2 0x50040000-0x5005ffff: Sysconf (used by the Linksys firmware).
                     55:     3 0x50060000-0x5015ffff: Self-extracting compressed kernel image.
                     56:     4 0x50160000-0x507dffff: Compressed ramdisk image.
                     57:     5 0x507e0000-0x507fffff: SerComm Flash trailer.
                     58:
                     59:    Segments 1, 2, and 5 should be considered immutable. Segments 3 and 4
                     60:    have a 16-byte header, the first 4 bytes of which describe the length
                     61:    of the image contained in that segment (not including the header).
                     62:
                     63:    On power-up, RedBoot copies the image in segment 3 into SDRAM at 0x01d00000,
                     64:    and the image in segment 4 into SDRAM at 0x01000000. RedBoot then jumps to
                     65:    0x01d00000. This is just a regular ARM Linux compressed kernel bootloader.
                     66:
                     67:    So, we need to create a version of gzboot linked not at Flash address
                     68:    0x50060000, but at 0x01d00000 instead. The only downside is that it looks
                     69:    like the combined size of gzboot plus compressed kernel cannot exceed 1MB.
                     70:
                     71:    To support an md(4) root filesystem, we will need to modify gzboot to
                     72:    decompress the ramdisk image from segment 4 and copy it to the correct
                     73:    place in the decompressed kernel image.
1.1       scw        74:
                     75:  - Move the kernel link address closer to the start of SDRAM. We waste a
                     76:    little under 2MB with the current setup.
                     77:
                     78:
                     79:
                     80: Getting NetBSD onto the NSLU2
                     81: =============================
                     82:
                     83: Thanks to the efforts of the guys over at www.nslu2-linux.org, hacking the
                     84: Slug is a pretty easy proposition, but some soldering skills are essential.
                     85: For a first-time install of NetBSD (at least until someone comes up with a
                     86: nice easy binary install image) you will almost certainly require access to
                     87: the serial console. This means firing up your trusty soldering iron and
                     88: hooking up a MAX3232 chip to your Slug. While your soldering iron is hot,
                     89: you should seriously consider de-restricting your Slug's CPU core clock
                     90: speed (133MHz stock, 266MHz de-restricted) by removing a single surface-
                     91: mount resistor. Full instructions for both the these mods are on the above
                     92: website.
                     93:
                     94: Once you have console access you can interrupt RedBoot's auto-boot process
                     95: using CTRL-C. You are now in a position to download a NetBSD kernel into
                     96: SDRAM.
                     97:
                     98: You will have to configure a TFTP server on a machine hooked up to the same
                     99: Ethernet segment as the Slug. This machine's Ethernet interface must also
                    100: be configured to have an address in the 192.168.0.0/24 subnet since the
                    101: Slug's Ethernet *always* defaults to 192.168.0.1 when running RedBoot.
                    102: There seems to be no way to alter this, so the best course of action will
                    103: probably be to set up an alias on the server's interface. 192.168.0.2 is
                    104: a good choice.
                    105:
                    106: Assuming you've done all that and have dropped a suitable kernel image
                    107: into the TFTP directory, the following commands will load and run the
                    108: kernel.
                    109:
                    110: redboot> ip_address -h 192.168.0.2
                    111: redboot> load -r -b 0x200000 netbsd.bin
                    112: redboot> go
                    113:
1.5.10.1! ad        114: At this point you should mount a root filesystem from a USB disk device.
        !           115: The ethernet is now supported, so you may also be able to use a NFS root.
        !           116: USB Ethernet devices can also be used for a NFS root.
1.1       scw       117:
                    118: Note that the kernel will always report the CPU core clock speed as 266MHz
                    119: even if your Slug's CPU clock is running at a stock 133MHz.
                    120:
                    121:
                    122: Burning a NetBSD kernel into Flash
                    123: ==================================
                    124:
                    125: TBD (waiting for gzboot support).
                    126:

CVSweb <webmaster@jp.NetBSD.org>