]> git.zerfleddert.de Git - ms2-fixes/commitdiff
initial Makefile and module (currently just a test for the toolchain)
authorMichael Gernoth <michael@gernoth.net>
Wed, 18 May 2011 20:14:41 +0000 (22:14 +0200)
committerMichael Gernoth <michael@gernoth.net>
Wed, 18 May 2011 20:14:41 +0000 (22:14 +0200)
Makefile [new file with mode: 0644]
debounce.c [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..d1cd736
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,15 @@
+KDIR=../out/target/product/generic/obj/PARTITIONS/kernel_intermediates/build
+ARCH=arm
+CROSS_COMPILE=arm-eabi-
+CROSS_PATH=$(PWD)/../prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin
+CC=$(CROSS_PATH)/$(CROSS_COMPILE)gcc
+LD=$(CROSS_PATH)/$(CROSS_COMPILE)ld
+AR=$(CROSS_PATH)/$(CROSS_COMPILE)ar
+
+obj-m := debounce.o
+
+all:
+       $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
+
+clean:
+       $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) clean
diff --git a/debounce.c b/debounce.c
new file mode 100644 (file)
index 0000000..8e13520
--- /dev/null
@@ -0,0 +1,17 @@
+#include <linux/module.h>
+
+static int __init debounce_init(void)
+{
+       printk(KERN_INFO "Hello Milestone2!\n");
+       return 0;
+}
+
+static void __exit debounce_exit(void)
+{
+}
+
+module_init(debounce_init);
+module_exit(debounce_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Michael Gernoth <michael@gernoth.net>");
Impressum, Datenschutz