summaryrefslogtreecommitdiffstats
path: root/Usb-Driver/Makefile
diff options
context:
space:
mode:
authorChristian Gromm <christian.gromm@microchip.com>2016-06-21 14:14:04 +0200
committerChristian Gromm <christian.gromm@microchip.com>2016-06-21 14:14:04 +0200
commit860b3c0ccfb2756b8ed77523048952011b74a212 (patch)
treee0672fb5cf923dcf0a4a48a62a69011e1b72976a /Usb-Driver/Makefile
parent742bace60b9c0a0f583d8afe1097d029f468fa03 (diff)
src: can-lin: initial source import
This patch adds the sources needed for the HVAC and iDrive applications. Change-Id: I53148a5d11c34787dd11295939bbaf8702c64dcb Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Diffstat (limited to 'Usb-Driver/Makefile')
-rw-r--r--Usb-Driver/Makefile42
1 files changed, 42 insertions, 0 deletions
diff --git a/Usb-Driver/Makefile b/Usb-Driver/Makefile
new file mode 100644
index 0000000..406b187
--- /dev/null
+++ b/Usb-Driver/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
+