I have a Yocto layer with kernel bbappend file, that adds my own kernel configuration fragmets and dependency on linux-firmware
package. I want to embed i915 firmware directly into Linux kernel. All I need to do is set two variables in my firmware.cfg
fragment file:
CONFIG_EXTRA_FIRMWARE="i915/bxt_dmc_ver1_07.bin"
CONFIG_EXTRA_FIRMWARE_DIR="${WORKDIR}${base_libdir}/firmware"
The problem is that Linux configuration fragments are preprocessed in configuration step, not in recipe execution step. Path ${WORKDIR}${base_libdir}/firmware
expands to /lib/firmware
, so it looks like ${WORKDIR}
variable is not set at this moment, but ${base_libdir}
variable already contains the right value. I also tried to use ${STAGING_FIRMWARE_DIR}
found in openembdded-core/meta/conf/bitbake.conf
file, but this variable expands to empty value.
Is it possible to pass bitbake variable from appended kernel recipe to kernel configuration fragment in Yocto? If no, what alternative solution can be used for embedding firmware into kernel using Yocto?
Looks like Yocto does not support firmware embedding directly and here is my workaround:
linux-firmware
recipe and make it install firmwares to sysroot;.config
file in do_configure
step using sed
and added required firmwares from my append file for linux kernel.linux-firmware
recipe for kernel so it can find firmwares in sysroot.