After getting fooled for about 6 hours by my cisco home router I finally managed to install u-boot bootloader on my linkstation and also boot a 2.6.22 kernel. What you basically need are the binaries for u-boot you can download here, and a linux or unix PC having netcat installed. Since I know about the pain now I do not want to say that it is a walk in the park – you will find your own pitfalls, but I try to describe how I did it.First some preperation work i extracted from the README and the Howto:
- create a directory /mnt/hda/share (I’m still not 100% sure if we require exactly this directory)
- create a /boot directory
- unpack u-boot-1.1.4-list-v2-1.0.1.tar.gz into /mnt/hda/share (tar -xvzf u-boot-1.1.4-list-v2-1.0.1.tar.gz)
- move both kernels the 2.4 and the 2.6 kernel to /boot (mv vmlinu* /boot)
- move u-boot-v2-mips-flash.bin to /boot as well
Now I try to explain what will happen next.In the /mnt/hda/share directory we have a script called u-boot-load.sh which basically loads a kernel module called loader.o and afterwards executes an init 6.
What now happens is that the system is booted into a Memory only copy of u-boot. Now we can work within this RAM version using the netcat (nc) utility since u-boot supports a network console.Within u-boot one can set several parameters and also access the flash memory as well as the filesystems in order to flash a persistent copy of u-boot to the box.
Once we have finished this, we have a u-boot enabled box and can run non buffalo kernels.Now lets start the real work :-)First we need to setup the network, both the linkstation and the pc should be connected through a direct cable – I spend as stated above a couple of hours searching at the wrong end.
- configure your Linkstation with the static IP address 192.168.11.150 netmask 255.255.255.0
- configure your PC with the static IP address 192.168.11.149 netmask 255.255.255.0
Next we need to boot our linkstation in a way that prevents it from rebooting if watchdog is not triggered (disable the watchdog). This can achieved by pressing the reset button at the back while the box is of and then power it on while still keeping reset pressed.
You see that you did it right if all LED’s are blinking – the guys at nas-central call that “christmas tree mode”. Your linkstation will now boot as ususal but without the watchdog. Now try to acces the linkstation via telnet or ssh using the ip 192.168.11.150.
Next go to the directory you created above /mnt/hda/share.
Now open a second terminal on your PC and start netcat using this command:
nc -u -p 6666 -v -v 192.168.11.150 6666
If it returns you to a shell don’t worry then you need to re-issue the command at a later stage from the command history. Next on the linkstation issue the command ./u-boot-load.sh
After a few second you will be disconnected from the box now quickly reissue the command in the other terminal to connect with netcat. You should see the u-boot loader message after a few seconds. You need to press s and Enter to interrupt the boot process.
Now you should see a prompt =>
Now issue flinfo you should see something like this:
next we will start the real flashing:
Once this is done, you have u-boot ready to be used 🙂
Please note that I took both picture from a posting in the nas-central forum – I closed my terminal and lost my outpt – my output looked the same – also without the help of the post I think I would not have been able to finish this successful.
Now type boot and you will boot into your linux using the 2.4 kernel named vmlinuz in your /boot directory. If you now shutdown the box and power it on again you will see the u-boot netcat output again. If you would like to change the kernel you can interrupt the boot process again by pressing s followed by enter.
Now you can see what is configured using printenv. You can set parameter using:
setenv <name> <value>
Remember to always test this settings! if you would like to change the kernel issue a command like this:
setenv hdfile boot/vmlinux-2.6.22.gz
boot and see if that works! You can save parameters by issuing:
Please note that you do this all at your own risk. Many tanks to the guys at nas-central and linuxnotincluded.