免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1172 | 回复: 2
打印 上一主题 下一主题

菜鸟弱问:《Linux设备驱动程序》源码用法 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-07-26 13:23 |只看该作者 |倒序浏览
各位大虾万福:
    小弟是一个刚刚进入Linux领域的门外汉,用虚拟机跑RedHat9.0。我现在遇到这样的问题:我把《Linux 设备驱动程序》的源码 ldd2-samples-1.0.1.tar.gz (对应第二版)解压到/home下以后,不知道怎么使用,make也通不过:
# make
for n in misc-progs misc-modules skull scull scullc scullp scullv sbull spull
snull short shortprint pci simple usb allocator; do make -C $n || exit 1; done
make[1]: Entering directory
`/home/study/drivers/ldd2-samples-1.0.1/misc-progs'
cc -O2 -fomit-frame-pointer -Wall -I/usr/include    asynctest.c   -o asynctest
cc -O2 -fomit-frame-pointer -Wall -I/usr/include    nbtest.c   -o nbtest
cc -O2 -fomit-frame-pointer -Wall -I/usr/include    setconsole.c   -o
setconsole
cc -O2 -fomit-frame-pointer -Wall -I/usr/include    setlevel.c   -o setlevel
/tmp/ccWQfMtI.o(.text+0x1c): In function `syslog':
: undefined reference to `errno'
/tmp/ccWQfMtI.o(.text+0x89): In function `main':
: undefined reference to `errno'
collect2: ld returned 1 exit status
make[1]: *** [setlevel] Error 1
make[1]: Leaving directory `/home/study/drivers/ldd2-samples-1.0.1/misc-progs'
make: *** [subdirs] Error 1

      我用的GCC是系统安装时把“开发”里的“开发工具”和“内核开发”点满了的版本。烦请各位大虾指导一下这些源码的使用方法,多谢了!
sharkhuang 该用户已被删除
2 [报告]
发表于 2006-07-26 13:26 |只看该作者
提示: 作者被禁止或删除 内容自动屏蔽

论坛徽章:
0
3 [报告]
发表于 2006-07-26 13:30 |只看该作者
to sharkhuang:你好,多谢回帖!不过这些都是源码,里面一大堆文件,我应该往里加么?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP