Flash Image to Board

This guide shows how to “flash” (write) the system image into the non-volatile flash memory of Genio EVKs. 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 Genio Tools, you need to set the SoC in download mode, which allows Genio 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.

Note

Make sure you have installed the Genio Tools on your Linux or Windows host before continuing the process.

Note

These pages are only a quick guide on using Genio Tools to flash images. Please read Genio Tools in order to get the most out of Genio Tools.

Note

For Genio 520/720, install the development version of genio-tools:

pip install -U --pre genio-tools

The --pre option installs development versions.

After installation, check the version of the genio-flash command:

genio-flash --version

It should be 1.7.0a2 or later. Earlier versions do not support Genio 720/520 EVK, primarily because the bootstrapping address has changed from 0x201000 to 0x2001000. The flash tool needs to detect the SoC family and update the bootstrap address accordingly.

  1. To download the latest download agent for the respective Genio EVK boards, please refer to the section titled pre-built board image.

  2. Once you have downloaded the aiotXXXX_raw.zip file, proceed to unarchive it. For example, if you downloaded “aiot8395p6_64_bsp_alps-vf-mp-t0.mp5-mp-u0.mp5-V7.6.V4.7_user_raw.zip”, extracting this file will yield the following files: “mmc0boot0.bin”, “mmc0boot1.bin”, “mmc0.bin”, and “lk.bin”.

Important

In case of Genio 520/720, once you have downloaded the aiotXXXX_raw.zip file, proceed to unarchive it. For example, if you downloaded “aiot8391p2_64_bsp_alps-vf-mp-u0.mp5-mp-v0.mp5-V7.48.V4.47_user_raw.zip”, extracting this file will yield the following files: ufs_lu2.bin, ufs_lu0_lu1.bin, and lk.bin.

  1. Create the respective “genio-XXX-evk” folder under “Genio-Flash-Tool-Path” and copy the shared eMMC Android image files i.e “mmc0boot0.bin”, “mmc0boot1.bin” and “mmc0.bin” into it.

Important

In case of Genio 520/720, create the respective “genio-XXX-evk” folder under “Genio-Flash-Tool-Path” and copy the shared UFS Android image files, i.e. ufs_lu2.bin, ufs_lu0_lu1.bin, and lk.bin into it.

  1. Open Windows command line and execute “genio-flash erase-mmc”.

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

    D:\<Genio-Flash-Tool-Path>\genio-350-evk>genio-flash erase-mmc
    

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

    D:\<Genio-Flash-Tool-Path>\genio-350-evk>genio-flash erase-mmc
    Genio Tools: v1.6a3
    Raw Image:
        name:  eMMC Disk Image (Sparse Image)
        machine:  Unspecified
    
    WARNING:root:Cannot find any FTDI device
    WARNING:root: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:root:Continue flashing...
    Looking for MediaTek SoC matching USB device 0e8d:0003
    

Enter Download Mode

Follow these steps to make the Genio EVK enter download mode:

  1. Locate the push buttons on the board:

    ../../../_images/sw_rity_get-started_flash_download-mode.gif
  2. Press and keep pressing the volume up button.

  3. Press and release the reset button.

  4. Release the volume up button.

  1. First, press and hold the Download key without releasing it. While holding the Download key, press and release the Reset key. Finally, release the Download key. The target board will then proceed with partition erasure.

INFO:root:Continue flashing...
Looking for MediaTek SoC matching USB device 0e8d:0003
Opening COM8 using baudrate=115200
Connected to MediaTek SoC: hw_code[0x8168]
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 [  0.474s]
Finished. Total time: 0.481s
erasing mmc0boot0
Erasing 'mmc0boot0'                                (bootloader) request sz: 0x400000, real erase len: 0x400000
OKAY [  0.007s]
Finished. Total time: 0.011s
erasing mmc0boot1
Erasing 'mmc0boot1'                                (bootloader) request sz: 0x400000, real erase len: 0x400000
OKAY [  0.008s]
Finished. Total time: 0.013s
Rebooting                                          OKAY [  0.002s]
Finished. Total time: 0.003s
  1. Execute “genio-flash”.

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

D:\<Genio-Flash-Tool-Path>\genio-350-evk>genio-flash
Genio Tools: v1.6a3
Raw Image:
    name:  eMMC Disk Image (Sparse Image)
    machine:  Unspecified

WARNING:root:Cannot find any FTDI device
WARNING:root: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:root:Continue flashing...
Looking for MediaTek SoC matching USB device 0e8d:0003
Opening COM8 using baudrate=115200
Connected to MediaTek SoC: hw_code[0x8168]
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 [  0.062s]
Finished. Total time: 0.068s
erasing mmc0boot0
Erasing 'mmc0boot0'                                (bootloader) request sz: 0x400000, real erase len: 0x400000
OKAY [  0.007s]
Finished. Total time: 0.012s
erasing mmc0boot1
Erasing 'mmc0boot1'                                (bootloader) request sz: 0x400000, real erase len: 0x400000
OKAY [  0.007s]
Finished. Total time: 0.013s
flashing mmc0=mmc0.bin
Sending sparse 'mmc0' 1/9 (257193 KB)              OKAY [  5.908s]
Writing 'mmc0'                                     OKAY [  8.632s]
Sending sparse 'mmc0' 2/9 (262000 KB)              OKAY [  6.115s]
Writing 'mmc0'                                     OKAY [  8.629s]
Sending sparse 'mmc0' 3/9 (262132 KB)              OKAY [  6.664s]
Writing 'mmc0'                                     OKAY [ 10.483s]
Sending sparse 'mmc0' 4/9 (257220 KB)              OKAY [  6.512s]
Writing 'mmc0'                                     OKAY [  9.199s]
Sending sparse 'mmc0' 5/9 (261881 KB)              OKAY [  6.553s]
Writing 'mmc0'                                     OKAY [  8.718s]
Sending sparse 'mmc0' 6/9 (262044 KB)              OKAY [  5.874s]
Writing 'mmc0'                                     OKAY [  8.642s]
Sending sparse 'mmc0' 7/9 (249921 KB)              OKAY [  5.906s]
Writing 'mmc0'                                     OKAY [  9.754s]
Sending sparse 'mmc0' 8/9 (261760 KB)              OKAY [  6.619s]
Writing 'mmc0'                                     OKAY [  8.725s]
Sending sparse 'mmc0' 9/9 (190352 KB)              OKAY [  4.358s]
Writing 'mmc0'                                     OKAY [  6.770s]
Finished. Total time: 143.650s
flashing mmc0boot0=mmc0boot0.bin
Warning: skip copying mmc0boot0 image avb footer (mmc0boot0 partition size: 0, mmc0boot0 image size: 262144).
Sending 'mmc0boot0' (256 KB)                       OKAY [  0.008s]
Writing 'mmc0boot0'                                OKAY [  0.015s]
Finished. Total time: 0.054s
flashing mmc0boot1=mmc0boot1.bin
Warning: skip copying mmc0boot1 image avb footer (mmc0boot1 partition size: 0, mmc0boot1 image size: 262144).
Sending 'mmc0boot1' (256 KB)                       OKAY [  0.008s]
Writing 'mmc0boot1'                                OKAY [  0.015s]
Finished. Total time: 0.055s
Rebooting                                          OKAY [  0.002s]
Finished. Total time: 0.003s

Note

If you are experiencing issues flashing on Windows, please refer to the troubleshooting guide.

Hint

See the Genio Tools page for more information on how to utilise genio-flash.

  1. After the successful flashing, the system will automatically boot into the Android home screen

  2. In Andriod home screen go to settings/About phone and check the build number.

../../../_images/Android_boot_up.jpg

Android Boot Up Image with Version