busybox使用中的問題

來源:互聯網
上載者:User

我現在使用的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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.