summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2008-10-30 22:01:40 -0400
committerRay Strode <rstrode@redhat.com>2008-10-30 22:03:24 -0400
commita82c51425220bf3e034a9ec7240ac039a695c396 (patch)
treed57253770b35ed398797a4e5128d2592e18a9c92
Stub module
Initial minimal module
-rw-r--r--Makefile12
-rw-r--r--kecho.c15
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
diff --git a/kecho.c b/kecho.c
new file mode 100644
index 0000000..cbdbb40
--- /dev/null
+++ b/kecho.c
@@ -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);