linux+ramdisk移植的时候遇到的某些问题及解决方法

1.

Uncompressing Linux................................................................ done, booting the kernel.

就不动了

解决:把console=/dev/ttySAC0 改成console=ttySAC0

2. 启动参数initrd=0x30800000,0x20000,0x30800000表示ramdisk在RAM中的地址,0x20000表示ramdisk的大小

3. Failed to execute /linuxrc;Kernel panic No init fo...

原因:initrd=0x30800000,0x20000; 0x20000小于ramdisk的实际大小

4. RAMDISK: incomplete write (-28 != 32768) 4194304
RAMDISK: ran out of compressed data
invalid compressed format (err=1)
Root-NFS: No NFS server available, giving up.
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "" or unknown-block(2,0)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)

出现上面情况,查阅资料才知道是因为没有修改
Driver device ->
Block device ->
(4096)Default RAM disk size (kbytes)
改4096为8192

5.Error: unrecognized/unsupported machine ID (r1 = 0x33f60264).

解决办法:参考我的CSDN博客

6. Kernel panic - not syncing: Attempted to kill init!

其中一个原因是内核不是用带eabi的的编译器编译的,而制作rootfs是的busybox使用带eabi的编译器编译的。

7.编译busybox时可能遇到的问题

将会遇到下面问题:
applets/applets.c:20:2:
error: #warning Static linking against glibc produces buggy executables
applets/applets.c:2
1:2: error: #warning (glibc does not cope well with ld --gc-sections).
applets/applets.c:22:2:
error: #warning See sources.redhat.com/bugzilla/show_bug.cgi?id=3400
applets/applets.c:23:2:
error: #warning Note that glibc is unsuitable for static linking anyway.
applets/applets.c:24:2:
error: #warning If you still want to do it, remove -Wl,--gc-sections
applets/applets.c:25:2:
error: #warning from top-level Makefile and remove this warning.
make[
1]: *** [applets/applets.o] Error1

这个警告的定义在applets/applets.c中。将这段警告注释掉就可以了。这段警告的意思是告诉你最好用uclibc编译,而不是用glibc因为glibc比较大,busybox在寸土寸金的嵌入式系统中运用比较多,所以会有这样的要求。

 

转载地址:http://blog.csdn.net/qiaoliang328/article/details/4724511

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值