> 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/quickstart-1/flash-image-to-board.md).

# Flash Image to Board

### Launch **genio-flash** Tool

To utilize the `genio-flash` tool for deploying the `rity-demo-image`, follow these steps:

1. **Navigate to the Image Directory**: If you have built the `rity-demo-image` from the source, locate it in:

   ```
   $BUILD_DIR/tmp/deploy/images/sd520
   ```
2. **Use the Default Configuration**:

   Execute the following command to load the necessary device tree overlays:

   ```
   $ genio-flash
   ```

   These overlays provide additional board features. You can specify multiple overlays using multiple `--load-dtbo` options.
3. **List Available Overlays**:

   To view available overlays, use:

   ```
   $ genio-flash --list-dtbo
   ```
4. **Example Log Output**:

   Upon running `genio-flash`, you should see logs similar to:

   ```
   AIoT Tools: <tool-version>
   Yocto Image:
           name:     Rity Demo Image (rity-demo-image)
           distro:   Rity Demo Layer <iot-yocto-version> (rity-demo)
           codename: kirkstone
           machine:  <machine>
           overlays: <DTBO1>,<DTBO2>,...

   Looking for MediaTek SoC matching USB device 0e8d:0003
   ```

   Note: `<tool-version>`, `<iot-yocto-version>`, and `<machine>` adapt based on the tool, Yocto version, and hardware in use.
5. **Proceed**: Once you receive the "Looking for MediaTek SoC matching USB device 0e8d:0003" message, you can move on

### Flash image

Follow these steps to update image to the SBC-MB520/SBC-MB720:

<figure><img src="https://3619554908-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmAO6HInc2Typbuq3W42l%2Fuploads%2FuPwu0GzQOo7xijI1et27%2Fimage.png?alt=media&amp;token=ba6a0536-b346-4089-a080-67eefff84525" alt=""><figcaption></figcaption></figure>

1. Keep pressing the <mark style="color:orange;">**Download**</mark> <mark style="color:orange;"></mark><mark style="color:orange;">Key</mark>.
2. Connect a Type-C USB cable between the host PC <mark style="color:red;">(Red).</mark>
3. Press the <mark style="color:orange;">**Download**</mark> <mark style="color:orange;"></mark><mark style="color:orange;">Key</mark> until you see the log `Erasing 'mmc0'` message, as shown below:

You should see flashing process start. A typical successful log looks like this:

```
$ genio-flash
Genio Tools: v1.7.0a4
Yocto Image:
        name:     Rity Demo Image (rity-demo-image)
        distro:   Rity Demo Layer 25.1-dev (rity-demo)
        codename: scarthgap
        machine:  sd520
        overlays: ['ufs.dtbo']

WARNING:aiot:Cannot find any FTDI device
WARNING:aiot:Unable to find and reset the board. Possible causes are:
1. This is not a Genio 350/700 EVK, nor a Pumpkin board.
2. The board port UART0 is not connected.
3. The UART0 port is being opened by another tool, such as TeraTerm on Windows.
You can now manually reset the board into DOWNLOAD mode.

INFO:aiot:Continue flashing...
Looking for MediaTek SoC matching USB device 0e8d:0003
Opening COM12 using baudrate=115200
Connected to MediaTek SoC: hw_code[0x8189]
Sending bootstrap to address: 0x2001000
Jumping to bootstrap at address 0x2001000 in AArch64 mode
erasing mmc0
< waiting for any device >
Erasing 'mmc0'                                     (bootloader) request sz: 0x1dcb000000, real erase len: 0x0
OKAY [  0.118s]
Finished. Total time: 0.160s
erasing mmc0boot0
Erasing 'mmc0boot0'                                (bootloader) request sz: 0x400000, real erase len: 0x400000
OKAY [  0.010s]
Finished. Total time: 0.016s
erasing mmc0boot1
Erasing 'mmc0boot1'                                (bootloader) request sz: 0x400000, real erase len: 0x400000
OKAY [  0.000s]
Finished. Total time: 0.008s
flashing mmc0=rity-demo-image-sd520.rootfs.wic.img
Sending sparse 'mmc0' 1/13 (262140 KB)             OKAY [  6.954s]
Writing 'mmc0'                                     OKAY [  3.663s]
Sending sparse 'mmc0' 2/13 (262140 KB)             OKAY [  6.931s]
Writing 'mmc0'                                     OKAY [  3.271s]
Sending sparse 'mmc0' 3/13 (262140 KB)             OKAY [  6.754s]
Writing 'mmc0'                                     OKAY [  2.716s]
Sending sparse 'mmc0' 4/13 (262140 KB)             OKAY [  6.769s]
Writing 'mmc0'                                     OKAY [  2.685s]
Sending sparse 'mmc0' 5/13 (236876 KB)             OKAY [  6.295s]
Writing 'mmc0'                                     OKAY [  2.538s]
Sending sparse 'mmc0' 6/13 (243392 KB)             OKAY [  6.371s]
Writing 'mmc0'                                     OKAY [  2.698s]
Sending sparse 'mmc0' 7/13 (262140 KB)             OKAY [  6.793s]
Writing 'mmc0'                                     OKAY [  2.688s]
Sending sparse 'mmc0' 8/13 (260512 KB)             OKAY [  6.676s]
Writing 'mmc0'                                     OKAY [  2.703s]
Sending sparse 'mmc0' 9/13 (255260 KB)             OKAY [  6.605s]
Writing 'mmc0'                                     OKAY [  2.618s]
Sending sparse 'mmc0' 10/13 (262140 KB)            OKAY [  6.792s]
Writing 'mmc0'                                     OKAY [  2.679s]
Sending sparse 'mmc0' 11/13 (262140 KB)            OKAY [  6.691s]
Writing 'mmc0'                                     OKAY [  2.678s]
Sending sparse 'mmc0' 12/13 (262140 KB)            OKAY [  6.865s]
Writing 'mmc0'                                     OKAY [  2.676s]
Sending sparse 'mmc0' 13/13 (220732 KB)            OKAY [  5.715s]
Writing 'mmc0'                                     OKAY [  2.273s]
Finished. Total time: 122.234s
flashing mmc0boot0=bl2.img
Sending 'mmc0boot0' (439 KB)                       OKAY [  0.013s]
Writing 'mmc0boot0'                                OKAY [  0.020s]
Finished. Total time: 0.064s
Detected U-Boot env size: 8192
flashing mmc0boot1=u-boot-env.bin
Sending 'mmc0boot1' (8 KB)                         OKAY [  0.002s]
Writing 'mmc0boot1'                                OKAY [  0.005s]
Finished. Total time: 0.030s
Rebooting                                          OKAY [  0.000s]
Finished. Total time: 0.005s
```
