How to access the boot menu, determine the boot order, relfash U-Boot, ...
The GTA04's new default "U-Boot" boot system (as of Oct. 2012) provides a graphical multi-boot selection and a very flexible way to multi-boot up to 5 systems installed on the device (p1, p2, p3, p4 on the uSD card and NAND flash): http://lists.goldelico.com/pipermail/gta04-owner/2012-October/003235.html
Therefore U-Boot is looking in different places to find the systems installed.
It is looking for a kernel (uImage) and/or a bootargs.scr script (which can be used to further tweak the booting process, e.g. to use custom boot parameters) on the microSD card (fat32 or ext[4,3,2] filesystems) in the following default boot order. This boot order can be modified by using the graphical boot menu (see below).
- Partition 1 (p1)
- Partition 2 (p2)
- Partition 3 (p3)
- Partition 4 (p4)
- NAND flash
If a kernel is found in the root of a partition (e.g. /uImage), it is assumed that the rootfs will be on partition 2 (e.g. root=/dev/mmcblk0p2).
This is used for legacy mode booting (e.g. uImage on fat32 partitioned p1 and rootfs on ext3 partitioned p2).
If a kernel is found in the /boot directory of a partition (e.g. /boot/uImage), it is assumed that the rootfs will be on this very same partition.
If no kernel is found at all (or no SD card installed), it will fall back to the kernel (pre-)installed in the NAND flash.
If there is also no kernel in NAND, the boot loader gives up by intensively flashing the LEDs.
If a bootargs.scr script was found in one of the places, it is beeing executed. Otherwise the (pre-)installed bootargs from NAND flash will be used. These will assume that you want to mount the jffs2 in NAND.
It is possible to have a bootargs.scr script but no kernel installed. In this case bootargs.scr will be executed, before booting the fallback kernel from the NAND flash.
If neither a kernel nor bootargs were found, the U-Boot will fall back to boot the system (pre-)installed in the NAND flash.
Creating a bootargs.scr
The bootargs.scr script can be created by running mkimage on a (modified) version of this bootargs.txt template, e.g.:
mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n 'Boot Args' -d "bootargs.txt" bootargs.scr
mkimage can be installed on Debian by
apt-get install -y uboot-mkimage
Accessing & using the boot menu
You can easily access the graphical boot menu, by booting the device while keeping the AUX button pressed.
If you select one boot option ("SD:1", "SD:2", "SD:3", "SD:4" or "NAND"), the boot menu will remember this selection and use the selected boot order on all consecutive boots, until you select another option.
E.g. if you select "SD:3" U-Boot will first search for a system on partition 3, then p4, then p1, then p2 and finally NAND (-> SD:3 412N).
The first system found during this search will be booted.
If you select the "NAND" option, U-Boot will keep booting into the system installed in the NAND flash, until you select another option in the boot menu.
Reflashing U-Boot (update/recovery)
Flashing U-Boot can be done by booting from a hw-validation microSD card, which was prepared with the makesd script.
If the U-Boot from the hw-validation microSD card is newer than the one installed in the NAND flash, the system is automatically beeing updated (the screen will turn red while flasing).