- 论坛徽章:
- 0
|
目前在i.MX21平台上编写了Linux2.6内核的BSP,现在内核基本能在板子上引导部分了;但到了:
.............
54.720000] mxc_nor_flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
[ 54.730000] mxc_nor_flash.0: Found 1 x16 devices at 0x1000000 in 16-bit bank
[ 52.730000] Intel/Sharp Extended Query Table at 0x0031
[ 54.740000] Using buffer write method
[ 53.740000] cfi_cmdset_0001: Erase suspend on write enabled
[ 53.740000] RedBoot partition parsing not available
[ 53.740000] Creating 3 MTD partitions on "mxc_nor_flash.0":
[ 53.750000] 0x00000000-0x00100000 : "bootloader"
[ 53.750000] ftl_cs: FTL header not found.
[ 53.750000] 0x00100000-0x00300000 : "kernel"
[ 53.760000] ftl_cs: FTL header not found.
[ 53.760000] 0x00300000-0x02000000 : "file system"
[ 53.760000] ftl_cs: FTL header not found.
[ 54.770000] mice: PS/2 mouse device common for all mice
[ 54.770000] i2c /dev entries driver
[ 54.780000] TCP cubic registered
[ 54.780000] NET: Registered protocol family 1
[ 54.780000] NET: Registered protocol family 17
[ 52.780000] VFS: Cannot open root device "<NULL>" or unknown-block(0,255)
[ 54.790000] Time: mx27_hrt clocksource has been installed.
[ 52.790000] Please append a correct "root=" boot option
[ 48.790000] Kernel panic - not syncing: VFS: Unable to mount root fs on unkno
wn-block(0,255)
就停了,而且在前面打印Kernel command line:的时候为空,是不是U-BOOT引导的时候"root=/dev/mtdblock/2 rw mem=48M console=ttySAC0,115200"这个参数没传给内核(U-BOOT是用原来引导linux2.4的,只是把串口稍微改动了一下)?
此外跟踪发现在
void __init setup_arch(char **cmdline_p)
{
struct tag *tags = (struct tag *)&init_tags;
struct machine_desc *mdesc;
char *from = default_command_line;
setup_processor();
mdesc = setup_machine(machine_arch_type);
machine_name = mdesc->name;
if (mdesc->soft_reboot)
reboot_setup("s");
// printk("boot params is start from address:0x%08x\n",mdesc->boot_params);
if (mdesc->boot_params)
tags = phys_to_virt(mdesc->boot_params);
.......}
函数中,from=NULL,这个default_command_line在哪获取的值?如果直接在配置内核选项的时候配置参数"root=/dev/mtdblock/2 rw mem=48M console=ttySAC0,115200"解压缩后就没有反应了!
所以现在不知道是引导传递参数问题还是本身所制作的文件系统的问题? |
|