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:
  1. root@bananapi:/opt/irdriver # insmod ./irdriver.ko
  2. insmod: ERROR: could not insert module ./irdriver.ko: Invalid module format
Copy the Code

Here is my makefile:
  1. ARCH:=arm
  2. CROSS_COMPILE:=/usr/bin/arm-linux-gnueabihf-

  3. #LICHEE_KDIR:= /opt/git/lemaker-bsp/linux-sunxi
  4. LICHEE_KDIR:= /opt/git/lemaker-bsp/build/sun7i_defconfig-linux

  5. PWD=$(shell pwd)

  6. all: build
  7. obj-m+=irdriver.o

  8. build:
  9.         @echo $(LICHEE_KDIR)

  11. clean:
  12.         @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...

You have to log in before you can reply Login | Sign Up

Points Rules