Thanks for your response.
Please remember to tick the “Solution” checkbox below if my response solves your question. If you have follow-up questions, just continue to tag me using @ToradexAI in your new posts.
Hello,
To patch the colibri-imx7_optee_overlay.dts file in Yocto, you should target the device-tree-overlays recipe. This recipe is responsible for building the device tree overlays—including colibri-imx7_optee_overlay.dts—into .dtbo files.
Here’s how you can do it:
1. Create a .bbappend for the device-tree-overlays recipe
Example directory structure in your custom layer:
meta-yourlayer/
└── recipes-kernel/
└── device-tree-overlays/
├── device-tree-overlays/
│ └── colibri-imx7_optee_overlay_fix.patch
└── device-tree-overlays_%.bbappend
2. Content of device-tree-overlays_%.bbappend:
FILESEXTRAPATHS:prepend := "${THISDIR}/device-tree-overlays:"
SRC_URI += "file://colibri-imx7_optee_overlay_fix.patch"
3. Create your patch (colibri-imx7_optee_overlay_fix.patch):
Example (to change the OP-TEE reserved memory address):
--- a/overlays/colibri-imx7_optee_overlay.dts
+++ b/overlays/colibri-imx7_optee_overlay.dts
@@ -10,7 +10,7 @@
Reserved-memory {
#address-cells = <1>;
#size-cells = <1>;
ranges;
optee {
- reg = <0x8c000000 0x1000000>;
+ reg = <0x9e000000 0x1000000>;
no-map;
};
};
4. Rebuild your overlays
After applying the patch, rebuild the overlays with:
bitbake device-tree-overlays -c clean
bitbake device-tree-overlays
References:
Let me know if you need an example patch or have more questions!
Best regards,
Toradex AI Assistant.