当前位置: 技术问答>linux和unix
动态编译busybox ,板子不能启动,求助
来源: 互联网 发布时间:2016-05-19
本文导语: 动态编译busybox,制作根文件系统后,板子不能启动,启动时的错误信息如下: Time: timebase clocksource has been installed. Generic RTC Driver v1.07 Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled serial8250.0: tty...
动态编译busybox,制作根文件系统后,板子不能启动,启动时的错误信息如下:
Time: timebase clocksource has been installed.
Generic RTC Driver v1.07
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
serial8250.0: ttyS0 at MMIO map 0xe0004500 mem 0xd1000500 (irq = 42) is a 16550A
serial8250.0: ttyS1 at MMIO map 0xe0004600 mem 0xd1002600 (irq = 42) is a 16550A
RAMDISK driver initialized: 16 RAM disks of 32768K size 1024 blocksize
fs_enet.c:v1.0 (Aug 8, 2005)
BB MII Bus: probed
CPM MAP addres is e0080000, io d1100000
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
IP-Config: Guessing netmask 255.255.255.0
IP-Config: Complete:
device=eth0, addr=192.168.1.100, mask=255.255.255.0, gw=255.255.255.255,
host=192.168.1.100, domain=, nis-domain=(none),
bootserver=255.255.255.255, rootserver=192.168.1.1, rootpath=
Looking up port of RPC 100003/2 on 192.168.1.1
Looking up port of RPC 100005/1 on 192.168.1.1
VFS: Mounted root (nfs filesystem).
Freeing unused kernel memory: 144k init
/sbin/initKernel panic - not syncing: Attempted to kill init!
: error while loRebooting in 180 seconds..ading shared libraries: libm.so.6: cannot open shared object file: No such file or directory
已经尝试过的操作:
1.使用静态编译的busybox,替换/bin下面的busybox,能够启动
2.交叉工具链下所有的.so(包括对应的链接文件)已经拷贝到根文件系统的/lib下面
3.$ readelf -a busybox|grep "Shared library"
0x00000001 (NEEDED) Shared library: [libm.so.6]
0x00000001 (NEEDED) Shared library: [libpthread.so.0]
0x00000001 (NEEDED) Shared library: [libc.so.6]
这几个库及对应的链接文件都在/lib下
4.在已启动的shell下,同样将交叉工具链的库拷贝到/lib目录下,运行动态编译的busybox可以成功
5.虚拟机环境下动态编译的busybox+拷贝库可以正常启动
busybox版本1.13.1, 1.10也试过,同样不行
交叉编译器gcc4.1.2 glic2.5.0
Time: timebase clocksource has been installed.
Generic RTC Driver v1.07
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
serial8250.0: ttyS0 at MMIO map 0xe0004500 mem 0xd1000500 (irq = 42) is a 16550A
serial8250.0: ttyS1 at MMIO map 0xe0004600 mem 0xd1002600 (irq = 42) is a 16550A
RAMDISK driver initialized: 16 RAM disks of 32768K size 1024 blocksize
fs_enet.c:v1.0 (Aug 8, 2005)
BB MII Bus: probed
CPM MAP addres is e0080000, io d1100000
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
IP-Config: Guessing netmask 255.255.255.0
IP-Config: Complete:
device=eth0, addr=192.168.1.100, mask=255.255.255.0, gw=255.255.255.255,
host=192.168.1.100, domain=, nis-domain=(none),
bootserver=255.255.255.255, rootserver=192.168.1.1, rootpath=
Looking up port of RPC 100003/2 on 192.168.1.1
Looking up port of RPC 100005/1 on 192.168.1.1
VFS: Mounted root (nfs filesystem).
Freeing unused kernel memory: 144k init
/sbin/initKernel panic - not syncing: Attempted to kill init!
: error while loRebooting in 180 seconds..ading shared libraries: libm.so.6: cannot open shared object file: No such file or directory
已经尝试过的操作:
1.使用静态编译的busybox,替换/bin下面的busybox,能够启动
2.交叉工具链下所有的.so(包括对应的链接文件)已经拷贝到根文件系统的/lib下面
3.$ readelf -a busybox|grep "Shared library"
0x00000001 (NEEDED) Shared library: [libm.so.6]
0x00000001 (NEEDED) Shared library: [libpthread.so.0]
0x00000001 (NEEDED) Shared library: [libc.so.6]
这几个库及对应的链接文件都在/lib下
4.在已启动的shell下,同样将交叉工具链的库拷贝到/lib目录下,运行动态编译的busybox可以成功
5.虚拟机环境下动态编译的busybox+拷贝库可以正常启动
busybox版本1.13.1, 1.10也试过,同样不行
交叉编译器gcc4.1.2 glic2.5.0
|
用readelf工具查看工具链中的m库和c库等文件,interpreter(ld-linux.so)路径不对
楼主说下流程,怎么看,学习学习,谢谢了!
楼主说下流程,怎么看,学习学习,谢谢了!
|
明显是找不到库
我觉得你可以换个交叉编译器试试。
我用的3.3.2版本的交叉编译器
打造专业的嵌入式开发平台 www.witech.com.cn
我觉得你可以换个交叉编译器试试。
我用的3.3.2版本的交叉编译器
打造专业的嵌入式开发平台 www.witech.com.cn
|
来接分的,呵呵。
|
没找到libm.so.6文件,这个文件是个链接文件,链接到/lib/libm-xxxx.so,做下连接试试
|
你的busybox和内核不一致吧。