TorizonCore deploys wrong checksum for custom image build

Issue: The checksum when using Torizoncore tool to deploy to a target, is different than the checksum from a successful Torizoncore build command. How do I ensure the custom image that I built is deployed to the target ?

Background: I am trying to build a custom image for a Colibri IMX7 with the relevant RPMsg kernel modules to run the RPMsg TTY demo. To achieve this I have the following setup:

# >> NOTES:
# >> Lines containing ">>" are simply comments explaining the properties that
# >> follow; if you don't like these comments run:
# >>   $ grep -v '>>' tcbuild.yaml > tcbuild-clean.yaml
# >> A line not containing ">>" can be uncommented (by removing the hash mark
# >> plus a space from its beginning); also set the corresponding property to
# >> appropriate values.
# >> When uncommenting a line having a property, remember to uncomment all its
# >> parent properties as well; for example: if you uncomment the
# >> 'splash-screen' property, also uncomment its parent property called
# >> 'customization'.

# >> The input section specifies the image to be taken as the base for the
# >> customization.
input:
  easy-installer:
    # >> Choose one of the options (REQUIRED):
    # >> (1) Image as local folder or tarball.
    local: torizon-core-docker-colibri-imx7-emmc-Tezi_5.7.2+build.20.tar
    # >> (2) Remote file (optionally with a filename and or a sha256 checksum):
    # remote: "https://artifacts.toradex.com/.../torizon-core-docker-apalis-imx8-Tezi_5.1.0%2Bbuild.1.tar"
    # remote: "https://artifacts.toradex.com/.../torizon-core-docker-colibri-imx6-Tezi_5.0.0-devel-202009%2Bbuild.2.tar;filename=torizon-core-docker-colibri-imx6-Tezi_5.0.0-devel-202009+build.2.tar;sha256sum=368595fa3fb00af9604e70311de3b04df6b30b280deec2f8918c46f479026ddb"
    # >> (3) Image specification (URL will be generated by the tool)
    # toradex-feed:
    #   version: "5.1.0"
    #   release: quarterly
    #   machine: colibri-imx7-emmc
    #   distro: torizon-upstream
    #   variant: torizon-core-docker
    #   build-number: "1"
    #   # build-date: "20210408"

# >> The customization section defines the modifications to be applied to get
# >> the desired output image.
customization:
  # >> Splash screen:
  # splash-screen: custom-splash-screen.png
  # >> Directories overlayed to the base OSTree
  # filesystem:
     # - changes/
   kernel:
    modules:
      - source-dir: rpmsg/
        autoload: true
   device-tree:
    # >> Directories where to look for include files.
     include-dirs:
      - device-tree-overlays/include
      - linux-toradex/include
    # >> Custom device tree source:
     custom: linux-toradex/arch/arm/boot/dts/imx7d-colibri-eval-v3.dts
    # >> Device-tree overlays configuration:
     overlays:
        add:
          - device-tree-overlays/overlays/colibri-imx7_disable-uart-b_overlay.dts
          - device-tree-overlays/overlays/colibri-imx7_fix_rpmsg_demo.dts

      # >> Whether to ignore all overlays from the base image (or ostree
      # >> archive in the future).
      # clear: false
      # >> Specific overlays not to use from base image (useful only when
      # >> clear is false and not DT has been selected).
      # remove:
        # - apalis-imx8_hdmi_overlay.dtbo
      # >> Overlays to add to output image.
      # add:
      # kernel:
    # >> Custom kernel arguments.
    # arguments:
      # - key1=val1
      # - key2=val2
    # >> Modules to build and possibly load automatically.
    # modules:
      # - source-dir: virtual_touchscreen/
      #   autoload: false

