amescon / raspicomm-module

raspicomm kernel module with tty driver support for rs485 (raspicommrs485.ko)
12 stars 14 forks source link

Compile error on 4.1.13-v7+ #9

Open lukicdarkoo opened 8 years ago

lukicdarkoo commented 8 years ago

My configuration: Kernel 4.1.13-v7+ Raspberry Pi 2

When I try to compile module on RP2 I get

make -C /lib/modules/4.1.13-v7+/build M= modules
make[1]: Entering directory '/usr/src/linux-headers-4.1.13-v7+'
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
make[2]: 'include/generated/mach-types.h' is up to date.
  CHK     include/generated/bounds.h
  CHK     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
grep: scripts/../arch/x86/syscalls/syscall_32.tbl: No such file or directory
make[2]: *** No rule to make target 'arch/arm/crypto/aes-armv4.o', needed by 'arch/arm/crypto/aes-arm.o'.  Stop.
Makefile:947: recipe for target 'arch/arm/crypto' failed
make[1]: *** [arch/arm/crypto] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.1.13-v7+'
Makefile2:6: recipe for target 'all' failed
make: *** [all] Error 2

I modified Makefile like this

CURRENT := $(shell uname -r)
KDIR := /lib/modules/$(CURRENT)/build
PWD := $(shell pwd)

obj-m += raspicommrs485.o

raspicommrs485-objs := module.o queue.o

all:
    # $(MAKE) -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
    $(MAKE) -I $(KDIR)/arch/arm/include/asm/ -C $(KDIR) M=$(PWD)

clean:
    make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean

but not I am getting error when I want to insmod insmod: ERROR: could not insert module raspicommrs485.ko: No such device

ossnoser commented 8 years ago

Same problem here...

rtu-dataframe commented 7 years ago

Any news? solutions?

Martin-Furter commented 6 years ago

I am running kernel 4.9.59-v7+ on a raspberry pi 2 B+. I created a fork since I had the same problem. It is more or less a complete rewrite since so many things changed in the kernel. You can find it here if you want to give it a try: https://github.com/Martin-Furter/raspicomm-module