aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-kernel/mocca-usb/_files/_Makefile
diff options
context:
space:
mode:
authorChristian Gromm <christian.gromm@microchip.com>2016-08-02 11:48:39 +0200
committerGerrit Code Review <gerrit@172.30.200.200>2016-08-04 07:17:20 +0000
commit7b58e8b4d4cd279b00124e50cbbc70b01248a0ee (patch)
tree3387ff74f5957fabe01a26f683ae84813436d32a /recipes-kernel/mocca-usb/_files/_Makefile
parent7e3a1a0442347e0290133707aa70e207bce47a99 (diff)
recipes-kernel: update driver recipes
This patch changes the recipes to fetch the driver sources from AGL's src directory. It therefore removes the redundant source files from the recipe directory. Change-Id: Ib3c48a0c7e79144713ccd8e10a89185cd929b41c Signed-off-by: Christian Gromm <christian.gromm@microchip.com> (cherry picked from commit 1ea0cef6934ccadc36395b60d8b8d58d69016e28)
Diffstat (limited to 'recipes-kernel/mocca-usb/_files/_Makefile')
-rw-r--r--recipes-kernel/mocca-usb/_files/_Makefile42
1 files changed, 42 insertions, 0 deletions
diff --git a/recipes-kernel/mocca-usb/_files/_Makefile b/recipes-kernel/mocca-usb/_files/_Makefile
new file mode 100644
index 000000000..406b18717
--- /dev/null
+++ b/recipes-kernel/mocca-usb/_files/_Makefile
@@ -0,0 +1,42 @@
+# set your module name here
+# provide the following files
+#
+# MODULENAME.c the driver
+# MODULENAME.h the include file
+# MODULENAME_test.c the driver test program
+# MODULENAME_test.sh the driver test script
+#
+MODULENAME := mocca-usb
+### should not need to change stuff below ######################
+
+
+# KDIR := /lib/modules/$(shell uname -r)/build
+#KDIR := /home/me/arm/linux-2.6.35.9/
+PWD := $(shell pwd)
+CC := ${CROSS_COMPILE}gcc -Wall
+
+ifeq ($(KERNELRELEASE),)
+all:
+ $(MAKE) V=0 -C $(KDIR) SUBDIRS=$(PWD) modules
+else
+ obj-m := $(MODULENAME).o
+endif
+
+
+load: all
+ ssh root@10.0.0.3 'echo 0x46 > /sys/bus/i2c/devices/i2c-0/delete_device; rmmod /home/matrix/$(MODULENAME).ko'
+ scp $(MODULENAME).ko root@10.0.0.3:/home/matrix
+ ssh root@10.0.0.3 'insmod /home/matrix/$(MODULENAME).ko; echo k2l-i2c-0 0x46 > /sys/bus/i2c/devices/i2c-0/new_device'
+
+unload:
+ ssh root@10.0.0.3 'echo 0x46 > /sys/bus/i2c/devices/i2c-0/delete_device; rmmod /home/matrix/$(MODULENAME).ko'
+
+test: all
+
+clean:
+ -rm -f *.o *.ko modules.order Module.symvers *.mod.c .*.cmd $(MODULENAME)_test
+ -rm -rf .tmp_versions
+
+copy:
+ scp $(MODULENAME).ko root@10.0.0.3:/home/matrix
+