Raspberry PI:make命令无法在makefile下面使用 [英] Raspberry PI: make command not working with below makefile

查看:108
本文介绍了Raspberry PI:make命令无法在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

此外,我可以在ubuntu上编译makefile.

Also, I can compile the makefile at ubuntu.

但是,我正在尝试在树莓派上编译abobe makefile.

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

错误日志:

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

我如何在raspberry pi(raspbian)上编译此makefile?

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

推荐答案

您在pi上的/lib/modules/4.14.98-v7+/build处没有Makefile. (您的default初始配方运行,但是随后使用-C调用make指向没有makefile的目录,并且错误消息由此而来).

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).

尝试执行ls /lib/modules/,并查看其中包含的目录.请注意,此网页意味着您必须手动将内核头文件安装到pi板上.

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...

这篇关于Raspberry PI:make命令无法在makefile下面使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