- -
[lds format]
* text: code
* rodata: const data
* data: initailized data (global & static)
* got:
* u_boot_cmd: __u_boot_cmd_start & __u_boot_cmd_end
* bss: uninitailized data
[./cpu/arm920t/start.S](stage1)(asm)
[_entry]
b reset.
[relocate]
在nor执行部分是相对寻址,而那些宏所指向的真正地址是sdram的地址.直到下面一句执行,程序跳转到sdram中执行,从而也执行了C语言程序.
pc, _start_armboot>
_start_armboot: .word start_armboot
[./lib_arm/board.c](stage2)(c)
[start_armboot]
* global data: 系统初始化参数
* init_sequence & hang: 执行init队列,失败则hang.
* other init
* main_loop
[main_loop](./common/main.c)
* bootdelay
a. "bootdelay >= 0 && s && !abortboot(bootdelay)" to choose bootcmd or command mode.
* bootcmd
a. getenv(bootcmd), define CONFIG_BOOTCOMMAND("bootm", argc,argv)
b. U_BOOT_CMD register cmd_tbl_t var to __u_boot_cmd_start
* do_bootm
0. read kernel to addr
a. set addr & get header & magic & crc
b. image type & compression type & & os type
* do_bootm_linux
a. set theKernel value
b. set_tag ...
c. cleanup_before_linux & theKernel
* theKernel
* zimge first point
[linux]
decompress_kernel
...
start_kernel
阅读(1647) | 评论(0) | 转发(0) |