busybox 製作動態庫檔案系統

來源:互聯網
上載者:User

busybox 如何做動態檔案系統

       libcrypt.so.1 => /lib/libcrypt.so.1 (0x2ab04000)                       
        libm.so.6 => /lib/libm.so.6 (0x2ab71000)                               
        libc.so.6 => /lib/libc.so.6 (0x2ac33000)                               
        /lib/ld.so.1 => /lib/ld.so.1 (0x2aaa8000)
1.基本步驟跟做靜態檔案系統差不多。

2.cd busybox-1.13
在make menuconfig
Build Options  ---> []Build shared libbusybox
不能選擇                          []Build BusyBox as a static binary (no shared libs)
如果沒有這項目,則不選

3.make

4.make install

5.在rootfs/lib 下,應當從你交叉編譯工具的lib庫中copy以下庫。

如我的交叉編譯庫在/opt/gcc-3.3.6-glibc-2.3.6/bin/mipsel-linux-

則應該在/opt/gcc-3.3.6-glibc-2.3.6/mipsel-linux/lib下copy如下庫

至於為什麼要copy 以下庫,或者說你如何知道應該copy那些庫。
可以在已做好的動態庫檔案系統下,運行如下命令
ldd bin/busybox
# ldd bin/busybox                                                              
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x2ab04000)                       
        libm.so.6 => /lib/libm.so.6 (0x2ab71000)                               
        libc.so.6 => /lib/libc.so.6 (0x2ac33000)                               
        /lib/ld.so.1 => /lib/ld.so.1 (0x2aaa8000)  
#

cp -a libcrypt-2.3.6.so /nfsroot/rootfs-1.1.3/lib/
cp -a libcrypt.so.1 /nfsroot/rootfs-1.1.3/lib/
cp -a  libm.so.6  libm-2.3.6.so /nfsroot/rootfs-1.1.3/lib/
cp -a  libc.so.6 libc-2.3.6.so /nfsroot/rootfs-1.1.3/lib/
cp -a ld*(ld.so.1  ld-2.3.6.so) /nfsroot/rootfs-1.1.3/lib/ 

 

或者還可以在你做的根檔案系統下:

mipse-linux-readelf -d -s busybox,找到busybox所依賴的動態庫

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.