# >> The output section defines properties of the output image.
output:
  # >> OSTree deployment configuration (relevant also for Easy Installer output).
  # ostree:
    # branch: my-dev-branch
    # commit-subject: "OSTree commit subject"
    # commit-body: "OSTree commit body"
  # >> Parameters for deploying to an Easy Installer image.
  easy-installer:
    # >> Output directory of the customized image (REQUIRED):
    local: output_directory
    # >> Information used by Toradex Easy Installer:
    # name: "My customized image"
    # description: "My customized image (description)"
    # licence: files/custom-licence.html
    # release-notes: files/custom-release-notes.html
    # accept-licence: true
    # autoinstall: true
    # autoreboot: true
    # bundle:
      # >> Choose one of the options:
      # >> (1) Specify a docker-compose file whose referenced images will be downloaded.
      # >>     Properties platform, username, password and registry are optional.
      # compose-file: files/docker-compose.yml
      # platform: linux/arm/v7
      # username: "${USERNAME}"
      # password: "${PASSWORD}"
      # registry: hub.docker.com
      # >> (2) Specify a local directory containing the bundled images (previously
      # >>     obtained by 'torizoncore-builder bundle' command).
      # dir: bundle/
    # >> Provisioning configuration:
    # provisioning:
      # >> For "online" mode, properties "shared-data" and "online-data" must be specified.
      # >> For "offline" mode, property "shared-data" must be specified alone.
      # mode: "online"
      # shared-data: "shared-data.tar.gz"
      # online-data: "${ONLINE_PROVISIONING_DATA:?online provisioning data not supplied}"

Additional Info:
Checksum after successful build on host:


Checksum after successful deploy command on host:

Incorrect checksum on target:

RPMsg demo on target fails as a result:

And attempts to just scp the built kernel modules to the target as outlined here: Build U-Boot and Linux Kernel from Source Code | Toradex Developer Center

failed because the /lib directory on the target is read-only. If the Torizoncore builder tool doesn’t work, could I get guidance on how to make the /lib directory on the target read-write capable ? I’ve tried remounting the directory with permission changes, but it doesn’t work for me.

Hey @Mit,

After you use torizoncore-builder build command you’ll need to images unpack the image before deploying it.

As found here:

1 Like

Thanks @eric.tx , you’re the man. Unpacking the image first, and then deploying successfully deployed with the correct checksum.

After a reboot, the board stays stuck in the “Starting version 244.5+” as outlined below:

The device tree overlay files that I’ve applied are the following:

  • colibri-imx7_fix_rpmsg_demo.dts:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright 2020-2021 Toradex
 */

// Disable UART2, aka UART_B on the Colibri iMX7

/dts-v1/;
/plugin/;

/ {
	compatible = "toradex,colibri-imx7d",
		     "toradex,colibri-imx7d-emmc",
		     "toradex,colibri-imx7s";
};

/ {
	memory {
		linux,usable-memory = <0x80000000 0xff00000>;
	};
};
  • colibri-imx7_disable-uart-b_overlay.dts:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright 2020-2021 Toradex
 */

// Disable UART2, aka UART_B on the Colibri iMX7

/dts-v1/;
/plugin/;

/ {
	compatible = "toradex,colibri-imx7d",
		     "toradex,colibri-imx7d-emmc",
		     "toradex,colibri-imx7s";
};

&uart2 {
	status = "disabled";
};

And I’ve also included the rpmsg source kernel module as outlined in the tcbuild.yaml:

# >> Lines containing ">>" are simply comments explaining the properties that
# >> follow; if you don't like these comments run:
# >>   $ grep -v '>>' tcbuild.yaml > tcbuild-clean.yaml
# >> A line not containing ">>" can be uncommented (by removing the hash mark
# >> plus a space from its beginning); also set the corresponding property to
# >> appropriate values.
# >> When uncommenting a line having a property, remember to uncomment all its
# >> parent properties as well; for example: if you uncomment the
# >> 'splash-screen' property, also uncomment its parent property called
# >> 'customization'.

