Flash Genio 1200-EVK

This guide shows how to “flash”(write) the system image into the non-volatile flash memory of Genio 1200-EVK. The flashing process is performed over a USB connection between the target board and the host computer containing the image.

In order to write the on-board storage with AIoT Tools, you need to set the SoC in download mode, which allows AIoT Tools to transfer a download agent binary to the SRAM of SoC. The download agent then provides a fastboot interface for subsequent image transfer and storage write operations.

Prerequisites

Prepare the following items:

  • A Linux or Windows host PC with AIoT Tools installed

  • Genio 1200-EVK and its 12V Power Adaptor. Please note that P1V1 version of Genio 1200-EVK uses a different DC Jack from Genio 700-EVK.

  • A USB-C cable for downloading images to on-board storage

Note

Make sure you have installed AIoT tools on your Linux or Windows host before continuing the following steps.

Step 1. Connect board to host PC

Warning

Make sure you are using the accompanied 12V power adapter for Genio 1200-EVK. Using an adapter with different output voltage results in unstable system and could damage your board.

  • Plug the 12V power jack to the DC JACK IN port. Once connected to power source, the LED_DC and LED_PWR should light up, as shown below:

    ../../../../_images/sw_yocto_flash_g1200_evk-led.jpg

    Connecting to 12V DC power

  • Find the USB-C D/L port (USB Type-C) on Genio 1200-EVK, and connect it to host PC with a micro USB cable:

../../../../_images/sw_yocto_flash_g1200_evk-usb-c.jpg

Connecting to Type-C D/L port

Note

The EVK board would power on when the Type-C D/L port is connected, regardless of the state of the auto power on jumper pin J51.

Step 2. Launch genio-flash Tool

Change working directory to the image directory. If you built rity-demo-image from source, the image is default in:

cd $BUILD_DIR/tmp/deploy/images/genio-1200-evk

If you are using a pre-built image, please change to the directory that you’ve unarchved the pre-built image. It should contain a partitions.json file.

After switching into the image directory, run following command:

genio-flash --load-dtbo gpu-mali.dtbo --load-dtbo apusys.dtbo --load-dtbo video.dtbo

By default genio-flash will use the prefix rity-demo-image to search for files under image directory. If you are building other images, use -i option to specify different prefix. For example:

cd $BUILD_DIR/tmp/deploy/images/genio-1200-evk
genio-flash -i rity-bsp-image --load-dtbo gpu-mali.dtbo --load-dtbo apusys.dtbo --load-dtbo video.dtbo

Note

Make sure you load the gpu-mali.dtbo, apusys.dtbo, and video.dtbo. GPU, APU and video codec does not work if you omitting these overlays.

genio-flash should print logs to the terminal similar to this:

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:  genio-1200-evk
        overlays: ['gpu-mali.dtbo', 'apusys.dtbo', 'video.dtbo']

Looking for MediaTek SoC matching USB device 0e8d:0003

The <tool-version> and <iot-yocto-version> strings change according to the tool version and IoT Yocto version. Once you see Looking for MediaTek SoC matching USB device 0e8d:0003 prompt, proceed to next step.

Step 3. Enter Download Mode

Locate the push buttons on the board:

../../../../_images/sw_yocto_flash_g1200_dl-buttons.jpg

Follow these steps to enter download mode:

  1. Press and keep pressing the Download button.

  2. Press and release the RST button.

  3. Hold the Download button until you see the log Erasing 'mmc0' message, as shown below:

    Looking for MediaTek SoC matching USB device 0e8d:0003
    Opening COM33 using baudate=115200
    Connected to MediaTek MT8195 SoC
    Sending bootstrap to address: 0x201000
    Jumping to bootstrap at address 0x201000 in AArch64 mode
    erasing mmc0
    < waiting for any device >
    Erasing 'mmc0'                                     (bootloader) request sz: 0xe8f800000, real erase len: 0x0
    OKAY [  9.627s]
    Finished. Total time: 9.655s
    erasing mmc0boot0
    Erasing 'mmc0boot0'                                (bootloader) request sz: 0x800000, real erase len: 0x800000
    OKAY [  0.013s]
    Finished. Total time: 0.018s
    erasing mmc0boot1
    Erasing 'mmc0boot1'                                (bootloader) request sz: 0x800000, real erase len: 0x800000
    OKAY [  0.004s]
    Finished. Total time: 0.010s
    flashing mmc0=rity-demo-image-genio-1200-evk.wic.img
    Sending sparse 'mmc0' 1/9 (262140 KB)              OKAY [  6.440s]
    Writing 'mmc0'                                     OKAY [  9.393s]
    Sending sparse 'mmc0' 2/9 (262140 KB)              OKAY [  6.332s]
    Writing 'mmc0'                                     OKAY [ 10.185s]
    Sending sparse 'mmc0' 3/9 (230376 KB)              OKAY [  5.607s]
    Writing 'mmc0'                                     OKAY [  8.196s]
    Sending sparse 'mmc0' 4/9 (262140 KB)              OKAY [  6.362s]
    Writing 'mmc0'                                     OKAY [  9.354s]
    Sending sparse 'mmc0' 5/9 (262140 KB)              OKAY [  6.401s]
    Writing 'mmc0'                                     OKAY [ 10.089s]
    Sending sparse 'mmc0' 6/9 (262140 KB)              OKAY [  6.413s]
    Writing 'mmc0'                                     OKAY [  9.291s]
    Sending sparse 'mmc0' 7/9 (242392 KB)              OKAY [  5.924s]
    Writing 'mmc0'                                     OKAY [  8.585s]
    Sending sparse 'mmc0' 8/9 (262140 KB)              OKAY [  6.417s]
    Writing 'mmc0'                                     OKAY [  9.288s]
    Sending sparse 'mmc0' 9/9 (129780 KB)              OKAY [  3.159s]
    Writing 'mmc0'                                     OKAY [  4.605s]
    Finished. Total time: 132.157s
    flashing mmc0boot0=bl2.img
    Sending 'mmc0boot0' (205 KB)                       OKAY [  0.007s]
    Writing 'mmc0boot0'                                OKAY [  0.026s]
    Finished. Total time: 0.054s
    flashing mmc0boot1=u-boot-env.bin
    Sending 'mmc0boot1' (4 KB)                         OKAY [  0.002s]
    Writing 'mmc0boot1'                                OKAY [  0.015s]
    Finished. Total time: 0.028s
    Rebooting                                          OKAY [  0.002s]
    Finished. Total time: 0.002s
    

    and then you can release the Download button.