linux 错误246,Linux内核移植常见错误及解决方法

下边列举几类移植中经常遇到到一下额问题,以及问题发生到原因和解决方法。

1、machine ID问题

machine ID问题跟CPU具体到型号相关,启动时打印信息如下:

Uncompressing Linux...........................................................................done,booting the kernel.

Error:unrecoginized/unsupported machine ID(r1 = 0x000003oe)

Available machine support:

ID (hex) NAME

0000016a SMDK2440

please check you kernel config and/or bootloader.

解决方法:可在U-boot中执行

param set mach_type 0x16a

修改bootloader配置到machine ID或者通过去掉内核代码中对应到machine ID。

注:出现这个问题到主要原因就算bootloader配置到机器ID和内核中配置到不一致,可以修改bootloader到配置或者在内核配置中添加相应的ID。machine ID在到文件arch/arm/tools/mach_types里

2.串口无输出

启动后打印如下信息: Uncompressing Linux...........................................................................done,booting the kernel.

然后就停住,无后续输出了。

解决办法:修改linux command line 中的console为ttySAC0,这是因为2.6内核对串口命名到方式到变动,但不影响应用程序。

3.kernel panic 问题

内核崩溃问题,启动后打印如下信息:

please append a crrect "root=" boot option

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)

"内核惊慌"除了缺失文件系统外,还有几个可能到原因。

devfs驱动未加载成功,在配置内核选项时选中:

[*] /proc file system support

[*] /dev file system support (OBSOLETE)

[*] Antomatically mount at boot

[*] Debug devfs

[*] Virtual memory file system support (former shm fs)

[ ] Relayfs file system support

devfs负责在/dev目录下挂在所有设备节点,只有在devfs正确加载后,/dev/mtdblock2才有效。

或是mtd驱动未加载成功。mtd驱动用来支持对Nand Flash,启动时如果不能打印正确到分区信息则要重新配置;

0x000000000x00100000:    "bootloader"

0x001000000x00500000:    "kernel"

0x005000000x02d00000:    "filesystem"

4、启动程序U-boot和内核中对于Nand Flash到分区必须一致,否则会提示找不到kernel镜像文件,可以在编译时修改分区信息,也可以在U-boot中用分区命令part。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值