# Creating .img file from Yocto build?

**URL:** <https://forums.balena.io/t/creating-img-file-from-yocto-build/60540>\
**Category:** balenaOS\
**Created:** [January 30, 2020, 5:52pm UTC](https://forums.balena.io/t/creating-img-file-from-yocto-build/60540 "2020-01-30T17:52:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![centipeda](https://avatars.discourse-cdn.com/v4/letter/c/74df32/32.png) [@centipeda](https://forums.balena.io/u/centipeda)\
**Post date:** [January 30, 2020, 5:52pm UTC](https://forums.balena.io/t/creating-img-file-from-yocto-build/60540/1 "2020-01-30T17:52:58Z")

</div>

I’ve successfully used Yocto to create a custom BalenaOS build for the generic Xilinx Zynq machine layer, but I can’t seem to find the packaged deploy image in `build/tmp/deploy/images/$machine`. Is this something I’d need to package myself / configure in my meta-balena layer?

For reference, these are the contents of my `images/$machine` directory:

```auto
kernel_modules_headers.tar.gz
kernel_source.tar.gz
modules--4.19-xilinx-v2019.1+git0+9811303824-r0-zynq-generic-20200130045342.tgz
Module.symvers
modules-zynq-generic.tgz
os-release
resin-data.img
resin-image
resin-image-initramfs-zynq-generic-20200130045342.rootfs.cpio.gz
resin-image-initramfs-zynq-generic-20200130045342.rootfs.manifest
resin-image-initramfs-zynq-generic-20200130045342.testdata.json
resin-image-initramfs-zynq-generic.cpio.gz
resin-image-initramfs-zynq-generic.manifest
resin-image-initramfs-zynq-generic.testdata.json
resin-image-zynq-generic-20200130052552.rootfs.license.manifest
resin-image-zynq-generic-20200130052552.rootfs.manifest
resin-image-zynq-generic-20200130052552.testdata.json
resin-image-zynq-generic.license.manifest
resin-image-zynq-generic.manifest
resin-image-zynq-generic.testdata.json
resin-logo.png
system-connections
uImage
uImage--4.19-xilinx-v2019.1+git0+9811303824-r0-zynq-generic-20200130045342.bin
uImage-initramfs--4.19-xilinx-v2019.1+git0+9811303824-r0-zynq-generic-20200130045342.bin
uImage-initramfs-zynq-generic.bin
uImage-zynq-generic.bin
VERSION
VERSION_HOSTOS
zImage
zImage--4.19-xilinx-v2019.1+git0+9811303824-r0-zynq-generic-20200130045342.bin
zImage-initramfs--4.19-xilinx-v2019.1+git0+9811303824-r0-zynq-generic-20200130045342.bin
zImage-initramfs-zynq-generic.bin

```

The flashing instructions generally say to flash a file named `$machine.img` or something similar, but it isn’t here.

---

<div class="post-metadata">

**Author:** ![alexgg](https://avatars.discourse-cdn.com/v4/letter/a/7ab992/32.png) [@alexgg](https://forums.balena.io/u/alexgg)\
**Post date:** [January 31, 2020, 9:28am UTC](https://forums.balena.io/t/creating-img-file-from-yocto-build/60540/8 "2020-01-31T09:28:45Z")

</div>

Hi, thanks for contacting support.  
If I understand correctly you are adding support to a new board type in BalenaOS following the instrructions at [https://www.balena.io/os/docs/custom-build/#Supporting-your-Own-Board](https://www.balena.io/os/docs/custom-build/#Supporting-your-Own-Board), is that right?  
Assuming the above is correct, you have to make sure that:

- You are bitbaking the resin-image target. Note that if using Barys you will need a coffee file with the correct image name
- You have appended the “resinos-img” image type to IMAGE\_FSTYPES, as it’s done for example in the meta-balena-raspberrypi layer at [https://github.com/balena-os/balena-raspberrypi/blob/eb7288da0a02fb90cf3718b3eda835d3cdef5cc2/layers/meta-balena-raspberrypi/recipes-core/images/resin-image.bbappend#L6](https://github.com/balena-os/balena-raspberrypi/blob/eb7288da0a02fb90cf3718b3eda835d3cdef5cc2/layers/meta-balena-raspberrypi/recipes-core/images/resin-image.bbappend#L6)  
Let me know if that helps and my assumptions are correct,

---

<div class="post-metadata">

**Author:** ![centipeda](https://avatars.discourse-cdn.com/v4/letter/c/74df32/32.png) [@centipeda](https://forums.balena.io/u/centipeda)\
**Post date:** [February 20, 2020, 8:38pm UTC](https://forums.balena.io/t/creating-img-file-from-yocto-build/60540/10 "2020-02-20T20:38:41Z")

</div>

That was it, thanks! I had put down IMAGES\_FSTYPES instead of IMAGE\_FSTYPES.
