uboot与linux的参数传递
来源:互联网 发布:win10软件注册表 编辑:程序博客网 时间:2024/05/17 10:52
uboot: 2011.12
linux :3.0.32
powerpc e500v2开发板
---------------------------------------------------------------------------------------------
1. common/cmd_bootm.c -- > int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
——————>bootm_start
------------------->bootm_load_os
------------------->lmb_reserve
------------------->arch_preboot_os
------------------->arch_preboot_os
------------------->boot_fn
------------------->do_reset
596 /* determine if we have a sub command */ 597 if (argc > 1) { 598 char *endp; 599 600 simple_strtoul(argv[1], &endp, 16); 601 /* endp pointing to NULL means that argv[1] was just a 602 * valid number, pass it along to the normal bootm processing 603 * 604 * If endp is ':' or '#' assume a FIT identifier so pass 605 * along for normal processing. 606 * 607 * Right now we assume the first arg should never be '-' 608 */ 609 if ((*endp != 0) && (*endp != ':') && (*endp != '#')) 610 return do_bootm_subcommand(cmdtp, flag, argc, argv); 611 }
这段代码是多cpu启动考虑的,当系统的core多于一个时,通常会使用类似下面的语句先启动其它内核,然后再启动第一个内核:
=> setenv bootm_low 0x40000000
=> setenv bootm_size 0x30000000
=> tftp 41000000 uImage.core1
=> tftp 42000000 ramdiskfile
=> tftp 40c00000 p2020ds.core1.dtb
=> interrupts off
=> bootm start 41000000 42000000 40c00000
=> bootm loados
=> bootm ramdisk
=> bootm fdt
=> fdt boardsetup
=> fdt chosen $initrd_start $initrd_end
=> bootm prep
=> cpu 1 release $bootm_low - $fdtaddr -
if ((*endp != 0) && (*endp != ':') && (*endp != '#')) 判断是不是直接启动,即是不是bootm $loadaddr $ramdiskaddr $fdtaddr这样的形式。此外只考虑单核情况,即endp ==0,所以do_bootm_subcommand不会执行。
2. bootm_start函数分析:
- uboot与linux之间参数的传递
- uboot与linux的参数传递
- Uboot与Linux之间的参数传递
- Uboot与Linux之间的参数传递
- Uboot与Linux Kernel参数传递
- uBoot和Linux的参数传递关系
- uboot内核参数的传递与内核解析uboot传递的内核参数
- uboot内核参数的传递与内核解析uboot传递的内核参数
- Uboot--Linux参数传递--ATAG
- Linux内核---16.启动分析4uboot与内核的参数传递
- A:UBOOT向LINUX内核传递参数的原理
- MIPS架构UBOOT和linux参数传递
- MIPS架构UBOOT和Linux参数传递
- uboot给linux传递参数流程
- uboot想Linux内核传递参数
- uboot中背光的启动参数传递
- uboot中给kernel参数的传递
- uboot移植之uboot和kernel的参数传递
- 黑马程序员-枚举和注解
- NSFileManager
- 开机启动tomcat
- Spring 注解总结
- PLSQL调试技巧
- uboot与linux的参数传递
- poj 2019 Cornfields
- uboot之u盘启动kernel
- where memory is allocate outside of Java heap. gc
- 通俗地说压缩音频格式
- 程序员到底怎么了
- JavaScript数字和字符串转换小结(转)
- 复制功能
- 基于博弈树启发式搜索的五子棋游戏