linux移植过程注意事项,linux移植过程的错误记录

1、Kernel panic - not syncing: Attempted to kill init!

【原因】:内核和文件系统编译时选用的配置不一致:一般是文件系统启用了ARM EABI,但内核编译时,未打开此编译选项;

【解决】:make menuconfig

Kernel Features --->[*]Use the ARM EABI to compile the kernel [*] Allow old ABI binaries to run with this kernel (EXPERIMENTA)

2、Bootloader启动结束后,串口信息变成乱码。

【原因】:内核配置的系统时钟频率跟实际硬件不匹配;

【解决】:修改系统时钟:

«在arch/arm/mach-s3c2440/mach-smdk2440.c中做如下修改

static void __init smdk2440_map_io(void)

{

……

//s3c24xx_init_clocks(16934400);

s3c24xx_init_clocks(12000000); //12MHz,根据实际硬件修改时钟参数

......

}

3、cramfs文件系统加载错误

end_request: I/O error, dev mtdblock3, sector 24

Buffer I/O error on device mtdblock3, logical block 3

end_request: I/O error, dev mtdblock3, sector 0

FAT: unable to read boot sector

VFS: Cannot open root device "mtdblock3" or unknown-block(31,3)

Please append a correct "root=" boot option; here are the available partitions:

1f00128 mtdblock0 (driver?)

1f0164 mtdblock1 (driver?)

1f022880 mtdblock2 (driver?)

1f0313312 mtdblock3 (driver?)

1f0432768 mtdblock4 (driver?)

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

Yaffs文件系统加载错误

yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lo

st+found.

yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lo

st+found.

yaffs_read_super: isCheckpointed 0

VFS: Mounted root (yaffs filesystem).

Freeing init memory: 136K

tragedy: yaffs_FindObjectByName: non-directory

==>> yaffs bug: fs/yaffs2/yaffs_guts.c 7311

Unable to handle kernel NULL pointer dereference at virtual address 00000000

pgd = c0004000

[00000000] *pgd=00000000

