diff options
author | Ray Strode <rstrode@redhat.com> | 2008-10-30 22:01:40 -0400 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2008-10-30 22:03:24 -0400 |
commit | a82c51425220bf3e034a9ec7240ac039a695c396 (patch) | |
tree | d57253770b35ed398797a4e5128d2592e18a9c92 |
Stub module
Initial minimal module
-rw-r--r-- | Makefile | 12 | ||||
-rw-r--r-- | kecho.c | 15 |
2 files changed, 27 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..7fd5da7 --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ +obj-m := kecho.o +KDIR := /lib/modules/$(shell uname -r)/build +PWD := $(shell pwd) + +default: + $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules + +install: default + $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules_install + +clean: + rm -rf *.o *.ko .*.cmd *.mod.c .tmp_versions *~ core @@ -0,0 +1,15 @@ +#include <linux/module.h> +#include <linux/init.h> + +MODULE_LICENSE("GPL"); +static int __init kecho_init(void) +{ + return 0; +} + +static void __exit kecho_cleanup(void) +{ +} + +module_init(kecho_init); +module_exit(kecho_cleanup); |