Building Torizon for Jetson Orin

Hi there,

I am trying to build Torizon with Yocto targeting a Jetson Orin Nano Dev Kit. I am following this blog:

Next I tried to add the layers from here:

And I am planning to build the torizon-docker. Unfortunately the build is failing and I am trying to fix the build errors. In the meantime, any hints? Is that the right approach and expected to work?

Thanks

Elias

1 Like

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello Elias,

Building Torizon for the Jetson Orin Nano Dev Kit using Yocto is indeed a valid approach, though it can be complex. Here are some steps and considerations to help you proceed:

  1. Compatibility Check: Ensure that the layers and configurations you are using are compatible with the Jetson Orin Nano. It’s crucial to use the correct machine configuration for your device.

  2. Manifest and Layers: Use the recommended manifest file, typically torizon/default.xml, from the Toradex manifest repository. This ensures a stable and tested configuration.

  3. TorizonCore Builder: Consider using the TorizonCore Builder tool for customization. This tool allows you to modify Torizon OS images without directly dealing with Yocto, potentially simplifying the process.

  4. Troubleshooting Build Errors:

    • Logs: Carefully examine the build logs to identify specific errors. They can provide clues about missing dependencies or configuration issues.
    • Dependencies: Ensure all required dependencies are installed on your build host, as missing packages can cause build failures.
    • Environment: Verify that your build environment matches the requirements specified by Toradex, including the correct versions of tools and libraries.
  5. Alternative Approaches: If build errors persist, consider using a Docker container for the build process. This can provide a more controlled environment that matches the expected setup.

By following these steps, you should be able to address the build issues and successfully create a Torizon image for your Jetson Orin Nano. Best of luck with your build process!

Best regards,
Toradex AI Assistant.

Please, also check if these links can help you solve your problem:

Including initramfs to build.

I think is failing because of this:

\par \cf5\highlight0 ERROR\cf0 : \cf6 edk2-firmware-tegra-36.4.0-r0 do_patch: QA Issue: Fuzz detected:\cf1\highlight2

Greetings @eliaspromiseq,

Well you have to understand porting a completely new device is quite involved. There’s not really any tips or hints. Especially considering what is needed to port a device to Torizon can be very heavily dependent on the specific hardware and it’s needs.

Also keep in mind meta-toradex-torizon is just an upper Distro layer, it does not provide any of the underlying BSP for the hardware. The BSP for this device itself has to come from elsewhere, which I do see in that blog it does mention the tegra based meta-layers.

We can’t really get any more specific since the hardware here is 3rd-party and not from Toradex. We’re not exactly the experts on this specific hardware.

Best Regards,
Jeremias

Out of curiosity, @eliaspromiseq how are you setting up your build, step-by-step?

I’m looking for instructions similar to meta-toradex-torizon/docs/README-rzv2l.md at scarthgap-7.x.y · torizon/meta-toradex-torizon · GitHub, for example.

As @jeremias.tx said, we cannot guarantee much help but if you provide more info it might be easier to get help from our community. By the way, when you make this machine work, feel free to open a PR on GitHub - torizon/meta-toradex-torizon: Torizon OS OpenEmbedded Distro Layer, we accept external contributions there for community machines.

Follow the steps as outlined in the blog here

You can download the BSP and RFS directly from

Yocto Scarthgap Release


git clone --single-branch -b scarthgap git://git.yoctoproject.org/poky.git

Clone Layers


git clone --single-branch -b scarthgap https://github.com/OE4T/meta-tegra.git
git clone --single-branch -b scarthgap https://github.com/openembedded/meta-openembedded.git

Initialize the build environment

cd ~/Documents/yocto-jetson-ros-tutorial/poky
source oe-init-build-env

Edit bblayers.conf

POKY_BBLAYERS_CONF_VERSION = "2"

BBPATH = "${TOPDIR}"
BBFILES ?= ""

BBLAYERS ?= " \

# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
POKY_BBLAYERS_CONF_VERSION = "2"

BBPATH = "${TOPDIR}"
BBFILES ?= ""

