Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build module on installed 4.4.54 kernel #47

Open
gapster opened this issue Aug 7, 2017 · 0 comments
Open

Cannot build module on installed 4.4.54 kernel #47

gapster opened this issue Aug 7, 2017 · 0 comments

Comments

@gapster
Copy link

gapster commented Aug 7, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant