RobertCNelson / bb-kernel

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot build module on installed 4.4.54 kernel

gapster opened this issue · comments

I have a device (a camera from Finger Lakes Instrumentation), and the vendor sent me source code for a kernel module. I know nothing about compiling kernel modules. Here's the makefile:

`
obj-m := fliusb.o

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

EXTRA_CFLAGS += -O2 -Wall

#EXTRA_CFLAGS += -DDEBUG # enable debug messages
#EXTRA_CFLAGS += -DASYNCWRITE # enable asynchronous writes
EXTRA_CFLAGS += -DSGREAD # enable scatter-gather reads

all: module cleanup

module:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules

cleanup:
rm -f .o ..cmd *.mod.c; rm -rf .tmp_versions

clean: cleanup
rm -f *.ko test
`

I had to invoke this with make -C /usr/src/linux to get it to even start. It compiles a few things, but fails with the following. Any ideas?

make: Entering directory '/usr/src/linux-headers-4.4.54-ti-r93'
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
make[1]: *** No rule to make target 'arch/arm/tools/gen-mach-types', needed by 'include/generated/mach-types.h'. Stop.
arch/arm/Makefile:313: recipe for target 'archprepare' failed
make: *** [archprepare] Error 2