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

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

Happy to make a PR once that is working