Build Genio 720/520 EVK Images from Latest IoT Yocto v25.1-dev

IoT Yocto v25.1-dev Pre-Release for Genio 720/520 EVK

Last Update: 2025-09-30

This guide shows you how to build and flash the development version of

IoT Yocto to Genio 720/520 EVK.

Overview

The document describes brief steps on how to build the in-development IoT Yocto v25.1-dev for Genio 720/520 EVK board.

For explanation on topics not mentioned in the document, please refer to MediaTek IoT Yocto Developer Guide for details. Please note that the documentation is in the preliminary phase and is subject to changes without notice.

Build Host Environment Setup

The IoT Yocto codebase is hosted in several repositories. Part of those repos are public repos, which can be accessed without special permission; several repos are restricted, which requires customer to create a Gitlab account and sign NDA before being able accessing them. To setup a Gitlab account, please refer to GitLab Account Setup.

Before building IoT Yocto image, please refer to following links to correctly setup your building environment:

More Information on Gitlab Account Setup

After generating HTTP access token, there are two ways for setting up git to access NDA repos:

Both ways work, so you only need to choose one of them for setting up access token.

If neither of them is set, you can consider creating .netrc file with following commands:


$ echo "machine gitlab.com login <USER NAME> password <PASSWORD>" \

>> $HOME/.netrc
$ chmod 600 $HOME/.netrc

Additional Package

More packages need to be installed in addition to packages mentioned in Setup Build Environment:

$ sudo apt install libssl-dev

Building

Step 1: Download recipes

Fetch the development recipes from the rity/scarthgap manifest branch:

$ mkdir iot-yocto; cd iot-yocto
$ export PROJ_ROOT=`pwd`
$ repo init -u https://gitlab.com/mediatek/aiot/bsp/manifest.git -b rity/scarthgap
$ repo sync -j 12

Step 2: Configure build environment

$ export TEMPLATECONF=$PROJ_ROOT/src/meta-rity/meta/conf/templates/default
$ source src/poky/oe-init-build-env
$ export BUILD_DIR=`pwd`

Step 3: Edit local.conf

$ echo 'NDA_BUILD = "1"' >> $BUILD_DIR/conf/local.conf
$ echo 'DL_DIR = "${TOPDIR}/../downloads"' >> $BUILD_DIR/conf/local.conf
$ echo 'SSTATE_DIR = "${TOPDIR}/../sstate-cache"' >> BUILD_DIR/conf/local.conf

Step 4: Fetch and build image

Please note that:

  • Genio 520 and Genio 720 shares the same MACHINE.

  • Genio 520 P3V3 and Genio 720 EVK P2V3 also shares the same MACHINE.

  • However, different boot storage options needs to use different MACHINE names since they have different storage image format.

Currently, Genio 720 and 520 EVK comes with 3 storage options: eMMC, UFS, and NOR flash.

Please run commands according to the boot configuration on Genio 720/520 EVK:

  • eMMC boot: Build MACHINE=genio-720-evk
  • UFS boot: Build MACHINE=genio-720-evk-ufs
  • NOR flash boot: MACHINE=genio-720-evk-norboot-ufs

Note: Currently the UFS part WD SDINFD04-128 is NOT supported. We plan to add support for this UFS part in Pre-Releas 4. Before this UFS part support is ready in IoT Yocto, we suggest you to use eMMC boot for Genio 720/520 EVK evaluation.


For building the image with UFS support, run followng commands:

$ export MACHINE=genio-720-evk-ufs
$ bitbake rity-demo-image

For the image with EMMC support:

$ export MACHINE=genio-720-evk
$ bitbake rity-demo-image

For the image with NOR boot and root file system on the UFS storage:

$ export MACHINE=genio-720-evk-norboot-ufs
$ bitbake rity-demo-image

You can also build rity-bsp-image instead to reduce the image size.

Hardware Settings

The system boot storage of Genio 720 and 520 EVK boards is selected by

on-board DIP switch and jumpers.

Please correctly configure the system boot storage before flashing

corresponding board image.

Power Path (AC Power)

Set the Power Path jumpers, located near the DC IN power jack to 12V DC.

Power Path (USB-C PD)

While IoT Yocto does not support charging functions from the PD port, the board can be powered by the USB-C PD port.
Set the Power Path jumpers to VBUS to supply power from the USB-C PD port.

UFS and eMMC Boot

To select system boot between eMMC and UFS, set these DIP switches & jumpers:

NOR Flash Boot

To select system boot using NOR flash and UFS as root file system

(MACHINE=genio-720-evk-norboot-ufs), set the DIP switch:

  • SW1 DIP1:ON, DIP2:OFF

  • SW2 DIP1:OFF, DIP2:ON

  • SW4 DIP1:ON, DIP2:OFF

and set jumper as the UFS config:

  • J496 short, J508 1-2 short

For further details, please refer to [Genio 720 and Genio 520 Evaluation Kit

User Guide](Genio 720: Advanced Power-Efficient IoT Platform for GenAI | MediaTek Genio).

Please note that currently the EVK user guide assumes that an Android

image is being used, so it does not describe NOR boot configuration.

Flashing

Install development version of genio-tools to support Genio 720/520:

pip install -U --pre genio-tools

The --pre option installs development versions.

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

genio-flash --version

It should be 1.7.0a2 or later.

To flash IoT Yocto image to Genio 720 / 520 EVK board,

change directory to the image, then run the command:

$ genio-flash

Troubleshooting

If genio-flash fails to flash the EVK board. Check if the EVK board has an Android image installed.

In some cases you need to erase the Android image before flashing IoT Yocto image.

To do so, download Smart Phone Flash Tool (SPFlashTool) and appropriate Android image to format the storage:

If you do not have SP Flash Tool and corresponding Android image, please contact your MediaTek representative.

Note:

  • The formatting process only needs to be done once.
  • The Android image is only used for formatting process. It is not required for running IoT Yocto.
2 Likes

(post deleted by author)

Couple of questions:

  • Can you clarify the switch/jumper settings? Looking at the 520 EVK documentation (MT8391 MT8371 Evaluation Kit User Guide V1.0.pdf) I see the following image which shows 3 switch settings instead of 2:

  • I’m trying to flash the prebuilt Yocto dev image using the Genio Tools (updated as mentioned in above post) to my 520 EVK, but I get the error below.

Sending bootstrap to address: 0x2001000
Jumping to bootstrap at address 0x2001000 in AArch64 mode
erasing mmc0
< waiting for any device >
Erasing ‘mmc0’ FAILED (remote: ‘Partition does not exist.’)
fastboot: error: Command failed
Traceback (most recent call last):

Then I changed the jumper/switch settings to eMMC, which seemed to flash the image.

But the EVK didn’t boot.

I changed the jumper/switch settings back to UFS, which booted back into the stock Android image.

Thanks for any help in advance!

Hi Nimish,

Thanks for using MTK EVK for your project development.

On the image flashing issue we see here we do need your help sharing more info for the debugging;

  1. For v25.1 we need to use genio-tools version 1.7.x software to flash the image to the board, please help us use the command “genio-flash --version” to verify your tool version first, if your tool is too old then please use the command “pip install -U --pre genio-tools” to update it.
  2. For the SW picture question, on the SW1 setting you can see we had the same config on it between the user guide and the picture we see in the thread, and the all switch setup are the same, on your side I will recommend to follow the settings from the user guide.

Please let me know your verification result, and hope I can talk to you soon on the project step follow-up.

1 Like

Hi @Nimish_Tambe,

The prebuilt image scarthgap_k6.6_v25.1_genio-720-evk-ufs_private_250901034426_dev.tar.gz is ONLY applicable to UFS boot for EVK using UFS part HN8T05DJHVX105. At the moment, the EVK boards with UFS part SDINFDQ6 is not supported.

The image is incompatible to eMMC. Therefore, the board won’t boot if you flash the prebuilt UFS image to the board when configured as eMMC boot.

Could you try:

  1. Set the board to UFS boot according to the EVK user guide
  2. Flash scarthgap_k6.6_v25.1_genio-720-evk-ufs_private_250901034426_dev.tar.gz
  3. Check if the board boot successfully

If the problem persists, it can be helpful to

  1. Connect to the UART0 port
  2. Set baudrate to 921600
  3. Manually reset & put the board into DOWNLOAD mode. This is because genio-flash cannot automatically put the board into download mode if the UART0 port is being occupied by other Windows application.

The download agent (lk.bin) would output log during initialization and also during flashing. This can be helpful to diagnose the root cause of FAILED (remote: ‘Partition does not exist.’) error message.

Note that the error message remote: ‘Partition does not exist. are actually generated by the download agent (lk.bin). So, by searching the message string Partition does not exist in lk source code, we can have some hints on the root cause.

I have the same problem as Nimish flashing the ufc prebuilt image on the 520 evk. I checked the jumpers/switches were set for ufc first.

here is the tail of the serial log

[MEM] Memory size: 0x200000000
[MEM] mt_mem_init(): done
[DA] gpio_trap_value : 0x0
[DA] storage_tpye: UFS
device descriptor length = 0x59
power descriptor length = 0x62
interconnect descriptor length = 0x6
configuration descriptor length = 0xe6
unit descriptor length = 0x2d
geometry descriptor length = 0x57
[UFS] UFS version 3.10
[UFS] ufs_get_device_info: Device Desc:
59 0 0 0 0 0 3 4 1 1 1 7f 0 1 f 0
3 10 1 65 0 1 3 4 1 45 16 1a 2 0 0 b3
7 20 b2 fd 20 0 96 a1 e0 17 2 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
2 3 b3 1 0 0 0 0 0
[UFS] Unipro version= 5
TW Reduction = 1, TW Type = 0
Shared WB Buffer AU = 0x0
ud0_base_offset = 22, ud_config_len = 26
[UFS] get unit serial number string len 0x18
[UFS] vendor id : 0x145
[UFS] ufs id : SDINFDO4-128G
[UFS] ufs fwver: 2218
[UFS] ufs serial number: 3ba510338e18862009249621
[UFS] dev_quirk = 0x0
opcode 0x1 for idn 1 failed, err = 251
[UFS] failed reading ufshcd_read_desc_param. desc_id 1 param_offset 0 desc_len 230 ret 251
[UFS] err: ufs_check_lu_cfg: read config descr error: 251
hba->dev_info.bootable: 0x1
[UFS] info: LU Configuration Check OK. Bootable UFS
[UFS] info: Boot LU Configuration Check OK. Active Boot LU: LU0
opcode 0x1 for idn 1 failed, err = 251
[UFS] failed reading ufshcd_read_desc_param. desc_id 1 param_offset 0 desc_len 230 ret 251
[UFS] err: ufs_check_lu_cfg: read config descr error: 251
bug: active_num_lu shall not be 0[UFS] info: HS-G1-2
[UFS] Sense Data: ASC=29, ASCQ=3
[UFS] err: task response error = 1
[UFS] err: ufs_get_lu_size: ufshcd_queuecommand err
[UFS] err: ufs_get_lu_size(0) fail, ret -5
starting app fitboot
block devices:
fastboot_init()
[USB] U2 pullup D+
[USB] HS (2) is detected
[USB] usb_online: 1
fastboot: processing commands
fastboot: getvar:has-slot:mmc0[len:20]
fastboot:[download_base:0xffff000300000000][download_size:0x0]
fastboot:[cmd:getvar:]-[arg:has-slot:mmc0]
fastboot: getvar:partition-type:mmc0[len:26]
fastboot:[download_base:0xffff000300000000][download_size:0x0]
fastboot:[cmd:getvar:]-[arg:partition-type:mmc0]
fastboot: erase:mmc0[len:10]
fastboot:[download_base:0xffff000300000000][download_size:0x0]
fastboot:[cmd:erase:]-[arg:mmc0]
cmd_erase mmc0
Partition does not exist.

I was able to flash an emmc image I built and that is running fine on the 520evk (I changed the jumpers and switches to emmc before flashing).

Hi Aaron,

Thanks for letting us know the UFS flash issue, we are processing with the solution now and trying to provide the patch to fix it, at the same moment please use the eMMC to continue the test on your side, if I have the update schedule then I will share it with you also.

Apologize for any inconvenient that happened in the progress.

Richard Lin

1 Like

Thanks Aaron and Richard,

I’ve updated my replies to reflect the current status:

For Genio 720/520 EVK boards, there are two UFS parts:

  • SK Hynix HN8T05DJHVX105 is supported by PR2. This is used in earlier batches of EVK.
  • WD SDINFDQ6-128G-XI is currently not supported by PR2. This is a known issue and the support for this is under development.

Are there special instructions to configure the D8 and D9 cameras for the 520 EVK?

***

I connected my D8 camera to CAM0/CSI0 and D9 camera to CAM1/CSI1.
I flashed my 520 by:
genio-flash --load-dtbo apusys.dtbo --load-dtbo camera-imx258-csi0-ov5640-csi1-std.dtbo --load-dtbo --load-dtbo video.dtbo
(I also tried –load-dtbo camera-ov5640-csi1-std.dtbo --load-dtbo camera-imx258-csi0-std.dtbo .)

# v4l2-ctl --list-device
mtk-jpeg-enc (platform:17030000.jpeg-encoder):
/dev/video0
mtk-jpeg-dec (platform:17040000.jpeg-decoder):
/dev/video1
mtk-seninf (platform:1a004000.seninf-top):
/dev/media0
mtk-camsv (platform:1a092000.camsv2):
/dev/video4

mtk-camsv (platform:1a097000.camsv7):
/dev/video9
platform:mt8189 (platform:mt8189):
/dev/video2
/dev/video3

***

When I tried the gst-launch-1.0 command in Genio 510 EVK Demo Requirements — IoT Yocto documentation , I get:

# gst-launch-1.0 v4l2src device=/dev/video4 ! video/x-raw,width=1920,height=1080,format=YUY2 ! v4l2convert output-io-mode=dmabuf-import ! video/x-raw,width=1280,height=720 ! waylandsink sync=false
** (gst-plugin-scanner:696): CRITICAL **: 00:02:30.557: Couldn’t g_module_open libpython. Reason: /usr/lib/libpython3.12.so: cannot open shared object file: No such file or directory
WARNING: erroneous pipeline: no element “v4l2convert”

FYI:
ls /usr/lib | grep libpython
libpython3.12.so.1.0

***

