[yocto] How to install kernel objects in /lib

Damien LEFEVRE lefevre.da at gmail.com
Fri Apr 20 04:07:44 PDT 2018


Hi,

I made a recipe to build and install a kernel object. See

SUMMARY = "Kernel module for EPIX grabber"
LICENSE = "CLOSED"

inherit module

SRC_URI = "file://Makefile \
           file://pixcilnx_aarch64_4.4.a \
           file://pixcipub.c \
           file://pixcipub.h \
           file://pixci.rc \
           file://pixci.conf \
          "

S = "${WORKDIR}"

# The inherit of module.bbclass will automatically name module packages with
# "kernel-module-" prefix as required by the oe-core build environment.

do_install() {
    # First create the directories
    install -d
${D}${base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/misc
    install -d ${D}${sysconfdir}/init.d
    install -d ${D}${sysconfdir}/default/

    # Then add the files
    install -m 555 -g root -o root ${B}/pixci.ko ${D}${base_libdir
}/modules/${KERNEL_VERSION}/kernel/drivers/misc/pixci.ko
    install -m 555 -g root -o root ${WORKDIR}/pixci.rc
${D}${sysconfdir}/init.d/pixci
    install -m 644 -g root -o root ${WORKDIR}/pixci.conf
${D}${sysconfdir}/default/pixci
}

# Include all installed files from /etc and /lib
FILES_${PN} += "${base_libdir
}/modules/${KERNEL_VERSION}/kernel/drivers/misc/pixci.ko"
FILES_${PN} += "${sysconfdir}/init.d/pixci"
FILES_${PN} += "${sysconfdir}/default/pixci"

If I use base_libdir to install the kernel object where the scripts expect
it to be, I get an error:
nothing provides kernel-module-pixci-4.4.38-l4t-r28.1+g79e4600 needed by
pixci-3.8.01-r0.jetson_tx2

But if I use libdir variable the kernel object is packages and installed
properly.

Could anyone explain me why?

Thanks,
-Damien
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20180420/e213f776/attachment.html>


More information about the yocto mailing list