交叉编译后不能运行,什么问题呢?
时间:2006-01-19
来源:互联网
交叉编译后下载到板子上怎么不可以用啊?
--------------------------------------------------------------------------------
bootloader-------vivi
kernel-------------2.4.18
fs-------------------cramfs
文件系统可以跑起来,但是很简单的应用程序“hello,World”都不能执行什么原因?输出如下:
..................
Initializing USB Mass Storage driver...
usb.c: registered new driver u
USB Mass Storage support registered.
mice: PS/2 mouse device common for all mice
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 4096 bind 4096)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
NetWinder Floating Point Emulator V0.95 (c) 1998-1999 Rebel.com
Root-NFS: No NFS server available, giving up.
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Mounted root (cramfs filesystem).
Mounted devfs on /dev
Freeing init memory: 76K
hub.c: USB new device connect on bus1/2, assigned device number 2
usb.c: USB device not accepting new address=2 (error=-110)
mount /etc as ramfs
hub.c: USB new device connect on bus1/2, assigned device number 3
usb.c: USB device not accepting new address=3 (error=-110)
re-create the /etc/mtab entries
init started: BusyBox v1.00 (2006.01.17-13:17+0000) multi-call binary
Starting pid 18, console /dev/ttyS0: '/etc/init.d/rcS'
exec: 3: /usr/etc/rc.local?not found
Please press Enter to activate this console.
Starting pid 21, console /dev/ttyS0: '/bin/sh'
BusyBox v1.00 (2006.01.17-13:17+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
/ # cd /usr/
/usr # ./hello
./hello: error while loading shared libraries: libc.so.6: cannot open shared obj
ect file: No such file or directory
/usr #
这是什么原因阿,是交叉编译有问题,还是应用程序的问题啊,其他的交叉编译后的程序也有问题,有时候提示是librt.so.1的问题,问题也是一样的。大家帮忙阿。
另外我还想问一下交叉编译用到的库是怎么找到的阿,怎么定义具体位置,只要export 工具链的路径就可以了么?
--------------------------------------------------------------------------------
bootloader-------vivi
kernel-------------2.4.18
fs-------------------cramfs
文件系统可以跑起来,但是很简单的应用程序“hello,World”都不能执行什么原因?输出如下:
..................
Initializing USB Mass Storage driver...
usb.c: registered new driver u
USB Mass Storage support registered.
mice: PS/2 mouse device common for all mice
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 4096 bind 4096)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
NetWinder Floating Point Emulator V0.95 (c) 1998-1999 Rebel.com
Root-NFS: No NFS server available, giving up.
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Mounted root (cramfs filesystem).
Mounted devfs on /dev
Freeing init memory: 76K
hub.c: USB new device connect on bus1/2, assigned device number 2
usb.c: USB device not accepting new address=2 (error=-110)
mount /etc as ramfs
hub.c: USB new device connect on bus1/2, assigned device number 3
usb.c: USB device not accepting new address=3 (error=-110)
re-create the /etc/mtab entries
init started: BusyBox v1.00 (2006.01.17-13:17+0000) multi-call binary
Starting pid 18, console /dev/ttyS0: '/etc/init.d/rcS'
exec: 3: /usr/etc/rc.local?not found
Please press Enter to activate this console.
Starting pid 21, console /dev/ttyS0: '/bin/sh'
BusyBox v1.00 (2006.01.17-13:17+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
/ # cd /usr/
/usr # ./hello
./hello: error while loading shared libraries: libc.so.6: cannot open shared obj
ect file: No such file or directory
/usr #
这是什么原因阿,是交叉编译有问题,还是应用程序的问题啊,其他的交叉编译后的程序也有问题,有时候提示是librt.so.1的问题,问题也是一样的。大家帮忙阿。
另外我还想问一下交叉编译用到的库是怎么找到的阿,怎么定义具体位置,只要export 工具链的路径就可以了么?
作者: noreason 发布时间: 2006-01-19
请问如何把自己的程序放到cramfs格式的文件系统镜像中?要用到什么工具来生成么?谢谢了
作者: gothicane 发布时间: 2006-04-14
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28