问题遇到的现象和发生背景
linux 用arm-linux-gnueabihf交叉编译链编译内核hello.c,无法找到init.h头文件
用代码块功能插入代码,请勿粘贴截图
这是我的源代码
#include <linux/init.h>
#include <linux/module.h>
#include <linux/kernel.h>
static int_init helloworld_init(void)
{
pr_info("Hello world!\n");
return 0;
}
static int_init exit helloword_exit(void)
{
pr_info("End of the world\n");
}
module_init(helloword_init);
module_init(helloword_exit);
MODULE_AUTHOR("John Madieujohn.madieu@gamil.com");
MODULE_LICENSE("GPL");