File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed
Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ #include <linux/init.h>
2+ #include <linux/module.h>
3+
4+
5+ MODULE_VERSION ("1.0.0" );
6+ MODULE_LICENSE ("Dual BSD/GPL" );
7+ MODULE_AUTHOR ("DavidingPlus" );
8+ MODULE_DESCRIPTION ("A Linux Kernel Module" );
9+
10+
11+ static int __init linuxKernelModuleInit (void )
12+ {
13+ pr_info ("linux-kernel-module: Hello Linux Kernel Module\n" );
14+
15+ return 0 ;
16+ }
17+
18+ static void __exit linuxKernelModuleExit (void )
19+ {
20+ pr_info ("linux-kernel-module: Goodbye Linux Kernel Module\n" );
21+ }
22+
23+
24+ module_init (linuxKernelModuleInit );
25+ module_exit (linuxKernelModuleExit );
Original file line number Diff line number Diff line change 1+ option (" linux-headers" , {showmenu = true , description = " Set linux-headers path." })
2+
3+
4+ target (" linux-kernel-module" )
5+ add_rules (" platform.linux.module" )
6+ add_files (" src/*.c" )
7+ set_values (" linux.driver.linux-headers" , " $(linux-headers)" )
8+
9+ add_cflags (" -O1" )
You can’t perform that action at this time.
0 commit comments