fatal error:asm/processor.h :No such file or directory
我按照网上提供的最简单的驱动代码:
#include <linux/module.h> //所有模块都需要的头文件
#include <linux/init.h> // init&exit相关宏
MODULE_LICENSE("GPL");
static int __init hello_init (void)
{
printk("Hello module init\n");
return 0;
}
static void __exit hello_exit (void)
{
printk("Hello module exit\n");
}
module_init(hello_init);
module_exit(hello_exit);
编译出错,fatal error:asm/processor.h :No such file or directory
我装的是ubuntu10,在系统上和虚拟系统机上测试都是这个问题。不知道怎么回事?驱动编程时必须要重新编译内核吗?