# Flashing custom yocto build to SD card

**URL:** <https://forums.balena.io/t/flashing-custom-yocto-build-to-sd-card/220155>\
**Category:** balenaOS\
**Created:** [December 11, 2020, 1:47am UTC](https://forums.balena.io/t/flashing-custom-yocto-build-to-sd-card/220155 "2020-12-11T01:47:05Z")\
**Posts on this page:** 1\
**Showing post:** 19

<div class="post-metadata">

**Author:** ![klutchell](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/klutchell/32/861_2.png) [@klutchell](https://forums.balena.io/u/klutchell)\
**Post date:** [December 16, 2020, 2:36pm UTC](https://forums.balena.io/t/flashing-custom-yocto-build-to-sd-card/220155/19 "2020-12-16T14:36:20Z")

</div>

Hey @bblankenship,

So happy to hear you had success flashing your custom build of balenaOS! It’s quite a process so I can appreciate the effort you put into it 🙂

As for manually copying the `config.txt` into your image, might I suggest an easier method? Using the balenaCLI you can interactively generate a device configuration once, then provision your OS image to your existing application.

Here’s the CLI doc for generating a config:

> **[balena CLI Documentation - Balena Documentation](https://www.balena.io/docs/reference/balena-cli/#os-build-config-image-device-type)**

Here’s the CLI doc for configuring your image:

> **[balena CLI Documentation - Balena Documentation](https://www.balena.io/docs/reference/balena-cli/#os-configure-image)**

For example, to provision your OS image to your existing app:

```auto
$ balena os build-config ../path/resin-image-raspberrypi4-64-20201211013047.rootfs.img raspberrypi4-64 --output raspberrypi4-64-config.json
$ balena os configure ../path/resin-image-raspberrypi4-64-20201211013047.rootfs.img --app MyApp --config raspberrypi4-64-config.json

```

Or if you want to streamline the process, you can generate

Regarding `cmdline.txt`, did you make any customization to this file that required it being added to the image? The file produced by the yocto build should be sufficient for most cases.

We are looking into the Etcher errors and will let you know if we have any updates or require additional information!

Take care,  
Kyle

---

_[View the full topic](https://forums.balena.io/t/flashing-custom-yocto-build-to-sd-card/220155)._
