一、问题描述
启动方式:SPI NAND。
错误提示如下:
nuc980 linux启动报错,提示
Scanning device for bad blocks 以及
not syncing: No working init found.
log日志
usbcore: registered new interface driver usb-storage
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
nand: device found, Manufacturer ID: 0xef, Chip ID: 0xaa
nand: Winbond W25N01GV 1G 3.3V
nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
nand: WARNING: spi0.0: the ECC used on your system is too weak compared to the o ne required by the NAND chip
Scanning device for bad blocks
Creating 3 MTD partitions on "nand0":
0x000000000000-0x000000200000 : "u-boot"
0x000000200000-0x000001600000 : "Kernel"
0x000001600000-0x000008000000 : "user"
NET: Registered protocol family 17
yaffs: dev is 32505858 name is "mtdblock2" rw
yaffs: passed flags "inband-tags"
VFS: Mounted root (yaffs2 filesystem) on device 31:2.
devtmpfs: mounted
Freeing unused kernel memory: 136K
Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
CPU: 0 PID: 1 Comm: swapper Not tainted 4.4.289 #1
Hardware name: NUC980
Backtrace:
[<c0012de0>] (dump_backtrace) from [<c0012fcc>] (show_stack+0x18/0x1c)
r6:00000000 r5:c03056fc r4:c0390a54 r3:00000000
[<c0012fb4>] (show_stack) from [<c03046d0>] (dump_stack+0x20/0x28)
[<c03046b0>] (dump_stack) from [<c0302a94>] (panic+0xb0/0x240)
[<c03029e8>] (panic) from [<c03057cc>] (kernel_init+0xd0/0xf4)
r3:c3840000 r2:00000001 r1:c3812000 r0:c0390a54
r7:00000000
[<c03056fc>] (kernel_init) from [<c000fd98>] (ret_from_fork+0x14/0x3c)
r4:00000000 r3:ffffffff
---[ end Kernel panic - not syncing: No working init found. Try passing init= o ption to kernel. See Linux Documentation/init.txt for guidance.
二、原因分析
最低级的就是内核传递的参数,把人家init主入口点指定错了,找不到。如果是自行修改参数传递了,估计把根文件的入口点路径拼写错了。
如果启动就这样,那估计存储介质有问题了,或者烧录时候不完整导致的。
如果原来正常,那可能有介质损坏了把init的依赖干坏了。
根据日志提示和原因分析
nand: WARNING: spi0.0: the ECC used on your system is too weak compared to the o ne required by the NAND chip
Scanning device for bad blocks
Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
因为是下载之后,启动就报错。排除了init主入口点参数的原因,怀疑点是估计存储介质有问题,导致系统不能正常启动。
三、解决办法
使用官方工具NuWriter.exe,擦除,重新下载烧录。
四、验证结果
虽然提示有坏块,但nand controller已经进行了管理,不影响系统正常启动。