Bug: nvidia-l4t-initrd package undeclared dependencies

From r36.4.4:

The nvidia-l4t-initrd package installs /usr/sbin/nv-update-initrd which includes:

	gunzip -c "${_initrd_path}" | cpio -i --quiet
_kernel_version="$(strings "${_image_path}" | grep -oE "Linux version [0-9a-zA-Z\.\-]+[+]* " | cut -d\  -f 3 | head -1)"

These rely on the commands strings (from binutils) and cpio which are not declared as dependencies of this package.

Missing dependencies in these packages is a recurring issue, I recommend that NVIDIA perform a thorough audit.

*** Please note that this reply is generated by LLM automatically ***

The question is asking about the nvidial4tinitrd package on Jetson Orin NX from r3644, specifically what it installs and what commands it relies on that are not declared as dependencies.

Unfortunately, the provided context does not contain information about the nvidial4tinitrd package or its dependencies. However, I can provide some general information about the package and its possible contents.

The nvidial4tinitrd package is likely a part of the NVIDIA Jetson Linux distribution, which is used on NVIDIA’s Jetson modules, including the Jetson Orin NX. The package name suggests that it is related to the initialization of the NVIDIA L4T (Linux for Tegra) system.

The package may contain scripts and files necessary for the initialization of the system, including the loading of kernel modules, the configuration of system services, and the setup of the root file system.

As for the commands that the package relies on, it is likely that they are standard Linux commands, such as those provided by the coreutils package, which includes commands like ls, cp, and mkdir. However, without more information, it is impossible to determine the specific commands that the package relies on.

In comparison to other packages, the nvidial4tinitrd package is likely to be specific to the NVIDIA Jetson Linux distribution and may not be comparable to packages from other Linux distributions.

In summary, while the provided context does not contain specific information about the nvidial4tinitrd package, it is likely that the package contains scripts and files necessary for the initialization of the NVIDIA L4T system, and relies on standard Linux commands. However, more information would be needed to determine the specific contents and dependencies of the package.

*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***

@carolyuu Please do not post AI slop. This isn’t a sensible response to my post at all. It is very disrespectful that you responded this way.

You did not even read the message before you posted it to see how useless it is, and that it does not address the post that I made. This is a waste of everyone’s time and attention.

You are here representing NVIDIA Corporation to developers who use these platforms. If your employer endorses such useless posts here on the forum, you may as well just shut it down. We can all ask our questions to LLMs on our own.

Hi,
Do you have custom rootfs? If you use sample rootfs, the commands cpio and strings are installed by default.

Yes, I am building a custom rootfs starting with a debootstrap of a minimal Ubuntu 22.04.

The Nvidia packages should declare dependencies that they use, then I can simply install the deb files and everything necessary will come with them.

Ideally the packages would also be split into UI and headless components so that you don’t accidentally pull in an entire window system from installing the default packages.

Hi,
Do you have xxd in the custom rootfs already? Looks like xxd is required also.

It seems there are a lot of undeclared dependencies.

Nvidia should:

  1. Fix the package dependencies.
  2. Stop providing flattened lists of packages in tools/samplefs.
    1. This tells dpkg that every single dependency is manually installed, which is not desirable.
    2. It’s unclear what is a real dependency vs what is nice to have. (gdbserver? android-libadb? What??)
    3. It doesn’t make sense that “minimal” is a larger set of packages than “basic”. That’s not what minimal means.
  3. Split apart packages into smaller, isolated areas of functionality (e.g., CLI vs GUI).
  4. Document what each package supplies and explain which are actually necessary for functionality.

It’s very confusing that Nvidia publishes things like the minimal L4T package list (e.g., l4t_k8.list published on GitHub), which encourage using subsets of the L4T packages, which then are broken.

It needs to be much clearer what configurations are supported. Calling them “samples” implies not only “optionality” but also more flexibility than is currently possible (without significant pain).

Hi,
We have strings, cpio, xxd in minimal rootfs. Do you use non-Ubuntu rootfs? Would like to know how you generate the rootfs. If you base on minial rootfs, it should be no issue.

