阅读背景:

在桌面红旗6上编写并运行第一个驱动设备程序_dijkstar的专栏

来源:互联网 

使用根用户,创建一个文件hello.c,内容:


#include <linux/init.h>
#include <linux/module.h>

static int hello_init(void)
{
    printk(KERN_ALERT "Hello, World\n");
    return 0;
}

static void hello_exit()
{
    printk(KERN_ALERT "Bye bye, Hello, World\n");
}


module_init(hello_init);
module_exit(hello_exit);


#include <linux/init



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: