Extra files to kernel module package #kernel


bgctkd@...
 

This was asked a while back with no answer that I could find, but I am running into the same issue where I can't use FILES:${PN} - to get a kernel udev source file into my build and am wondering if anyone has a suggestion on how best to accomplish it. I have found some links where it is agreed that FILES:${PN} doesn't work but no solution that works for me anyway has been provided.

I have recipe that compiles kernel module. It works fine ie. the
module ends up to image.

I also have few configuration files that I'd like to add with the
package. Earlier version (I'm currently using thud-branch) that was
done by adding this line to recipe:

FILES_${PN} += "${sysconfdir}/udev/*"

Then when image - recipe I had
IMAGE_INSTALL += "<recipe-name>"  all would be installed to image.

Now the sysconfdir files ends up to recipe-name - package and module
itself ends up to kernel-module-<recipe-name> - package and although
I"m installing <recipe-name>  - package the one with module ends up to
image and the <recipe-name> - package is not.

I know that when inheriting module.class it'll rename the package to
kernel-module-${PN} yet you use the recipe name for installing the
package.  I tried adding the files to kernel-module-${PN} - package
instead, but didn't work.

What's the proper way adding extra files to kernel-module-package or
is it not recommended and I should use separate package instead?

(I have also unsuccessfully tried FILES:kernel-base) - which I found in a separate post

the "meat" of my recipe is as follows:

inherit module
 
SRC_URI += " file://99-mtx.rules "
 
# Modify these as desired
PV = "1.0+git${SRCPV}"
SRCREV = "${AUTOREV}"
 
S = "${WORKDIR}/git/modules/mtx"
 
do_install:append() {
  install -d ${D}${sysconfdir}/udev/rules.d/
  install -m 0644 ${WORKDIR}/99-mtx.rules ${D}${sysconfdir}/udev/rules.d/99-mtx.rules
}
 
FILES:${PN} += "  ${sysconfdir}/udev/rules.d/99-mtx.rules "
RPROVIDES:${PN} += " kernel-module-mtx"