Adding USB Audio Gadget modules to BalenaOS

Hi,
Is there a way to add USB Audio support to Balena OS (u_audio, usb_f_uac1, usb_f_uac2)?
I have a Jetson Orin devkit 64G, and it appears that Ubuntu/Jetson Linux struggles to enable it even if I compile it into the kernel and load it. I was wondering if perhaps there is a relatively easy way to find out if this will work on Balena OS?

Hello @JayDoubleu first of all welcome to the balena community!

did you provision the device to balenaCloud?

Could you please check and share what you get when you do (put the audio supports between " "):

zcat /proc/config.gz | grep -i "enter_search_items_here"

Afterwards you could check if whatever drivers you need are built-in (they would appear with an Y in the query above), or as modules (they would appear with a m in the query above)

Let us know more details!

Thanks

Hi @mpous thanks for the reply and apologies for double posting (I thought I posted in wrong section and I didnt have ability to delete)

To answer your question, yes. I have provisioned the device to balenaCloud.

This is the output from the command:

root@55292e0:~# zcat /proc/config.gz | grep -i -E "CONFIG_USB_GADGET|CONFIG_USB_F_UAC|CONFIG_USB_CONFIGFS|CONFIG_USB_AUDIO|CONFIG_SND_USB"
CONFIG_SND_USB=y
CONFIG_SND_USB_AUDIO=y
# CONFIG_SND_USB_UA101 is not set
# CONFIG_SND_USB_CAIAQ is not set
# CONFIG_SND_USB_6FIRE is not set
# CONFIG_SND_USB_HIFACE is not set
# CONFIG_SND_USB_POD is not set
# CONFIG_SND_USB_PODHD is not set
# CONFIG_SND_USB_TONEPORT is not set
# CONFIG_SND_USB_VARIAX is not set
CONFIG_USB_GADGET=y
# CONFIG_USB_GADGET_DEBUG is not set
# CONFIG_USB_GADGET_DEBUG_FILES is not set
# CONFIG_USB_GADGET_DEBUG_FS is not set
CONFIG_USB_GADGET_VBUS_DRAW=2
CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2
# CONFIG_USB_GADGET_XILINX is not set
CONFIG_USB_CONFIGFS=m
CONFIG_USB_CONFIGFS_SERIAL=y
CONFIG_USB_CONFIGFS_ACM=y
CONFIG_USB_CONFIGFS_OBEX=y
CONFIG_USB_CONFIGFS_NCM=y
CONFIG_USB_CONFIGFS_ECM=y
CONFIG_USB_CONFIGFS_ECM_SUBSET=y
CONFIG_USB_CONFIGFS_RNDIS=y
CONFIG_USB_CONFIGFS_EEM=y
CONFIG_USB_CONFIGFS_MASS_STORAGE=y
# CONFIG_USB_CONFIGFS_F_LB_SS is not set
CONFIG_USB_CONFIGFS_F_FS=y
CONFIG_USB_CONFIGFS_F_ACC=y
# CONFIG_USB_CONFIGFS_F_UAC1 is not set
# CONFIG_USB_CONFIGFS_F_UAC1_LEGACY is not set
# CONFIG_USB_CONFIGFS_F_UAC2 is not set
# CONFIG_USB_CONFIGFS_F_MIDI is not set
# CONFIG_USB_CONFIGFS_F_HID is not set
# CONFIG_USB_CONFIGFS_F_UVC is not set
# CONFIG_USB_CONFIGFS_F_PRINTER is not set
# CONFIG_USB_AUDIO is not set
# CONFIG_USB_GADGETFS is not set
root@55292e0:~#

From kernel configuration output, I can see that:

  1. The USB Gadget framework is enabled:
CONFIG_USB_GADGET=y
  1. ConfigFS support is enabled as a module:
CONFIG_USB_CONFIGFS=m
  1. However, all USB Audio Class gadget functions are disabled:

Copy

# CONFIG_USB_CONFIGFS_F_UAC1 is not set
# CONFIG_USB_CONFIGFS_F_UAC1_LEGACY is not set
# CONFIG_USB_CONFIGFS_F_UAC2 is not set

To enable USB audio gadget functionality, i'll need to enable at least one of these in my kernel configuration:
  • CONFIG_USB_CONFIGFS_F_UAC1 (for USB Audio Class 1.0)
  • CONFIG_USB_CONFIGFS_F_UAC2 (for USB Audio Class 2.0)




