如何动态加载helloworld驱动模块
初学者必读参考文档谢谢楼主分享哦。。。。 raominping 发表于 2011-12-9 10:12 static/image/common/back.gif
谢谢楼主分享哦。。。。
呵呵 自己写的 仅供参考 还请版主多多指教啊:) 支持原创!{:3_62:} 谢谢分享,参考一下 很好,学习了! 唉,我碰到头文件都找不到的问题。请问如何解决。
# cd ..
# cd opt/EmbedSky/linux-2.6.30.4/drivers/hellomode/
# make
make -C /opt/EmbedSky/linux-2.6.30.4 M=/opt/EmbedSky/linux-2.6.30.4/drivers/hell
omode modules ARCH=arm CROSS_COMPILE=arm-linux-
make: Entering directory `/opt/EmbedSky/linux-2.6.30.4'
WARNING: Symbol version dump /opt/EmbedSky/linux-2.6.30.4/Module.symvers
is missing; modules will have no dependencies and modversions.
CC /opt/EmbedSky/linux-2.6.30.4/drivers/hellomode/hellomode.o
/opt/EmbedSky/linux-2.6.30.4/drivers/hellomode/hellomode.c:1:26: error: linux/mo
dule.h: No such file or directory
/opt/EmbedSky/linux-2.6.30.4/drivers/hellomode/hellomode.c:2:24: error: linux/in
it.h: No such file or directory
/opt/EmbedSky/linux-2.6.30.4/drivers/hellomode/hellomode.c:3: error: expected de
claration specifiers or '...' before string constant
/opt/EmbedSky/linux-2.6.30.4/drivers/hellomode/hellomode.c:3: warning: data defi
nition has no type or storage class
/opt/EmbedSky/linux-2.6.30.4/drivers/hellomode/hellomode.c:3: warning: type defa
ults to 'int' in declaration of 'MODULE_LICENSE'
/opt/EmbedSky/linux-2.6.30.4/drivers/hellomode/hellomode.c:3: 謝謝大大分享:funk: 下载来看看,楼主辛苦了。 7楼的亲,你的错误是因为内核没有编译引起的。 本帖最后由 lingbing001 于 2012-3-2 17:18 编辑
亚瑟王 发表于 2012-2-27 12:05 http://bbs.embedsky.net/static/image/common/back.gif
7楼的亲,你的错误是因为内核没有编译引起的。
请问能帮我分析下我这个问题吗?
make -C /opt/EmbedSky/opt/EmbedSky/linux-2.6.30.4 M= /opt/EmbedSky/hellworld modules ARCH=arm
CROSS_COMPILE=arm-linux-
make:Entering directory '/opt/EmbedSky/opt/EmbedSky/linux-2.6.30.4'
Makefile:535: /opt/EmbedSky/opt/EmbedSky/linux-2.6.30.4/arch//Makefile:没有那个文件或目录
make:arm-linux-: gcc:Command not found
B Bmake :*** No rule to make target '/opt/EmbedSky/opt/EmbedSky/linux-2.6.30.4/arch//Makefile' .Stop.
make: Leaving directory '/opt/EmbedSky/opt/EmbedSky/linux-2.6.30.4'
make: ***Error 2
亲,你编译驱动的Makefile文件有问题,你把文件内容贴出来。 亚瑟王 发表于 2012-3-3 14:55 static/image/common/back.gif
亲,你编译驱动的Makefile文件有问题,你把文件内容贴出来。
就是按照分享的文件写的,只不过把KDIR的路径改为我自己的内核路径了。 亚瑟王 发表于 2012-2-27 12:05 static/image/common/back.gif
7楼的亲,你的错误是因为内核没有编译引起的。
能给您提供个建议吗?回答别人问题的时候可不可以选择回复,这样的话系统会提示有消息,不然的话都不知道问题有没有人回~:'( lingbing001 发表于 2012-3-7 15:10 static/image/common/back.gif
能给您提供个建议吗?回答别人问题的时候可不可以选择回复,这样的话系统会提示有消息,不然的话都不知道 ...
亲,好的,这个之前没有想到。不好意思啊。
页:
[1]
2