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

**URL:** <https://hub.mender.io/t/how-to-modify-mender-recipe-to-add-a-new-binary-from-yocto-build-to-boot-partition/258>\
**Category:** General Discussions\
**Tags:** yocto, sumo, rocko\
**Created:** [February 23, 2019, 7:36am UTC](https://hub.mender.io/t/how-to-modify-mender-recipe-to-add-a-new-binary-from-yocto-build-to-boot-partition/258 "2019-02-23T07:36:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajithpv](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/ajithpv/32/728_2.png) [@ajithpv](https://hub.mender.io/u/ajithpv)\
**Post date:** [February 23, 2019, 7:36am UTC](https://hub.mender.io/t/how-to-modify-mender-recipe-to-add-a-new-binary-from-yocto-build-to-boot-partition/258/1 "2019-02-23T07:36:39Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![MarekBelisko](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/marekbelisko/32/33_2.png) [@MarekBelisko](https://hub.mender.io/u/MarekBelisko)\
**Post date:** [February 23, 2019, 8:06pm UTC](https://hub.mender.io/t/how-to-modify-mender-recipe-to-add-a-new-binary-from-yocto-build-to-boot-partition/258/2 "2019-02-23T20:06:36Z")

</div>

Hi,

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

```auto
IMAGE_BOOT_FILES

```

variable. It’s well documented in yocto ref. manual: [yocto ref manual](https://www.yoctoproject.org/docs/2.5/ref-manual/ref-manual.html#var-IMAGE_BOOT_FILES)

Hope this helps.

---

<div class="post-metadata">

**Author:** ![ajithpv](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/ajithpv/32/728_2.png) [@ajithpv](https://hub.mender.io/u/ajithpv)\
**Post date:** [February 25, 2019, 6:36am UTC](https://hub.mender.io/t/how-to-modify-mender-recipe-to-add-a-new-binary-from-yocto-build-to-boot-partition/258/3 "2019-02-25T06:36:06Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![MarekBelisko](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/marekbelisko/32/33_2.png) [@MarekBelisko](https://hub.mender.io/u/MarekBelisko)\
**Post date:** [February 25, 2019, 9:28am UTC](https://hub.mender.io/t/how-to-modify-mender-recipe-to-add-a-new-binary-from-yocto-build-to-boot-partition/258/4 "2019-02-25T09:28:12Z")

</div>

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