Maybe it would be good to have a working example in the tree. Best Regards, Ulf Samuelsson
> 6 feb. 2019 kl. 02:22 skrev Khem Raj <raj.k...@gmail.com>: > > > >> On Sat, Feb 2, 2019 at 7:17 PM Ken Sloat <ken.sl...@ohmlinxelectronics.com> >> wrote: >> On Sat, Feb 2, 2019 at 10:03 PM Bruce Ashfield >> <bruce.ashfi...@windriver.com> wrote: >> > >> > On 2019-02-02 9:59 p.m., Ken Sloat wrote: >> > > Hello, >> > > >> > > I have an out of tree kernel module which I want autoloaded at startup >> > > on my system. Looking at the Yocto project manual, I see that one way >> > > I can do this is to add the module name to the KERNEL_MODULE_AUTOLOAD >> > > variable within my custom module recipe. >> > > >> > > What I have found is that the module-split class is indeed generating >> > > the "/etc/modules-load.d/mymodule.conf" file, however this file is not >> > > actually being installed. To be more precise it is appearing in the >> > > "package" directory (i.e. >> > > tmp/work/**/mymodule/package/etc/modules-load.d/mymodule.conf) but not >> > > within the "image" directory (nor in my final rootfs). >> > > >> > > Is there something I'm missing in the usage of KERNEL_MODULE_AUTOLOAD? >> > > Is the intention for this variable I add extra steps to manually >> > > install this file in my recipe? FYI I'm using Morty. >> > >> > Can you provide your recipe ? It would make suggestions easier. For >> > example, my first question is: Is the module being installed to your >> > image via IMAGE_INSTALL, or some other similar variable ? >> > >> > Bruce >> > >> > > >> > > Thanks, >> > > Ken Sloat >> > > >> > >> >> Hi Bruce, >> >> Thanks for your quick reply. Yes the module is being installed via >> image_install. Module is installed but generated conf file is not. See >> recipe below: >> >> require mymodule.inc >> >> inherit module kernel-module-split >> >> DEPENDS = "virtual/kernel" >> >> EXTRA_OEMAKE_append = " \ >> KERNELDIR=${STAGING_KERNEL_DIR} \ >> " >> >> MAKE_TARGETS = "module" >> >> MODULE_NAME = "mymodule" >> >> PKG_${PN} = "kernel-module-${MODULE_NAME}" >> >> module_do_install() { >> install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/${MODULE_NAME} >> install -m 0644 ${MODULE_NAME}.ko \ >> >> ${D}/lib/modules/${KERNEL_VERSION}/kernel/${MODULE_NAME}/${MODULE_NAME}.ko >> } >> >> FILES_${PN} = " \ >> /lib/modules/${KERNEL_VERSION}/kernel/${MODULE_NAME} \ >> " > > Your recipe is overwriting common stuff which otherwise should be provided by > module bbclass > I would suggest that you append to the variables instead of over writing them > above and try to reuse > The primitives from bbclass as much as you can for best results >> >> >> KERNEL_MODULE_AUTOLOAD += "${MODULE_NAME}" >> -- >> _______________________________________________ >> yocto mailing list >> yocto@yoctoproject.org >> https://lists.yoctoproject.org/listinfo/yocto > -- > _______________________________________________ > yocto mailing list > yocto@yoctoproject.org > https://lists.yoctoproject.org/listinfo/yocto
-- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto