uCLinux下静态加载驱动出现问题,设备无法打开,求助高手
我用的是44B0得板子,2.4的内核,u-boot1.1启动。把驱动和应用程序都一起编进内核,
正常启动后cat devices能看到设备,但是一运行应用程序打开设备却会打开失败。open的返回值为-1。
/bin> gpio_test
open device error (这句话是我加进去的打印信息,如果open的返回值为-1即会打印出来)
pid 31: failed 65280
请教高手问题可能出在哪儿,谢了先。
以下是启动打印的信息:
go 0xc008000
## Starting application at 0x0C008000 ...
Now we are starting kernel
Linux version 2.4.24-uc0 ([email=root@localhost]root@localhost[/email]) (gcc version 2.95.3 20010315 (release)
(ColdFire patches - 20010318 from http://fiddes.net/coldfire/)(uClinux XIP and s
hared lib patches from http://www.snapgear.com/)) #45 五 3月 21 17:50:14 CST 200
8
Processor: Samsung S3C44B0X revision 0
Architecture: S3C44B0X
On node 0 totalpages: 2048c 0c2dd080 00000000 00000
zone(0): 0 pages.e88 0c22feArchite
zone(1): 2048 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/rom0 init=/linuxrc0 totalpages: 2048
68
Calibrating delay loop... 23.85 BogoMIPS301cc 0c2301ac 00000000 0c22febc 0c22fe
Memory: 8MB = 8MB total
Memory: 5940KB available (1904K code, 168K data, 44K init)
Kernel command line: root=/dev/rom0 i
Dentry cache hash table entries: 1024 (order: 1, 8192 bytes)70 0c07a1a8 00000040 0c230290 0c2301cc 0c2301a0 0c2301. 23.
Inode cache hash table entries: 512 (order: 0, 4096 bytes)
Memory: 8
Mount cache hash table entries: 512 (order: 0, 4096 bytes)52 60000093 0c23f714 0c22fee4 0c22febc 0c07a5f0 0c07a3d8
Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
Dentry cache hash table e
Based upon Swansea University Computer Society NET3.039229d0 0c07a568 00000000 00000018 00000000 0c2380e8 0c2
Initializing RT netlink socket
Starting kswapd
ttyS0 at I/O 0x1d00000 (irq = 3) is a S3C44B0nitializing RT net
00k
ttyS1 at I/O 0x1d04000 (irq = 2) is a S3C44B0 0c016e30 01c00000 0c238134 0c22ff0x1d00000 (
gpio_drv: init sucessfully!
ne.c:v1.10 9/23/94 Donald Becker (becker@scyld.com)
Last modified Nov 1, 2000 by Paul Gortmakerf98 0c016e70 0c016e68 60000013 ffffffff 0c
NE*000 ethercard probe at 0x6000000:NE2000 driver modified by http://www.21space
ne.c:v1.10 9/23/94 Donald Becker
time.net
Backtrace:ionne
Blkmem copyright 1998 Kenneth Albanowski from [<0c01acb8>]ht 1998 Kenneth Albano
Blkmem 1 disk images:
0: C100FE8-C1EF3E7 [VIRTUAL C100FE8-C1EF3E7] (RO)F0 r4 = E1D420B2 images:red at [<0c008560>]
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksizet [<0c0caaec>] from [<0c082478>]ink socket
ipddp.c:v0.01 8/28/97 Bradford W. Johnson <johns393@maroon.tc.umn.edu> [<0c0823ec>] from [<0c07a068>]ze 1024 blocksize = 3) is a S3C44B02d7f
ipddp0: Appletalk-IP Encap. mode by Bradford W. Johnson <johns393@maroon.tc.umn.
r6 = 00000001 r5 = 0C2DD080 r4 = 0C23F388v0.01
edu>/97
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
Linux IP multicast router 0.06 plus PIM-SM
GRE over IPv4 tunneling
NET4: Linux IPX 0.47 for NET4.0
Function entered at [<0c022918
IPX Portions Copyright (c) 1995 Caldera, Inc.
IPX Portions Copyright (c) 2000, 2001 Conectiva, Inc.unction entered at [<0c022a74>] from [<0c0162e4>]mn.e
NET4: AppleTalk 0.18a for Linux NET4.0
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
Function entered at [<0c0161b0>] from [<0c0156d4>]
Other stuff added by David S. Miller <davem@redhat.com>ons Copyright (c) 2000
Shell invoked to run file: /etc/rc] from [<0c013034>]o
Command: hostname Samsung
NET4: Linux T
Command: /bin/expand /etc/ramfs.img /dev/ram1ot 1.1.1----www.21spacetime.net (Mar 11 2005
Command: /bin/expand /etc/ramfs2048.img /dev/ram2
Can't open expanded file /dev/ram2
U-Boot
Command: mount -t proc proc /proc
mount: /etc/mtab: Read-only file systempanded file /dev/ram
Command: mount -t ext2 /dev/ram1 /var
p
Bank #0: 0c000000 8
mount: /etc/mtab: Read-only file system
Flash: 2 MBc /procpleTa
/ramdisk: No such file or directory#################################ir
Command: mkdir /var/config
Command: mkdir /var/tmp
Command: mkdir /var/log
Command: mkdir /var/run#######################
Command: mkdir /var/lock##########nd: mkdir /var
Command: mkdir /var/empty
Command: ifconfig eth0 211.83.106.157 netmask 255.255.255.0 up
Command: mkdir /var/run
Command: cat /etc/motd######################
Welcome to##########
For further information check:
http://www.uclinux.org/
Command: sh < /dev/ttyS0
Shell invoked to run file: <
<: No such file or directory
Command: #ifconfig eth0 192.168.0.28 netmask 255.255.255.0 up
Execution Finished, Exiting
Sash command shell (version 1.1.1)
/> ls bin
tftp shutdown reboot sh arp
ifconfig route portmap ledtest init
expand ftpd ftp umount rm
ping mount mkdir ls cat
busybox
/> cd bin
/bin>gpio_test
open device error!
pid 31: failed 65280
/bin>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
把Code贴出来啊,是什么驱动,初始化函数