- 11
- 0
- 约4.64千字
- 约 4页
- 2017-12-20 发布于河北
- 举报
如何编译第一个模块hello.ko
如何编译第一个模块 hello.ko
2011-08-16 21:06 25人阅读 评论(0) 收藏 举报
?
看了书后,照着书上的方法一步一步去做,却失败了,555真是的,写书的人啊,却不考虑一下细节问题新建一个目录[liu@liu-desktop hellomod]$mddir hellomod[liu@liu-desktop hellomod]$cd hellomod[liu@liu-desktop hellomod]$vi hellomod.c/****************hellomod.c*******************************/#include linux/module.h //所有模块都需要的头文件#include linux/init.h // initexit相关宏MODULE_LICENSE(GPL);static int __init hello_init (void){??? printk(Hello china init/n);??? return 0;}static void __exit hello_exit (void){??? printk(Hello china exit/n);}module_init(hello_init);module_exit(hello_ex
原创力文档

文档评论(0)