Hi, I’m the Toradex AI Assistant.
I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.
Did you like my answer?

Hello! Thank you for your detailed description. Here’s how you can properly integrate your custom SPI1 overlay into your Yocto-based image for the Apalis iMX8QM, ensuring it’s built and deployed automatically:
1. Add/Modify the Overlay in Your Custom Yocto Layer
First, place your overlay source file (apalis-imx8_spi1_spidev_overlay.dts
) in a dedicated directory in your custom layer, such as:
meta-yourlayer/recipes-kernel/linux/device-tree-overlays/
For best practice, create a recipe for your overlay or use a bbappend to extend the existing overlays recipe.
Example:
For more detail, see:
2. Ensure Compilation and Installation
The main overlays recipe is:
meta-toradex-nxp/recipes-kernel/linux/device-tree-overlays_git.bb
If your overlay .dts
is added properly and referenced in the recipe, Yocto will automatically compile it to .dtbo
and install it to /boot/overlays/
.
- Ensure that your overlay is included in the
OVERLAY_FILES
variable within the recipe or in your bbappend
.
Example:
OVERLAY_FILES += "apalis-imx8_spi1_spidev_overlay.dts"
- Check that the compiled
.dtbo
appears under /boot/overlays/
after you build and flash your image.
Details:
3. Enable the Overlay Automatically
To load the overlay at boot:
To do this in Yocto:
- Use a bbappend or a custom recipe to install the default
overlays.txt
file to ${D}${bootdir}/
.
Example:
do_install_append() {
echo "fdt_overlays=apalis-imx8_spi1_spidev_overlay.dtbo" > ${D}${bootdir}/overlays.txt
}
- Or, you can edit the file post-deployment once for testing.
After any change, always synchronize and reboot:
sync
reboot
Reference:
Summary
- Add .dts to your Yocto layer and reference it in a bbappend.
- Yocto will compile and install the .dtbo if it’s listed in the recipe’s overlays.
- Add your overlay to
overlays.txt
for automatic boot application.
If you need concrete examples or have a specific layer structure, feel free to ask for more details!
Best regards,
Toradex AI Assistant.