> For the complete documentation index, see [llms.txt](https://amobile-solutions.gitbook.io/yocto-developer-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://amobile-solutions.gitbook.io/yocto-developer-guide/getting-started/iot-800n-g420/flash-image-to-board.md).

# Flash Image to Board

## Entering download mode

The board powers on automatically **8 seconds** after DC is applied. The download key has to be held during that window, so the tool is started first to give the widest margin.

1. Connect the USB Type-C cable between the board and the host.
2. Start `genio-flash` on the host (see below).
3. Apply DC power to the board.
4. **Press and hold the download key immediately**, and keep holding it until `genio-flash` begins printing download progress.

{% hint style="warning" %}
If the 8 seconds elapse and the board boots normally, remove DC power and start again. Releasing the key too early has the same effect.
{% endhint %}

## Flashing

From the deploy directory:

```
cd g420_build/tmp/deploy/images/iot800n-g420

genio-flash --load-dtbo camera-s5k3l6-csi0.dtbo \
            --load-dtbo apusys.dtbo \
            --load-dtbo video.dtbo
```

The three overlays enable, respectively, the camera, the AI processing unit and the video codec.

{% hint style="info" %}
`ufs.dtbo` is deliberately absent from that command. It is applied automatically through `KERNEL_DEVICETREE_OVERLAYS_AUTOLOAD` in `local.conf`, because the SoM boots from UFS and the controller node is enabled by that overlay. Without it the kernel starts, prints normally, and then stops without a root filesystem.
{% endhint %}

Flashing takes a few minutes. The board reboots into the new image on its own.

## Flashing a prebuilt release

The same command works from an extracted image release; the deploy directory layout is identical.

## Verifying what was flashed

After boot:

```
cat /etc/os-release
uname -r
```

`/etc/os-release` carries the AMobile version string for the release. The kernel version string ends in the git describe output for the kernel tree, so it identifies the exact source revision.

## Partitions

The partition layout comes from `rity.json` in the deploy directory. To inspect it:

```
cat rity.json
```

To flash a single partition rather than the whole image:

```
genio-flash <partition-name>
```

## Further reading

* [MediaTek IoT Yocto documentation](https://genio.mediatek.com/doc/iot-yocto/latest/index.html)
