I am trying to compile the kernel module inside Yocto recipe. However, I always get this error /bin/sh: 1: sparse: not found
.
If I cross-compile the module with the populated SDK, it works perfectly fine.
Somehow, sh
can't find sparse
.
Note: sparse
is downloaded
Here is my recipe
SUMMARY = "test Linux kernel module"
LICENSE = "CLOSED"
inherit module
SRC_URI = "git://github.com/xyz/test_yocto.git;protocol=https"
SRCREV = "${AUTOREV}"
#SRCREV = "5c6224fee66d8e4eb167f4c74d42e5cfa479e9eb"
S = "${WORKDIR}/git"
# The inherit of module.bbclass will automatically name module packages with
# "kernel-module-" prefix as required by the oe-core build environment.
RPROVIDES_${PN} += "kernel-module-test"
and here is my make file:
obj-m := test.o
SRC := $(shell pwd)
all:
$(MAKE) KBUILD_CHECKSRC=1 -C $(KERNEL_SRC) M=$(SRC)
modules_install:
$(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install
clean:
rm -f *.o *~ core .depend .*.cmd *.ko *.mod.c
rm -f Module.markers Module.symvers modules.order
rm -rf .tmp_versions Modules.symvers
If I remove KBUILD_CHECKSRC=1
, which will pass checks, it will work fine.
What am I missing here?
sparse
is downloaded on my build machine. I can build the module with theSDK
and it usessparse
. However, this cant be done during bitbake build. – Mero Oct 17 at 8:54