
On Thu, Sep 25, 2008 at 3:04 AM, Roman Mashak romez777@gmail.com wrote:
Hello
Reading u-boot's README paper and trying to figure out a few aspects:
(1) as I know the bootloader sets up memory area for argument passing, initializes it with data structures and fill up with the values. Is this the structure defined in $(UBOOT)/include/asm-arm/global_data.h, named 'global_data' ?
(2) this question is a consequence of the first. 'struct bd_info' from $(UBOOT)/include/asm-arm/u-boot.h is a structure holding board's specific information, am I right?
How is the address of boot parameters determined ("bd->bi_boot_params"). If speaking about Linux, it is defined in $(LINUX)/arch/arm/mach-xxx/Makefile.boot -- but how is it defined to be what it is?
(3) can't yet figure out how CONFIG_BOOTARGS is pulled in. Somwhow it should get into board's information structure?
Thanks in advance for comments.
Many (most?) ARM kernel ports use a format called ATAGS to pass information to the linux kernel at startup. CONFIG_CMDLINE_TAG tells u-boot to include ATAGS support, there are a variety of tags that can be included with different CONFIG options. Have a look at lib_arm/bootm.c - where the kernel actually gets called is in line 125, like so: theKernel(0, machid, bd->bi_boot_params)
where the arguments get put into registers r0, r1, r2 and are 0, the machine ID, and a pointer to the ATAGS structure respectively.
http://www.arm.linux.org.uk/developer/booting.php#5 also has some more info about the tags & booting