Skip to main content

MediaTek SOC flashing

Devices based on MediaTek SOCs need the genio-flash tool to install images using USB connection to the Host PC and a builtin Serial Downloade mode on the device.

This variant of flashing generally applies to:

  • SOM-SMARC-Genio700/510 (E58)
  • Modular Vision Genio700/510

Prepare host PC

A PC running either Windows or Linux is required. A virtual machine is not recommended here, as the USB-passthrough may lead to problems.

The genio-tools package is available from pip. Installation instructions for Windows/Linux are available from MediaTek.

info

genio-flash of version newer than 1.5 is recommended. Make sure to update the tool with pip install --upgrade genio-tools if you have an older version installed.

Download release image

The actual device image needs to be downloaded from the specific Clea OS release. Check Download Links section page for further details.

In case of MediaTek, you need a bunch of files to flash the image. They are conveniently gathere into a Miscellaneous Artifacts bundle on a release page.

Select either Clea-OS Things or Clea-OS Embedded artifacts and download the archive.

Decompress files

On a Linux host the downloaded files may be decompressed with the following commands:

$ tar xf *.tar.gz

On a Windows host the downloaded files may be decompressed with the 7zip tool.

Prepare USB Connection to the device

The flashing process using the genio-flash tool needs a USB connection to the device. On most devices either a USB-A to micro-USB- or USB-A to USB-C-Cable is required.

You can directly connect this to the related interface on the device and to the host PC.

Flashing the device

info

The flashing procedure may be slightly different from device to device due to the different way in which the Serial Download mode is enabled. The user is therefore requested to read the documentation below and then also refer to the specific documentation for the board in his possession.

Serial Download mode

The device must be forced to start into the USB Serial Download mode. The actual way how this is achieved depends on the device.

Flashing the image

Open the directory with the software package and inside it run the command to install the software. Then you can can power on the device forced into the Serial download mode and the flashing procedure should start.

Note: MediaTek devices do not permanently stay in the Serial download mode and proceed with regular boot after ~8 seconds if no flashing process starting.

$ genio-flash

Expected output:

Genio Tools: v1.6.2
Yocto Image:
name: SECO Clea OS Image Base for Embedded. (seco-image-clea-os-full)
distro: SECO Clea OS Embedded Distro 4.0.5 (clea-os-embedded-wayland)
codename: kirkstone
machine: seco-genio700-e58
overlays: ['gpu-mali.dtbo', 'video.dtbo']

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

And after the flashing process starts:

Opening COM10 using baudrate=115200
Connected to MediaTek SoC: hw_code[0x8188]
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: 0x747c00000, real erase len: 0x0
OKAY [ 0.201s]
Finished. Total time: 0.234s
erasing mmc0boot0
Erasing 'mmc0boot0' (bootloader) request sz: 0x400000, real erase len: 0x400000
OKAY [ 0.021s]
Finished. Total time: 0.052s
erasing mmc0boot1
Erasing 'mmc0boot1' (bootloader) request sz: 0x400000, real erase len: 0x400000
OKAY [ 0.021s]
Finished. Total time: 0.051s
flashing mmc0=seco-clea-os-image-seco-genio510-e58.rootfs.wic.img
Sending sparse 'mmc0' 1/7 (262140 KB) OKAY [ 7.510s]
Writing 'mmc0' OKAY [ 10.553s]
Sending sparse 'mmc0' 2/7 (262140 KB)
...

Some useful arguments for genio-flash usage.

The list of available DTBO files can be printed with

$ genio-flash --list-dtbo

DTBO files can be loaded with

$ genio-flash --load-dtbo seco-e58-b79.dtbo --load-dtbo seco-e58-hdmi.dtbo

To only flash the kernel patition (fitImage)

$ genio-flash fitimage

To only flash the bootloader

$ genio-flash bootloaders mmc0boot0 mmc0boot1

Device specific variants of the flashing process

See subpages for additional hints for devices that need some additional steps.