From 0df0d597825c70057f929a4d08ecb459b3c672cd Mon Sep 17 00:00:00 2001 From: hackbard Date: Fri, 23 Sep 2005 07:20:46 +0000 Subject: [PATCH] readded hello world module and Makefile --- hello/Makefile | 1 + hello/hello.c | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 hello/Makefile create mode 100644 hello/hello.c diff --git a/hello/Makefile b/hello/Makefile new file mode 100644 index 0000000..17ba718 --- /dev/null +++ b/hello/Makefile @@ -0,0 +1 @@ +obj-m += hello.o diff --git a/hello/hello.c b/hello/hello.c new file mode 100644 index 0000000..3b236b8 --- /dev/null +++ b/hello/hello.c @@ -0,0 +1,22 @@ +/* + * hello world kernel module + * + */ + +#include +#include +#include + +//MODULE_LICENSE("GPL"); + +static int __init name_of_initialization_routine(void) { + printk(KERN_INFO "hello world, this is your kernel speaking\n"); + return 0; +} + +static void __exit name_of_cleanup_routine(void) { + printk(KERN_INFO "good bye world!\n"); +} + +module_init(name_of_initialization_routine); +module_exit(name_of_cleanup_routine); -- 2.39.2