Search code examples
imageyoctorecipe

Yocto: how to make variable recipe for image?


I'v got ./meta-mycompany/recipes-fsl/mycompany-image-base.bb recipe for building image.

Also I have recipes in ./meta-mycompany/recipes-kernel/driver1 and driver2 to build alternative drivers. Drivers are for input video. Both of them had in .bb file KERNEL_MODULE_AUTOLOAD += "${MODULE_NAME}" at the end.

Q:How and where (conf/layer.conf probably?) to make load that drivers? Suppose to use MACHINE_ESSENTIAL_EXTRA_RDEPENDS but I need alternative config such way that include driver1 OR driver2 but never both - they interferent and anyway it isn't possible to work at the same time on single hardware. Desired results is to build an image with driver1 included and loaded at boot OR with driver2.


Solution

  • KERNEL_MODULE_AUTOLOAD += "driver1 driver2"
    

    You normally put it into machine.conf.