对文件系统进行移植,移植完后发现系统启动后报错,在网上查找资料说是由于
制作文件系统时没有创建console,null这两个文件,于是重新创建这两个问题,
制作好文件系统后发现问题还是没解决。
         对移植过程进行排查,发现是编译内核时没有在编译选项中添加对文件系统的支持。
 
对编译选项进行修改,进入linux内核原文件的fs目录,
1、在Kconfig文件中添加source "fs/yaffs2/Kconfig"
2、在文件Makefile中添加obj-$(CONFIG_YAFFS_FS) += yaffs2
重新编译内核,升级后问题消失
 
问题现象
VFS: Mounted root (yaffs filesystem) on device 31:2.
Freeing init memory: 92K
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:
[<c0023fd4>] (dump_backtrace+0x0/0x10c) from [<c01ef770>] (dump_stack+0x18/0x1c)
r7:00000000 r6:c02b4cc0 r5:c02b4680 r4:c02999a0
[<c01ef758>] (dump_stack+0x0/0x1c) from [<c01ef7c0>] (panic+0x4c/0x124)
[<c01ef774>] (panic+0x0/0x124) from [<c001f4f0>] (init_post+0xec/0x178)
r3:00000007 r2:00000004 r1:00000003 r0:c025f13c
[<c001f404>] (init_post+0x0/0x178) from [<c000847c>] (kernel_init+0xcc/0xf4)
r5:c001b9d8 r4:c001bc30
[<c00083b0>] (kernel_init+0x0/0xf4) from [<c0034ee0>] (do_exit+0x0/0x620)
r7:00000000 r6:00000000 r5:00000000 r4:00000000
 
问题解决后系统启动信息
yaffs: dev is 32505858 name is "mtdblock2"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.2, "mtdblock2"
yaffs: auto selecting yaffs2
yaffs_read_super: isCheckpointed 0
VFS: Mounted root (yaffs filesystem) on device 31:2.
Freeing init memory: 92K
 
Please press Enter to activate this console. 
[root@EmbedSky /]#