You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#include <linux/module.h> /* Needed by all modules */
#include <linux/kernel.h> /* Needed for KERN_INFO */
#include <linux/init.h> /* Needed for the macros */
#include "greet.h"
static int __init module_load(void) {
printk("Loading hello module...");
greet();
printk("hello module initialization");
return 0;
}
static void __exit module_unload(void) {
printk("Goodbye.");
}
module_init(module_load);
module_exit(module_unload);
///< The author -- visible when you use modinfo
MODULE_AUTHOR("Someones");
///< The description -- see modinfo
MODULE_DESCRIPTION("A simple Hello world LKM!");
///< The version of the module
MODULE_VERSION("0.1");
///< The license type -- this affects runtime behavior
MODULE_LICENSE("GPL");
Xmake 版本
xmake v2.7.1+202209191332
操作系统版本和架构
Linux wl-kernel 6.0.0-rc5 #1 SMP PREEMPT_DYNAMIC Sat Sep 17 14:58:17 CST 2022 x86_64 x86_64 x86_64 GNU/Linux
描述问题
多文件编译错误
modpost 报错:文件未找到
期待的结果
编译通过
工程配置
xmake.lua
main.c
greet.h
greet.c
附加信息和错误日志
The text was updated successfully, but these errors were encountered: