Build from Source Code

Based on Yocto project, rity-demo-image is used to demonstrate the IoT Yocto BSP. Please follow the instructions below to build the demo images of each board.

Note

Important

You need permission to access the https://gitlab.com/mediatek/aiot/nda to build fully functioned rity-demo-image. You can still build image using only publicly available packages through configuration, but the resulting images have only limited feature set.

To request for the permission, please contact your MediaTek sales.

Genio 350-EVK

Important

Please read and agree AIoT Software License Agreement before accessing or using IoT Yocto software. If you do not agree to the terms and conditions of AIoT Software License Agreement, you must not access or use the software.

For v22.1

In v22.1 release, to build public configuration that requires no GitLab account:

# download recipe with manifests
mkdir aiot-yocto; cd aiot-yocto
export PROJ_ROOT=`pwd`
repo init -u https://gitlab.com/mediatek/aiot/bsp/manifest.git -b refs/tags/rity-dunfell-v22.1 -m default.xml --no-repo-verify
repo sync

# build configuration
TEMPLATECONF=$PWD/src/meta-rity/meta/conf source src/poky/oe-init-build-env
export BUILD_DIR=`pwd`

# fetch all the packages and build rity-demo-image
DISTRO=rity-demo MACHINE=i350-evk bitbake rity-demo-image

The output image is located in $BUILD_DIR/tmp/deploy/images/i350-evk. Please refer to Flash Genio 350-EVK to flash the image to the board.

To build private configuration that requires GitLab account and NDA repository access, set the NDA_BUILD configuration variable to 1:

# download recipe with manifests
$ mkdir aiot-yocto; cd aiot-yocto
$ export PROJ_ROOT=`pwd`
$ repo init -u https://gitlab.com/mediatek/aiot/bsp/manifest.git -b refs/tags/rity-dunfell-v22.1 -m default.xml --no-repo-verify
$ repo sync

# build configuration
$ TEMPLATECONF=$PWD/src/meta-rity/meta/conf source src/poky/oe-init-build-env
$ export BUILD_DIR=`pwd`

# Enable components that require NDA access
$ echo NDA_BUILD = \"1\" >> ${BUILD_DIR}/conf/local.conf

# fetch all the packages and build rity-demo-image
$ DISTRO=rity-demo MACHINE=i350-evk bitbake rity-demo-image

The output image is located in $BUILD_DIR/tmp/deploy/images/i350-evk. Please refer to Flash Genio 350-EVK to flash the image to the board.

For v22.0.1

If you have access to https://gitlab.com/mediatek/aiot/nda, set the NDA_BUILD = "1" in your configuration file local.conf:

# STEP 1: download recipe with manifests
$ mkdir aiot-yocto; cd aiot-yocto
$ export PROJ_ROOT=`pwd`
$ repo init -u https://gitlab.com/mediatek/aiot/bsp/manifest.git -b refs/tags/rity-v22.0.1
$ repo sync

# STEP 2: initialize build configuration
$ export TEMPLATECONF=${PWD}/src/meta-rity/meta/conf/
$ source src/poky/oe-init-build-env
$ export BUILD_DIR=`pwd`
# Enable components that require NDA access
$ echo NDA_BUILD = \"1\" >> ${BUILD_DIR}/conf/local.conf

# STEP 3: fetch all the packages and build rity-demo-image
$ DISTRO=rity-demo MACHINE=i350-evk bitbake rity-demo-image

The above instructions allows you to build an image with full feature set. But if you do not have access right to access to https://gitlab.com/mediatek/aiot/nda, you will get error when fetching nda repo.

For this situation, you could build an image with limited feature set by apply following commands at the end of STEP 1:

# STEP 1-1: Cherry-pick solution to build image with limited feature set
# cherry-pick for meta-rity
cd aiot-yocto/src/meta-rity
git cherry-pick e00bc87c53bb41314e9c790a497e8b75d0802ede
git cherry-pick 19e42d3a9e31f862b6896a910e3c1f5689ed5895

# cherry-pick for meta-nn
cd aiot-yocto/src/meta-nn
git cherry-pick 97db3c1d00668f0f294e72729f6a080d6d6b2ebf

# cherry-pick for meta-mediatek-bsp
cd aiot-yocto/src/meta-mediatek-bsp
git cherry-pick 66f2d7acc457015dc8e855f78400bcdf4ce88a02

and then modify the local.conf to set the configuration variable NDA_BUILD = "0":

# STEP 2: initialize build configuration
export TEMPLATECONF=${PWD}/src/meta-rity/meta/conf/
source src/poky/oe-init-build-env
export BUILD_DIR=`pwd`
# Disable components that require NDA access
echo NDA_BUILD = \"0\" >> ${BUILD_DIR}/conf/local.conf

# STEP 3: fetch all the packages and build rity-demo-image
$ DISTRO=rity-demo MACHINE=i350-evk bitbake rity-demo-image

For v21.3 and Before

# download recipe with manifests
mkdir aiot-yocto; cd aiot-yocto
export PROJ_ROOT=`pwd`
repo init -u https://gitlab.com/mediatek/aiot/bsp/manifest.git -b refs/tags/rity-v21.3 -m rity-nn.xml
repo sync

# build configuration
export TEMPLATECONF=${PWD}/src/meta-nn-extra/conf/
source src/poky/oe-init-build-env
export BUILD_DIR=`pwd`

# fetch all the packages and build rity-demo-image
DISTRO=rity-demo MACHINE=i350-evk bitbake rity-demo-image

The output image is located in $BUILD_DIR/tmp/deploy/images/i350-evk. Please refer to Flash Genio 350-EVK to flash the image to the board.

Genio 1200-Demo Board

Important

Please read and agree AIoT Software License Agreement before accessing or using IoT Yocto software. If you do not agree to the terms and conditions of AIoT Software License Agreement, you must not access or use the software.

For v22.1

In v22.1 release, to build public configuration that requires no GitLab account:

# download recipe with manifests
mkdir aiot-yocto; cd aiot-yocto
export PROJ_ROOT=`pwd`
repo init -u https://gitlab.com/mediatek/aiot/bsp/manifest.git -b refs/tags/rity-kirkstone-v22.1 -m default.xml --no-repo-verify
repo sync

# build configuration
TEMPLATECONF=$PWD/src/meta-rity/meta/conf source src/poky/oe-init-build-env
export BUILD_DIR=`pwd`

# fetch all the packages and build rity-demo-image
DISTRO=rity-demo MACHINE=i1200-demo bitbake rity-demo-image

The output image is located in $BUILD_DIR/tmp/deploy/images/i1200-demo. Please refer to Flash Genio 1200-demo Board to flash the image to the board.

To build private configuration that requires GitLab account and NDA repository access, set the NDA_BUILD configuration variable to 1:

# download recipe with manifests
$ mkdir aiot-yocto; cd aiot-yocto
$ export PROJ_ROOT=`pwd`
$ repo init -u https://gitlab.com/mediatek/aiot/bsp/manifest.git -b refs/tags/rity-kirkstone-v22.1 -m default.xml --no-repo-verify
$ repo sync

# build configuration
$ TEMPLATECONF=$PWD/src/meta-rity/meta/conf source src/poky/oe-init-build-env
$ export BUILD_DIR=`pwd`

# Enable components that require NDA access
$ echo NDA_BUILD = \"1\" >> ${BUILD_DIR}/conf/local.conf

# fetch all the packages and build rity-demo-image
$ DISTRO=rity-demo MACHINE=i1200-demo bitbake rity-demo-image

The output image is also located in $BUILD_DIR/tmp/deploy/images/i1200-demo. Please refer to Flash Genio 1200-demo Board to flash the image to the board.

Details and Other Boards

Please continue to the following sections for descriptions of each step and possible boards and image configurations.