Once the rootfs is ready, you need a new bootloader that will be able to boot
our vanilla kernel.
You need a JTAG
Board, so you can access the serial console. If you connect the USB cable to
you PC, you can use for example
screen /dev/ttyUSB0 115200
Given that we want to boot a vanilla kernel, we need a vanilla bootloader as
well. Before you mess with the bootloader, it’s a good idea to make a backup of
its config (there is a 3 second timeout during boot - if you press any key
there, you get the Marvell prompt). Here is my config:
Marvell>> printenv
bootcmd=${x_bootcmd_ethernet}; ${x_bootcmd_usb}; ${x_bootcmd_kernel}; setenv bootargs ${x_bootargs} ${x_bootargs_root}; bootm 0x6400000;
bootdelay=3
baudrate=115200
x_bootcmd_ethernet=ping 192.168.2.1
x_bootcmd_usb=usb start
x_bootcmd_kernel=nand read.e 0x6400000 0x100000 0x400000
x_bootargs=console=ttyS0,115200
x_bootargs_root=ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs
ethact=egiga0
bootargs=console=ttyS0,115200 ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs
ipaddr=10.10.10.10
serverip=10.10.10.179
ethaddr=F0:AD:4E:00:CE:C3
stdin=serial
stdout=serial
stderr=serial
The only semi-unique part is the MAC address of the network interface(s).
If you want to update the bootloader, a possible way is to put the new binary
to a pendrive. Given that the default bootloader does not support ext*, we need
a fat filesystem. So format the first small partition we created already (the
device name may be different in your case!):
Till Frugalware 1.6 is released, support for GuruPlug is available in
Frugalware -current only, so download the
binary
package from there, extract the u-boot.kwb file from the guruplug directory,
put it to the new partition. (A few other models are explained
here).
Before you reboot, copy also /boot/uImage
to the fat partition, you may have
problems problems with reading the kernel from the ext4 partition with u-boot.
Once copying the kernel is done, reboot and in the u-boot shell do:
usb start
fatload usb 0:1 0x0800000 u-boot.kwb
nand erase 0x0 0x60000
nand write 0x0800000 0x0 0x60000
reset
You can verify the updated bootloader with the version
command:
Marvell>> version
U-Boot 2011.12 (Jan 03 2012 - 16:55:38)
Marvell-GuruPlug
gcc (Frugalware Linux) 4.6.2
GNU ld (GNU Binutils) 2.22
If Frugalware is mentioned, that’s a good sign. :)