1

Makefile:

module=usb-it950x
EXTRA_CFLAGS = -DEXPORT_SYMTAB
CURRENT = $(shell uname -r)
KDIR = /lib/modules/$(CURRENT)/build
PWD = $(shell pwd)
MACHINE = $(shell uname -m)
KDIR26   := /lib/modules/$(CURRENT)/kernel/drivers/media
DEST = /lib/modules/$(CURRENT)/kernel/$(MDIR)
LMDIR26 := /lib/firmware

usb-it950x-objs := \
        it950x-core.o it950x-drv.o iocontrol.o  \
        tuner.o cmd.o IT9133.o ADF4351.o \
        IT9507.o Omega.o eagleTuner.o \
        standard.o usb2impl.o modulatorUser.o user.o 

obj-m += usb-it950x.o  

default:
    @(cp api/*.* ./; cp src/*.* ./)
    make -s -C $(KDIR) SUBDIRS=$(PWD) modules

Also, I can compile the makefile at ubuntu.

But, I am trying compile abobe makefile at raspberry pi.

Error Log:

make -C /lib/modules/4.14.98-v7+/build SUBDIRS=/home/pi/it950x_driver modules
make[1]: *** /lib/modules/4.14.98-v7+/build: No such file or directory.  Stop.
Makefile:20: recipe for target 'default' failed
make: *** [default] Error 2

How I can compile this makefile at raspberry pi(raspbian)?

Relay Just
  • 15
  • 2

1 Answers1

1

You do not have a Makefile at /lib/modules/4.14.98-v7+/build on your pi. (your initial recipe for default runs, but then calls make with a -C that points to a directory with no makefile, and your error message comes from that).

Try doing an ls /lib/modules/, and see what directories it has in there. Note that this web page implies that you have to install the kernel headers onto a pi board manually...

HardcoreHenry
  • 5,909
  • 2
  • 19
  • 44