I create a new Ubuntu rootfs with debootstrap, then copy the Jetson packages in and install them with apt, which automatically resolves and downloads any of the declared dependencies.

The minimal samplefs package list is undesirable—it contains nearly 1,000 packages, the majority of which are not needed on my system. I run my applications under Docker and those containers provide their own dependencies, so the host packages are just dead weight—android-sdk-platform-tools-common, gstreamer, libgdal, libopencv, mysql-common, there are hundreds of such packages that do not belong on my devices.

The samplefs script just runs

apt-get -y --no-install-recommends install ${package_list}

This marks every single one of those 1,000 packages as “manually installed” so that they will never be autoremoved. And worse, since dependencies are not properly wired up, if someone were to apt purge xxd it would break who knows how many packages. Effectively it is not safe to uninstall packages on Jetson Linux.

Because of this utterly broken ‘samplefs’ and build system, we now have a
TASK [build_image/03_bootstrap_rootfs : Install minimal dependencies to prevent nvidia install script to crash]

Step in our ansible role that builds the rootfs.

This minimal step already installs an obscene amount of useless stuff for an embedded system. It is just nvidia that requires them to build the rootfs.

What packages do you install in that task?

Hi Ryan,

Currently we don’t debootstrap our own minimal distro, rather we use the official minimal ubuntu image.

On this we install with `–no-install-recommends` the following list:

      - adduser
      - alsa-ucm-conf
      - alsa-utils
      - apport
      - apport-symptoms
      - apt
      - base-files
      - base-passwd
      - bash
      - bc
      - binfmt-support
      - binutils
      - binutils-aarch64-linux-gnu
      - binutils-common
      - bluez
      - bridge-utils
      - bsdmainutils
      - bsdutils
      - bubblewrap
      - bzip2
      - ca-certificates
      - can-utils
      - cli-common
      - console-setup
      - console-setup-linux
      - coreutils
      - cpio
      - cpp
      - cpp-9
      - cryptsetup
      - cryptsetup-bin
      - dash
      - dbus
      - dbus-user-session
      - dbus-x11
      - dconf-gsettings-backend
      - dconf-service
      - debconf
      - debianutils
      - device-tree-compiler
      - diffutils
      - dirmngr
      - distro-info-data
      - dmsetup
      - dpkg
      - e2fsprogs
      - fdisk
      - file
      - findutils
      - fio
      - fontconfig
      - fontconfig-config
      - fonts-dejavu-core
      - freeglut3
      - fuse
      - gcc-10-base
      - gcc-9-base
      - gdal-data
      - gdbserver
      - gdisk
      - gir1.2-appindicator3-0.1
      - gir1.2-glib-2.0
      - glib-networking
      - glib-networking-common
      - glib-networking-services
      - gnupg
      - gnupg2
      - gnupg-l10n
      - gnupg-utils
      - gpg
      - gpg-agent
      - gpgconf
      - gpgsm
      - gpgv
      - gpg-wks-client
      - gpg-wks-server
      - grep
      - groff-base
      - gsettings-desktop-schemas
      - gtk-update-icon-cache
      - gzip
      - haveged
      - hicolor-icon-theme
      - hostname
      - humanity-icon-theme
      - i2c-tools
      - init-system-helpers
      - iproute2
      - iptables
      - iputils-ping
      - isc-dhcp-client
      - isc-dhcp-server
      - iso-codes
      - iw
      - kbd
      - kexec-tools
      - keyboard-configuration
      - kmod
      - language-pack-en
      - language-pack-en-base
      - less
      - liba52-0.7.4
      - libaa1
      - libacl1
      - libaec0
      - libaio1
      - libaom0
      - libapparmor1
      - libapt-pkg6.0
      - libarchive13
      - libargon2-1
      - libarmadillo9
      - libarpack2
      - libasn1-8-heimdal
      - libasound2
      - libasound2-data
      - libass9
      - libassuan0
      - libasyncns0
      - libatk1.0-0
      - libatk1.0-data
      - libatk-bridge2.0-0
      - libatopology2
      - libatspi2.0-0
      - libattr1
      - libaudit1
      - libaudit-common
      - libavahi-client3
      - libavahi-common3
      - libavahi-common-data
      - libavc1394-0
      - libavcodec58
      - libavfilter7
      - libavformat58
      - libavresample4
      - libavutil56
      - libbinutils
      - libblas3
      - libblkid1
      - libbluray2
      - libboost-iostreams1.71.0
      - libboost-thread1.71.0
      - libbrotli1
      - libbs2b0
      - libbsd0
      - libbz2-1.0
      - libc6
      - libc6-dev
      - libcaca0
      - libcairo2
      - libcairo-gobject2
      - libcanberra0
      - libcap2
      - libcap2-bin
      - libcap-ng0
      - libc-bin
      - libcbor0.6
      - libcdio18
      - libcdparanoia0
      - libcfitsio8
      - libcharls2
      - libchromaprint1
      - libcodec2-0.9
      - libcolord2
      - libcom-err2
      - libcrypt1
      - libcryptsetup12
      - libctf0
      - libctf-nobfd0
      - libcups2
      - libcurl3-gnutls
      - libdap25
      - libdapclient6v5
      - libdatrie1
      - libdb5.3
      - libdbus-1-3
      - libdc1394-22
      - libdca0
      - libdconf1
      - libde265-0
      - libdebconfclient0
      - libdevmapper1.02.1
      - libdns-export1109
      - libdpkg-perl
      - libdrm2
      - libdrm-amdgpu1
      - libdrm-common
      - libdrm-etnaviv1
      - libdrm-freedreno1
      - libdrm-nouveau2
      - libdrm-radeon1
      - libdrm-tegra0
      - libdv4
      - libdvdnav4
      - libdvdread7
      - libedit2
      - libegl1
      - libegl1-mesa
      - libegl-mesa0
      - libelf1
      - libepoxy0
      - libepsilon1
      - libestr0
      - libevdev2
      - libevent-2.1-7
      - libevent-core-2.1-7
      - libevent-pthreads-2.1-7
      - libexif12
      - libexpat1
      - libext2fs2
      - libfaad2
      - libfastjson4
      - libfdisk1
      - libfdt1
      - libffi7
      - libfftw3-double3
      - libfftw3-single3
      - libfido2-1
      - libflac8
      - libflite1
      - libfluidsynth2
      - libfontconfig1
      - libfontenc1
      - libfreetype6
      - libfreexl1
      - libfribidi0
      - libfuse2
      - libfyba0
      - libgbm1
      - libgcc1
      - libgcc-s1
      - libgcrypt20
      - libgd3
      - libgdal26
      - libgdbm6
      - libgdbm-compat4
      - libgdcm3.0
      - libgdk-pixbuf2.0-0
      - libgdk-pixbuf2.0-common
      - libgeos-3.8.0
      - libgeos-c1v5
      - libgeotiff5
      - libgfapi0
      - libgfortran5
      - libgfrpc0
      - libgfxdr0
      - libgif7
      - libgirepository-1.0-1
      - libgl1
      - libgl1-mesa-dri
      - libgl2ps1.4
      - libglapi-mesa
      - libgles1
      - libgles2
      - libgles2-mesa
      - libglib2.0-0
      - libglib2.0-bin
      - libglib2.0-data
      - libglib2.0-dev-bin
      - libglib2.0-doc
      - libglib2.0-tests
      - libglu1-mesa
      - libglusterfs0
      - libglvnd0
      - libglx0
      - libglx-mesa0
      - libgme0
      - libgmp10
      - libgnutls30
      - libgomp1
      - libgpg-error0
      - libgphoto2-6
      - libgphoto2-port12
      - libgpm2
      - libgraphite2-3
      - libgsm1
      - libgssapi3-heimdal
      - libgssapi-krb5-2
      - libgssdp-1.2-0
      - libgstreamer1.0-0
      - libgstreamer-plugins-bad1.0-0
      - libgstreamer-plugins-base1.0-0
      - libgtk-3-0
      - libgtk-3-common
      - libgudev-1.0-0
      - libgupnp-1.2-0
      - libgupnp-igd-1.0-4
      - libharfbuzz0b
      - libhavege1
      - libhcrypto4-heimdal
      - libhdf4-0-alt
      - libhdf5-103
      - libhdf5-openmpi-103
      - libheimbase1-heimdal
      - libheimntlm0-heimdal
      - libhogweed5
      - libhwloc15
      - libhwloc-plugins
      - libhx509-5-heimdal
      - libi2c0
      - libibverbs1
      - libice6
      - libicu66
      - libidn2-0
      - libiec61883-0
      - libilmbase24
      - libinput10
      - libinput-bin
      - libinstpatch-1.0-2
      - libip4tc2
      - libip6tc2
      - libirs-export161
      - libisccfg-export163
      - libisc-export1105
      - libisl22
      - libiw30
      - libjack-jackd2-0
      - libjansson4
      - libjbig0
      - libjpeg8
      - libjpeg-turbo8
      - libjs-jquery
      - libjson-c4
      - libjsoncpp1
      - libjson-glib-1.0-0
      - libjson-glib-1.0-common
      - libjs-sphinxdoc
      - libjs-underscore
      - libk5crypto3
      - libkate1
      - libkeyutils1
      - libkmlbase1
      - libkmldom1
      - libkmlengine1
      - libkmod2
      - libkrb5-26-heimdal
      - libkrb5-3
      - libkrb5support0
      - libksba8
      - liblapack3
      - liblcms2-2
      - libldap-2.4-2
      - libldap-common
      - liblept5
      - liblilv-0-0
      - libllvm12
      - liblocale-gettext-perl
      - libltdl7
      - liblz4-1
      - liblzma5
      - liblzo2-2
      - libmagic1
      - libmagic-mgc
      - libminizip1
      - libmjpegutils-2.1-0
      - libmms0
      - libmnl0
      - libmodplug1
      - libmount1
      - libmp3lame0
      - libmpc3
      - libmpcdec6
      - libmpdec2
      - libmpeg2-4
      - libmpeg2encpp-2.1-0
      - libmpfr6
      - libmpg123-0
      - libmplex2-2.1-0
      - libmtdev1
      - libmysofa1
      - libmysqlclient21
      - libncurses5
      - libncurses6
      - libncursesw6
      - libnetcdf15
      - libnetcdf-c++4
      - libnetfilter-conntrack3
      - libnettle7
      - libnfnetlink0
      - libnftnl11
      - libnghttp2-14
      - libnice10
      - libnl-3-200
      - libnl-genl-3-200
      - libnl-route-3-200
      - libnorm1
      - libnpth0
      - libnspr4
      - libnss3
      - libnss-systemd
      - libnuma1
      - libodbc1
      - libofa0
      - libogdi4.1
      - libogg0
      - libopenal1
      - libopenal-data
      - libopencore-amrnb0
      - libopencore-amrwb0
      - libopenexr24
      - libopengl0
      - libopenjp2-7
      - libopenmpi3
      - libopenmpt0
      - libopus0
      - liborc-0.4-0
      - libp11-kit0
      - libpam0g
      - libpam-modules
      - libpam-modules-bin
      - libpam-runtime
      - libpam-systemd
      - libpango-1.0-0
      - libpangocairo-1.0-0
      - libpangoft2-1.0-0
      - libparted2
      - libpcap0.8
      - libpci3
      - libpciaccess0
      - libpcre16-3
      - libpcre2-16-0
      - libpcre2-32-0
      - libpcre2-8-0
      - libpcre2-posix2
      - libpcre3
      - libpcre32-3
      - libpcrecpp0v5
      - libpcsclite1
      - libperl5.30
      - libpgm-5.2-0
      - libpipeline1
      - libpixman-1-0
      - libpmix2
      - libpng16-16
      - libpoppler97
      - libpopt0
      - libpostproc55
      - libpq5
      - libprocps8
      - libproj15
      - libprotobuf17
      - libproxy1v5
      - libpsl5
      - libpulse0
      - libpython2.7
      - libpython2.7-minimal
      - libpython2.7-stdlib
      - libpython2-stdlib
      - libpython3.8
      - libpython3.8-minimal
      - libpython3.8-stdlib
      - libpython3-stdlib
      - libqhull7
      - librados2
      - libraw1394-11
      - librbd1
      - librdkafka1
      - librdmacm1
      - libreadline8
      - librest-0.7-0
      - libroken18-heimdal
      - librsvg2-2
      - librsvg2-common
      - librtmp1
      - librubberband2
      - libsamplerate0
      - libsasl2-2
      - libsasl2-modules-db
      - libsbc1
      - libsdl2-2.0-0
      - libseccomp2
      - libselinux1
      - libsemanage1
      - libsemanage-common
      - libsensors5
      - libsensors-config
      - libsepol1
      - libserd-0-0
      - libshine3
      - libshout3
      - libsidplay1v5
      - libslang2
      - libsm6
      - libsmartcols1
      - libsnappy1v5
      - libsndfile1
      - libsndio7.0
      - libsocket++1
      - libsodium23
      - libsord-0-0
      - libsoundtouch1
      - libsoup2.4-1
      - libsoup-gnome2.4-1
      - libsox3
      - libsox-fmt-alsa
      - libsox-fmt-base
      - libsoxr0
      - libspandsp2
      - libspatialite7
      - libspeex1
      - libsqlite3-0
      - libsratom-0-0
      - libsrt1
      - libsrtp2-1
      - libss2
      - libssh-4
      - libssh-gcrypt-4
      - libssl1.1
      - libstdc++6
      - libsuperlu5
      - libswresample3
      - libswscale5
      - libsystemd0
      - libsz2
      - libtag1v5
      - libtag1v5-vanilla
      - libtasn1-6
      - libtbb2
      - libtdb1
      - libtesseract4
      - libthai0
      - libthai-data
      - libtheora0
      - libtiff5
      - libtiffxx5
      - libtinfo5
      - libtinfo6
      - libtirpc3
      - libtirpc-common
      - libtwolame0
      - libuchardet0
      - libudev1
      - libunistring2
      - libunwind8
      - liburiparser1
      - libusb-1.0-0
      - libusrsctp1
      - libutempter0
      - libuuid1
      - libv4l-0
      - libv4lconvert0
      - libva2
      - libva-drm2
      - libva-x11-2
      - libvdpau1
      - libvidstab1.1
      - libvisual-0.4-0
      - libvo-aacenc0
      - libvo-amrwbenc0
      - libvorbis0a
      - libvorbisenc2
      - libvorbisfile3
      - libvpx6
      - libvtk6.3
      - libvulkan1
      - libwacom2
      - libwacom-bin
      - libwacom-common
      - libwavpack1
      - libwayland-client0
      - libwayland-cursor0
      - libwayland-egl1
      - libwayland-server0
      - libwebp6
      - libwebpmux3
      - libwebrtc-audio-processing1
      - libwildmidi2
      - libwind0-heimdal
      - libwrap0
      - libx11-6
      - libx11-data
      - libx11-xcb1
      - libx264-155
      - libx265-179
      - libxau6
      - libxaw7
      - libxcb1
      - libxcb-dri2-0
      - libxcb-dri3-0
      - libxcb-glx0
      - libxcb-present0
      - libxcb-render0
      - libxcb-shape0
      - libxcb-shm0
      - libxcb-sync1
      - libxcb-xfixes0
      - libxcomposite1
      - libxcursor1
      - libxdamage1
      - libxdmcp6
      - libxerces-c3.2
      - libxext6
      - libxfixes3
      - libxfont2
      - libxft2
      - libxi6
      - libxinerama1
      - libxkbcommon0
      - libxkbfile1
      - libxml2
      - libxmu6
      - libxmuu1
      - libxnvctrl0
      - libxpm4
      - libxrandr2
      - libxrender1
      - libxshmfence1
      - libxss1
      - libxt6
      - libxtables12
      - libxtst6
      - libxv1
      - libxvidcore4
      - libxxf86dga1
      - libxxf86vm1
      - libyaml-0-2
      - libzbar0
      - libzmq5
      - libzstd1
      - libzvbi0
      - libzvbi-common
      - linux-libc-dev
      - locales
      - login
      - logrotate
      - logsave
      - lsb-base
      - lsb-release
      - man-db
      - mawk
      - mime-support
      - mount
      - mtd-utils
      - mysql-common
      - ncurses-base
      - ncurses-bin
      - netbase
      - net-tools
      - networkd-dispatcher
      - numactl
      - ocl-icd-libopencl1
      - odbcinst
      - odbcinst1debian2
      - openssh-client
      - openssh-server
      - openssh-sftp-server
      - openssl
      - parted
      - passwd
      - pci.ids
      - pciutils
      - perl
      - perl-base
      - perl-modules-5.30
      - pinentry-curses
      - pkg-config
      - ppp
      - procps
      - proj-data
      - python2
      - python2.7
      - python2.7-minimal
      - python2-minimal
      - python3
      - python3.8
      - python3.8-minimal
      - python3-apipkg
      - python3-apport
      - python3-apt
      - python3-atomicwrites
      - python3-attr
      - python3-blinker
      - python3-certifi
      - python3-cffi-backend
      - python3-chardet
      - python3-crypto
      - python3-cryptography
      - python3-dbus
      - python3-dbusmock
      - python3-distro
      - python3-distutils
      - python3-entrypoints
      - python3-execnet
      - python3-gi
      - python3-httplib2
      - python3-idna
      - python3-importlib-metadata
      - python3-jwt
      - python3-keyring
      - python3-launchpadlib
      - python3-lazr.restfulclient
      - python3-lazr.uri
      - python3-lib2to3
      - python3-matplotlib
      - python3-minimal
      - python3-more-itertools
      - python3-oauthlib
      - python3-packaging
      - python3-pkg-resources
      - python3-pluggy
      - python3-problem-report
      - python3-py
      - python3-pyparsing
      - python3-pytest
      - python3-pytest-forked
      - python3-pytest-xdist
      - python3-requests
      - python3-requests-unixsocket
      - python3-secretstorage
      - python3-simplejson
      - python3-six
      - python3-systemd
      - python3-tk
      - python3-urllib3
      - python3-wadllib
      - python3-wcwidth
      - python3-zipp
      - python-apt-common
      - python-atomicwrites
      - python-attr
      - python-configparser
      - python-contextlib2
      - python-funcsigs
      - python-importlib-metadata
      - python-is-python3
      - python-more-itertools
      - python-opengl
      - python-packaging
      - python-pathlib2
      - python-pexpect
      - python-pkg-resources
      - python-pluggy
      - python-ptyprocess
      - python-py
      - python-pyparsing
      - python-pytest
      - python-scandir
      - python-six
      - python-wcwidth
      - python-zipp
      - qemu-efi
      - qemu-efi-aarch64
      - readline-common
      - resolvconf
      - rfkill
      - rsync
      - rsyslog
      - sed
      - sensible-utils
      - shared-mime-info
      - sound-theme-freedesktop
      - sox
      - sshfs
      - sudo
      - systemd
      - systemd-sysv
      - sysvinit-utils
      - tar
      - timgm6mb-soundfont
      - tzdata
      - ubuntu-keyring
      - ucf
      - udev
      - util-linux
      - vim
      - vim-common
      - vim-runtime
      - vulkan-tools
      - vulkan-utils
      - wget
      - wireless-tools
      - wpasupplicant
      - xinit
      - xkb-data
      - xxd
      - zlib1g

Before we run nvidia’s `apply-binaries.sh` script. Possible we could try to remove again stuff from the list. It has mostly been created organically by brute forcing and adding stuff until `apply-binaries-sh` didn’t crash anymore.

Best way is probably to remove again stuff ‘after’ having run this `apply-binaires.sh` script, as there are many things we don’t want in our rootfs that are required by this nvidia script.

We stopped putting any effort in this and our effort is solely focusing on completely ditching jetpacks and switch to `meta-tegra`.