`
xiaoer_1982
  • 浏览: 1807085 次
  • 性别: Icon_minigender_2
  • 来自: 北京
文章分类
社区版块
存档分类
最新评论

head.s分析(15):复制u-boot传递的参数

阅读更多

快乐虾

http://blog.csdn.net/lights_joy/

lights@hb165.com

本文适用于

ADI bf561 DSP

uclinux-2008r1.5-rc3 (移植到vdsp5)

Visual DSP++ 5.0(update 5)

欢迎转载,但请保留作者信息

/* pass the uboot arguments to the global value command line */

R0 = R7;

call.x _cmdline_init;

head.s的一开始,就将u-boot的参数指针保存在R7这个寄存器中,且一直没有对R7进行过修改,在这里,以这个指针为参数调用cmdline_init

void __init cmdline_init(const char *r0)

{

if (r0)

strncpy(command_line, r0, COMMAND_LINE_SIZE);

}

实际上很简单,就是把参数的内容从u-boot的空间复制到uclinux可以管理的空间中来,到此为止,u-boot之类的bootloader终于可以寿终正寝了!

参考资料

head.s分析(1):保存u-boot传递过来的指针(2009-1-19)

head.s分析(2)SYSCFG配置(2009-1-19)

head.s分析(3):数据及指针寄存器清0(2009-1-19)

head.s分析(4):关闭CACHE(2009-01-19)

head.s分析(5):关闭串口(2009-01-19)

head.s分析(6):栈指针初始化(2009-01-19)

head.s分析(7)init_early_exception_vectors(2009-1-19)

head.s分析(8):配置PLLSDRAM(2009-01-20)

head.s分析(9)EBIU配置(2009-01-20)

head.s分析(10):转入中断15(2009-01-20)

head.s分析(11):关闭WATCHDOG(2009-01-20)

head.s分析(12)bss段清0(2009-01-20)

head.s分析(13):代码段前空间清0(2009-01-20)

head.s分析(14)L2空间清0(2009-01-20)

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics