Skip to content

Cannot build module on installed 4.4.54 kernel #47

Description

@gapster

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions