Device Tree Overlay Method for Kernel Arguments
You can use device tree overlays to set kernel command line arguments like isolcpus=3. Here’s how to create the overlay and integrate it into your Yocto build:
Creating the Device Tree Overlay
Create a device tree overlay source file (.dts) with the /plugin/ directive (1). Here’s the basic structure for adding kernel arguments:
/dts-v1/;
/plugin/;
/ {
compatible = "toradex,<your-module>";
fragment@0 {
target-path = "/chosen";
__overlay__ {
bootargs-append = "isolcpus=3";
};
};
};
(1)
The overlay must be denoted with /plugin/; in the header (2). Replace <your-module> with your specific Toradex module (e.g., verdin-imx8mp, colibri-imx8x) (1).
Template Structure
You can use this template for pin muxing or other customizations (1):
/dts-v1/;
/plugin/; //Indicates a Device Tree Overlay
// Header file with pin definitions
#include <soc-pinfunc.h>
/ {
compatible = "toradex,apalis-imx8"; // Set hardware compatibility
};
&iomuxc {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl-originally-in-device-tree>, <&pinctrl_my_pins>; // Pin group available in userspace i.e. as GPIO
name-of-som {
pinctrl_my_pins: my_muxgrp {
fsl,pins = <
PIN_NAME_PIN_MUX PAD_CTRL // PINS
>;
};
};
};
&node {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_my_pins>; // Pin group used in genericPeripheral
status = "okay";
};
(1)
Integration into Yocto Build
Step 1: Add Your Overlays to the Yocto Project
There are two recipes that handle device tree overlays (2):
- Upstream-based images:
meta-toradex-bsp-common/recipes-kernel/linux/device-tree-overlays-mainline_git.bb (2)
- Downstream-based images:
meta-toradex-nxp/recipes-kernel/linux/device-tree-overlays_git.bb (2)
You can write your own bbappends to add your device tree overlays repository (2).
Step 2: Example bbappend
Create a bbappend file with this structure (2):
FILESEXTRAPATHS:prepend := "${THISDIR}/device-tree-overlays:"
CUSTOM_OVERLAYS_SOURCE = " \
my-device-tree_overlay.dts \
"
CUSTOM_OVERLAYS_BINARY = " \
my-device-tree_overlay.dtbo \
"
SRC_URI += " \
file://my-device-tree_overlay.dts \
"
TEZI_EXTERNAL_KERNEL_DEVICETREE += " \
${CUSTOM_OVERLAYS_BINARY} \
"
TEZI_EXTERNAL_KERNEL_DEVICETREE_BOOT = " \
${CUSTOM_OVERLAYS_BINARY} \
"
do_collect_overlays:prepend() {
for DTS in ${CUSTOM_OVERLAYS_SOURCE}; do
cp ${WORKDIR}/${DTS} ${S}
done
}
(2)
Step 3: Enable Your Overlays
The class meta-toradex-bsp-common/classes/image_type_tezi.bbclass uses the variable TEZI_EXTERNAL_KERNEL_DEVICETREE_BOOT to add overlays that will be applied during boot time (2).
You can find the variable settings using grep in the layers directory (2):
$ cd <yocto projet setup>
$ grep -nre "TEZI_EXTERNAL_KERNEL_DEVICETREE_BOOT" layers/*
(2)
Build Process
Using TorizonCore Builder for Testing
For evaluation and development, you can use TorizonCore Builder’s dto command (1):
$ torizoncore-builder dto apply device-trees/overlays/<your-custom-device-tree-overlay.dts>
(3)
Production Build with Yocto
For production, use the build.yaml file approach (1):
customization:
device-tree:
include-dirs:
- device-trees/include/
overlays:
add:
- device-trees/overlays/<your-custom-device-tree-overlay.dts>
(1)
This enables the build command to compile and deploy the DTOs to your customized image (1).
Important Notes
- Raw NAND modules don’t support device tree overlays (2)
- The overlay source file should be located in the
device-tree-overlays folder at the same directory as your bbappend (2)
- Make sure your custom meta layer is properly initialized as a Git project for OSTree integration (2)
Best regards, Toradex AI Assistant.
Did you like my answer?

If I answered your question, please tick the “Solution” checkbox.
For follow-up questions to me, please use @ToradexAI in your post.