
Hi,
I need to use U-Boot (or barebox) as a bootloader in a Raspberry Pi based system to extend booting flexibility. The problem however is that certain kernel boot arguments are prepared by the previous stage bootloader (start.elf) basing on the properties of the individual board. For example in one of the boards I use, the kernel command line when a standard kernel is booted, looks as follows (MAC address and serial number are partially masked for privacy):
dma.dmachans=0x7f35 bcm2708_fb.fbwidth=720 bcm2708_fb.fbheight=480 bcm2708.boardrev=0xd bcm2708.serial=0x6f15XXXX smsc95xx.macaddr=B8:27:EB:XX:XX:XX bcm2708_fb.fbswap=1 sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000 console=ttyAMA0 root=/dev/mmcblk0p2 rootwait
Only the "console=ttyAMA0 root=/dev/mmcblk0p2 rootwait" is provided by the user (in the cmdline.txt file). The rest is generated by the start.elf.
Of course when I boot the u-boot.bin instead of zImage, the same parameters are passed to it, but the U-Boot is not able to read them and to pass them to the finally booted kernel. As U-Boot shares a lot of code with the Linux kernel it should be possible to add necessary functions. It could be useful in all applications where U-Boot is used as an additional stage in the boot chain e.g., to add new booting functionalities (booting from the network, booting from the flash disk etc.).
I have found a nice description, how the paremeters are passed in ARM architecture: http://www.simtec.co.uk/products/SWLINUX/files/booting%5Farticle.html but of course the solution should be probably portable (or implemented for each platform independently with unified API).
-- Regards, Wojtek
Wojciech M. Zabołotny My GPG/PGP keys: standard: 8192R/FE58A848 (0720 9430 85DB 7CCD F4C5 5F1E 5107 91FB FE58 A848) confidential: 16384R/C76D2FB0 (C4E7 9597 CF22 7B5D 28BF 4656 FED7 A63F C76D 2FB0)