When I tried the gst-launch-1.0 command in Camera — IoT Yocto documentation , I get:
# gst-launch-1.0 v4l2src device=/dev/video4 ! video/x-raw,width=2316,height=1746,format=UYVY ! videoconvert ! waylandsink sync=false
Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Pipeline is PREROLLED …
Setting pipeline to PLAYING …
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed to allocate required memory.
Additional debug info:
/usr/src/debug/gstreamer1.0-plugins-good/1.22.12/sys/v4l2/gstv4l2src.c(950): gst_v4l2src_decide_allocation (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Buffer pool activation failed
Execution ended after 0:00:00.018669461
Setting pipeline to NULL …
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
/usr/src/debug/gstreamer1.0/1.22.12/libs/gst/base/gstbasesrc.c(3134): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
Freeing pipeline …

Hi David,

Since there are some node changes in Genio 720/520 EVK, for the moment, please refer to the following example unit test example:

  1. Connect CAM DTB D8 to CAM0 and CAM DTB D9 to CAM1

  2. Load DTBO camera-imx258-csi0-ov5640-csi1-std.dtbo.
    You can update U-boot boot_conf variable in Linux console using fw_setenv:

    fw_setenv boot_conf "#conf-mediatek_mt8391-genio-720-evk.dtb#conf-emmc.dtbo#conf-camera-imx258-csi0-ov5640-csi1-std.dtbo" 
    
  3. Save the following bash script to a file genio_520_720_standard_v4l2_camera_testcase_20250905.sh

#!/bin/bash

# Genio 520/720 Camera Test

## Environment Setup

# +---------------+--------+--------+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------+
# | Genio EVK     | CSI0   | CSI1   | DTBO                                    | Load DTBO Command                                                                                                         |
# +---------------+--------+--------+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------+
# | Genio 520/720 | OV5640 | x      | camera-ov5640-csi0-std.dtbo             | fw_setenv boot_conf "#conf-mediatek_mt8391-genio-720-evk.dtb#conf-emmc.dtbo#conf-camera-ov5640-csi0-std.dtbo"             |
# | Genio 510/700 | x      | OV5640 | camera-ov5640-csi1-std.dtbo             | fw_setenv boot_conf "#conf-mediatek_mt8391-genio-720-evk.dtb#conf-emmc.dtbo#conf-camera-ov5640-csi1-std.dtbo"             |
# | Genio 510/700 | OV5640 | OV5640 | camera-ov5640-dual-std.dtbo             | fw_setenv boot_conf "#conf-mediatek_mt8391-genio-720-evk.dtb#conf-emmc.dtbo#conf-camera-ov5640-dual-std.dtbo"             |
# | Genio 510/700 | IMX258 | x      | camera-imx258-csi0-std.dtbo             | fw_setenv boot_conf "#conf-mediatek_mt8391-genio-720-evk.dtb#conf-emmc.dtbo#conf-camera-imx258-csi0-std.dtbo"             |
# | Genio 510/700 | x      | IMX258 | camera-imx258-csi1-std.dtbo             | fw_setenv boot_conf "#conf-mediatek_mt8391-genio-720-evk.dtb#conf-emmc.dtbo#conf-camera-imx258-csi1-std.dtbo"             |
# | Genio 510/700 | IMX258 | IMX258 | camera-imx258-dual-std.dtbo             | fw_setenv boot_conf "#conf-mediatek_mt8391-genio-720-evk.dtb#conf-emmc.dtbo#conf-camera-imx258-dual-std.dtbo"             |
# | Genio 510/700 | IMX258 | OV5640 | camera-imx258-csi0-ov5640-csi1-std.dtbo | fw_setenv boot_conf "#conf-mediatek_mt8391-genio-720-evk.dtb#conf-emmc.dtbo#conf-camera-imx258-csi0-ov5640-csi1-std.dtbo" |
# +---------------+--------+--------+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------+

## Obtain Camera Nodes

CAM_NAME="seninf-top"
CAM_BUS_NAME=platform:$(basename `find /sys/bus/platform/devices/ -name "*${CAM_NAME}"`)
export CAM_MEDIA_DEV=$(v4l2-ctl -z ${CAM_BUS_NAME} --list-devices | grep media)
if [ -z ${CAM_MEDIA_DEV} ] ; then  echo "error: Cannot find media device"; [ "${BASH_SOURCE[0]}" != "${0}" ] && return; exit 1; fi

declare -a CAMSV_DEV_NAME=($(basename -a `find /sys/bus/platform/devices/ -name "*camsv*" | sort | tr "\n" " "`))
declare -a CAMSV_VIDEO_DEV=($(for i in ${CAMSV_DEV_NAME[@]}; do media-ctl -d ${CAM_MEDIA_DEV} --entity "${i} video stream"; done))
declare -a SENINF_DEV_NAME=(seninf-0 seninf-1)

## IMX258

IMX258_FMT () {
    MBUSFMT="SBGGR10_1X10"
    V4L2FMT=BG10
    GSTFMT=UNKNOWN
    WIDTH=2104
    HEIGHT=1560
}

IMX258_CSI0 () {
    SENSOR="imx258 7-001a"
    NODE_ID=0
}

IMX258_CSI1 () {
    SENSOR="imx258 8-001a"
    NODE_ID=1
}

## OV5640

OV5640_FMT () {
    MBUSFMT=YUYV8_1X16
    V4L2FMT=YUYV
    GSTFMT=YUY2
    WIDTH=1920
    HEIGHT=1080
}

OV5640_CSI0 () {
    SENSOR="ov5640 7-003c"
    NODE_ID=0
}

OV5640_CSI1 () {
    SENSOR="ov5640 8-003c"
    NODE_ID=1
}

## Set Media Device

SET_MEDIA () {
    SENINF=${SENINF_DEV_NAME[${NODE_ID}]}
    CAMSV=${CAMSV_DEV_NAME[${NODE_ID}]}
    media-ctl -d ${CAM_MEDIA_DEV} -l "'${SENSOR}':0 -> '${SENINF}':0 [1]"
    media-ctl -d ${CAM_MEDIA_DEV} -l "'${SENINF}':1 -> '${CAMSV}':0 [1]"
    media-ctl -d ${CAM_MEDIA_DEV} -V "'${SENSOR}':0 [fmt:${MBUSFMT}/${WIDTH}x${HEIGHT}]"
    media-ctl -d ${CAM_MEDIA_DEV} -V "'${SENINF}':0 [fmt:${MBUSFMT}/${WIDTH}x${HEIGHT}]"
    media-ctl -d ${CAM_MEDIA_DEV} -V "'${CAMSV}':0 [fmt:${MBUSFMT}/${WIDTH}x${HEIGHT}]"
}

## Run pipeline

LAUNCH () {
    if [ "${GSTFMT}" != "UNKNOWN" ] ; then
        gst-launch-1.0 -e v4l2src device=${CAMSV_VIDEO_DEV[${NODE_ID}]} num-buffers=300 io-mode=mmap ! video/x-raw,width=${WIDTH},height=${HEIGHT},format=${GSTFMT} ! waylandsink sync=false
    else
        v4l2-ctl -v width=${WIDTH},height=${HEIGHT},pixelformat=${V4L2FMT} --stream-mmap --stream-count=300 -d ${CAMSV_VIDEO_DEV[${NODE_ID}]}
    fi
}

## Single Camera

SINGLE_CAMERA() {
    media-ctl -d ${CAM_MEDIA_DEV} -r

    ${FMT0}
    ${CSI0}
    SET_MEDIA
    LAUNCH
}

## Dual Camera

DUAL_CAMERA() {
    media-ctl -d ${CAM_MEDIA_DEV} -r

    ${FMT0}
    ${CSI0}
    SET_MEDIA
    LAUNCH &


    ${FMT1}
    ${CSI1}
    SET_MEDIA
    LAUNCH
}

# Buffer Starvation

BUFFER_STARVATION() {
    media-ctl -d ${CAM_MEDIA_DEV} -r

    ${FMT1}
    ${CSI0}
    SET_MEDIA

    v4l2-ctl -v width=${WIDTH},height=${HEIGHT},pixelformat=${V4L2FMT} --stream-mmap --stream-count=100 -d ${CAMSV_VIDEO_DEV[${NODE_ID}]} --stream-sleep count=10
}

# Test Cases

SINGLE_CAMERA_OV5640_CSI0 () {
    echo "Run ${FUNCNAME}"
    FMT0=OV5640_FMT
    CSI0=OV5640_CSI0
    SINGLE_CAMERA
}

SINGLE_CAMERA_OV5640_CSI1 () {
    echo "Run ${FUNCNAME}"
    FMT0=OV5640_FMT
    CSI0=OV5640_CSI1
    SINGLE_CAMERA
}

DUAL_CAMERA_OV5640_CSI0_OV5640_CSI1 () {
    echo "Run ${FUNCNAME}"
    FMT0=OV5640_FMT
    CSI0=OV5640_CSI0
    FMT1=OV5640_FMT
    CSI1=OV5640_CSI1
    DUAL_CAMERA
}

SINGLE_CAMERA_IMX258_CSI0 () {
    echo "Run ${FUNCNAME}"
    FMT0=IMX258_FMT
    CSI0=IMX258_CSI0
    SINGLE_CAMERA
}

SINGLE_CAMERA_IMX258_CSI1 () {
    echo "Run ${FUNCNAME}"
    FMT0=IMX258_FMT
    CSI0=IMX258_CSI1
    SINGLE_CAMERA
}

SINGLE_CAMERA_IMX258_CSI0_BUFFER_STARVATION () {
    echo "Run ${FUNCNAME}"
    FMT0=IMX258_FMT
    CSI0=IMX258_CSI0
    BUFFER_STARVATION
}

DUAL_CAMERA_IMX258_CSI0_IMX258_CSI1 () {
    echo "Run ${FUNCNAME}"
    FMT0=IMX258_FMT
    CSI0=IMX258_CSI0
    FMT1=IMX258_FMT
    CSI1=IMX258_CSI1
    DUAL_CAMERA
}

DUAL_CAMERA_IMX258_CSI0_OV5640_CSI1 () {
    echo "Run ${FUNCNAME}"
    FMT0=IMX258_FMT
    CSI0=IMX258_CSI0
    FMT1=OV5640_FMT
    CSI1=OV5640_CSI1
    DUAL_CAMERA
}

help () {
    echo "Run the following test according to your hardware setting:"
    echo ""
    echo "    SINGLE_CAMERA_OV5640_CSI0"
    echo "    SINGLE_CAMERA_OV5640_CSI1"
    echo "    DUAL_CAMERA_OV5640_CSI0_OV5640_CSI1"
    echo "    SINGLE_CAMERA_IMX258_CSI0"
    echo "    SINGLE_CAMERA_IMX258_CSI1"
    echo "    SINGLE_CAMERA_IMX258_CSI0_BUFFER_STARVATION"
    echo "    DUAL_CAMERA_IMX258_CSI0_IMX258_CSI1"
    echo "    DUAL_CAMERA_IMX258_CSI0_OV5640_CSI1"
    echo ""
    echo "    e.g. # SINGLE_CAMERA_OV5640_CSI0"
}

help
  1. You can then source test script & run the test commands defined in test script, for eample:

    source ./genio_520_720_standard_v4l2_camera_testcase_20250905.sh
    SINGLE_CAMERA_IMX258_CSI0
    SINGLE_CAMERA_OV5640_CSI1
    DUAL_CAMERA_IMX258_CSI0_OV5640_CSI1
    

Hi Pablo,

Thank you very much for the helpful info and script! It works on my 520 EVK.

Hi, I’m Mike Puckett. I’m building the 520 EVK Yocto image in ARM-based environment (Ubuntu 22.04 under VM Parallels on a MacBookPro with Apple Silicon), and I encountered the following error:

ERROR: perfetto-31.0-r0 do_configure: ExecutionError(‘/home/ubuntu/workspace/iot-yocto/build/tmp/work/armv8a-poky-linux/perfetto/31.0/temp/run.do_configure.46277’, 1, None, None)ERROR: Logfile of failure stored in: /home/ubuntu/workspace/iot-yocto/build/tmp/work/armv8a-poky-linux/perfetto/31.0/temp/log.do_configure.46277| OSError: [Errno 8] Exec format error| WARNING: exit code 1 from a shell command.ERROR: Task (/home/ubuntu/workspace/iot-yocto/src/poky/../meta-openembedded/meta-oe/recipes-devtools/perfetto/perfetto.bb:do_configure) failed with exit code ‘1’

Hi, I’m Mike Puckett. I’m building the 520 EVK Yocto image in an ARM-based environment (Ubuntu 22.04 under VM Parallels on a MacBook Pro with Apple Silicon), and I encountered the following error:

ERROR: perfetto-31.0-r0 do_configure: ExecutionError(‘/home/ubuntu/workspace/iot-yocto/build/tmp/work/armv8a-poky-linux/perfetto/31.0/temp/run.do_configure.46277’, 1, None, None)ERROR: Logfile of failure stored in: /home/ubuntu/workspace/iot-yocto/build/tmp/work/armv8a-poky-linux/perfetto/31.0/temp/log.do_configure.46277
...snip...
| OSError: [Errno 8] Exec format error| WARNING: exit code 1 from a shell command
ERROR: Task (/home/ubuntu/workspace/iot-yocto/src/poky/../meta-rity/meta-rity-demo/recipes-devtools/perfetto/perfetto.bb:do_configure) failed with exit code ‘1’

The problem was that it’s attempting to use a prebuilt Intel-based binary in an ARM-based environment. To correct this, I added a perfetto.bbappend file to src/poky/../meta-rity/meta-rity-demo/recipes-devtools/perfetto. I’m not sure if that was the right place to put it, especially if one wanted to upstream it. But it corrects the build for building the rity-demo-image in non-Intel environments. The contents of the perfetto.bbappend file are:

DEPENDS += "gn-native"

# Force perfetto to use the native gn binary instead of the bundled one
do_configure:prepend() {
    # Remove the bundled gn binary and replace it with the native one
    if [ -f ${S}/tools/gn ]; then
        bbwarn "Replacing bundled gn binary with native gn"
        rm -f ${S}/tools/gn
        ln -sf ${STAGING_BINDIR_NATIVE}/gn ${S}/tools/gn
        chmod +x ${S}/tools/gn
    fi
}

I just thought I’d let people know in case they encountered this problem as well as, perhaps, so that something like it might be included in an upcoming release. Thank you.

Please help to send a MR (merge request) on the gitlab. Although I’m not familiar with perfetto, I guess this might be good to submit to IOT gitlab.
https://gitlab.com/mediatek/aiot/rity/meta-rity/-/blob/scarthgap/meta/recipes-rity/packagegroups/packagegroup-rity-debug.bb

GN is a tool by google for Android (ninja), I’m not sure if this was missing in the guideline for setting up development environment. Maybe just because this is newly added hence the document hasn’t been updated yet. I’ll find someone to check both the recipe and the document.
But first, please send your merge request, it’s welcome! Thanks a lot.

Sorry for bother , I just got the 720 EVK board and tring to build my yocto image .
When I built it, it’s told me that i got not enough storage space, but I am prepare 512G of space for yocto.
After it told me the problem , I check the “build” folder it seems to be a problem here, my build folder is way too big.
Is there any reason or solution ?

Hi @Huang_Shu_Chun
You can try adding INHERIT += “rm_work” to your local.conf
This will reduce the storage demand for build directory by automatically cleaning all the temp files after building the recipe.

I’ve unboxed a new Genio 520 eval kit and tried to power it on, but it never booted to the stock Android image. I see the following lines on the UART0 debug where the boot process appears to halt:

[   18.760911][    T1] init 24: processing action (sys.boot_completed=1 && sys.wifitracing.started=0) from (/system/etc/init/wifi.rc:28)
[   18.771569][  T498] apexd: Deleting unused dm device com.android.devicelock
[   18.795553][  T498] apexd: Deleting unused dm device com.android.extservices
[   18.814406][    T1] init 24: Command 'mkdir /sys/kernel/debug/tracing/instances/wifi 711' action=sys.boot_completed=1 && sys.wifitracing.started=0 (/system/etc/init/wifi.rc:30) took 51ms and succeeded
[   18.819482][    T1] init 24: Service 'vendor.ccci_rpcd' (pid 719) exited with status 255 oneshot service took 8.242000 seconds in background
[   18.821106][    T1] init 24: Sending signal 9 to service 'vendor.ccci_rpcd' (pid 719) process group...
[   18.822472][    T1] libprocessgroup 25: Removed cgroup /sys/fs/cgroup/uid_1001/pid_719
[   18.823811][  T296] init 27: ReapLogT PropSet [sys.user.0.ce_available]=[true]18587 [init.svc.fuelgauged_nvram]=[stopped]18593 [init.svc_debug_pid.fuelgauged_nvram]=[]18594 [init.svc.aee-reinit_v2]=[running]18667 [ro.boottime.aee-reinit_v2]=[18665872385]18668 [init.svc_debug_pid.aee-reinit_v2]=[1762]18668 [vendor.debug.mtk.aee.status64]=[free]18688 [sys.bootstat.first_boot_completed]=[1]18693 [init.svc.aee-reinit_v2]=[stopped]18698 [init.svc_debug_pid.aee-reinit_v2]=[]18698 [dmesgd.start]=[1]18700 [init.svc.logd-auditctl]=[running]18739 [ro.boottime.logd-auditctl]=[18734934154]18743 [init.svc_debug_pid.logd-auditctl]=[1776]18743 [init.svc.vendor.ccci_rpcd]=[stopped]18812 Done
[   18.831521][  T498] apexd: Deleting unused dm device com.android.healthfitness
[   18.832662][    T1] init 24: Service 'logd-auditctl' (pid 1776) exited with status 0 oneshot service took 0.086000 seconds in background
[   18.834389][    T1] init 24: Sending signal 9 to service 'logd-auditctl' (pid 1776) process group...
[   18.836142][    T1] libprocessgroup 25: Removed cgroup /sys/fs/cgroup/uid_1036/pid_1776
[   18.863536][  T498] apexd: Deleting unused dm device com.android.i18n
[   18.894106][    T1] init 24: processing action (sys.boot_completed=1) from (/system_ext/etc/init/batterywarning.rc:8)
[   18.896500][    T1] init 29: starting service 'batterywarning'...
[   18.907596][  T498] apexd: Deleting unused dm device com.android.ipsec
[   18.907958][    T1] init 24: ... started service 'batterywarning' has pid 1819
[   18.909621][    T1] init 24: processing action (sys.boot_completed=1) from (/vendor/etc/init/atcid.rc:17)
[   18.912369][    T1] init 24: processing action (sys.boot_completed=1) from (/vendor/etc/init/init.frs.rc:8)
[   18.914542][    T1] init 29: starting service 'frs'...
[   18.918770][    T1] init 30: Created socket '/dev/socket/frs_socket', mode 660, user 0, group 1000
[   18.931328][    T1] init 24: ... started service 'frs' has pid 1828
[   18.932436][    T1] init 24: processing action (ro.build.type=userdebug && sys.boot_completed=1) from (/vendor/etc/init/mtklog.rc:3)
[   18.935858][    T1] init 24: Command 'write /proc/dynamic_debug/control file *mediatek* +p ; file *gpu* =_' action=ro.build.type=userdebug && sys.boot_completed=1 (/vendor/etc/init/mtklog.rc:4) took 1ms and failed: Unable to write to file '/proc/dynamic_debug/control': open() failed: Permission denied
[   18.939490][    T1] init 24: processing action (sys.boot_completed=1) from (/vendor/etc/init/mtklog.rc:6)
[   18.941574][  T299] log_store: sram_dram_buff flag 0x223, reboot count 0, 0.
[   18.943377][  T299] log_store:read pmic register value 0x4100.
[   18.944146][  T299] log_store: write pmic value 0x1400, ret 0x0.
[   18.944912][  T299] log_store printk_buff addr:0x223b10000,sz:0x80000,buff-flag:0x623.
[   18.946953][  T299] console name: ttyS, status 0x16.

Next, I tried to flash an image to the dev kit using my genio-flash tools and I see the following error:

INFO:aiot:Continue flashing...
Looking for MediaTek SoC matching USB device 0e8d:0003
Opening /dev/ttyACM0 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'                                     FAILED (remote: 'Partition does not exist.')
fastboot: error: Command failed

Here is the output of the UART0 debug terminal:

check_dramc_voltage_after_k: Read voltage: Vdd1 = -1, Vcore = -1, Vddq = -1, Vmddr = -1, Vdd2H = -1, Vdd2L = 0
[MEM] Memory size: 0x200000000
[MEM] mt_mem_init(): done
[DA] gpio_trap_value : 0x0
[DA] storage_tpye: UFS
device descriptor length = 0x59
power descriptor length = 0x62
interconnect descriptor length = 0x6
configuration descriptor length = 0xe6
unit descriptor length = 0x2d
geometry descriptor length = 0x57
[UFS] UFS version 3.10
[UFS] ufs_get_device_info: Device Desc:
59 0 0 0 0 0 3 4 1 1 1 7f 0 1 f 0 
3 10 1 30 0 1 3 4 1 45 16 1a 2 0 0 b3 
7 20 b2 fd 20 0 96 a1 e0 17 2 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
2 3 b3 1 0 0 0 0 0 
[UFS] Unipro version= 5
TW Reduction = 1, TW Type = 0
Shared WB Buffer AU = 0x0
ud0_base_offset = 22, ud_config_len = 26
[UFS] get unit serial number string len 0x18
[UFS] vendor id : 0x145
[UFS] ufs id : SDINFDO4-128G   
[UFS] ufs fwver: 2218
[UFS] ufs serial number: 81a1103330a28220ac249621
[UFS] dev_quirk = 0x0
opcode 0x1 for idn 1 failed, err = 251
[UFS] failed reading ufshcd_read_desc_param. desc_id 1 param_offset 0 desc_len 230 ret 251
[UFS] err: ufs_check_lu_cfg: read config descr error: 251
hba->dev_info.bootable: 0x1
[UFS] info: LU Configuration Check OK. Bootable UFS
[UFS] info: Boot LU Configuration Check OK. Active Boot LU: LU0
opcode 0x1 for idn 1 failed, err = 251
[UFS] failed reading ufshcd_read_desc_param. desc_id 1 param_offset 0 desc_len 230 ret 251
[UFS] err: ufs_check_lu_cfg: read config descr error: 251
bug: active_num_lu shall not be 0[UFS] info: HS-G1-2
[UFS] Sense Data: ASC=29, ASCQ=3
[UFS] err: task response error = 1
[UFS] err: ufs_get_lu_size: ufshcd_queuecommand err
[UFS] err: ufs_get_lu_size(0) fail, ret -5
starting app fitboot
block devices:
fastboot_init()
[USB] U2 pullup D+
[USB] HS (2) is detected
[USB] usb_online: 1
fastboot: processing commands
fastboot: getvar:has-slot:mmc0[len:20]
fastboot:[download_base:0xffff000300000000][download_size:0x0]
fastboot:[cmd:getvar:]-[arg:has-slot:mmc0]
fastboot: getvar:partition-type:mmc0[len:26]
fastboot:[download_base:0xffff000300000000][download_size:0x0]
fastboot:[cmd:getvar:]-[arg:partition-type:mmc0]
fastboot: erase:mmc0[len:10]
fastboot:[download_base:0xffff000300000000][download_size:0x0]
fastboot:[cmd:erase:]-[arg:mmc0]
cmd_erase mmc0
Partition does not exist.

Is there a problem with the dev kit or am I doing something wrong?

Hi @Nimish_Tambe ,

Could you provide the link to the IoT Yocto prebuilt image that you’re trying to flash?
Usually, this kind of error is caused by a mismatch between image and the “boot configuration” on the board.

From the UART0 boot log, it looks like your board is configured to boot from UFS storage. Please help to confirm if all jumpers & switches are being configured as boot from UFS, and also make sure that you are flashing an IoT Yocto “UFS boot” image.

Hello Everyone,

The original post incorrectly states that IoT Yocto does not support power supply from the USB-C PD port. This is not true. While IoT Yocto does not support the charging functions from the USB-C PD port, the board can be powered by the PD port as long as the jumpers has been set correctly. The post has been edited to reflect this.