busybox使用中的问题


我现在使用的rootfs是从TI官网down下来的编译好的busybox v1.00-pre8。使用中遇到问题如下:

1. 提示can't access tty.job control turned off

每次启动都有这个提示,也不知道有什么坏处。

这是busybox的官方说明:
Job control will be turned off since your shell can not obtain a controlling terminal. This typically happens when you run your shell on /dev/console. The kernel will not provide a controlling terminal on the /dev/console device. Your should run your shell on a normal tty such as tty1 or ttyS0 and everything will work perfectly. If you REALLY want your shell to run on /dev/console, then you can hack your kernel (if you are into that sortof thing) by changing drivers/char/tty_io.c to change the lines where it sets "noctty = 1;" to instead set it to "0". I recommend you instead run your shell on a real console...

我没修改内核,直接改$(rootfs)/etc/inittab的
::askfirst:-/bin/sh

ttyS0::askfirst:-/bin/sh
来指定输出设备,OK了。

参考文档:
http://www.linuxforum.net/forum/showflat.php?Cat=&Board=embedded&Number=591401&page=2&view=collapsed&sb=5&o=all&fpart=1&vc=1
http://192.192.6.66/upload/read.php?tid=250

2. 运行自己的程序(例如./flash_erase)提示:
# ./flash_erase
-sh: ./flash_erase: not found

把$(arm cross compile)/arm-linux/lib的所有文件cp到$(rootfs)/lib下解决问题。
参考下面这段话:
如果你的busybox是静态编译的,那么一个简单的能使用的根文件系统就这样完成了,但是这个文件系统中没有glibc的动态链接库,除了 busybox以外的软件,如果对glibc有依赖,但是又没有静态编译的的话就无法运行。但如果所有的软件都用静态编译的话,那这个文件系统将很大。所以一般推荐软件不要使用静态编译,而使用一个库。
如果你不是用静态编译的,那么你需要编译好的glibc的动态链接库。在一般的交叉编译器中都带有已经编译好的库,直接拷过来就行了。一般在交叉编译器的lib或arm-linux/lib中

参考文档:
http://www.arm9bbs.com/archiver/tid-402.html
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值