关于驱动程序模块编译

derest12 derest12 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
为什么我的驱动程序模块编译时候通过了,并生产了.ko文件,当我加载到系统上时不能出现我想要的结果,我是初学者,
#include <linux/init.h>
#include <linux/module.h>

MODULE_LICENSE("Dual BSD/GPL");

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

static void hello_exit(void)
{
printk(KERN_ALERT "Goodbye, cruel world\n");
}

module_init(hello_init);
module_exit(hello_exit);
应该出现的结果是在加载的时候出现hello,wrold,在卸载模块的时候出现Goodbye,cruel wrold,但是我加载后卸载了什么都没出现。请问各位高手这个可能是哪点出错了?
...全文

相关推荐

评论 22
收藏 已收藏
分享
返回顶部
derest12
Linux_Kernel 4,469 成员 17,458 内容