From: Michael Gernoth Date: Wed, 18 May 2011 20:14:41 +0000 (+0200) Subject: initial Makefile and module (currently just a test for the toolchain) X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/ms2-fixes/commitdiff_plain/b422e3333d93d3e54f65e0837af55ede54d73247 initial Makefile and module (currently just a test for the toolchain) --- b422e3333d93d3e54f65e0837af55ede54d73247 diff --git a/Makefile b/Makefile new file mode 100644 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 index 0000000..8e13520 --- /dev/null +++ b/debounce.c @@ -0,0 +1,17 @@ +#include + +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 ");