What is uboot?
Uboot is a universal bootloader program that has been developed by DENX software and several external authors for the loading and starting of embedded Linux systems. The idea is to have a program that loads and starts the linux kernel on a variety of architectures, including PPC, MIPS, ARM and SH4.
What can it do?
Uboot essentially can load a (linux) kernel from one of several locations, and start it with corresponding arguments. In addition, uboot has a basic (but very useful) capability to erase and flash the non-volatile memory of its target systems, and a simple shell command interpreter (the latter goes beyond this wiki).
What does this mean for the Cuberevo?
The makers of the Cuberevo and Cuberevo mini (just as the IPBox 9000hd and 900hd series) have adopted Uboot as the bootloader for their machines. This means were bound (for now) to this bootloader and its command for starting our boxes.
So, how do I boot with Uboot?
Normally, one doesn´t have to do anything; just as the BIOS in a PC computer, uboot should know where to find the linux kernel and start it with the default arguments. As long as you don´t touch the system, it should keep on working!
This means I can´t change anything?
No, off course not, firmwares may need occasional updates.
Now, it´s time to get into a bit more detail. If you got up to here, it probably means you want to go ahead and do a firmware update. It´s important to know the basics of the Cuberevo flash memory and how Uboot works with it:
Cuberevo memory (this is for the SH4 based systems, I don´t know the PPC ones):
The flash memory in the Cuberevo is divided in several blocks, each with its particlar base address. If you give a “mount” command to the linux shell, you can see some of these blocks as mtd devices. The blocks are:
1) Uboot program
2) Uboot environment
3) Linux kernel
4) Root filesystem (read only)
5) Variable fileystem (read/write, normally mounted on /var)
6) Database
So, uboot takes up a memory block, just as the bios takes up flash memory in a PC. The difference is that the filesystem (on harddisk in a PC) is also located on flash memory, in a separated block.
Uboot is the first thing that is started when the Cuberevo is powered up. Depending on the input (or lack of input) it receives, uboot can boot your device or program it. Let´s have a look how this works on the Cuberevo:
1) No input:
Uboot will load its last known or the default boot configuration, and start the box.
2) Holding down the front ON/OFF button:
Uboot will wait for a USB connection to the PC (flashtools or PCEditor), and follow the instructions that arrive through the USB cable.
3) Holding down the front ON/OFF button and UP key together:
Uboot will try to load the file “usb_update.img” from a USB flas drive and flash this accordig to the adresses given inside the image file. The USB stick must (ideally) contain a single FAT16 partition (this means smaller than or equal to 2Gb) with the correctly named file. Note that you can also reflash uboot itself in this way, as long as the file contains the right block adresses for the uboot block (let DGS take care of that).
If Uboot can´t find the file, it will give an error “ER10”.
Whenever Uboot is erasing or flashing, it will give a message on the front display, together with a percentage progress indicator. After Uboot is done, it will say so: Give the program time and wait for the “DONE” message!
Since Uboot is located in a separate block, a bad flash (due to a power faillure) of the linux kernel or root will prevent booting, but can easily be repaired by flashing again. The only way to really get stuck is to do a bad flash of the uboot block itself.
Since the Cuberevo first came on the market, Uboot has evolved significantly. Whereas the first version of Uboot will only boot from flash and do a firmware update through a USB cable, later versions are able to flash from USB stick and boot a linux kernel from harddisk or USB stick (for USB based E2 images). There´s not too many different versions of uboot on the Cuberevo, some are:
1.2.2) This essentially means any version before 1.3.1. Boots from flash, does USB cable update. I Don´t know if it does USB stick method for updates.
1.3.1) This means any version from 1.3.1 onwards. Boots from flash, USB stick or HD. Can read the Uboot environment (this is plain text, read the multiboot config file that is flashed). Boot preference can be selected by remote control. Can flash from USB stick, cable, and harddisk (mounted media folder).
1.3.3) The only difference is that the flash sequence is described in more detail in the front panel (“loading” is included). Does not differ functionally from version 1.3.1.
Some more info:
http://www.denx.de/wiki/U-Boot
http://www.stlinux.com/u-boot