Basic Framework of Linux Kernel Modules
The writing of Linux kernel modules intimidates many people, but it is actually not that difficult or complicated. Here’s a basic framework to help those with a little knowledge get started quickly. 1. Basic Framework (Before Kernel 2.3.13) #include<linux/kernel.h> #include<linux/module.h> int init_module(void){ pr_info("hello module.\n"); return 0; } void cleanup_module(void){ pr_info("hello end.\n"); } MODULE_LICENSE("GPL"); #include<linux/module.h> int … Read more