mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-26 11:41:35 +01:00
bring a minimal buildroot kernel modules example to life
More importantly, to make modules_install on the Linux kernel build.
This commit is contained in:
18
buildroot_packages/kernel_modules/buildroot_dep2.c
Normal file
18
buildroot_packages/kernel_modules/buildroot_dep2.c
Normal file
@@ -0,0 +1,18 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#kernel-module-dependencies */
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
extern u32 lkmc_dep;
|
||||
|
||||
static int myinit(void)
|
||||
{
|
||||
pr_info("%llu\n", (long long unsigned)lkmc_dep);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void myexit(void) {}
|
||||
|
||||
module_init(myinit)
|
||||
module_exit(myexit)
|
||||
MODULE_LICENSE("GPL");
|
||||
Reference in New Issue
Block a user