22 June 2010

GuruPlug - Part 1

Well, after a successful trial of the SheevaPlug, which is now in use as a firewall (sharing a 3G connection via the onboard ethernet), I purchased a GuruPlug Server Plus back in April. I've just now had time to do much with it, but I'm not terribly impressed overall. Granted, the SheevaPlug was a "developer preview" and thus is expected to be more easily "tweakable" and such, while the GuruPlug seems to be aimed more at end users who just plug it in and use it, but I hadn't expected the GuruPlug to be quite as crippled as it is. That's probably not a fair use of the term "crippled" since it's not intentionally limited by the manufacturer and/or vendor, but it's the only term that comes to mind - basically, it's not easily (if at all) possible to load the kernel from usb or mmc devices, and the uboot (bootloader) shipped on the plug is unable to read ext* partitions at all. I tested some other uboot builds (including one by Philippe Kehl of Debian) and even compiled one myself, but it still wouldn't replicate what I was able to accomplish with the SheevaPlug (load the kernel and initrd from /boot partition on mmc and use / on mmc). Perhaps there was a hefty dose of PEBKAC involved, but eventually, I found it easier and less time-consuming to just put the kernel and initrd on the embedded NAND.

For those who stumble across this blog post, here's the process (but note that this WILL wipe the root filesystem off of /dev/mtd2, so you will no longer be able to boot the OS shipped on the plug). Make the kernel and initrd images and such available via tftp and configure the uboot environment as detailed in INSTALL_KIRKWOOD.TXT and then do something like this:

>> tftp 0x6400000 uImage-kirkwood
>> nand erase 0x100000 0x400000
>> nand write.e 0x6400000 0x100000 0x400000
>> tftp 0x6400000 uinitrd-kirkwood
>> nand erase 0x500000 0x1fb00000
>> nand write.e 0x6400000 0x500000 0x800000

Now, verify that it did what you think it did: :-)

>> nand start
>> nand read.e 0x00800000 0x100000 0x400000
>> nand read.e 0x01100000 0x500000 0x800000
>> iminfo 0x00800000
>> iminfo 0x01100000

Both of those 'iminfo' lines should end with "Verifying Checksum ... OK"

Now you'll want a uboot environment something like this:

>> printenv
bootargs_root=root=/dev/sdb2 waitforroot=10 rootfs=ext4
bootcmd_slack=bootm 0x00800000 0x01100000
bootcmd_usb=usb start;
bootcmd=setenv bootargs $(bootargs_console) $(bootargs_root); \
run bootcmd_usb; run bootcmd_nand; run bootcmd_slack;
bootcmd_nand=nand start; nand read.e 0x00800000 0x100000 0x400000; \
nand read.e 0x01100000 0x500000 0x800000

Environment size: 629/131068 bytes

Labels: , ,


At 29/7/10 07:56 , Blogger Scuzz said...

Hello I stumbled on your blog while searching for some information on the GuruPlug.
I am currently using a U-Boot that was obtained at this URL http://oinkzwurgl.org/dl.php?file=guruplug-u-boot-flipflip-20100512.tar.gz .
This u-boot.kwb allows me to use ext2load and boot my two images out of the /boot directory on my usb stick.
I believe you can also boot off a mmc device with this U-Boot.

At 8/8/10 17:08 , Blogger Robby Workman said...

That's interesting, because I swear I tried that uboot version. I might try it again now, but I'm a bit hesitant since the hackbox formerly known as a GuruPlug is now in service as my firewall/router/dhcp/dns/ntp server... Maybe this is just an excuse to buy another GuruPlug ;-)


Post a Comment

Subscribe to Post Comments [Atom]

<< Home