Hi,
I was wondering if it is possible to select a Toradex provided (binary) devicetree in the TorizonCore-Builder tcbuild.yaml.
Verdin iMX8M Plus 2GB WB IT V1.1A
Ivy Carrier Board V1.0A
Torizon OS 7.1.0-build.4 - Docker variant
TorizonCore-Builder 3.12.0 on Ubuntu 22.04
Since we are using the Ivy Carrier Board we can use the devicetrees included in the TorizonOS image. We currently have to set this manually through the UBoot variables on the device after flashing. Preferably we would include selecting the devicetree in our customisations.
As far as I can see the customization:devicetree: section of the tcbuild.yaml only allows to configure building a (custom) device tree or selecting overlays. This is not about the overlays but the full devicetree. We would like to select one of the provided ones without having to build it from source. Building from source seems a bit overkill since the binary devicetree is already included in the base Torizon image and requires cloning the full kernel.
Of course we can always replace the UBoot variables by running sed on the u-boot-initial-env-sd file in the resulting easy-installer image but preferably we’d have them set through the TorizonCore-Builder configuration.
Is this currently possible and if so how? If not are there any plans for supporting this in the future?
Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!
Did you like my answer?
Hello René,
Thank you for reaching out with your question. Currently, TorizonCore-Builder does not support directly selecting a pre-existing binary device tree in the tcbuild.yaml file. The customization:devicetree: section is primarily intended for building custom device trees or applying overlays.
To achieve your goal of using a pre-existing device tree, you can modify the U-Boot environment variables as part of your image customization process. Although this isn’t directly supported in tcbuild.yaml, you can automate the modification of U-Boot variables by scripting changes to the u-boot-initial-env-sd file. Alternatively, you could use a post-install script to set the desired device tree automatically.
While there are no current plans to add direct support for selecting pre-existing binary device trees in tcbuild.yaml, this could be a feature to look out for in future updates of TorizonCore-Builder. For now, using scripts to automate U-Boot variable settings is the most practical approach.
I hope this helps with your project. If you have any more questions, feel free to ask.
Best regards,
Toradex AI Assistant
Please, also check if these links can help you solve your problem:
Welcome to Toradex Community!
Feel free to browse around!
This is currently not possible and there is a good reason for it: TorizonCore Builder is a tool that allows you to input “source” information and get your final image on the other side (not to mention other features like deploying changes directly to the module, pushing updates to the Torizon Cloud, etc). With that, you can give it as input a device tree [overlay] source code from Toradex or something that you wrote yourself and TorizonCore Builder will build it for you.
Indeed you can set the desired device tree via U-Boot (using the fdtfile) or via userspace (using fw_setenv - U-Boot fw-utils | Toradex Developer Center). Theses approaches are very useful during development. For production, it is recommended set this via TorizonCore Builder, so in the end you will have your customized Torizon OS with the correct device tree already selected (Ivy’s device tree, in your case). You can even remove the ones not used.
I understand what you mean here and indeed seems like an overkill when you just want to quickly test something. But for the quick tests, you have the 2 approaches shared above (which you are already using).
For production, you will need to make the source codes available for TorizonCore Builder in order to be able to output your customized Torizon OS.
I can ask internally if there is any modification expected to this workflow, but for now the way to go in production is to have the Linux kernel cloned and building the device tree source code using TorizonCore Builder.
Thanks for your answer!
Too bad that our prefered workflow is currently not possible without source rebuilds. I think we will be sticking to the sed trick for now.
If it ever does become a possibility we’d love to hear about it.