hello world中添加了作者信息, makefile中添加编译参数...

This commit is contained in:
gatieme
2017-03-23 20:53:28 +08:00
parent 77f202b658
commit dbabd18a46
2 changed files with 12 additions and 0 deletions
+3
View File
@@ -25,6 +25,9 @@ DRIVER_LICENSE := "Dual BSD/GPL"
MODULE_NAME := hello
MODCFLAGS:=-O6 -Wall -DMODULE -D__KERNEL__ -DLINUX -std=c99
ifneq ($(KERNELRELEASE),)
+9
View File
@@ -1,7 +1,15 @@
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/sched.h>
//#include <linux/list.h>
//#include <linux/mm.h>
//#include <linux/mm_types.h>
MODULE_LICENSE("Dual BSD/GPL");
MODULE_AUTHOR("Gatieme");
MODULE_DESCRIPTION("hello world");
/*
* print the module information
@@ -36,6 +44,7 @@ static int hello_init(void)
static void hello_exit(void)
{
printk(KERN_ERR"exit");
}