MediaTek Genio for industrial automation
Genio’s industrial capabilities go beyond edge AI inference. The SoC integrates TSN-capable Gigabit Ethernet, and the RITY BSP includes the full industrial software stack: linuxptp for IEEE 1588 time synchronization, OPC-UA via libopen62541, PREEMPT_RT for soft real-time, and Jailhouse for hard real-time partitioning. This makes Genio viable as an industrial edge computer that combines sensor fusion, AI inference, and deterministic industrial protocol handling on a single board.
Key Insights
- TSN is native in silicon — Genio 510/520/700/720/1200 all include a TSN-capable GbE MAC; no external TSN switch required for single-hop setups
meta-mediatek-tsnYocto layer provides the full TSN software stack — linuxptp, tc with taprio/CBS, and OPC-UA- PREEMPT_RT is included in the RITY BSP — enables soft real-time Linux for control loops that need deterministic response in the 50–500µs range
- Jailhouse hypervisor partitions CPU cores between Linux and a bare-metal RTOS — use it when you need hard real-time guarantees alongside Linux
- OPC-UA (
libopen62541) ships in therity-tsnpackagegroup — server and client modes supported out of the box
TSN (Time-Sensitive Networking) on Genio
TSN adds deterministic delivery and time synchronization to standard Gigabit Ethernet. The key standards relevant for industrial automation:
| Standard | What it provides | Genio support |
|---|---|---|
| IEEE 802.1AS | Time synchronization (gPTP) | ✅ via linuxptp |
| IEEE 802.1Qbv | Time-Aware Shaper (TAS/taprio) | ✅ via tc taprio |
| IEEE 802.1Qav | Credit-Based Shaper (CBS) | ✅ via tc CBS |
| IEEE 802.1Qcc | Stream reservation | ✅ via SR classes |
Setting up gPTP time synchronization
# Install linuxptp (from meta-mediatek-tsn)
# On target:
# Check that PTP hardware clock is available
ls /dev/ptp*
# /dev/ptp0
# Query PTP clock capabilities
ethtool -T eth0 | grep -E "SOF_TIMESTAMPING|PTP"
# Start gPTP daemon as grandmaster (time source)
ptp4l -i eth0 -f /etc/linuxptp/gPTP.cfg --masterOnly 1 &
phc2sys -a -rr &
# Or as slave (sync to network time)
ptp4l -i eth0 -f /etc/linuxptp/gPTP.cfg -s &
phc2sys -a -rr &
Verify synchronization:
pmc -u -b 0 'GET CURRENT_DATA_SET'
# Should show offset close to 0 ns when synced
Configuring Time-Aware Shaper (taprio)
taprio schedules transmission windows for different traffic classes, ensuring control traffic is transmitted in guaranteed time slots:
# Configure taprio schedule
# 8 queues, 1ms cycle: 200µs for control (queue 0), 800µs for best-effort
tc qdisc replace dev eth0 parent root handle 100 taprio \
num_tc 2 \
map 1 1 1 1 1 1 1 1 \
queues 1@0 1@1 \
base-time $(date +%s%N)000 \
sched-entry S 01 200000 \
sched-entry S 02 800000 \
flags 0x2
Credit-Based Shaper (CBS) for audio/video streams
tc qdisc replace dev eth0 parent root mqprio \
num_tc 3 map 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 queues 1@0 1@1 2@2 \
hw 0
tc qdisc replace dev eth0 parent 100:1 cbs \
idleslope 10000 sendslope -990000 \
hicredit 153 locredit -1389 offload 1
OPC-UA with libopen62541
libopen62541 is the open-source OPC-UA implementation included in the RITY rity-tsn packagegroup.
Simple OPC-UA server on Genio
#include <open62541/server.h>
#include <open62541/server_config_default.h>
int main(void) {
UA_Server *server = UA_Server_new();
UA_ServerConfig_setDefault(UA_Server_getConfig(server));
// Add a variable node: temperature sensor reading
UA_VariableAttributes attr = UA_VariableAttributes_default;
UA_Float temperature = 23.5f;
UA_Variant_setScalar(&attr.value, &temperature, &UA_TYPES[UA_TYPES_FLOAT]);
attr.displayName = UA_LOCALIZEDTEXT("en-US", "Temperature");
attr.accessLevel = UA_ACCESSLEVELMASK_READ | UA_ACCESSLEVELMASK_WRITE;
UA_NodeId nodeId = UA_NODEID_STRING(1, "temperature");
UA_NodeId parentNodeId = UA_NODEID_NUMERIC(0, UA_NS0ID_OBJECTSFOLDER);
UA_NodeId parentReferenceNodeId = UA_NODEID_NUMERIC(0, UA_NS0ID_ORGANIZES);
UA_QualifiedName browseName = UA_QUALIFIEDNAME(1, "Temperature");
UA_Server_addVariableNode(server, nodeId, parentNodeId,
parentReferenceNodeId, browseName,
UA_NODEID_NUMERIC(0, UA_NS0ID_BASEDATAVARIABLETYPE),
attr, NULL, NULL);
// Run server on port 4840
UA_StatusCode retval = UA_Server_runUntilInterrupt(server);
UA_Server_delete(server);
return retval == UA_STATUSCODE_GOOD ? 0 : 1;
}
Build with:
gcc -o opc_server opc_server.c \
$(pkg-config --cflags --libs open62541)
Clients connect to opc.tcp://<genio-ip>:4840.
Real-time Linux (PREEMPT_RT)
The RITY BSP includes PREEMPT_RT kernel patches. With PREEMPT_RT, most kernel code paths become preemptible, reducing worst-case interrupt latency from milliseconds to the 50–500µs range.
Enable PREEMPT_RT in Yocto
# conf/local.conf
KERNEL_FEATURES:append = " features/preempt-rt/preempt-rt.scc"
Or in your kernel bbappend:
LINUX_KERNEL_TYPE = "preempt-rt"
Verify RT kernel is running
uname -r
# Should include "rt" in the version string
# e.g., 6.1.57-rt16-v8+
# Check preemption model
grep CONFIG_PREEMPT /boot/config-$(uname -r)
# CONFIG_PREEMPT_RT=y
Configuring a real-time control thread
#include <pthread.h>
#include <sched.h>
void* control_loop(void* arg) {
// Set real-time priority
struct sched_param param = { .sched_priority = 80 };
pthread_setschedparam(pthread_self(), SCHED_FIFO, ¶m);
// Lock memory to prevent page faults
mlockall(MCL_CURRENT | MCL_FUTURE);
struct timespec next;
clock_gettime(CLOCK_MONOTONIC, &next);
while (1) {
// 1ms control loop
next.tv_nsec += 1000000;
if (next.tv_nsec >= 1000000000) {
next.tv_nsec -= 1000000000;
next.tv_sec++;
}
// --- Do control work here ---
read_sensors();
compute_control_output();
write_actuators();
// ---
clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, &next, NULL);
}
return NULL;
}
Isolate a CPU core for the RT thread:
# Kernel command line: isolate core 3 from the OS scheduler
isolcpus=3 irqaffinity=0-2
# Pin RT thread to isolated core
taskset -c 3 ./control_app
Jailhouse hypervisor for hard real-time
When PREEMPT_RT soft real-time isn’t sufficient — for example, motion control requiring sub-100µs determinism — Jailhouse partitions the Genio CPU cores:
| Partition | Cores | Runs | Latency |
|---|---|---|---|
| Root cell | Core 0–2 | Linux + full BSP + applications | OS-level (1–10ms) |
| Inmate cell | Core 3 | Bare-metal RTOS or custom firmware | Hardware-level (<50µs) |
The inmate cell has exclusive access to its CPU core and assigned memory — Linux cannot interrupt it.
# Load Jailhouse kernel module
modprobe jailhouse
# Enable Jailhouse with the board cell config
jailhouse enable /lib/firmware/jailhouse/genio720-evk.cell
# Load and start an inmate (bare-metal demo)
jailhouse cell create /lib/firmware/jailhouse/genio720-inmate.cell
jailhouse cell load my-inmate /path/to/inmate.bin
jailhouse cell start my-inmate
# Check status
jailhouse cell list
Jailhouse configurations for Genio EVKs are included in the RITY BSP. Custom carrier boards need their own cell configuration describing memory layout and peripheral assignment.
Industrial use case examples
| Application | Key Genio features used |
|---|---|
| Smart gateway (IIoT edge) | TSN GbE, OPC-UA server, NPU for anomaly detection |
| Machine vision + PLC integration | MIPI CSI camera, TFLite NPU inference, OPC-UA client |
| Motor drive coordination | PREEMPT_RT, TSN taprio for deterministic EtherCAT-like control |
| Predictive maintenance | Multiple I2C/SPI vibration sensors, NPU time-series inference |
| Vision-guided robot | Multi-camera (MIPI CSI), NPU object detection, UART/SPI to servo controller |
| Industrial HMI | HDMI/DSI display, Weston Wayland, OPC-UA data visualization |
For the RITY Yocto layer that includes the TSN and OPC-UA packages, see What is RITY? MediaTek’s Genio reference distribution explained. For AI inference on the Genio NPU that powers the machine vision component, see on-device AI without the cloud on Genio.
FAQ
Does MediaTek Genio support real-time Linux for industrial control?
Yes. The RITY Yocto BSP includes PREEMPT_RT patches for the Genio kernel. This reduces worst-case latency to the 50–500µs range for soft real-time control. For hard real-time, Jailhouse partitions a CPU core for a dedicated RTOS.
What is TSN and does Genio support it?
TSN (Time-Sensitive Networking) adds deterministic, time-synchronized packet delivery to standard Ethernet. Genio 510, 520, 700, 720, and 1200 include a TSN-capable GbE MAC. The RITY BSP includes linuxptp, taprio, and CBS in the meta-mediatek-tsn layer.
Can Genio run OPC-UA for industrial protocol integration?
Yes. libopen62541 (open-source OPC-UA stack) is included in the rity-tsn packagegroup. It supports both OPC-UA server and client modes on Genio.
What is the Jailhouse hypervisor on Genio and when should I use it?
Jailhouse is a static partitioning hypervisor that dedicates CPU cores to isolated partitions. Use it when you need hard real-time control (sub-millisecond determinism) alongside Linux-based applications on the same SoC.
Relevant Services
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
Does MediaTek Genio support real-time Linux for industrial control?
Yes. The RITY Yocto BSP includes PREEMPT_RT patches for the Genio kernel. PREEMPT_RT converts most kernel code paths to preemptible, reducing worst-case latency to the microsecond range. This is sufficient for soft real-time control loops (PLCs, motion control coordination) but not hard real-time requirements where Jailhouse with a dedicated RTOS core is the right approach.
What is TSN and does Genio support it?
TSN (Time-Sensitive Networking) is a set of IEEE 802.1 standards that add deterministic, time-synchronized packet delivery to standard Ethernet. MediaTek Genio 510, 520, 700, 720, and 1200 include a TSN-capable Gigabit Ethernet MAC. The RITY BSP includes the TSN software stack (linuxptp, taprio, CBS) in the meta-mediatek-tsn layer.
Can Genio run OPC-UA for industrial protocol integration?
Yes. The RITY Yocto BSP includes libopen62541, the open-source OPC-UA stack, in the rity-tsn packagegroup. libopen62541 runs on Genio and supports both OPC-UA server and client modes. It integrates with TSN for deterministic OPC-UA transport in industrial Ethernet networks.
What is the Jailhouse hypervisor on Genio and when should I use it?
Jailhouse is a static partitioning hypervisor included in the RITY BSP. It partitions the Genio CPU cores so that one partition runs Linux (with full BSP and application software) and another partition runs a lightweight RTOS or bare-metal application with guaranteed CPU access and hard real-time latency. Use Jailhouse when you need hard real-time control (sub-millisecond determinism) alongside Linux-based applications on the same SoC.
Written by
Andrés CamposCo-Founder & CTO · ProventusNova
8 years deep in embedded systems, from underwater ROVs to edge AI. Andrés leads every technical delivery personally.
Connect on LinkedInRelated Articles
Jailhouse hypervisor on MediaTek Genio: bare-metal isolation on Linux
Jailhouse hypervisor on MediaTek Genio 720: cell config, GIC addresses, required kernel patches, MTK vendor config, and IVSHMEM communication.
MediaTek Genio for computer vision: a practical guide
Build a computer vision pipeline on MediaTek Genio. Camera capture, GStreamer, OpenCV, TFLite NPU inference, and end-to-end object detection pipeline examples.
On-device AI without the cloud on MediaTek Genio
Run AI inference on MediaTek Genio without cloud. NeuroPilot NPU, TFLite, ONNX Runtime, model conversion, and practical deployment patterns for edge AI.
Real-Time Linux on MediaTek Genio: PREEMPT-RT, Jailhouse, and RITY
What real-time Linux options exist on MediaTek Genio, what each approach delivers, and how to choose between PREEMPT-RT, Jailhouse, and RITY.