ApolloX TCB project to rebuild "TorizonCore with Evaluation Container"

I tried to create an ApolloX TCB project that rebuilds the “TorizonCore with Evaluation Container” 6.3.0-devel-202305+build.7.container for Verdin iMX8M-Plus.

  • I cloned linux and device-trees repos as described here
  • I downloaded the binaries of TorizonCore from the above link and I installed it on the SoM
  • I copied docker-compose.yaml from the SoM into TCB project on my PC
  • I changed tcbuild.yaml in this way (I suppose it is how it should be to build “TorizonCore with Evaluation Container”, but I added the verdin-imx8mp_hmp_overlay.dts overlay too)
# Documentation https://developer.toradex.com/torizon/os-customization/torizoncore-builder-workflow/#customizing-the-configuration-file
# Configuration file outline:
# ⚠️ Mouse hover to the properties to see documentation
# ⚠️ ctrl+space inside a object or property to get the autocompletion tips
input:
  # Input section items (required).
  # ⚠️ change it for your needs
  easy-installer:
    toradex-feed:
      version: "6.3.0"
      release: monthly
      machine: verdin-imx8mp
      distro: torizon
      variant: torizon-core-docker
      build-number: 7
      build-date: 202305

customization:
  # Customization section items.
  splash-screen: splashScreen.png
  device-tree:
    include-dirs:
      - linux/include
    custom: linux/arch/arm64/boot/dts/freescale/imx8mp-verdin-wifi-dev.dts
    overlays:
      add:
        - device-trees/overlays/verdin-imx8mp_hdmi_overlay.dts
        - device-trees/overlays/verdin-imx8mp_dsi-to-hdmi_overlay.dts
        - device-trees/overlays/verdin-imx8mp_spidev_overlay.dts
        - device-trees/overlays/verdin-imx8mp_hmp_overlay.dts

output:
  # Output section items (required).
  # ⚠️ change it for your needs
  easy-installer:
    local: tcbhmp-TCB-CUSTOM3
    bundle:
      compose-file: docker-compose.yml
  ostree:
    branch: tcb-hmp
    commit-subject: tcbhmp
  • I run tcb-build task from ApolloX and the image is built
  • when I install it on the SoM, it cannot boot with the error below:
Applying Overlay: verdin-imx8mp_hmp_overlay.dtbo
2503 bytes read in 2 ms (1.2 MiB/s)
13348705 bytes read in 43 ms (296.1 MiB/s)
11600629 bytes read in 38 ms (291.1 MiB/s)
   Uncompressing Kernel Image
## Flattened Device Tree blob at 50200000
   Booting using the fdt blob at 0x50200000
ERROR: Failed to allocate 0x3a000 bytes below 0x100000000.
device tree - allocation error
FDT creation failed!
resetting ...

and this is the issue reported here.
After the fixI can build the image.

Two questions:

  1. is my tcbuild.yaml the right one?
  2. Is it possible to configure tcbuild.yaml so that fdt_high is set automatically during the build?

Greetings @vix,

is my tcbuild.yaml the right one?

On quick inspection it looks correct for what you’re trying to do. Why do you ask, are you having issues related to it?

Is it possible to configure tcbuild.yaml so that fdt_high is set automatically during the build?

Unfortunately no, that is a U-Boot environment variable. It is currently not possible to use TorizonCore Builder to freely modify the bootloader or it’s environment. You would need to modify the shipped bootloader itself to have this variable set by default.

Best Regards,
Jeremias

On quick inspection it looks correct for what you’re trying to do. Why do you ask, are you having issues related to it?

Not a real issue, but I need a confirmation that I understood what are the expected steps to customize a tcbuild.yaml

You would need to modify the shipped bootloader itself to have this variable set by default.

As far as I understood from a @hfranco.tx suggestion here I can modify the file u-boot-initial-env-sd after the TorizonCore image has been built.

It is currently not possible to use TorizonCore Builder to freely modify the bootloader or it’s environment.

I would like a new TCB feature that allows to customize U-Boot variables. I mean, that modify the u-boot-initial-env-sd file as needed.
Based on my experience (discussed in other topics) this is necessary when working with Cortex-M too (on Verdin iMX8M-Plus, as an example). And an integrated way in TCB would be great!
Will Toradex consider such a product suggestion?
I can open in Feature Requests

Will Toradex consider such a product suggestion?

We can certainly put the suggestion in for consideration. Keep in mind though like all feature requests, we do not guarantee any timeline or if the feature will even be implemented. It is only take as a consideration initially.

That said, I can go and bring this up internally with our team for consideration.

Best Regards,
Jeremias

Hi @vix !

Quick update: the consideration about adding such feature on TorizonCore Builder can take more time, but until then we are going to add some tips about this request of yours on our documentation.

Best regards,