内核挂载了根文件系统但找不到任何init脚本。我确信该脚本存在于我的 ramdisk.img 中!
我也查看了这和 GE863-PRO3 U-BOOT 软件用户指南 1VV0300777 Rev. 6 – 2010-01-25。
有什么想法或替代文档吗?
我的环境:GE863-PRO3 128/64版本
U-Boot 1.2.0 (Aug 18 2010 - 12:16:10)- 221 Telit
DRAM: 64 MB
Bank #1
Flash:NAND Numonyx NAND01G-B2B 128MB 1.8V 8-bit
Hardware ECC (ECC data size = 512 bytes)
Nb min erasable unit: 1024
min erasable Size: 131072
Size=134217728 bytes
Logical address: 0x40000000
No bad block detected
Area 0: 40000000 to 403BFFFF (RO) Primary Bootstrap
Area 1: 403C0000 to 4043FFFF (RO) U-Boot code
Area 2: 40440000 to 404BFFFF (RO) U-Boot Environment
Area 3: 404C0000 to 407BFFFF User Area 1
Area 4: 407C0000 to 47FFFFFF User Area 2
U-BOOT命令:
setenv bootargs console=ttyS0,115200 mem=64M ver=4384k icofat=257k rootfstype=jffs2 root=/dev/mtdblock1 rw mtdparts=at91_nand:7936k(ARMboot)ro,-@7936k(root) init=/bin/busybox
ethinit 192.168.122.3
erase 404C0000 47FFFFFF
tftp 20200000 ramdisk.img
cp.b 20200000 0x407c0000 14cd78
tftp 20200000 uImage
bootm
启动输出:
VFS: Mounted root (jffs2 filesystem).
Freeing init memory: 96K
Setting DMA Console
Failed to execute /bin/busybox. Attempting defaults...
Kernel panic - not syncing: No init found. Try passing init= option to kernel.
Function entered at [<c01de28c>] from [<c01de304>]
Function entered at [<c01de2a0>] from [<c0020398>]
r3:c3c1ac40 r2:c3c1ac40 r1:c3c1deb0 r0:c01c3cab
Function entered at [<c00202dc>] from [<c00085e0>]
r4:c020d2c0
Function entered at [<c00083b8>] from [<c003a454>]
答案1
你的问题在这里:
setenv bootargs console=ttyS0,115200 mem=64M ver=4384k icofat=257k rootfstype=jffs2 root=/dev/mtdblock1 rw mtdparts=at91_nand:7936k(ARMboot)ro,-@7936k(root) init=/bin/busybox
Busyboxy 就像一条变色龙。它会根据您的调用方式改变其行为。为了让它表现得像init
你必须调用它init
。将其更改为init=/sbin/init
.
您还需要确保它是指向 ramdisk.img 内部的/sbin/init
符号链接或硬链接。/bin/busybox
答案2
我不热衷于创建 initrd,但是可以在 initrd 中设置权限吗?可能/bin/busybox/
没有可执行权限。
答案3
是/dev/null
还是/dev/console
缺失了?当这两个文件丢失时,我也遇到了类似的问题。