Internal error: Oops: 5 [#1]

Modules linked in:

CPU: 0Not tainted(2.6.27.5mjp #5)

PC is at yaffs_FindObjectByName+0x100/0x138

LR is at yaffs_FindObjectByName+0x68/0x138

pc : [015609c>]lr : []psr: 60000013

sp : c3819c60ip : 00000000fp : c3819d8c

r10: c3819e10r9 : 00000bcdr8 : c340856c

r7 : c39adf7cr6 : c39adfe4r5 : 00000000r4 : 00000000

r3 : 00000000r2 : 00000008r1 : 00000008r0 : 00000bcd

Flags: nZCvIRQs onFIQs onMode SVC_32ISA ARMSegment kernel

Control: c000717fTable: 30004000DAC: 00000017

Process swapper (pid: 1, stack limit = 0xc3818268)

Stack: (0xc3819c60 to 0xc381a000)

9c60: 00766564 00000000 00000000 00000000 00000000 00000000 00000000 00000000

9c80: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

9ca0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

9cc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

9ce0: 00000000 00000000 00000000 00000000 c3819d0c c3819d00 c0052e3c c0057620

9d00: c3819d34 c3819d10 c0098abc c0179620 c39adf7c 00000000 c3409a54 00000007

9d20: c3819d44 c3819d30 c00508a8 c005085c 00000000 c340992c c3819d54 c3819d48

9d40: c009834c c005797c c3819d64 c3409998 c3819d9c c3819d60 c02f28bc c005793c

9d60: 22222222 00000000 c340992c c3408514 c3a1d000 c3409998 c3819dfc c3819e10

9d80: c3819dac c3819d90 c0151630 c0155fac 00000000 c3408514 c340992c c3819ef0

9da0: c3819de4 c3819db0 c008d39c c01515f0 c3819eec c380c2a0 c017b464 c38ec005

9dc0: c3819ef0 c340992c 00000000 00000003 00000000 00000000 c3819e44 c3819de8

9de0: c008eddc c008d2e0 c38ec005 00000101 c3819ef4 c3818000 00000000 05b6719b

9e00: 00000007 c38ec005 c3401760 c3819ed8 c380c2a0 c3408498 c3819e44 c3819ef0

9e20: c3819ef0 c3819e48 c38ec000 00000003 00000000 00000000 c3819e6c c3819e48

9e40: c008f410 c008e578 c380c2a0 c34083a0 00000001 c3819ef0 c38ec000 c38ec000

9e60: c3819e94 c3819e70 c008f584 c008f3d0 c3819e94 c3819e80 c3819ef0 ffffff9c

9e80: c38ec000 00000001 c3819eb4 c3819e98 c008f628 c008f4b4 00000002 00000000

9ea0: ffffff9c 00000000 c3819ecc c3819eb8 c008f688 c008f5e4 00000003 00000000

9ec0: c3819f7c c3819ed0 c00901d4 c008f674 00000003 c3819ee0 00000000 00000002

9ee0: 00000026 00000000 00000000 00000000 c380c2a0 c3408498 c3819f74 c3819f08

9f00: c003dce0 00000101 00000001 00000000 00000001 00000000 c008fff0 c043a4e0

9f20: c0407cd0 40000013 00000000 c043a520 00000000 00000003 00000000 c38e1660

9f40: c3816bc4 00000000 c3819f7c c3819f58 c009a688 00000002 00000000 ffffff9c

9f60: 00000000 c38ec000 00000000 00000000 c3819fac c3819f80 c0083a78 c0090164

9f80: c3819fbc c3819fa0 c003041c c04084e0 00000000 00000000 00000000 00000000

9fa0: c3819fbc c3819fb0 c0083b40 c0083a2c c3819fd4 c3819fc0 c002a438 c0083b2c

9fc0: c04084e0 00000000 c3819ff4 c3819fd8 c0008604 c002a41c 00000000 00000001

9fe0: 00000000 00000000 00000000 c3819ff8 c003fe90 c000854c 09008204 20400240

Backtrace:

[0155f9c>] (yaffs_FindObjectByName+0x0/0x138) from [] (yaffs_lookup+

0x50/0xfc)

[] (yaffs_lookup+0x0/0xfc) from [39c>] (do_lookup+0xcc/0x198)

r7:c3819ef0 r6:c340992c r5:c3408514 r4:00000000

[] (do_lookup+0x0/0x198) from [] (__link_path_walk+0x874/0xd

24)

[] (__link_path_walk+0x0/0xd24) from [008f410>] (path_walk+0x50/0x9c

)

[008f3c0>] (path_walk+0x0/0x9c) from [008f584>] (do_path_lookup+0xe0/0x108)

r7:c38ec000 r6:c38ec000 r5:c3819ef0 r4:00000001

[008f4a4>] (do_path_lookup+0x0/0x108) from [008f628>] (__path_lookup_intent_

open+0x54/0x90)

r7:00000001 r6:c38ec000 r5:ffffff9c r4:c3819ef0

[008f5d4>] (__path_lookup_intent_open+0x0/0x90) from [008f688>] (path_lookup

_open+0x24/0x2c)

r7:00000000 r6:ffffff9c r5:00000000 r4:00000002

[008f664>] (path_lookup_open+0x0/0x2c) from [] (do_filp_open+0x80/0x

6cc)

[] (do_filp_open+0x0/0x6cc) from [0083a78>] (do_sys_open+0x5c/0xec)

[0083a1c>] (do_sys_open+0x0/0xec) from [] (sys_open+0x24/0x28)

r8:00000000 r7:00000000 r6:00000000 r5:00000000 r4:c04084e0

[1c>] (sys_open+0x0/0x28) from [002a438>] (init_post+0x2c/0xf8)

[002a40c>] (init_post+0x0/0xf8) from [] (kernel_init+0xc8/0xf0)

r5:00000000 r4:c04084e0

[000853c>] (kernel_init+0x0/0xf0) from [] (do_exit+0x0/0x6bc)

r4:00000000

Code: e3a020ff eb008efe e3500000 0a000003 (e5955000)

---[ end trace 58341908cdc6eff5 ]---

Kernel panic - not syncing: Attempted to kill init!

【原因】:一般是NAND ECC校验错误:内核编译启用了MTD的ECC,文件系统制作过程禁用了的ECC;

【解决】:禁用内核编译时的MTD的ECC:

drivers/mtd/nand/s3c2410.c

将chip->ecc.mode = NAND_ECC_SOFT;

改为chip->ecc.mode = NAND_ECC_NONE;

4、can't open /dev/s3c2440_serial0: No such file or directory

【原因】:内核驱动中使用的驱动设备名跟inittab中的名字匹配不上;

【解决】:修改inittab中的s3c2440_serial0::askfirst:-/bin/sh使之与驱动代码/driver/serial/ samsung.c中的一致:

static struct uart_driver s3c24xx_uart_drv = {

.owner= THIS_MODULE,

.dev_name= "s3c2410_serial",

.nr= 3,

.cons= S3C24XX_SERIAL_CONSOLE,

.driver_name= S3C24XX_SERIAL_NAME,

.major= S3C24XX_SERIAL_MAJOR,

.minor= S3C24XX_SERIAL_MINOR,

};

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值