Incorrect u-boot-fw-utils fw_env.config file in custom image


On a custom carrier board for Colibri iMX6ULL 512MB Wi-Fi / Bluetooth IT V1.1A module I have bitbaked an image with minor changes/patches to u-boot. I am using BSP v3.0.4. The patches are essentially device tree change so that u-boot recognises an eMMC that we have placed on the carrier board: a device tree content and filename change. This works nicely and u-boot can see the eMMC.

Because u-boot-fw-utils appears to use the same source as u-boot (but a copy), the same patches are needed there, so the .bbappend files for u-boot and u-boot-fw-utils are essentially the same. The content of the u-boot-toradex-fw-utils_2019.07.bbappend is:

FILESEXTRAPATHS_prepend := "${THISDIR}/files/colibri-imx6ull/:"              
# u-boot-toradex-fw-utils uses same source as u-boot-toradex                 
# so we need to apply same patches.                                          

SRC_URI += "file://0001-uboot-config-and-device-tree-for-mycarrier.patch \
COMPATIBLE_MACHINE = "(colibri-imx6ull|colibri-imx6ull-mycarrier)"            

The problem is that, while the resulting rootfs image contains functioning fw_printenv / fw_setenv commands, the /etc/fw_env.config file is not the colibri-imx6ull one, but rather seems to be coming from the meta-toradex-nxp/recipes-bsp/u-boot/files/mx6/fw_env.config directory.

If I copy the correct file (meta-toradex-nxp/recipes-bsp/u-boot/files/colibri-imx6ull/fw_env.config) to my host the fw_ commands work as expected but I cannot figure out why the bitbake image is not picking up the correct file.

Greetings @gman!

What is the priority of your layer? Perhaps you need to increase the layer priority in order for it to pick up the correct file.

Looks like you created your own machine colibri-imx6ull-mycarrier. Did you add colibri-imx6ull to the machine overrides? If not that is probably the reason for what you see. E.g. add a line like this to the machine config file: MACHINEOVERRIDES =. "colibri-imx6ull:".

Hi @max.tx ,

Thank you - that seemed to do the trick!

Hi @gustavo.tx

Thanks for your reply. The answer by @max.tx has worked, but I will read up on layer priorities and bear this in mind.

Perfect that it solved. Thanks for the feedback.