Because I wanted to try Amahi, I had to prepare the microSD as bootable drive and then boot from it. Finding the right configuration for the environment-variables in U-Boot was not easy. I tried many different ways, ending up with a very easy solution.

At first, I had to get the recent U-Boot since the one on my GuruPlug did not have ext2load (and right now I'm not even sure if it is needed...). I followed this guide which also has the links to the DENX U-Boot versions.

After upgrading the U-Boot, I had the "fresh" environment variables in U-Boot, which looked like this:

Marvell>> printenv
baudrate=115200
bootcmd=setenv ethact egiga0; ${x_bootcmd_ethernet}; setenv ethact egiga1; ${x_bootcmd_ethernet}; ${x_bootcmd_usb}; ${x_bootcmd_kernel}; setenv bootargs ${x_bootargs} ${x_bootargs_root}; bootm 0x6400000;
bootdelay=3
eth1addr=02:50:43:85:38:8a
ethact=egiga0
ethaddr=02:50:43:e8:0a:7f
stderr=serial
stdin=serial
stdout=serial
x_bootargs=console=ttyS0,115200
x_bootargs_root=ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs
x_bootcmd_ethernet=ping 192.168.2.1
x_bootcmd_kernel=nand read.e 0x6400000 0x100000 0x400000
x_bootcmd_usb=usb start
Environment size: 578/131068 bytes

With those environment variables, booting from the internal nand should work.

 

To boot from the microSD-card, I only had to change the following line:

x_bootargs_root=ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs

Since my microSD-card is mounted at /dev/sdb1 and the filesystem is ext3, I changed the line to

x_bootargs_root=root=/dev/sdb1 rootwait rootfstype=ext3

Usint the "setenv"-command, this variable can be set in U-Boot as follows

setenv x_bootargs_root 'root=/dev/sdb1 rootwait rootfstype=ext3'

To check if the changes applied, use "printenv" to see the current environment variables.

 

Now its a good idea just to try booting once (before the environment variables are saved), so that if booting fails, a reset just loads the old environment variables again. To start the booting process, just type

>> boot

on the U-Boot command line

 

If booting works fine, the environment variables can be saved (on the U-Boot command line) with "saveenv". If a reset has been done after changing the environment variables, they have to me modified again!