Announcing Yocto support for Jetson Boards

Hello community,

RidgeRun is happy to anounce that we will be providing professional Yocto support for Jetson boards. We will also be contributing to meta-tegra community layer with new features and characteristics (Gst-inference, DeepStream, or other video and/or AI) and helping companies interested in using Yocto. Currently we are validating all supported features and testing them. You can check our developer’s wiki (work in progress) for easy instructions on how to use Yocto built images on your Jetson boards.

Regards,
Fabian
www.ridgerun.com

2 Likes

Hi @fabian.solano,
thank you for providing details for Yocto support for Jetson boards.
I tried to run a build for jetson-xavier,

Build Configuration:
BB_VERSION           = "1.46.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "ubuntu-18.04"
TARGET_SYS           = "aarch64-poky-linux"
MACHINE              = "jetson-xavier"
DISTRO               = "poky"
DISTRO_VERSION       = "3.1.1"
TUNE_FEATURES        = "aarch64 armv8a crc"
TARGET_FPU           = ""
meta                 
meta-poky            
meta-yocto-bsp       = "dunfell:0fc9d32ae11ebb53aa33342f50887c1e692a1f32"
meta-tegra           = "dunfell-l4t-r32.4.2:7600b655471b94db0251fd459ac4bb069056e725"

However once it ended I am wondering how to load the generated O.S. into the eMMC.
In your document the chapter Flash image to Jetson platform refers to an unexistent tegraflash.zip and doflash.sh.

Could you clarify how to do that?
Thanks

Hi @MarukoBG,

To get the tegraflash tarball you need to add the following lines to your local.conf file (as specified here)

IMAGE_CLASSES += "image_types_tegra"
IMAGE_FSTYPES = "tegraflash"

Then after the bitbake command ended you need to create the deploy.sh script. I think the problem is that the latest meta-tegra branch (dunfell-l4t-r32.4.2) updated from .zip file to .tar.gz. Here is the updated script, I also updated it in our developer wiki for future reference

#!/bin/bash

image=$1
machine=$2

scriptdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
deployfile=${image}-${machine}.tegraflash.tar.gz
tmpdir=`mktemp`

rm -rf $tmpdir
mkdir -p $tmpdir
echo "Using temp directory $tmpdir"
pushd $tmpdir
cp $scriptdir/build/tmp/deploy/images/${machine}/$deployfile .
tar -xvf $deployfile
set -e
sudo ./doflash.sh
popd
echo "Removing temp directory $tmpdir"
rm -rf $tmpdir

Regards,
Fabian
www.ridgerun.com

Hi,
I added the lines below to local.conf, but tegraflash tarball is not generated.
May be caused by the jetson-xavier?

MACHINE = "jetson-xavier"
IMAGE_CLASSES += "image_types_tegra"
INHERIT += "rm_work"
IMAGE_FSTYPES = "tegraflash tar.gz wic.gz"

In the wiki there is a typo too ;-)

gunzip -c core-image-sato-dev-jetson-tx1.wic | sudo dd of=/dev/sdd bs=10M status=progress

gunzip -c core-image-sato-dev-jetson-tx1.wic.gz | sudo dd of=/dev/sdd bs=10M status=progress

Can you share the output of the following command to verify which images are being generated?

ls -lha build/tmp/deploy/images/jetson-xavier/

Regards,
Fabian
www.ridgerun.com

$ ls -lha build/tmp/deploy/images/jetson-xavier/
total 788M
drwxr-xr-x 2 koan koan 4,0K giu 19 14:26 .
drwxr-xr-x 3 koan koan 4,0K giu 19 10:15 ..
-rw-r--r-- 1 koan koan 420K giu 19 10:16 cboot-jetson-xavier-32.4.2-r0.bin
lrwxrwxrwx 1 koan koan   33 giu 19 10:16 cboot-jetson-xavier.bin -> cboot-jetson-xavier-32.4.2-r0.bin
-rw-r--r-- 1 koan koan 1,6K giu 19 14:25 core-image-minimal.env
-rw-r--r-- 1 koan koan  14G giu 19 14:25 core-image-minimal-jetson-xavier-20200619122451.rootfs.ext4
-rw-r--r-- 1 koan koan 4,0K giu 19 14:25 core-image-minimal-jetson-xavier-20200619122451.rootfs.manifest
-rw-r--r-- 1 koan koan  41M giu 19 14:25 core-image-minimal-jetson-xavier-20200619122451.rootfs.tar.gz
-rw-r--r-- 1 koan koan  60M giu 19 14:26 core-image-minimal-jetson-xavier-20200619122451.rootfs.wic.gz
-rw-r--r-- 1 koan koan  65M giu 19 14:25 core-image-minimal-jetson-xavier-20200619122451.tegraflash.tar.gz
-rw-r--r-- 1 koan koan 254K giu 19 14:25 core-image-minimal-jetson-xavier-20200619122451.testdata.json
lrwxrwxrwx 1 koan koan   59 giu 19 14:25 core-image-minimal-jetson-xavier.ext4 -> core-image-minimal-jetson-xavier-20200619122451.rootfs.ext4
lrwxrwxrwx 1 koan koan   63 giu 19 14:25 core-image-minimal-jetson-xavier.manifest -> core-image-minimal-jetson-xavier-20200619122451.rootfs.manifest
lrwxrwxrwx 1 koan koan   61 giu 19 14:25 core-image-minimal-jetson-xavier.tar.gz -> core-image-minimal-jetson-xavier-20200619122451.rootfs.tar.gz
lrwxrwxrwx 1 koan koan   65 giu 19 14:25 core-image-minimal-jetson-xavier.tegraflash.tar.gz -> core-image-minimal-jetson-xavier-20200619122451.tegraflash.tar.gz
lrwxrwxrwx 1 koan koan   61 giu 19 14:25 core-image-minimal-jetson-xavier.testdata.json -> core-image-minimal-jetson-xavier-20200619122451.testdata.json
lrwxrwxrwx 1 koan koan   61 giu 19 14:26 core-image-minimal-jetson-xavier.wic.gz -> core-image-minimal-jetson-xavier-20200619122451.rootfs.wic.gz
lrwxrwxrwx 2 koan koan   66 giu 19 11:27 Image -> Image--4.9.140+git0+e3c8d3e903-r0-jetson-xavier-20200619075607.bin
-rw-r--r-- 2 koan koan  36M giu 19 11:27 Image--4.9.140+git0+e3c8d3e903-r0-jetson-xavier-20200619075607.bin
-rw-r--r-- 2 koan koan  38M giu 19 11:27 Image-initramfs--4.9.140+git0+e3c8d3e903-r0-jetson-xavier-20200619075607.bin
-rw-r--r-- 2 koan koan  38M giu 19 11:27 Image-initramfs--4.9.140+git0+e3c8d3e903-r0-jetson-xavier-20200619075607.cboot
lrwxrwxrwx 2 koan koan   76 giu 19 11:27 Image-initramfs-jetson-xavier.bin -> Image-initramfs--4.9.140+git0+e3c8d3e903-r0-jetson-xavier-20200619075607.bin
lrwxrwxrwx 2 koan koan   78 giu 19 11:27 Image-initramfs-jetson-xavier.cboot -> Image-initramfs--4.9.140+git0+e3c8d3e903-r0-jetson-xavier-20200619075607.cboot
lrwxrwxrwx 2 koan koan   66 giu 19 11:27 Image-jetson-xavier.bin -> Image--4.9.140+git0+e3c8d3e903-r0-jetson-xavier-20200619075607.bin
-rw-r--r-- 2 koan koan 318M giu 19 11:27 modules--4.9.140+git0+e3c8d3e903-r0-jetson-xavier-20200619075607.tgz
lrwxrwxrwx 2 koan koan   68 giu 19 11:27 modules-jetson-xavier.tgz -> modules--4.9.140+git0+e3c8d3e903-r0-jetson-xavier-20200619075607.tgz
-rw-r--r-- 2 koan koan 270K giu 19 11:27 tegra194-p2888-0001-p2822-0000--4.9.140+git0+e3c8d3e903-r0-jetson-xavier-20200619075607.dtb
lrwxrwxrwx 2 koan koan   91 giu 19 11:27 tegra194-p2888-0001-p2822-0000.dtb -> tegra194-p2888-0001-p2822-0000--4.9.140+git0+e3c8d3e903-r0-jetson-xavier-20200619075607.dtb
lrwxrwxrwx 2 koan koan   91 giu 19 11:27 tegra194-p2888-0001-p2822-0000-jetson-xavier.dtb -> tegra194-p2888-0001-p2822-0000--4.9.140+git0+e3c8d3e903-r0-jetson-xavier-20200619075607.dtb
-rw-r--r-- 2 koan koan 2,2M giu 19 11:27 tegra-minimal-initramfs-jetson-xavier-20200619075607.rootfs.cpio.gz
-rw-r--r-- 2 koan koan  309 giu 19 11:26 tegra-minimal-initramfs-jetson-xavier-20200619075607.rootfs.manifest
-rw-r--r-- 2 koan koan 256K giu 19 11:26 tegra-minimal-initramfs-jetson-xavier-20200619075607.testdata.json
lrwxrwxrwx 2 koan koan   67 giu 19 11:27 tegra-minimal-initramfs-jetson-xavier.cpio.gz -> tegra-minimal-initramfs-jetson-xavier-20200619075607.rootfs.cpio.gz
lrwxrwxrwx 2 koan koan   68 giu 19 11:26 tegra-minimal-initramfs-jetson-xavier.manifest -> tegra-minimal-initramfs-jetson-xavier-20200619075607.rootfs.manifest
lrwxrwxrwx 2 koan koan   66 giu 19 11:26 tegra-minimal-initramfs-jetson-xavier.testdata.json -> tegra-minimal-initramfs-jetson-xavier-20200619075607.testdata.json
-rw-r--r-- 1 koan koan 361K giu 19 10:15 tos-jetson-xavier-32.4.2-r0.img
lrwxrwxrwx 1 koan koan   31 giu 19 10:15 tos-jetson-xavier.img -> tos-jetson-xavier-32.4.2-r0.img

