免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4998 | 回复: 2

LDD3的scull_load出错 [复制链接]

论坛徽章:
0
发表于 2011-09-07 19:42 |显示全部楼层
大家好,刚学linux。目前在看LDD3。
运行里面的例程,错误很多,google之后都能解决。现在就是创建节点的时候出错了。
完全搞不懂是什么情况。
请大家多多指点。
内核版本是:
xx@xx-ubuntu:~/driver_dev/scull$ uname -a
Linux xx-ubuntu 2.6.36.4-xx #1 SMP Thu Jul 14 20:26:12 HKT 2011 i686 GNU/Linux

xx@xx-ubuntu:~/driver_dev/scull$ sudo ./scull_load
awk: 0: unexpected character '\'
awk: line 1: syntax error at or near ==
mknod: missing operand after `0'
Try `mknod --help' for more information.
mknod: missing operand after `1'
Try `mknod --help' for more information.
mknod: missing operand after `2'
Try `mknod --help' for more information.
mknod: missing operand after `3'
Try `mknod --help' for more information.
chgrp: cannot access `/dev/scull[0-3]': No such file or directory
chmod: cannot access `/dev/scull[0-3]': No such file or directory
mknod: missing operand after `4'
Try `mknod --help' for more information.
mknod: missing operand after `5'
Try `mknod --help' for more information.
mknod: missing operand after `6'
Try `mknod --help' for more information.
mknod: missing operand after `7'
Try `mknod --help' for more information.
chgrp: cannot access `/dev/scullpipe[0-3]': No such file or directory
chmod: cannot access `/dev/scullpipe[0-3]': No such file or directory
mknod: missing operand after `8'
Try `mknod --help' for more information.
chgrp: cannot access `/dev/scullsingle': No such file or directory
chmod: cannot access `/dev/scullsingle': No such file or directory
mknod: missing operand after `9'
Try `mknod --help' for more information.
chgrp: cannot access `/dev/sculluid': No such file or directory
chmod: cannot access `/dev/sculluid': No such file or directory
mknod: missing operand after `10'
Try `mknod --help' for more information.
chgrp: cannot access `/dev/scullwuid': No such file or directory
chmod: cannot access `/dev/scullwuid': No such file or directory
mknod: missing operand after `11'
Try `mknod --help' for more information.
chgrp: cannot access `/dev/scullpriv': No such file or directory
chmod: cannot access `/dev/scullpriv': No such file or direct

论坛徽章:
0
发表于 2011-09-07 20:15 |显示全部楼层
貌似awk就出错了?你把awk拿出来运行一下

论坛徽章:
0
发表于 2011-09-13 14:46 |显示全部楼层
本帖最后由 klanet 于 2011-09-13 14:48 编辑

解决了。
1.要apt-get install gawk.ubuntu里面的awk行为有点诡异
2.把major=$(awk "\\$2==\"$module\" {print \\$1}" /proc/devices)
改为
major=$(awk "\$2==\"$module\" {print \$1}" /proc/devices)
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP