Hi, following the guide to setup and flash a basic rootfs for an Orin NX 16GB reComputer J4012 I find that I have to add multiple packages to the binary list to get the scripts to even work. Here’s the steps I’ve used:
$ wget https://developer.nvidia.com/downloads/embedded/l4t/r36_release_v2.0/release/jetson_linux_r36.2.0_aarch64.tbz2
$ tar xf jetson_linux_r36.2.0_aarch64.tbz2
$ cd Linux_for_Tegra
$ sudo ./tools/samplefs/nv_build_samplefs.sh --abi aarch64 --distro ubuntu --flavor basic --version jammy
$ sudo tar xpf ./tools/samplefs/sample_fs.tbz2 -C ./rootfs/
$ sudo ./apply_binaries.sh --factory
It fails at the apply_binaries.sh script unless I add the patch described below.
I have also tried without --factory, though that fails on even more packages (mostly GUI packages that I obviously don’t want for a basic rootfs).
Here are some of the errors I’m getting:
...
Unpacking nvidia-l4t-bootloader (36.2.0-20231130105725) ...
Setting up jetson-gpio-common (2.1.3ubuntu1) ...
Setting up python3-jetson-gpio (2.1.3ubuntu1) ...
dpkg: dependency problems prevent configuration of python-jetson-gpio:
python-jetson-gpio depends on python2:any (<< 2.8).
python-jetson-gpio depends on python2:any (>= 2.7~).
dpkg: error processing package python-jetson-gpio (--install):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of nvidia-l4t-3d-core:
nvidia-l4t-3d-core depends on nvidia-l4t-wayland (= 36.2.0-20231130105725); however:
Package nvidia-l4t-wayland is not installed.
nvidia-l4t-3d-core depends on nvidia-l4t-x11 (= 36.2.0-20231130105725); however:
Package nvidia-l4t-x11 is not installed.
dpkg: error processing package nvidia-l4t-3d-core (--install):
dependency problems - leaving unconfigured
...
/usr/sbin/nv-update-initrd: line 106: strings: command not found
Error: is empty
dpkg: error processing package nvidia-l4t-initrd (--install):
installed nvidia-l4t-initrd package post-installation script subprocess returned error exit status 1
I get it to work by applying the patches below, although I would prefer if I didn’t have to. Specially python2 now that we’re finally on Jammy, and nvidia-l4t-wayland, nvidia-l4t-x11 etc… are not needed for our basic rootfs.
Patch for apply_binaries.sh to run with --factory, but keep some necessary packages (i.e. keep the ones removed from “skiplist”, e.g. keep nvidia-l4t-3d-core, nvidia-l4t-apt-source, etc…):
diff --git a/nv_tegra/nv-apply-debs.sh b/nv_tegra/nv-apply-debs.sh
index 809b06f..a2cf189 100755
--- a/nv_tegra/nv-apply-debs.sh
+++ b/nv_tegra/nv-apply-debs.sh
@@ -172,18 +172,12 @@ deb_list_force_install=()
force_install_deb_list=()
# List of packages to skip for dgpu
-dgpu_skiplist=("nvidia-l4t-3d-core")
-dgpu_skiplist+=("nvidia-l4t-apt-source")
-dgpu_skiplist+=("nvidia-l4t-cuda")
-dgpu_skiplist+=("nvidia-l4t-gbm")
+dgpu_skiplist=("nvidia-l4t-gbm")
dgpu_skiplist+=("nvidia-l4t-graphics-demos")
dgpu_skiplist+=("nvidia-l4t-jetsonpower-gui-tools")
dgpu_skiplist+=("nvidia-l4t-nvml")
-dgpu_skiplist+=("nvidia-l4t-nvpmodel")
dgpu_skiplist+=("nvidia-l4t-nvpmodel-gui-tools")
-dgpu_skiplist+=("nvidia-l4t-wayland")
dgpu_skiplist+=("nvidia-l4t-weston")
-dgpu_skiplist+=("nvidia-l4t-x11")
Patch for nvubuntu-jammy-basic-aarch64-packages. Some packages are removed because they are not necessary in a basic rootfs, though packages like python2, binutils, cpio, libvulkan1 etc… were required for the flashing scripts to even run.
diff --git a/tools/samplefs/nvubuntu-jammy-basic-aarch64-packages b/tools/samplefs/nvubuntu-jammy-basic-aarch64-packages
index 0b2619e..d54bb4d 100644
--- a/tools/samplefs/nvubuntu-jammy-basic-aarch64-packages
+++ b/tools/samplefs/nvubuntu-jammy-basic-aarch64-packages
@@ -5,12 +5,15 @@ apt
base-files
base-passwd
bash
+bash-completion
+bc
+binutils
bridge-utils
bsdutils
bzip2
ca-certificates
-containerd
coreutils
+cpio
cpp
cpp-11
dash
@@ -20,7 +23,6 @@ debianutils
device-tree-compiler
diffutils
distro-info-data
-docker.io
dpkg
e2fsprogs
file
@@ -35,6 +37,7 @@ gpgv
grep
gzip
hostname
+ifupdown
init-system-helpers
iproute2
iputils-ping
@@ -84,6 +87,7 @@ libevdev2
libexpat1
libext2fs2
libfdisk1
+libffi7
libffi8
libfido2-1
libfontconfig1
@@ -197,16 +201,11 @@ libunistring2
libunwind8
libutempter0
libuuid1
+libvulkan1
libwacom-bin
libwacom-common
libwacom9
-libwayland-client0
-libwayland-server0
libwrap0
-libx11-6
-libx11-data
-libx11-dev
-libx11-xcb1
libxau-dev
libxau6
libxaw7
@@ -265,6 +264,7 @@ passwd
perl-base
procps
python-apt-common
+python2
python3
python3-apport
python3-apt
@@ -308,17 +308,15 @@ systemd-sysv
systemd-timesyncd
sysvinit-utils
tar
+tmux
tzdata
ubuntu-keyring
ucf
udev
usrmerge
util-linux
+vim
wpasupplicant
-x11-common
-x11-xkb-utils
-x11-xserver-utils
-x11proto-dev
xauth
xbitmaps
xcvt
@@ -329,20 +327,6 @@ xfonts-utils
xinit
xkb-data
xorg-sgml-doctools
-xserver-common
-xserver-xorg
-xserver-xorg-core
-xserver-xorg-input-all
-xserver-xorg-input-libinput
-xserver-xorg-input-wacom
-xserver-xorg-legacy
-xserver-xorg-video-all
-xserver-xorg-video-amdgpu
-xserver-xorg-video-ati
-xserver-xorg-video-fbdev
-xserver-xorg-video-nouveau
-xserver-xorg-video-radeon
-xserver-xorg-video-vesa
xterm
xtrans-dev
xxd
Is there anything I am missing, as I would prefer things to work without any changes? This was also a problem for the previous Jetson Linux version 35.4.1, though with a different set of missing packages - And I hoped it would be fixed for 36.2. I haven’t tried the Desktop rootfs or the Sample rootfs, though these worked fine on 35.4.1 without any changes.