So the tegraflash.tar.gz file is actually being generated.

-rw-r–r-- 1 koan koan 65M giu 19 14:25 core-image-minimal-jetson-xavier-20200619122451.tegraflash.tar.gz

Maybe you are running the script from the wrong path, and that is why the file is not found.

You should run the script, from the same directory from where you ran that command.

Regards,
Fabian
www.ridgerun.com

1 Like

Great now the script starts. Thank you

$ chmod +x deploy.sh 

$ ./deploy.sh core-image-minimal jetson-xavier
Using temp directory /tmp/tmp.yMyF1RR5SA
/tmp/tmp.yMyF1RR5SA ~/yocto-nvidia-dunfell/poky
./
nvtboot_cpu_t194.bin
...
[  21.0161 ] 
[  21.0182 ] tegradevflash_v2 --write MEM_BCT_b mem_coldboot_sigheader.bct.encrypt
[  21.0204 ] Bootloader version 01.00.0000
[  21.0234 ] Writing partition MEM_BCT_b with mem_coldboot_sigheader.bct.encrypt
[  21.0250 ] [................................................] 100%
[  21.0401 ] 
[  21.0402 ] Flashing completed
1 Like

Hi @fabian.solano

I’ve tried building the Yocto image (according to https://developer.ridgerun.com/wiki/index.php?title=Yocto_Support_for_NVIDIA_Jetson_Platforms), by configuring the MACHINE environment variable to ‘jetson-xavier-8gb’ machine , however i have a 16GB Xavier.

Should it work on my machine? Is there another BSP layer for the 16GB Jetson Xavier?

Regards.
Elad

Hi @ereelad,

If you set up the environment variable to just jetson-xavier it would be the default for the 16GB. Actually the 8GB is a side support by the community according to readme at: https://github.com/madisongh/meta-tegra

Regards,
Fabian
www.ridgerun.com

Most welcome for ping submission sites if you already do off page activities link is gives you want ping submission