全部博文(32)
分类: LINUX
2011-05-06 23:26:07
wangjianchangdx2011-05-08 21:32:26
经对启动参数代码的调试,发现U-Boot传递给Linux Kernel的__atags_pointer为空,说明是u-boot没有传参到Linux Kernel。
修改u-boot mini2440.h中的配置文件,添加:
#define CONFIG_SETUP_MEMORY_TAGS
#define CONFIG_INITRD_TAG
#define CONFIG_CMDLINE_TAG
启动参数识别成功:
noinitrd root=/dev/mtdblock3 rw console=ttySAC0,115200 init=/linuxrc mem=64M
wangjianchangdx2011-05-08 10:26:05
__atags_pointer defined in arch/arm/kernel/setup.c,
and initialized in arch/arm/kernel/head-common.S by __mmap_switched using the paramter passed by bootloader.
Kernel读取U-boot传递的相关参数
http://www.nishizawa23.com/
wangjianchangdx2011-05-07 23:44:39
U-boot给kernel传参数和kernel读取参数—struct tag
http://blogold.chinaunix.net/u3/90973/showart_1925725.html