Interfacing
Banana Pi IR Driver
21
20982
|
Edited by pohybel at Thu Jul 23, 2015 07:59
I've already made some progress and created makefile. But it seems i've missed something. I compiled module and got irdriver.ko as a result but when I try to insmod irdriver.ko im getting:
- root@bananapi:/opt/irdriver # insmod ./irdriver.ko
- insmod: ERROR: could not insert module ./irdriver.ko: Invalid module format
Copy the Code
Here is my makefile:
- ARCH:=arm
- CROSS_COMPILE:=/usr/bin/arm-linux-gnueabihf-
- #LICHEE_KDIR:= /opt/git/lemaker-bsp/linux-sunxi
- LICHEE_KDIR:= /opt/git/lemaker-bsp/build/sun7i_defconfig-linux
- PWD=$(shell pwd)
- all: build
- obj-m+=irdriver.o
- build:
- @echo $(LICHEE_KDIR)
- $(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(LICHEE_KDIR) M=$(PWD)
- clean:
- @rm -rf *.o *.ko .*.cmd *.mod.c *.order *.symvers .tmp_versions *~
Copy the Code
What I've missed? Why my module has invalid format?
|
|
|
|
|
|
|
|
try using the "-f" option with insmod.
could be a simple version mismatch with the running kernel or sth more sinister... |
|
|
|
|
|
|