- 论坛徽章:
- 0
|
本帖最后由 ch81 于 2013-04-18 02:55 编辑
我精简了所有代码 只剩下这些 还是出错 我无语了 哥们帮忙看看
#include <linux/init.h>
#include <linux/module.h>
static int __init hello_init(void)
{
printk("hello world \n");
return 0;
}
static void __exit hello_exit(void)
{
printk("Goodbye,cruel world \n");
}
module_init(hello_init);
module_exit(hello_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("chang hao");
MODULE_DESCRIPTION("test module");
//***************Makefile**********************
obj-m := test_module.o
KDIR := /opt/linux-3.1_TQ2416
PWD := $(shell pwd)
all:
make -C $(KDIR) M=$(PWD) modules
clean:
make -C $(KDIR) M=$(PWD) modules clean
rm -f *.ko *.o
|
|