摘要: 在使用命令ismod helloworld.ko 加载编译成功的模块helloworld.ko时出现错误insmod: error inserting 'helloworld.ko': -1 Invalid module format一般出错信息被记录在文件/var/log/messages中[root@hailiang linux-2.6.15.5]# cat /var/log/messages |tailSep 14 09:20:19 localhost kernel: hello: disagrees about version of symbol struct_modu 阅读全文
posted @ 2013-08-27 15:20 总是TMD后知后觉 阅读(1210) 评论(0) 推荐(0) 编辑
摘要: 嵌入式linux下设备驱动的运行和linux x86 pc下运行设备驱动是类似的,由于手头没有嵌入式linux设备,先在vmware上的linux上学习驱动开发。按照如下方法就可以成功编译出hello world模块驱动。1、首先确定本机linux版本怎么查看Linux的内核kernel版本?'uname'是Linux/unix系统中用来查看系统信息的命令,适用于所有Linux发行版。配合使用'uname'参数可以查看当前服务器内核运行的各个状态。#uname -aLinux whh 3.5.0-19-generic #30-UbuntuSMPTue Nov 1 阅读全文
posted @ 2013-08-27 13:45 总是TMD后知后觉 阅读(274) 评论(0) 推荐(0) 编辑