Playing with u-boot

Once you get the console link working, you can witness the very early stage of the ED Mini boot process. It looks like this:

__ __ _ _
| \/ | __ _ _ ____ _____| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| | | | (_| | | \ V / __/ | |
|_| |_|\__,_|_| \_/ \___|_|_|
_ _ ____ _
| | | | | __ ) ___ ___ | |_
| | | |___| _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
\___/ |____/ \___/ \___/ \__| ** LOADER **
** MARVELL BOARD: DB-88F5182-EDmini-V2 LE

U-Boot 1.1.1 (Aug 16 2006 - 10:46:18) Marvell version: 1.7.3 - LaCie version: 1.3.4

DRAM CS[0] base 0x00000000 size 64MB
DRAM Total size 64MB
Flash: flashStructGet manu 0xff id 0xff
[0kB@fff80000] ## Unknown FLASH at fff80000: Size = 0x00000000 = 0 MB
Flash: 0 kB
Addresses 20M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (20M - 16M): Done
*** Warning - bad CRC, using default environment


Soc: MV88F5182 Rev 2
CPU: ARM926 (Rev 0) running @ 400Mhz
SysClock = 133Mhz , TClock = 166Mhz


USB 0: host mode
USB 1: device mode
PCI 0: PCI Express Root Complex Interface
PCI 1: Conventional PCI, speed = 33000000
Net: egiga0 [PRIME]
Power Button Released
Hit any key to stop autoboot: 3

Is that big enough to notice? The ED Mini uses u-boot as its bootloader. You can find more about u-boot there. U-boot is Open Source, and actually in the ED Mini tarball, LaCie provides a heavily modified u-boot version.

The good news is that we can stop the boot process and enter u-boot commands at the console, which allows us to change the Linux booting process: we could for instance load a Linux kernel from a TFTP server, and boot on a root filesystem over NFS. We simply need to set some environment variables at the u-boot prompt and enter the right boot command.

The bad news is that, as the prompt shows, this u-boot has trouble recognizing the board's FLASH part. This basically means we can't make permanent changes to environment variables, which should reside in FLASH. And this means that each time we want to boot over TFTP/NFS, we'd have to stop u-boot at the prompt, re-enter the environment variables again, and re-enter the right boot command.

But we've got the source, right? So we should be able to fix that FLASH issue.