Yocto install a script along with a kernel module

Viewed 71

I want to install a script into target rootfs that will help set up a driver. I tried doing something like this (as I wanted it to be installed along the kernel module):

SUMMARY = "Kernel module with script"

LICENSE = "MIT"
LIC_FILES_CHKSUM = "\
   file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

inherit module

SRC_URI = "file://Makefile"
SRC_URI += "file://char-drv-ll.c"
SRC_URI += "file://start-char-drv-ll.sh"

S = "${WORKDIR}"

# 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-char-drv-ll"

do_install_append() {
    install -d ${D}${bindir}
    install -m 0755 ${S}/start-char-drv-ll.sh ${D}${bindir}
}

RDEPENDS_${PN} += "bash"
FILES_${PN} += "${bindir}/start-char-drv-ll.sh"

However, after running the image in QEMU, I see that module is installed, but the script is nowhere to be found.

Where am I wrong in my reasoning?

0 Answers
Related