你能具体说是什么参数吗?
亚瑟王 发表于 2010-5-13 17:13 
int boot_zImage(ulong from, size_t size)
{
int ret;
ulong boot_mem_base; /* base address of bootable memory */
ulong to;
ulong mach_type;
boot_mem_base = 0x30000000;
/* copy kerne image */
to = boot_mem_base + LINUX_KERNEL_OFFSET;
printk("Copy linux kernel from 0x%08lx to 0x%08lx, size = 0x%08lx ... ",
from, to, size);
ret = copy_kernel_img(to, (char *)from, size);
if (ret) {
printk("failed\n");
return -1;
} else {
printk("Copy Kernel to SDRAM done,");
}
if (*(ulong *)(to + 9*4) != LINUX_ZIMAGE_MAGIC) {
printk("Warning: this binary is not compressed linux kernel image\n");
printk("zImage magic = 0x%08lx\n", *(ulong *)(to + 9*4));
} else {
// printk("zImage magic = 0x%08lx\n", *(ulong *)(to + 9*4));
;
}
/* Setup linux parameters and linux command line */
setup_linux_param(boot_mem_base + LINUX_PARAM_OFFSET);
/* Get machine type */
mach_type = MACH_TYPE_S3C2440;
// printk("MACH_TYPE = %d\n", mach_type);
/* Go Go Go */
printk("NOW, Booting Linux......\n");
call_linux(0, mach_type, to);
return 0;
}
这里有一段设置Linux启动参数的代码
/* Setup linux parameters and linux command line */
setup_linux_param(boot_mem_base + LINUX_PARAM_OFFSET);
这里的参数存放地址是如何确定的,也就是为什么把参数的存放地址选在这里。内存的地址映射情况是怎么样的?
另外,u-boot传递给Linux的参数是什么?为什么要传递这些参数?能不能给个方向,如果要知道这些,需要了解哪些知识?谢谢! |