Beaglebone + u-boot = multiple DTB in KERNEL_DEVICETREE warning - ok?

Hello, I’m working to build a Yocto Mender image for Beaglebone Black using U-Boot. Things seem to be working well but I’m puzzled by this warning I see during builds of u-boot:

WARNING: u-boot-1_2019.01-r0 do_provide_mender_defines: Found more than one dtb specified in KERNEL_DEVICETREE. Only one should be specified. Choosing the last one.

This warning does not occur when following the official integration directions, but when I change it to use u-boot instead of grub, I see the warning occur.

The only change I made was to add these two lines to my local.conf as instructed to in the Mender docs.
MENDER_FEATURES_ENABLE_append = " mender-uboot mender-image-sd" MENDER_FEATURES_DISABLE_append = " mender-grub mender-image-uefi"

I observed that the file sources/poky/meta-yocto-bsp/conf/machine/beaglebone-yocto.conf sets KERNEL_DEVICETREE to "am335x-bone.dtb am335x-boneblack.dtb am335x-bonegreen.dtb", and I am using Beaglebone Black, so the “choosing the last one” is not correct. However, everything seems to be working correctly and my patches to am335x-boneblack.dtb are being applied and show up when I install the new system image, so I’m not exactly sure if this warning is worth investigating.

Thanks,
Matthew Beckler

Welcome to Mender Hub!

You can read a bit more about this here,

https://tracker.mender.io/browse/MEN-2494

There where plans made to clarify the error message but never got around to do it.

1 Like

Excellent, thanks for the info. Sounds like that might be a good introductory task for my first contribution back to the project :slight_smile:

I tried to set KERNEL_DEVICETREE = "am335x-boneblack.dtb" in my local.conf but it didn’t seem to take. Presumably it can’t override the setting made in the machine conf?

1 Like

You can also use MENDER_DTB_NAME_FORCE, which forces the one you want, regardless of what is in KERNEL_DEVICETREE. Doing it this way will still install all of the unneeded DTB files. It only changes which one will be used.

Thanks much! I added MENDER_DTB_NAME_FORCE = "am335x-boneblack.dtb"to my local.conf and that silenced the “Found more than one dtb specified in KERNEL_DEVICETREE” warning, but now observe this new warning:

WARNING: "MENDER_DTB_NAME_FORCE" is not a recognized MENDER_ variable. Typo?

That warning seems to arise because MENDER_DTB_NAME_FORCE is not in the list in meta-mender/meta-mender-core/conf/mender-vars.json. Should it be added there? I can make a PR. Or should I just ignore this warning? Thanks!

Yes, this is just a mistake on our part, please consider a PR!

1 Like