This short howto explains howto to build a linux 2.6 kernel and the Angstrom distribution, and how to run this setup on the DS-101 specifically, without erasing the built-in flash. This way you can test different kernels and softwares without fearing to brick your device. In case something goes wrong, simply reboot the device and try again.
This is not a HOWTO on how to build Angstrom and Linux (instructions on the topic may be found elsewhere), but it tries to gather required steps in order to use an open distribution instead of the original firmware.
Although the overall process is quite easy, it is not yet ready for end user as it requires some unusual hardware to access the serial console of the device (see Prerequisites).
In short, the step involved are :
You may use another distribution like Unslung or SlugOS, or other. One of the most important thing is to have a working ARM big-endian toolchain, and that is not easy. Fortunately such a toolchain is built as part of the OpenEmbedded build process.
Softwares version used in this howto may not be up to date. You may check for newer versions before to begin. However this actual setup is known to be good for DS-101 rev3.0.
Things described here are somewhat experimental, so be careful.
This howto is possibly incomplete and/or incorrect. Feel free to improve it.
A 3.3V TTL serial cable is required to access the device serial console. See SerialConsole. A free hard disk or a usb stick is needed to store the root filesystem. Before to begin experimentations remove the current hard disk from the DS-101, so that your data are kept in a safe way. Internal flash won't be overwritten, so in case you would like to come back to the original DS101 firmware, just reboot your device with the current hard disk.
Build the Angstrom distribution
From http://www.slug-firmware.net/, download Angstrom soure code (http://ftp.osuosl.org/pub/nslu2/releases/Angstrom-2007.12-source.tar.gz). Building Angstrom is pretty straightforward, for example :
This should be enough. If everything goes well you will obtain (among other nice things) :
Preparing the root fs for the DS-101
The easiest way is probably to put the root fs on a USB storage device, so that it can be plugged directly into one of the DS-101 USB port. It will preserve the IDE connector which is rather flimsy. Assuming your disk is /dev/sda, a possible procedure on your host computer could be :
You may adjust system files like /etc/fstab, or do it later if needed. Plug your disk in the DS-101, the root filesystem is then ready to be used on the device.
Build the kernel
The proposed patch is an all-in-one patch, gathering essential things. Broken out series can be found here : http://www.pierrox.net/ds101/20080122/sources/patches/. It is not the official repository. It merges code found on nslu2-linux and mikpe patches.
Add the cross-compiler to your PATH, and ensure it is working :
Unpack the Linux kernel and apply DS-101 patches :
Important : adjust manually the MAC address of the ethernet port in arch/arm/mach-ixp4xx/ds101-setup.c. This MAC address should be stored somewhere in flash, but as we don't want to access flash it is currently hardcoded...
Finally adjust the proposed configuration and build the kernel. The kernel .config file shipped in the ds101 patch should be considered as a starting point only.
Modules can be installed on the target root filesystem this way :
Connect to the bootloader
Follow the instructions on SerialConsole to establish the serial link, then power-up the DS-101.
Soon after powering-up the DS-101 RedBoot bootloader ask whether to enable ethernet or not. Type "1" for yes. You must be ready and type "1" as soon as possible because you won't get more than 1 second to answer. Some few seconds later the bootloader ask whether to execute the automatic boot script : type ^C to abort it. Once again answer delay is short, so be careful. If all goes well RedBoot will now wait for your commands. You can now interact with the bootloader, and especially load the kernel zImage. Typing "help" will provide some explanation about available commands.
RedBoot offers several methods to download the kernel. Fastest is tftp or http over ethernet but needs a server, slowest is x/ymodem but does not need special setup (only lrzsz package). The tftp or http method is strongly recommended as it really speeds up the transfert. Setting up a tftp or http server is out of scope According to your setup, load the kernel with one of the following command:
The default DS-101 IP address is 192.168.1.75, netmask 255.255.255.0. Your tftp or http server must be on a 192.168.1.0 network. The previous http load command suppose a web server is running on host 192.168.1.8 and that the linux kernel can be found at the /zImage path. Data are fetched and stored into memory at location 0x11600000 in physical RAM.
It is time to cross fingers and have a pray. The "exec" command is designed to boot a linux kernel. In our case a good invocation is :
You may modify the root device "/dev/sda1" according to your setup. The rootdelay option can be removed if /dev/sda1 refers the internal hard disk. In case you mount root on a USB mass storage device, the rootdelay option will instruct the kernel to wait a bit before to mount root, so that USB devices can be detected before.
And after ?
If all goes well, the boot process ends on a login prompt. Log in as root (no password), and start enjoying your new and powerful machine. Some things you will probably want to do :
The rest is up to you.
They are provided as is, for convenience only. You may just start with these files if you are really eager to start. Use at your own risks.