目录:
1:hello word驱动
2:Makefile的分类
3:外部模块编译
4:内部模块编译
5:模块加载
6:模块信息查询
正文:
1:hello word驱动代码
/*******************************************
*Func:A simple Kernel Driver Module
*Author:Golf(FXB)
*Date:2016/08/10
* ***************************************/
#include <linux/init.h>
#include <linux/module.h>
MODULE_LICENSE("Dual BSD/GPL"); //模块许可声明
static char *weather = "the weather is sunshine";
static char temperature = 36;
static int __init hello_word_init(void) //