Home | History | Annotate | Line # | Download | only in nslu2
README revision 1.2
      1 $NetBSD: README,v 1.2 2006/03/04 11:28:36 scw Exp $
      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  - NPE Ethernet
     35    Someone will have to port Intel's IXP425 access library before this can
     36    be made to work. If that someone is you, the source code is available
     37    online here:
     38 
     39    http://www.intel.com/design/network/products/npfamily/ixp425.htm
     40 
     41    Look under "Tools & Software", then select "Register/Login" to download
     42    "Intel(R) IXP400 Software". Documentation is available in the
     43    "Technical Documents" section.
     44 
     45    The easiest option will be to download the non-crypto version of the
     46    Access Library. The crypto-enabled version requires a lot more form
     47    filling. The Slug's IXP420 has no crypto capabilities anyway.
     48 
     49  - Flash ROM
     50    You can write gzboot kernels (when support is added) to Flash using
     51    RedBoot, so all is not lost.
     52 
     53  - Buzzer
     54    In the absence of a decent API to expose the onboard buzzer to userland,
     55    this is not yet supported. I envisage using timer1 to generate an
     56    interrupt at the required rate (1-2KHz). The handler will toggle the
     57    buzzer GPIO pin. Obviously timer1 will be configured only when necessary
     58    as a 1-2KHz interrupt rate will sap a fair bit of CPU horsepower.
     59 
     60 Everything else is fully supported, including the power/reset buttons and
     61 disk activity/status LEDs.
     62 
     63 Non-hardware items on the TODO list include:
     64 
     65  - gzboot support.
     66    This needs to emulate a "vmlinuz" compressed Linux kernel image so that
     67    RedBoot will invoke the kernel from Flash at power-up.
     68 
     69  - Move the kernel link address closer to the start of SDRAM. We waste a
     70    little under 2MB with the current setup.
     71 
     72 
     73 
     74 Getting NetBSD onto the NSLU2
     75 =============================
     76 
     77 Thanks to the efforts of the guys over at www.nslu2-linux.org, hacking the
     78 Slug is a pretty easy proposition, but some soldering skills are essential.
     79 For a first-time install of NetBSD (at least until someone comes up with a
     80 nice easy binary install image) you will almost certainly require access to
     81 the serial console. This means firing up your trusty soldering iron and
     82 hooking up a MAX3232 chip to your Slug. While your soldering iron is hot,
     83 you should seriously consider de-restricting your Slug's CPU core clock
     84 speed (133MHz stock, 266MHz de-restricted) by removing a single surface-
     85 mount resistor. Full instructions for both the these mods are on the above
     86 website.
     87 
     88 Once you have console access you can interrupt RedBoot's auto-boot process
     89 using CTRL-C. You are now in a position to download a NetBSD kernel into
     90 SDRAM.
     91 
     92 You will have to configure a TFTP server on a machine hooked up to the same
     93 Ethernet segment as the Slug. This machine's Ethernet interface must also
     94 be configured to have an address in the 192.168.0.0/24 subnet since the
     95 Slug's Ethernet *always* defaults to 192.168.0.1 when running RedBoot.
     96 There seems to be no way to alter this, so the best course of action will
     97 probably be to set up an alias on the server's interface. 192.168.0.2 is
     98 a good choice.
     99 
    100 Assuming you've done all that and have dropped a suitable kernel image
    101 into the TFTP directory, the following commands will load and run the
    102 kernel.
    103 
    104 redboot> ip_address -h 192.168.0.2
    105 redboot> load -r -b 0x200000 netbsd.bin
    106 redboot> go
    107 
    108 At this point your only real option is to mount the root filesystem from
    109 a USB disk device as the onboard Ethernet is not (yet?) supported. However,
    110 there's nothing to stop you using a USB-Ethernet interface...
    111 
    112 Note that the kernel will always report the CPU core clock speed as 266MHz
    113 even if your Slug's CPU clock is running at a stock 133MHz.
    114 
    115 
    116 
    117 Burning a NetBSD kernel into Flash
    118 ==================================
    119 
    120 TBD (waiting for gzboot support).
    121 
    122