Why does the boot partition contain the Kernel Image and Devicetree?

Hi all

I’m using the meta-mender layer, branch zeus to generate an image using Mender. I noticed that the boot partition (/uboot when using U-Boot) contains the Kernel Image and Devicetree. They are identical to the image and Devicetree on the root partition, directory /boot.

After digging in the meta-mender layer I think mender_merge_bootfs_and_image_boot_files() in meta-mender/meta-mender-core/classes/mender-helpers.bbclass is responsible for that. So I assume this is done intentionally by Mender.

But why? Is this some kind of fall back for cases in which both root partitions are corrupted? I don’t see how the image on the boot partition would ever be loaded by U-Boot though. So what’s the purpose of those duplicates?

Thanks in advance

I think this comes from the IMAGE_BOOT_FILES variable, which is not set by Mender. The kernel should be removed from there, but the devicetree probably needs remain since the boot loader typically needs it. It depends on the exact boot loader configuration though.

You’re right, thanks. It’s set by my machine.conf.