免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1587 | 回复: 0
打印 上一主题 下一主题

嵌入式linux2.6内核引导问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-08-27 21:37 |只看该作者 |倒序浏览
目前在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"解压缩后就没有反应了!
   所以现在不知道是引导传递参数问题还是本身所制作的文件系统的问题?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP