0

我正在尝试使用 yaffs2 fs 启动嵌入式系统。这是我使用的引导参数:

控制台=ttyO0,115200n8 androidboot.console=ttyO0 ip=off mem=256M rootwait=1 rw root=1f09 rw rootfstype=yaffs2 init=/init

我在启动内核时得到了这个:

[    3.160095] yaffs: dev is 32505865 name is "mtdblock9" rw
[    3.165802] yaffs: passed flags ""
[    3.480407] VFS: Mounted root (yaffs2 filesystem) on device 31:9.
[    3.486877] devtmpfs: error mounting -2
[    3.491546] Freeing init memory: 244K
[    3.495422] Failed to execute /init.  Attempting defaults...
[    3.502258] Kernel panic - not syncing: No init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
[    3.515350] Backtrace: 
[    3.518005] [<c001803c>] (dump_backtrace+0x0/0x10c) from [<c0504850>] (dump_stack+0x18/0x1c)
[    3.526885]  r7:00000013 r6:c003f498 r5:c0739350 r4:c0739350
[    3.532867] [<c0504838>] (dump_stack+0x0/0x1c) from [<c05048b8>] (panic+0x64/0x198)
[    3.540954] [<c0504854>] (panic+0x0/0x198) from [<c0008818>] (init_post+0x84/0xd4)
[    3.548919]  r3:fffffffe r2:00000004 r1:00000080 r0:c05f5690
[    3.554901] [<c0008794>] (init_post+0x0/0xd4) from [<c06a02fc>] (kernel_init+0xf4/0x124)
[    3.563446]  r5:c06dbf94 r4:c0738400
[    3.567230] [<c06a0208>] (kernel_init+0x0/0x124) from [<c003f498>] (do_exit+0x0/0x6ac)

我也尝试过使用其他初始化脚本(/system/bin/sh),但我仍然遇到同样的问题。

我也尝试了 ramdisk 映像,我从内核得到了这个日志:

[    3.171234] omap_rtc omap_rtc: setting system clock to 2000-01-01 01:24:39 UTC (946689879)
[    3.180786] RAMDISK: gzip image found at block 0
[    3.190429] yaffs: dev is 1048576 name is "ram0" rw
[    3.195587] yaffs: passed flags ""
[    3.199371] List of all partitions:
[    3.203063] 1f00             128 mtdblock0  (driver?)
[    3.208435] 1f01             128 mtdblock1  (driver?)
[    3.213775] 1f02             128 mtdblock2  (driver?)
[    3.219116] 1f03             128 mtdblock3  (driver?)
[    3.224426] 1f04            1920 mtdblock4  (driver?)
[    3.229766] 1f05             128 mtdblock5  (driver?)
[    3.235076] 1f06            5120 mtdblock6  (driver?)
[    3.240417] 1f07            5120 mtdblock7  (driver?)
[    3.245727] 1f08           61440 mtdblock8  (driver?)
[    3.251068] 1f09          187904 mtdblock9  (driver?)
[    3.256408] b300         7875584 mmcblk0  driver: mmcblk
[    3.262023]   b301          200781 mmcblk0p1 00000000-0000-0000-0000-000000000000mmcblk0p1
[    3.270751]   b302         7671037 mmcblk0p2 00000000-0000-0000-0000-000000000000mmcblk0p2
[    3.279449] No filesystem could mount root, tried:  yaffs2
[    3.285247] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,9)
[    3.294036] Backtrace: 
[    3.296661] [<c001803c>] (dump_backtrace+0x0/0x10c) from [<c0504850>] (dump_stack+0x18/0x1c)
[    3.305541]  r7:c05f5f18 r6:00008000 r5:c0739350 r4:c0739350
[    3.311553] [<c0504838>] (dump_stack+0x0/0x1c) from [<c05048b8>] (panic+0x64/0x198)
[    3.319641] [<c0504854>] (panic+0x0/0x198) from [<c06a0df4>] (mount_block_root+0x1e8/0x228)
[    3.328430]  r3:00000000 r2:cf81df58 r1:cf81df58 r0:c05f59c8
[    3.334411] [<c06a0c0c>] (mount_block_root+0x0/0x228) from [<c06a194c>] (initrd_load+0xb4/0x338)
[    3.343688] [<c06a1898>] (initrd_load+0x0/0x338) from [<c06a0fcc>] (prepare_namespace+0xcc/0x1cc)
[    3.353027]  r5:c06ce068 r4:c06ce05c
[    3.356842] [<c06a0f00>] (prepare_namespace+0x0/0x1cc) from [<c06a02f8>] (kernel_init+0xf0/0x124)
[    3.366149]  r5:c06dbf94 r4:c0738400
[    3.369964] [<c06a0208>] (kernel_init+0x0/0x124) from [<c003f498>] (do_exit+0x0/0x6ac)
[    3.378295]  r5:c06a0208 r4:00000000

我不明白这个问题的原因。由于我对这个主题不太了解,任何人都可以帮我找到原因吗?是否有任何内核选项可以添加以获取有关 bootargs 中原因或缺失详细信息的更多详细信息?

谢谢 !

4

2 回答 2

0

尝试在 init 所在的命令行参数选项中给出根分区。例如。/dev/sda - 给出你的根分区。

于 2013-10-01T14:15:41.783 回答
0

我有同样的经历。从 u-boot 安装时使用选项 inband-tags。

setenv bootargs 控制台=ttyO0,115200n8 root=/dev/mtdblock9 rootflags=inband-tags rw rootfstype=yaffs2

于 2019-01-07T01:57:39.230 回答