2440 nand flash挂载不了文件系统解决

    最近把落了灰尘的2440板子拿出来,移植linux,uboot烧进去,运行正常,内核编译好了下载进去,也能跑,做了文件系统下载进去启动,挂载不上,kernel panic 了

VFS: Mounted root (yaffs filesystem) on device 31:3.
Freeing init memory: 160K
Warning: unable to open an initial console.
Failed to execute /linuxrc.  Attempting defaults...
Kernel panic - not syncing: No init found.  Try passing init= option to kernel.
Backtrace: 
[<c0034990>] (dump_backtrace+0x0/0x104) from [<c0034aac>] (dump_stack+0x18/0x1c)
 r7:00000000 r6:c040d50c r5:c0027dec r4:c040ca14
[<c0034a94>] (dump_stack+0x0/0x1c) from [<c00546cc>] (panic+0x40/0x11c)
[<c005468c>] (panic+0x0/0x11c) from [<c00305cc>] (init_post+0xd0/0x100)
 r3:c3805e0c r2:00000004 r1:00000003 r0:c0381ac4
[<c00304fc>] (init_post+0x0/0x100) from [<c0008c20>] (kernel_init+0xdc/0x10c)
 r4:c040ca18
[<c0008b44>] (kernel_init+0x0/0x10c) from [<c0056cf0>] (do_exit+0x0/0x59c)
 r5:00000000 r4:00000000

 

左思右想,把busybox版本换了重做还是一样,甚至把uboot和内核版本都换了,uboot从1.1.6-->1.3.4,内核从2.6.22->2.6.32,再来一遍,还是不行,折磨了2天,最后翻看启动信息,有这么几行:

Bad block at 0x260000 in erase block from 0x260000 will be skipped
Bad block at 0x280000 in erase block from 0x280000 will be skipped
Bad block at 0x2a0000 in erase block from 0x2a0000 will be skipped

原来是nand flash有坏块了,读出来的内容不对了,文件系统可能没读出来,难怪会挂载不上,有2个方法解决这个问题:

方法1:换掉nand flash芯片,粗暴直接,但是得有焊接基础,还得买个芯片

方法2:把nand flash重新分区,跳过bad block得地方

这里我用方法2,现在可以挂载了

Starting kernel ...

Uncompressing Linux.................................................................................................................................... done, booting the kernel.
Linux version 2.6.32.18 (wangchanglin@ubuntu) (gcc version 3.4.5) #6 Sun Aug 9 20:55:37 CST 2020
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
CPU: VIVT data cache, VIVT instruction cache
Machine: SMDK2440
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C24XX Clocks, (c) 2004 Simtec Electronics

。。。。

yaffs_read_super: isCheckpointed 1
VFS: Mounted root (yaffs filesystem) on device 31:3.
Freeing init memory: 160K
init started: BusyBox v1.7.0 (2019-06-15 23:36:36 CST)

Please press Enter to activate this console. 
starting pid 901, tty '/dev/console': '/bin/sh'

Processing /etc/profile... Done

/ # ls
bin         lib         mnt         readme      sys         var
dev         linuxrc     opt         root        tmp
etc         lost+found  proc        sbin        usr

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值