Build Jetson Xavier Balena image from Yocto


I am trying to build the balena os image from yocto build for the release tag v2.99.27+rev1.

I am following the following procedure to build.

  1. Clone the balena-jetson yocto source.
    $ git clone GitHub - balena-os/balena-jetson

  2. Download the needed dependencies (i.e) other yocto repositories needed for yocto build using following command.
    $ cd balena-jetson
    $ git submodule update --init --recursive

  3. Checkout to the release tag and create a temporary development branch.
    $ git checkout v2.99.27+rev1
    $ git checkout -b dev_branch

  4. Checkout to the tag v2.99.27 in the meta-balena source
    $ cd layers/meta-balena
    $ git checkout v2.99.27

  5. Move back to the balena-jetson directory.
    $ cd …/…/

  6. Build the Jetson xavier Balena OS image .
    $ balena-yocto-scripts/build/barys -b jetson_xavier_build --shared-downloads $HOME/downloads -m jetson-xavier

But I am facing the following issue in the yocto build.

ERROR: Traceback (most recent call last):
** File “/home/parthiban/Projects/Balena_Jetson/balena-jetson/layers/poky/bitbake/lib/bb/”, line 162, in wrapped**
** return func(fn, args)*
** File “/home/parthiban/Projects/Balena_Jetson/balena-jetson/layers/poky/bitbake/lib/bb/”, line 187, in parse_config_file**
** return bb.parse.handle(fn, data, include)**
** File “/home/parthiban/Projects/Balena_Jetson/balena-jetson/layers/poky/bitbake/lib/bb/parse/”, line 107, in handle**
** return h[‘handle’](fn, data, include)**
** File “/home/parthiban/Projects/Balena_Jetson/balena-jetson/layers/poky/bitbake/lib/bb/parse/parse_py/”, line 118, in handle**
** abs_fn = resolve_file(fn, data)**
** File “/home/parthiban/Projects/Balena_Jetson/balena-jetson/layers/poky/bitbake/lib/bb/parse/”, line 133, in resolve_file**
** raise IOError(errno.ENOENT, “file %s not found” % fn)**
FileNotFoundError: [Errno 2] file /home/parthiban/Projects/Balena_Jetson/balena-jetson/nilecam25_jetson_xavier/…/layers/meta-rust/conf/layer.conf not found

ERROR: Unable to parse /home/parthiban/Projects/Balena_Jetson/balena-jetson/nilecam25_jetson_xavier/…/layers/meta-rust/conf/layer.conf: [Errno 2] file /home/parthiban/Projects/Balena_Jetson/balena-jetson/nilecam25_jetson_xavier/…/layers/meta-rust/conf/layer.conf not found
[000000010][LOG]Build for jetson-xavier failed. Check failed log in nilecam25_jetson_xavier/tmp/log/cooker/jetson-xavier .
[000000010][LOG]If build for jetson-xavier succeeded, final image should have been generated here:
[000000010][LOG] nilecam25_jetson_xavier/tmp/deploy/images/jetson-xavier/balena-image-jetson-xavier.balenaos-img

When I searched the “balena-jetson/layers/meta-rust” there is no files present inside the directory.

Is there anything we are missing in the build? We need to build jetson xavier balena image for the L4T32.7.1



Any update on the above question?



We are trying to move up in the release tag v2.105.2+rev3 and could able to proceed with the build. But we face issues while unpacking tegra-firmware debian packages. Attached the error log (balena_error_log.txt) for your reference. Kindly help us to resolve this issue.

balena_error_log.txt (9.2 KB)

Hi @koilarulraj-s,

We just wanted to acknowledge your message and say that we’ve pinged our Devices engineers to give it a look. But We’re wondering why you are trying to build this yourself though - the Jetson device-types are some of our most complex to design, so we’re hoping to better understand why you would choose to build it in this case? Is it to support a custom carrier board, or maybe some other reason?

Hi @the-real-kenna,

Thanks for your reply.

We are trying the build balena image from source to integrate our camera support to the Jetson AGX xavier source.

We have found the reason for the build issue. To extract the .zst tar files, layers/poky/bitbake/lib/bb/fetch2/ file needed additional command as given below. And this command is missed in the latest poky init scripts.

if datafile.endswith(‘.tzst’) or datafile.endswith(‘.tar.zst’):
cmd = ‘ar x %s %s && tar --use-compress-program=unzstd --no-same-owner -xpf %s && rm %s’ % (file, datafile, datafile, datafile)

Attached the updated file as a text file for your reference. init .txt|attachment (68.5 KB)

Kindly do the needful.