Yocto build guide for MediaTek Genio: complete walkthrough
Building the Yocto BSP for MediaTek Genio is straightforward once you have the right host setup, the correct manifest URL, and understand the NDA_BUILD flag that controls whether proprietary hardware acceleration is included. This guide covers every step from a fresh Ubuntu machine to a flashed board.
Key Insights
- Ubuntu 22.04 LTS is the only officially supported build host — other distros cause hard-to-debug package failures
kasis MediaTek’s chosen build configuration tool — do not userepoor rawbitbakewithout itNDA_BUILD=1adds hardware video, NPU, and camera acceleration — requires a MediaTek NDA and the private BSP layer- The download cache and sstate-cache are the biggest time savers — point multiple machines at a shared network location
genio-flashhandles the entire flash sequence — board must be in download mode before running it
What are the host requirements?
MediaTek validates the IoT Yocto BSP against Ubuntu 22.04 LTS (Jammy). Minimum hardware:
| Resource | Minimum | Recommended |
|---|---|---|
| CPU | 4 cores | 8+ cores |
| RAM | 16 GB | 32 GB |
| Disk | 100 GB free | 250 GB SSD |
| OS | Ubuntu 22.04 LTS | Ubuntu 22.04 LTS |
Install required packages:
sudo apt-get update
sudo apt-get install -y \
gawk wget git diffstat unzip texinfo gcc build-essential \
chrpath socat cpio python3 python3-pip python3-pexpect \
xz-utils debianutils iputils-ping python3-git python3-jinja2 \
libegl1-mesa libsdl1.2-dev pylint xterm python3-subunit \
mesa-common-dev zstd liblz4-tool file locales libacl1
sudo locale-gen en_US.UTF-8
Install kas:
pip3 install kas
kas is a Python tool that manages Yocto layer fetching and configuration. MediaTek ships .yml configuration files that kas reads to clone all required layers at the right revisions.
How do you fetch the BSP source?
The entry point is the genio-yocto manifest repository:
git clone https://gitlab.com/mediatek/aiot/rity/genio-yocto.git
cd genio-yocto
The repository contains a kas/ directory with one configuration file per supported machine:
kas/
genio-350-evk.yml
genio-510-evk.yml
genio-520-evk.yml
genio-700-evk.yml
genio-720-evk.yml
genio-1200-evk.yml
Each .yml file pins the exact branch and commit for every layer. Run kas checkout to clone all layers without building:
kas checkout kas/genio-720-evk.yml
This fetches: poky, meta-openembedded, meta-clang, meta-arm, meta-mediatek-bsp, and meta-rity. If you have the NDA layer, you add it here.
How do you configure the build?
The build is controlled by two things: the kas .yml file (which machine you target) and the NDA_BUILD environment variable.
Public build (no NDA required):
NDA_BUILD=0 kas build kas/genio-720-evk.yml
NDA build (proprietary drivers + hardware acceleration):
First, add the private layer to your kas configuration or place it in the layers/ directory alongside the public layers. For a detailed breakdown of what the NDA build unlocks versus the public build, see NDA vs public Yocto build on Genio. Then:
NDA_BUILD=1 kas build kas/genio-720-evk.yml
The NDA build includes:
mtkvdec/mtkh265enc— hardware video codec GStreamer elements- NeuroPilot SDK — NPU and MDLA inference runtime
- MT3D Mali GPU firmware
- Camera ISP drivers (
v4l2ISP pipeline)
The public build falls back to software implementations for all of these.
What does the layer structure look like?
| Layer | Type | Purpose |
|---|---|---|
poky | Public | Yocto Project core (OE-Core + BitBake) |
meta-openembedded | Public | Extended package collection |
meta-clang | Public | LLVM/Clang toolchain |
meta-arm | Public | ARM architecture support |
meta-mediatek-bsp | Public | Public Genio BSP — drivers, u-boot, kernel |
meta-rity | Public | RITY RTOS co-processor integration |
meta-mediatek-bsp-private | NDA | Closed hardware blobs — NeuroPilot, VPU, ISP |
What do you get after a successful build?
Output lands in build/tmp/deploy/images/<machine>/. If you need to add GStreamer plugins to your image before flashing, see adding GStreamer plugins to Genio IoT Yocto.
<machine>-<image>.wic.zst— the full flash image (partitioned)u-boot.bin— bootloaderImage— kernel<machine>.dtb— device tree
The .wic.zst image contains all partitions and is what genio-flash uses.
How do you flash the image?
Install genio-flash:
pip3 install genio-flash
Put the board in download mode: hold the Download button and power on (or press Reset while holding Download). A USB device should appear.
Flash:
genio-flash
Run from the build output directory or pass --image-dir path/to/deploy/images/<machine>. The tool selects the correct image and flashes all partitions. The process takes 2-5 minutes.
What are the common build failures?
locale: Cannot set LC_ALL — Locale not generated. Run sudo locale-gen en_US.UTF-8 and set export LC_ALL=en_US.UTF-8.
FileNotFoundError: kas — kas is not in PATH. Add ~/.local/bin to PATH: export PATH=$HOME/.local/bin:$PATH.
Out of disk space mid-build — BitBake work directories consume 60-80 GB for a full build. Check with df -h before starting. Point TMPDIR to a larger partition in conf/local.conf.
meta-mediatek-bsp-private not found — You set NDA_BUILD=1 but the private layer is not cloned. Either obtain the NDA layer from your MediaTek FAE or set NDA_BUILD=0.
Recipe fetching fails (network errors) — Some recipes fetch source at build time. If you are behind a proxy, set http_proxy and https_proxy before running kas build. Also set them in conf/local.conf as BB_ENV_PASSTHROUGH_ADDITIONS.
Building on MediaTek Genio and need help with BSP integration, Yocto customization, or getting to production faster? ProventusNova specializes in embedded Linux on Genio. See our custom board bringup service or get in touch.
MediaTek Genio Expert Support
Building on MediaTek Genio?
BSP bring-up, GStreamer pipelines, NeuroPilot integration, we've shipped it. Get unblocked fast. One call to scope it, fixed bid to deliver it.
Frequently Asked Questions
What Ubuntu version is required to build the Genio IoT Yocto BSP?
Ubuntu 22.04 LTS (Jammy) is the supported host OS. Ubuntu 20.04 works for some branches but 22.04 is what MediaTek validates against. Build on a native install or VM — Docker builds are not officially supported and have package version conflicts.
What is NDA_BUILD and when do I need it?
NDA_BUILD=1 enables the closed-source BSP layer (meta-mediatek-bsp-private) which includes hardware video codecs (mtkvdec, mtkh265enc), the NPU/MDLA NeuroPilot stack, camera ISP drivers, and GPU firmware. NDA_BUILD=0 is the public build — functional but lacks hardware acceleration. You need a MediaTek NDA and a separate private layer repo for NDA_BUILD=1.
How do I get the private BSP layer for NDA_BUILD=1?
The private layer (meta-mediatek-bsp-private) is distributed under NDA through MediaTek's partner portal or directly from your MediaTek FAE. It is not on GitHub. You must have an active NDA with MediaTek. Contact your FAE or reach out through the Genio partner program to request access.
How long does a full Genio Yocto build take?
First build with an empty download cache takes 4-8 hours on a modern 8-core machine with SSD storage. Subsequent builds with the download cache intact and a shared sstate-cache take 30-60 minutes for most changes. BitBake's sstate-cache is the single biggest factor — share it across machines if your team runs multiple builds.
How do I flash the built image to a Genio board?
Use genio-flash. Put the board in download mode by holding the Download button while powering on. Then run: genio-flash --board-config boards/<machine>.yaml. The tool finds the output image automatically if you run it from the build directory or pass --image-dir.
Written by
Aarón AnguloCo-Founder & CEO · ProventusNova
Obsessed with client outcomes. Aarón ensures every engagement delivers real results, on time, on scope, no exceptions.
Connect on LinkedIn