How to modify mender recipe to add a new binary from Yocto build to '/boot' partition?

Hi,

Currently, mender automatically adding the device tree and kernel image from the Yocto build into the ‘/boot’ partition of the filesystem. Hence, the filesystem and .mender artifact will be having these images after the Yocto build.

Now, we need to add our custom binaries (required for booting) into the ‘/boot’ along with the device tree and kernel images. Is this possible by modifying the mender recipe(s)?

If possible, could anyone tell me where I need to modify (i.e. which recipe/bb/class/inc file need to be modify) for adding the new binaries to ‘/boot’.

Any help would be appreciated.

Hi,

if you would like to put files to boot partition you can add them to:

IMAGE_BOOT_FILES

variable. It’s well documented in yocto ref. manual: yocto ref manual

Hope this helps.

1 Like

Thank you @MarekBelisko for the response.
Sorry for the confusion here. Adding files to the “IMAGE_BOOT_FILES” will add the files to the boot partition. But, that is different from the logical /boot partition of the file system.
Currently, the device tree and kernel image are taking from U-boot environment as “/boot/{mender_dtb_name}_" and "_/boot/{mender_kernel_name}”. Similarly, I need to take my custom file also similar to “/boot/${custom_file_name}”. Hence the custom file need to be put inside /boot of the file system.

I thought Mender have some custom recipe which doing the above task to .mender and rootfs file.

1 Like

Ok then in your recipe you just install necessary files to boot directory as to any other rootfs directory

1 Like