# >> The input section specifies the image to be taken as the base for the
# >> customization.
input:
  easy-installer:
    # >> Choose one of the options (REQUIRED):
    # >> (1) Image as local folder or tarball.
    local: torizon-core-docker-colibri-imx7-emmc-Tezi_5.7.2+build.20.tar
    # >> (2) Remote file (optionally with a filename and or a sha256 checksum):
    # remote: "https://artifacts.toradex.com/.../torizon-core-docker-apalis-imx8-Tezi_5.1.0%2Bbuild.1.tar"
    # remote: "https://artifacts.toradex.com/.../torizon-core-docker-colibri-imx6-Tezi_5.0.0-devel-202009%2Bbuild.2.tar;filename=torizon-core-docker-colibri-imx6-Tezi_5.0.0-devel-202009+build.2.tar;sha256sum=368595fa3fb00af9604e70311de3b04df6b30b280deec2f8918c46f479026ddb"
    # >> (3) Image specification (URL will be generated by the tool)
    # toradex-feed:
    #   version: "5.1.0"
    #   release: quarterly
    #   machine: colibri-imx7-emmc
    #   distro: torizon-upstream
    #   variant: torizon-core-docker
    #   build-number: "1"
    #   # build-date: "20210408"

# >> The customization section defines the modifications to be applied to get
# >> the desired output image.
customization:
  # >> Splash screen:
  # splash-screen: custom-splash-screen.png
  # >> Directories overlayed to the base OSTree
  # filesystem:
     # - changes/
   kernel:
    modules:
      - source-dir: rpmsg/
        autoload: true
   device-tree:
    # >> Directories where to look for include files.
     include-dirs:
      - device-tree-overlays/include
      - linux-toradex/include
    # >> Custom device tree source:
     custom: linux-toradex/arch/arm/boot/dts/imx7d-colibri-eval-v3.dts
    # >> Device-tree overlays configuration:
     overlays:
        add:
          - device-tree-overlays/overlays/colibri-imx7_disable-uart-b_overlay.dts
          - device-tree-overlays/overlays/colibri-imx7_fix_rpmsg_demo.dts

      # >> Whether to ignore all overlays from the base image (or ostree
      # >> archive in the future).
      # clear: false
      # >> Specific overlays not to use from base image (useful only when
      # >> clear is false and not DT has been selected).
      # remove:
        # - apalis-imx8_hdmi_overlay.dtbo
      # >> Overlays to add to output image.
      # add:
      # kernel:
    # >> Custom kernel arguments.
    # arguments:
      # - key1=val1
      # - key2=val2
    # >> Modules to build and possibly load automatically.
    # modules:
      # - source-dir: virtual_touchscreen/
      #   autoload: false

# >> The output section defines properties of the output image.
output:
  # >> OSTree deployment configuration (relevant also for Easy Installer output).
  # ostree:
    # branch: my-dev-branch
    # commit-subject: "OSTree commit subject"
    # commit-body: "OSTree commit body"
  # >> Parameters for deploying to an Easy Installer image.
  easy-installer:
    # >> Output directory of the customized image (REQUIRED):
    local: output_directory
    # >> Information used by Toradex Easy Installer:
    # name: "My customized image"
    # description: "My customized image (description)"
    # licence: files/custom-licence.html
    # release-notes: files/custom-release-notes.html
    # accept-licence: true
    # autoinstall: true
    # autoreboot: true
    # bundle:
      # >> Choose one of the options:
      # >> (1) Specify a docker-compose file whose referenced images will be downloaded.
      # >>     Properties platform, username, password and registry are optional.
      # compose-file: files/docker-compose.yml
      # platform: linux/arm/v7
      # username: "${USERNAME}"
      # password: "${PASSWORD}"
      # registry: hub.docker.com
      # >> (2) Specify a local directory containing the bundled images (previously
      # >>     obtained by 'torizoncore-builder bundle' command).
      # dir: bundle/
    # >> Provisioning configuration:
    # provisioning:
      # >> For "online" mode, properties "shared-data" and "online-data" must be specified.
      # >> For "offline" mode, property "shared-data" must be specified alone.
      # mode: "online"
      # shared-data: "shared-data.tar.gz"
      # online-data: "${ONLINE_PROVISIONING_DATA:?online provisioning data not supplied}"

Is this issue related to the deploy command or some configuration setup for the custom image ?

Hey @mit,
For isolating the issue with the boot loop.

Are you able to only run the A-core side of things (no M-core). And see if the Linux side boots correctly and also check if the kernel module is working/installed.

-Eric

Hey @eric.tx ,

Feel free to mark this thread as resolved - I’ve started a new thread for the latest issue here: Colibri IMX7 not booting after loading RPMsg Kernel Module custom image.

Best,
Mit