Adding additional DTB files via TorizonCore builder

Happy to report my idea worked. Setup is as follows:

  • Common base DTS file with all hardware defined. Items unique to one or the other configuration are disabled by default.
  • Created a pair of DTS files that change the status for each variant’s additional hardware to “okay”.
  • Build these into dtbo files using dtc
  • Place the dtbos in usr/lib/modules/[version]/dts/overlays
  • Add a systemd script that checks the contents of overlays.txt matches the hardware (we use some GPIO strapping to do this). If not, rewrite the .txt and issue a reboot.
  • Can be easily expanded with additional variants/hardware revisions if necessary.

Something similar can be done with uboot scripts as well but this is far easier and can be done directly via torizoncore-builder.

2 Likes