I’ve tried adding these in and compiling the OS for orin however I’ve hit this issue here:



Steps to reproduce the build:

# Step 1: Clone the Balena OS repository for Jetson Orin
jayw@fedoraremix41 ➜ balena git clone https://github.com/balena-os/balena-jetson-orin
Cloning into 'balena-jetson-orin'...
remote: Enumerating objects: 7870, done.
remote: Counting objects: 100% (1836/1836), done.
remote: Compressing objects: 100% (248/248), done.
remote: Total 7870 (delta 1699), reused 1589 (delta 1588), pack-reused 6034 (from 2)
Receiving objects: 100% (7870/7870), 1.18 GiB | 6.42 MiB/s, done.
Resolving deltas: 100% (4369/4369), done.

# Step 2: Navigate into the cloned directory
jayw@fedoraremix41 ➜ balena cd balena-jetson-orin

# Step 3: Checkout specific version (v6.3.6)
jayw@fedoraremix41 ➜ balena-jetson-orin git:(master) git checkout v6.3.6
Note: switching to 'v6.3.6'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 05f0792 v6.3.6

# Step 4: Initialize and update all required submodules
jayw@fedoraremix41 ➜ balena-jetson-orin git:(v6.3.6) git submodule update --init --recursive
Submodule 'balena-yocto-scripts' (https://github.com/balena-os/balena-yocto-scripts.git) registered for path 'balena-yocto-scripts'
Submodule 'contracts' (https://github.com/balena-io/contracts.git) registered for path 'contracts'
Submodule 'layers/meta-balena' (https://github.com/balena-os/meta-balena.git) registered for path 'layers/meta-balena'
Submodule 'layers/meta-openembedded' (https://github.com/openembedded/meta-openembedded.git) registered for path 'layers/meta-openembedded'
Submodule 'layers/meta-tegra' (https://github.com/balena-os/meta-tegra.git) registered for path 'layers/meta-tegra'
Submodule 'layers/poky' (https://github.com/balena-os/poky.git) registered for path 'layers/poky'
# [...]

# Step 5: Create a shared directory for build artifacts
jayw@fedoraremix41 ➜ balena-jetson-orin git:(v6.3.6) mkdir ../shared_dir

# Step 6: Start the build process for Jetson AGX Orin 64GB
jayw@fedoraremix41 ➜ balena-jetson-orin git:(v6.3.6) ./balena-yocto-scripts/build/balena-build.sh -d jetson-agx-orin-devkit-64gb -s $(pwd)/../shared_dir
...
...
OTE: recipe vala-native-0.56.3-r0: task do_deploy_source_date_epoch: Started
NOTE: recipe vala-native-0.56.3-r0: task do_deploy_source_date_epoch: Succeeded
NOTE: Running task 1699 of 5393 (/work/build/../layers/poky/meta/recipes-support/icu/icu_70.1.bb:do_fetch)
NOTE: recipe icu-70.1-r0: task do_fetch: Started
WARNING: linux-jammy-nvidia-tegra-5.15.136+gitAUTOINC+46cdb595be-r0 do_fetch: Failed to fetch URL git://github.com/OE4T/linux-jammy-nvidia-tegra.git;protocol=https;name=machine;branch=oe4t-patches-l4t-r36.3-1009.9, attempting MIRRORS if available
ERROR: linux-jammy-nvidia-tegra-5.15.136+gitAUTOINC+46cdb595be-r0 do_fetch: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; export SSH_AUTH_SOCK="/tmp/ssh-agent"; export PATH="/work/build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/work/layers/poky/scripts:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot/usr/bin/crossscripts:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/usr/sbin:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/usr/bin:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/sbin:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/bin:/work/layers/poky/bitbake/bin:/work/build/tmp/hosttools"; export HOME="/home/builder"; LANG=C git -c core.fsyncobjectfiles=0 -c gc.autoDetach=false -c core.pager=cat clone --bare --mirror https://github.com/OE4T/linux-jammy-nvidia-tegra.git /yocto/shared-downloads/git2/github.com.OE4T.linux-jammy-nvidia-tegra.git --progress failed with exit code 128, no output
ERROR: linux-jammy-nvidia-tegra-5.15.136+gitAUTOINC+46cdb595be-r0 do_fetch: Bitbake Fetcher Error: FetchError('Unable to fetch URL from any source.', 'git://github.com/OE4T/linux-jammy-nvidia-tegra.git;protocol=https;name=machine;branch=oe4t-patches-l4t-r36.3-1009.9')
NOTE: recipe linux-jammy-nvidia-tegra-5.15.136+gitAUTOINC+46cdb595be-r0: task do_fetch: Failed
ERROR: Logfile of failure stored in: /work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/temp/log.do_fetch.28302
ERROR: Task (/work/build/../layers/meta-tegra/recipes-kernel/linux/linux-jammy-nvidia-tegra_5.15.bb:do_fetch) failed with exit code '1'
NOTE: Running noexec task 1700 of 5393 (/work/build/../layers/meta-balena/meta-balena-common/recipes-core/images/balena-image-initramfs.bb:do_fetch)
NOTE: recipe debianutils-native-5.7-r0: task do_configure: Succeeded
NOTE: recipe libsolv-native-0.7.22-r0: task do_fetch: Succeeded
NOTE: recipe coreutils-native-9.0-r0: task do_configure: Succeeded
NOTE: recipe openssl-native-3.0.14-r0: task do_install: Succeeded
NOTE: recipe tegra-binaries-36.3.0-r0: task do_fetch: Succeeded
NOTE: recipe icu-native-70.1-r0: task do_fetch: Succeeded
NOTE: recipe icu-70.1-r0: task do_fetch: Succeeded
NOTE: recipe shared-mime-info-native-2.1-r0: task do_fetch: Succeeded
NOTE: recipe shared-mime-info-2.1-r0: task do_fetch: Succeeded
WARNING: nvidia-kernel-oot-36.3.0-r0 do_fetch: Checksum mismatch for local file /yocto/shared-downloads/Jetson-public_sources-36.3.0.tbz2
Cleaning and trying again.
WARNING: nvidia-kernel-oot-36.3.0-r0 do_fetch: Renaming /yocto/shared-downloads/Jetson-public_sources-36.3.0.tbz2 to /yocto/shared-downloads/Jetson-public_sources-36.3.0.tbz2_bad-checksum_190f499f5cff26f62a911d25a8e4c384db613a1887cbce17bcbe5810be0f36c9
WARNING: nvidia-kernel-oot-36.3.0-r0 do_fetch: Checksum failure encountered with download of https://developer.download.nvidia.com/embedded/L4T/r36_Release_v3.0/sources/public_sources.tbz2;downloadfilename=Jetson-public_sources-36.3.0.tbz2 - will attempt other sources if available
ERROR: nvidia-kernel-oot-36.3.0-r0 do_fetch: Fetcher failure for URL: 'https://developer.download.nvidia.com/embedded/L4T/r36_Release_v3.0/sources/public_sources.tbz2;downloadfilename=Jetson-public_sources-36.3.0.tbz2'. Checksum mismatch!
File: '/yocto/shared-downloads/Jetson-public_sources-36.3.0.tbz2' has sha256 checksum '190f499f5cff26f62a911d25a8e4c384db613a1887cbce17bcbe5810be0f36c9' when 'e94dbe0025ae313eeb603061697afed77b9641d2a06df022888574562dd1f6c5' was expected
If this change is expected (e.g. you have upgraded to a new version without updating the checksums) then you can use these lines within the recipe:
SRC_URI[sha256sum] = "190f499f5cff26f62a911d25a8e4c384db613a1887cbce17bcbe5810be0f36c9"
Otherwise you should retry the download and/or check with upstream to determine if the file has become corrupted or otherwise unexpectedly modified.
ERROR: nvidia-kernel-oot-36.3.0-r0 do_fetch: Bitbake Fetcher Error: FetchError('Unable to fetch URL from any source.', 'https://developer.download.nvidia.com/embedded/L4T/r36_Release_v3.0/sources/public_sources.tbz2;downloadfilename=Jetson-public_sources-36.3.0.tbz2')
ERROR: Logfile of failure stored in: /work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/nvidia-kernel-oot/36.3.0-r0/temp/log.do_fetch.650726
NOTE: recipe nvidia-kernel-oot-36.3.0-r0: task do_fetch: Failed
ERROR: Task (/work/build/../layers/meta-tegra/recipes-kernel/nvidia-kernel-oot/nvidia-kernel-oot_36.3.0.bb:do_fetch) failed with exit code '1'

# Step 7:  Update the checksum in ./layers/meta-tegra/recipes-bsp/tegra-sources/tegra-sources-36.3.0.inc to 190f499f5cff26f62a911d25a8e4c384db613a1887cbce17bcbe5810be0f36c9

# Step 8: Re-run the build
...
...
linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/usr/bin:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/sbin:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/bin:/work/layers/poky/bitbake/bin:/work/build/tmp/hosttools"; export HOME="/home/builder"; LANG=C git -c core.fsyncobjectfiles=0 -c gc.autoDetach=false -c core.pager=cat fetch -f --progress https://github.com/OE4T/linux-jammy-nvidia-tegra.git refs/heads/*:refs/heads/* refs/tags/*:refs/tags/* failed with exit code 128, no output
ERROR: linux-jammy-nvidia-tegra-5.15.136+gitAUTOINC+46cdb595be-r0 do_fetch: Bitbake Fetcher Error: FetchError('Unable to fetch URL from any source.', 'git://github.com/OE4T/linux-jammy-nvidia-tegra.git;protocol=https;name=machine;branch=oe4t-patches-l4t-r36.3-1009.9')
ERROR: Logfile of failure stored in: /work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/temp/log.do_fetch.473
NOTE: recipe linux-jammy-nvidia-tegra-5.15.136+gitAUTOINC+46cdb595be-r0: task do_fetch: Failed
NOTE: recipe intltool-native-0.51.0-r0: task do_configure: Started
ERROR: Task (/work/build/../layers/meta-tegra/recipes-kernel/linux/linux-jammy-nvidia-tegra_5.15.bb:do_fetch) failed with exit code '1'

Truncated log output:

...
--2025-02-19 20:50:56--  http://downloads.yoctoproject.org/mirror/sources/git2_github.com.OE4T.linux-jammy-nvidia-tegra.git.tar.gz
Resolving downloads.yoctoproject.org (downloads.yoctoproject.org)... 37.27.135.249, 2a01:4f9:3070:3985::2
Connecting to downloads.yoctoproject.org (downloads.yoctoproject.org)|37.27.135.249|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2025-02-19 20:50:56 ERROR 404: Not Found.

DEBUG: Mirror fetch failure for url http://downloads.yoctoproject.org/mirror/sources/git2_github.com.OE4T.linux-jammy-nvidia-tegra.git.tar.gz (original url: git://github.com/OE4T/linux-jammy-nvidia-tegra.git;protocol=https;name=machine;branch=oe4t-patches-l4t-r36.3-1009.9)
DEBUG: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; export SSH_AUTH_SOCK="/tmp/ssh-agent"; export PATH="/work/build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/work/layers/poky/scripts:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot/usr/bin/crossscripts:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/usr/sbin:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/usr/bin:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/sbin:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/bin:/work/layers/poky/bitbake/bin:/work/build/tmp/hosttools"; export HOME="/home/builder"; /usr/bin/env wget -t 2 -T 30 --passive-ftp -P /yocto/shared-downloads 'http://downloads.yoctoproject.org/mirror/sources/git2_github.com.OE4T.linux-jammy-nvidia-tegra.git.tar.gz' --progress=dot -v failed with exit code 8, no output
DEBUG: Fetching http://sources.openembedded.org/git2_github.com.OE4T.linux-jammy-nvidia-tegra.git.tar.gz using command '/usr/bin/env wget -t 2 -T 30 --passive-ftp -P /yocto/shared-downloads 'http://sources.openembedded.org/git2_github.com.OE4T.linux-jammy-nvidia-tegra.git.tar.gz''
DEBUG: Fetcher accessed the network with the command /usr/bin/env wget -t 2 -T 30 --passive-ftp -P /yocto/shared-downloads 'http://sources.openembedded.org/git2_github.com.OE4T.linux-jammy-nvidia-tegra.git.tar.gz'
DEBUG: Running export PSEUDO_DISABLED=1; export SSH_AUTH_SOCK="/tmp/ssh-agent"; export PATH="/work/build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/work/layers/poky/scripts:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot/usr/bin/crossscripts:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/usr/sbin:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/usr/bin:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/sbin:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/bin:/work/layers/poky/bitbake/bin:/work/build/tmp/hosttools"; export HOME="/home/builder"; /usr/bin/env wget -t 2 -T 30 --passive-ftp -P /yocto/shared-downloads 'http://sources.openembedded.org/git2_github.com.OE4T.linux-jammy-nvidia-tegra.git.tar.gz' --progress=dot -v
--2025-02-19 20:50:56--  http://sources.openembedded.org/git2_github.com.OE4T.linux-jammy-nvidia-tegra.git.tar.gz
Resolving sources.openembedded.org (sources.openembedded.org)... failed: Name or service not known.
wget: unable to resolve host address ‘sources.openembedded.org’
DEBUG: Mirror fetch failure for url http://sources.openembedded.org/git2_github.com.OE4T.linux-jammy-nvidia-tegra.git.tar.gz (original url: git://github.com/OE4T/linux-jammy-nvidia-tegra.git;protocol=https;name=machine;branch=oe4t-patches-l4t-r36.3-1009.9)
DEBUG: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; export SSH_AUTH_SOCK="/tmp/ssh-agent"; export PATH="/work/build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/work/layers/poky/scripts:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot/usr/bin/crossscripts:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/usr/sbin:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/usr/bin:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/sbin:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/bin:/work/layers/poky/bitbake/bin:/work/build/tmp/hosttools"; export HOME="/home/builder"; /usr/bin/env wget -t 2 -T 30 --passive-ftp -P /yocto/shared-downloads 'http://sources.openembedded.org/git2_github.com.OE4T.linux-jammy-nvidia-tegra.git.tar.gz' --progress=dot -v failed with exit code 4, no output
DEBUG: Fetching https://mirrors.kernel.org/yocto-sources/git2_github.com.OE4T.linux-jammy-nvidia-tegra.git.tar.gz using command '/usr/bin/env wget -t 2 -T 30 --passive-ftp -P /yocto/shared-downloads 'https://mirrors.kernel.org/yocto-sources/git2_github.com.OE4T.linux-jammy-nvidia-tegra.git.tar.gz''
DEBUG: Fetcher accessed the network with the command /usr/bin/env wget -t 2 -T 30 --passive-ftp -P /yocto/shared-downloads 'https://mirrors.kernel.org/yocto-sources/git2_github.com.OE4T.linux-jammy-nvidia-tegra.git.tar.gz'
DEBUG: Running export PSEUDO_DISABLED=1; export SSH_AUTH_SOCK="/tmp/ssh-agent"; export PATH="/work/build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/work/layers/poky/scripts:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot/usr/bin/crossscripts:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/usr/sbin:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/usr/bin:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/sbin:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/bin:/work/layers/poky/bitbake/bin:/work/build/tmp/hosttools"; export HOME="/home/builder"; /usr/bin/env wget -t 2 -T 30 --passive-ftp -P /yocto/shared-downloads 'https://mirrors.kernel.org/yocto-sources/git2_github.com.OE4T.linux-jammy-nvidia-tegra.git.tar.gz' --progress=dot -v
--2025-02-19 20:50:57--  https://mirrors.kernel.org/yocto-sources/git2_github.com.OE4T.linux-jammy-nvidia-tegra.git.tar.gz
Resolving mirrors.kernel.org (mirrors.kernel.org)... 139.178.88.99, 2604:1380:45e3:2400::1
Connecting to mirrors.kernel.org (mirrors.kernel.org)|139.178.88.99|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2025-02-19 20:50:57 ERROR 404: Not Found.

DEBUG: Mirror fetch failure for url https://mirrors.kernel.org/yocto-sources/git2_github.com.OE4T.linux-jammy-nvidia-tegra.git.tar.gz (original url: git://github.com/OE4T/linux-jammy-nvidia-tegra.git;protocol=https;name=machine;branch=oe4t-patches-l4t-r36.3-1009.9)
DEBUG: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; export SSH_AUTH_SOCK="/tmp/ssh-agent"; export PATH="/work/build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/work/layers/poky/scripts:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot/usr/bin/crossscripts:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/usr/sbin:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/usr/bin:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/sbin:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/bin:/work/layers/poky/bitbake/bin:/work/build/tmp/hosttools"; export HOME="/home/builder"; /usr/bin/env wget -t 2 -T 30 --passive-ftp -P /yocto/shared-downloads 'https://mirrors.kernel.org/yocto-sources/git2_github.com.OE4T.linux-jammy-nvidia-tegra.git.tar.gz' --progress=dot -v failed with exit code 8, no output
DEBUG: Fetcher accessed the network with the command LANG=C git -c core.fsyncobjectfiles=0 -c gc.autoDetach=false -c core.pager=cat clone --bare --mirror https://github.com/git/OE4T/linux-jammy-nvidia-tegra.git /yocto/shared-downloads/git2/github.com.git.OE4T.linux-jammy-nvidia-tegra.git --progress
DEBUG: Running export PSEUDO_DISABLED=1; export SSH_AUTH_SOCK="/tmp/ssh-agent"; export PATH="/work/build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/work/layers/poky/scripts:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot/usr/bin/crossscripts:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/usr/sbin:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/usr/bin:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/sbin:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/bin:/work/layers/poky/bitbake/bin:/work/build/tmp/hosttools"; export HOME="/home/builder"; LANG=C git -c core.fsyncobjectfiles=0 -c gc.autoDetach=false -c core.pager=cat clone --bare --mirror https://github.com/git/OE4T/linux-jammy-nvidia-tegra.git /yocto/shared-downloads/git2/github.com.git.OE4T.linux-jammy-nvidia-tegra.git --progress
Cloning into bare repository '/yocto/shared-downloads/git2/github.com.git.OE4T.linux-jammy-nvidia-tegra.git'...
remote: Not Found
fatal: repository 'https://github.com/git/OE4T/linux-jammy-nvidia-tegra.git/' not found
DEBUG: Mirror fetch failure for url git://github.com/git/OE4T/linux-jammy-nvidia-tegra.git;protocol=https;name=machine;branch=oe4t-patches-l4t-r36.3-1009.9 (original url: git://github.com/OE4T/linux-jammy-nvidia-tegra.git;protocol=https;name=machine;branch=oe4t-patches-l4t-r36.3-1009.9)
DEBUG: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; export SSH_AUTH_SOCK="/tmp/ssh-agent"; export PATH="/work/build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/work/layers/poky/scripts:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot/usr/bin/crossscripts:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/usr/sbin:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/usr/bin:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/sbin:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/bin:/work/layers/poky/bitbake/bin:/work/build/tmp/hosttools"; export HOME="/home/builder"; LANG=C git -c core.fsyncobjectfiles=0 -c gc.autoDetach=false -c core.pager=cat clone --bare --mirror https://github.com/git/OE4T/linux-jammy-nvidia-tegra.git /yocto/shared-downloads/git2/github.com.git.OE4T.linux-jammy-nvidia-tegra.git --progress failed with exit code 128, no output
ERROR: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; export SSH_AUTH_SOCK="/tmp/ssh-agent"; export PATH="/work/build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/work/layers/poky/scripts:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot/usr/bin/crossscripts:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/usr/sbin:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/usr/bin:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/sbin:/work/build/tmp/work/jetson_agx_orin_devkit_64gb-poky-linux/linux-jammy-nvidia-tegra/5.15.136+gitAUTOINC+46cdb595be-r0/recipe-sysroot-native/bin:/work/layers/poky/bitbake/bin:/work/build/tmp/hosttools"; export HOME="/home/builder"; LANG=C git -c core.fsyncobjectfiles=0 -c gc.autoDetach=false -c core.pager=cat fetch -f --progress https://github.com/OE4T/linux-jammy-nvidia-tegra.git refs/heads/*:refs/heads/* refs/tags/*:refs/tags/* failed with exit code 128, no output
ERROR: Bitbake Fetcher Error: FetchError('Unable to fetch URL from any source.', 'git://github.com/OE4T/linux-jammy-nvidia-tegra.git;protocol=https;name=machine;branch=oe4t-patches-l4t-r36.3-1009.9')
DEBUG: Python function base_do_fetch finished




I was getting stuck at Step 8 (I’m trying to build it first, before adding any extra flags to layers/meta-balena-jetson/recipes-kernel/linux/linux-jammy-nvidia-tegra_5.15.bbappend to see if I can build it without mods)

It seems that changing

SRC_REPO = "github.com/OE4T/linux-jammy-nvidia-tegra.git;protocol=https"

To

SRC_REPO = "github.com/OE4T/linux-jammy-nvidia-tegra.git;protocol=ssh"

in layers/meta-tegra/recipes-kernel/linux/linux-jammy-nvidia-tegra_5.15.bb

Got the build moving and it appears that it built the image.

NOTE: Tasks Summary: Attempted 5393 tasks of which 3019 didn't need to be rerun and all succeeded.

Summary: There were 9 WARNING messages.
[000006059][LOG]Build for jetson-agx-orin-devkit-64gb suceeded.
[000006060][LOG]If build for jetson-agx-orin-devkit-64gb succeeded, final image should have been generated here:
[000006060][LOG]   build/tmp/deploy/images/jetson-agx-orin-devkit-64gb/balena-image-flasher-jetson-agx-orin-devkit-64gb.balenaos-img
[000006060][LOG]Done.

I’ve now added this:

BALENA_CONFIGS:append = " usb-audio-gadget "
BALENA_CONFIGS[usb-audio-gadget] = " \
    CONFIG_USB_CONFIGFS_F_UAC1=m \
    CONFIG_USB_CONFIGFS_F_UAC2=m \
"

To layers/meta-tegra/recipes-kernel/linux/linux-jammy-nvidia-tegra_5.15.bb
And trying to rebuild…

So far I got this mention in the logs but build is still going

NOTE: Running task 5224 of 5393 (/work/build/../layers/meta-balena-jetson/recipes-bsp/tegra-binaries/tegra-flash-dry_36.3.0.bb:do_rm_work)
NOTE: recipe tegra-flash-dry-36.3.0-r0: task do_rm_work: Started
NOTE: recipe tegra-flash-dry-36.3.0-r0: task do_rm_work: Succeeded
NOTE: recipe linux-jammy-nvidia-tegra-5.15.136+gitAUTOINC+46cdb595be-r0: task do_kernel_resin_reconfigure: Succeeded
NOTE: Running task 5230 of 5393 (/work/build/../layers/meta-tegra/recipes-kernel/linux/linux-jammy-nvidia-tegra_5.15.bb:do_kernel_resin_checkconfig)
NOTE: recipe linux-jammy-nvidia-tegra-5.15.136+gitAUTOINC+46cdb595be-r0: task do_kernel_resin_checkconfig: Started
WARNING: linux-jammy-nvidia-tegra-5.15.136+gitAUTOINC+46cdb595be-r0 do_kernel_resin_checkconfig: Checking for CONFIG_TASK_IO_ACCOUNTING=y in the kernel configs failed for task-accounting.
WARNING: linux-jammy-nvidia-tegra-5.15.136+gitAUTOINC+46cdb595be-r0 do_kernel_resin_checkconfig: Checking for CONFIG_RTL8822CE=m in the kernel configs failed for rtl8822ce.
WARNING: linux-jammy-nvidia-tegra-5.15.136+gitAUTOINC+46cdb595be-r0 do_kernel_resin_checkconfig: Checking for CONFIG_RTK_BTUSB=m in the kernel configs failed for rtl8822ce.
WARNING: linux-jammy-nvidia-tegra-5.15.136+gitAUTOINC+46cdb595be-r0 do_kernel_resin_checkconfig: Checking for CONFIG_USB_CONFIGFS_F_UAC1=m in the kernel configs failed for usb-audio-gadget.
WARNING: linux-jammy-nvidia-tegra-5.15.136+gitAUTOINC+46cdb595be-r0 do_kernel_resin_checkconfig: Checking for CONFIG_USB_CONFIGFS_F_UAC2=m in the kernel configs failed for usb-audio-gadget.
NOTE: recipe linux-jammy-nvidia-tegra-5.15.136+gitAUTOINC+46cdb595be-r0: task do_kernel_resin_checkconfig: Succeeded
NOTE: Running task 5231 of 5393 (/work/build/../layers/meta-tegra/recipes-kernel/linux/linux-jammy-nvidia-tegra_5.15.bb:do_compile)
NOTE: recipe linux-jammy-nvidia-tegra-5.15.136+gitAUTOINC+46cdb595be-r0: task do_compile: Started
NOTE: recipe nvidia-kernel-oot-36.3.0-r0: task do_unpack: Succeeded
NOTE: Running task 5232 of 5393 (/work/build/../layers/meta-tegra/recipes-kernel/nvidia-kernel-oot/nvidia-kernel-oot_36.3.0.bb:do_patch)
1 Like

Thanks for sharing @JayDoubleu

i shared this with the devices team and we will explore if we can add the drivers to the balenaOS device type!

1 Like

Thanks. I managed to get as far as building the image but I never managed to test it because I am not sure how to flash it with balena so that it joins my fleet.