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:
Ciro Santilli 六四事件 法轮功
2018-11-04 21:21:06 +00:00
parent b12206e871
commit 72167f9f68
11 changed files with 221 additions and 44 deletions

View File

@@ -0,0 +1,19 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#getting-started-natively */
#include <linux/module.h>
#include <linux/kernel.h>
static int myinit(void)
{
pr_info("init buildroot\n");
return 0;
}
static void myexit(void)
{
pr_info("exit buildroot\n");
}
module_init(myinit)
module_exit(myexit)
MODULE_LICENSE("GPL");