织梦CMS - 轻松建站从此开始!

罗索

移植cramfs文件系统和busybox到linux2.6

落鹤生 发布于 2010-10-15 21:13 点击:次 
目前还没有成功,先把问题摆上了,挨个解决首先是busybox的linuxrc文件的问题,按照教程上是编译完busybox后,用自己写的linxurc覆盖自动产生的这个文件,但是我的那些busybox命令好像都是 链接(why?) 到linuxrc的,如果替换成自己的lixnurc,全都不正确了
TAG:

目前还没有成功,先把问题摆上了,挨个解决

首先是busybox的linuxrc文件的问题

按照教程上是编译完busybox后,用自己写的linxurc覆盖自动产生的这个文件

但是我的那些busybox命令好像都是链接(why?)到linuxrc的,如果替换成自己的lixnurc,全都不正确了

如果把生成的cramfs文件烧入nand中,会出现如下错误

VFS: Mounted root (cramfs filesystem) readonly.
Mounted devfs on /dev
Freeing init memory: 92K
Failed to execute /linuxrc. Attempting defaults...
Kernel panic - not syncing: No init found. Try passing init= option to kernel.

但是如果不修改linuxrc文件,也会出现错误

VFS: Mounted root (cramfs filesystem) readonly.
Mounted devfs on /dev
Freeing init memory: 92K
Reading data from NAND FLASH without ECC is not recommended
init started: BusyBox v1.1.3 (2008.08.11-01:57+0000) multi-call binary
Starting pid 16, console /dev/tts/0: '/etc/init.d/rcS'
Bummer,
Please press Enter to activate this console.
Starting pid 18, console /dev/tts/0: '/bin/sh'
Bummer, could not run '/bin/sh': No such file or directory
Bummer, could not run '/bin/sh': No such file or directory

头大啊该怎么办呢?

顺带说下ubuntu默认没有装zlib,make cramfs时有问题,用新立得装一下吧

将mkcramfs文件拷贝到系统的usr/bin目录下就可以使用了

对my_rootfs目录使用命令mkcramfs my_rootfs my_rootfs.cramfs生成cramfs文件系统

烧入nand闪存的第三分区,即我设定的0x400000,linux运行时可找到文件系统

 

==================================================

解决的第二个错误,用busybox默认的linxurc文件可以正常启动

刚才不能启动的原因是没有将ash设为默认,故没有生成/bin/sh命令

1、要这样配置:
?
│ │ ? ? ? ? ? ? ? Shells ?---> ? ?
? ? ? Choose your default shell (ash) ?---> ? ? ?

2、如果是这样配置的话,虽然可以生成ash,但不能生成sh
?
│ │ ? ? ? Choose your default shell (none) ?---> ? ? ? ? ? ? ? ? ? ? ? ?│ │
?
│ │ ? [*] ash ?

参考如上,可惜这样不是自己的linuxrc文件,继续寻找解决方法中

VFS: Mounted root (cramfs filesystem) readonly.
Mounted devfs on /dev
Freeing init memory: 92K
Reading data from NAND FLASH without ECC is not recommended
init started: BusyBox v1.1.3 (2008.08.11-02:20+0000) multi-call binary
Starting pid 16, console /dev/tts/0: '/etc/init.d/rcS'
Bummer,
Please press Enter to activate this console.
Starting pid 18, console /dev/tts/0: '/bin/sh'


BusyBox v1.1.3 (2008.08.11-02:20+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

#
# ls
bin      etc      lib      mnt      root     sys      usr
dev      home     linuxrc proc     sbin     tmp
#

=====================================================

(aokikyon)
本站文章除注明转载外,均为本站原创或编译欢迎任何形式的转载,但请务必注明出处,尊重他人劳动,同学习共成长。转载请注明:文章转载自:罗索实验室 [http://www.rosoo.net/a/201010/10315.html]
本文出处:百度博客 作者:aokikyon
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 验证码:点击我更换图片
栏目列表
将本文分享到微信
织梦二维码生成器
推荐内容