BBLAYERS ?= " \
  /home/eli/Documents/yocto-tutorial/poky/meta \
  /home/eli/Documents/yocto-tutorial/poky/meta-poky \
  /home/eli/Documents/yocto-tutorial/poky/meta-yocto-bsp \
  /home/eli/Documents/yocto-tutorial/sources/meta-tegra \
  /home/eli/Documents/yocto-tutorial/sources/meta-openembedded/meta-oe \
  /home/eli/Documents/yocto-tutorial/sources/meta-openembedded/meta-python \
  /home/eli/Documents/yocto-tutorial/sources/meta-openembedded/meta-networking \
  /home/eli/Documents/yocto-tutorial/sources/meta-openembedded/meta-filesystems \
  /home/eli/Documents/yocto-torizon/meta-toradex-torizon \
  /home/eli/Documents/yocto-torizon/meta-updater \
  /home/eli/Documents/yocto-torizon/meta-virtualization \
  /home/eli/Documents/yocto-tutorial/poky/build/workspace \
  "

Edit bblayers.conf

Those are the line that I have uncommented.

MACHINE ?= "jetson-orin-nano-devkit"
DISTRO ?= "common-torizon"
PACKAGE_CLASSES ?= "package_deb"
PACKAGECONFIG:append:pn-qemu-system-native = " sdl"
EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
USER_CLASSES ?= "buildstats"
IMAGE_CLASSES += "image_types_tegra"
IMAGE_FSTYPES = "tegraflash tar.gz"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS ??= "\
    STOPTASKS,${TMPDIR},1G,100K \
    STOPTASKS,${DL_DIR},1G,100K \
    STOPTASKS,${SSTATE_DIR},1G,100K \
    STOPTASKS,/tmp,100M,100K \
    HALT,${TMPDIR},100M,1K \
    HALT,${DL_DIR},100M,1K \
    HALT,${SSTATE_DIR},100M,1K \
    HALT,/tmp,10M,1K"

PACKAGECONFIG:append:pn-qemu-system-native = " sdl"
CONF_VERSION = "2"

Start Yocto Build!

bitbake torizon-docker

1 Like

Happy to make a PR once that is working

1 Like

Hi @eliaspromiseq

I’m new to the Torizon community and also very interested in getting the Jetson Orin to work in the platform. I’ll try the tutorials linked above and let you know how far I get.
In an ideal scenario, I would like to get a Jetson + custom carrier board onboarded but let’s first start with the devkit.

Hi @RobbeGoethals,

Just to understand your goals and use-case. Do you want to run the full Torizon OS on your Jetson Orin hardware? Or do you just want to be able to connect your Jetson Orin to our Torizon Cloud Platform?

If it’s the latter, then what could be an alternative is the following: GitHub - torizon/torizon-plugin-installer: Installation script for installing the Torizon software stack on apt-based distributions.

This is an experimental way to connect a generic device running any apt-based distro to Torizon Cloud. This should install the base components needed for a device to communicate with the Torizon Cloud Platform. Just keep in mind the experimental aspect, this just means it’s not something we regularly test, and we may or may not choose to invest in this tool going forward. But, if you’re willing to give this a try despite this, then it could be a somewhat easy way to connect your Jetson Orin to our Cloud.

Best Regards,
Jeremias

Hi @jeremias.tx

In an ideal world, I would be able to get the complete Torizon OS working on the Jetson Orin.
Thanks for the installation script, I’ll give it a go anyway.

Kind regards
Robbe

In an ideal world, I would be able to get the complete Torizon OS working on the Jetson Orin.
Thanks for the installation script, I’ll give it a go anyway.

I see. Getting the complete Torizon OS ported on the Jetson Orin would certainly require a more substantial effort. Out of curiosity what aspects of Torizon OS do you most desire for the Jetson Orin?

Since you said you’d like the full OS, I imagine it’s not just the Torizon Cloud Platform aspects, correct?

Best Regards,
Jeremias

Hi @jeremias.tx

There’s a number of things that I would like to achieve using Torizon OS:

  • Operating System + Container updates through the cloud platform
  • Remote access through the cloud platform
  • Offline updates using the lockboxes
  • Immutable read-only OS
  • Flexibility in OS images by uploading our own (e.g. RT build for x86, custom HW etc.)

Yesterday I had a nice intro ( thanks to @drew.tx ) into the platform and OS. The next step for me would be to just invest more time into this and get my Jetson devkit up and running.

KR
Robbe

I see, thank you for sharing your interests and use-cases with us. It’s good to hear you have a interest in what our platform has to offer. If you have any further questions feel free to reach out to us.

Best Regards,
Jeremias