DriveWorks SDK Reference
5.10.90 Release
For Test and Development only

Getting Started Using the NVIDIA DRIVE OS Debian Package Repository

Please see the "NVIDIA DRIVE OS Debian Package Installation Guide" for complete host system requirements, to install the NVIDIA® DRIVE® OS Debian package repository and DRIVE OS Debian package, flash the NVIDIA DRIVE Orin™ system, setup minicom and networking for secure shell (SSH) and network file system (NFS), and for other important installation information.

Host System x86

Core Binaries Installation

We assume that you have installed the appropriate NVIDIA DRIVE OS Debian package from the localrepo folder of the NVIDIA DRIVE OS Debian package repository following the procedures in the "NVIDIA DRIVE OS Debian Package Installation Guide." In that guide you are asked to set an environment variable named $NV_WORKSPACE and that should remain set while following these instructions. We recommend setting $NV_WORKSPACE to /drive.

To install the NVIDIA DriveWorks SDK precompiled for the Linux x86 architecture onto the host system, use apt-get and dpkg to install the following Debian packages in order using the following commands on the host system.

Synchronize the APT package index:

% sudo apt-get update

Console output:

Get:1 http://archive.ubuntu.com/ubuntu focal InRelease
Get:2 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
Get:3 http://security.ubuntu.com/ubuntu focal-security InRelease
Get:4 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
Get:5 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Get:6 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
Get:7 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Get:8 http://archive.ubuntu.com/ubuntu focal-backports/main amd64 Packages
Reading package lists... Done

Install the following packages from the Ubuntu APT package repository:

% sudo apt-get -y --no-install-recommends install \
cmake g++ g++-aarch64-linux-gnu gcc gcc-aarch64-linux-gnu gnupg \
libdrm-dev libegl-dev libgl-dev libgles-dev libglu1-mesa-dev libglx-dev \
libqt5core5a libqt5gui5 libqt5qml5 libqt5quick5 libusb-1.0-0 libx11-dev \
libxcursor-dev libxinerama-dev libxrandr-dev libxxf86vm-dev make minicom \
nfs-kernel-server openssh-client pkg-config python3 python3-crypto \
python3-jinja2 python3-jsonschema python3-matplotlib python3-numpy \
python3-pil python3-prompt-toolkit python3-pycryptodome python3-pygments \
python3-regex python3-tabulate python3-tk python3-yaml zlib1g-dev

Partial console output:

The following additional packages will be installed:
binutils binutils-aarch64-linux-gnu binutils-common binutils-x86-64-linux-gnu
blt cmake-data cpp cpp-9 cpp-9-aarch64-linux-gnu cpp-aarch64-linux-gnu
dirmngr fontconfig fontconfig-config fonts-dejavu-core fonts-lyx g++-9
g++-9-aarch64-linux-gnu gcc-10-cross-base gcc-9 gcc-9-aarch64-linux-gnu
gcc-9-aarch64-linux-gnu-base gcc-9-base gcc-9-cross-base gnupg-l10n
gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm
keyutils libarchive13 libasan5 libasan5-arm64-cross libasn1-8-heimdal
libassuan0 libatomic1 libatomic1-arm64-cross libbinutils libblas3 libbrotli1
libbsd0 libc-dev-bin libc6-arm64-cross libc6-dev libc6-dev-arm64-cross
libcap2 libcbor0.6 libcc1-0 libcrypt-dev libctf-nobfd0 libctf0 libcurl4
libdbus-1-3 libdevmapper1.02.1 libdouble-conversion3 libdpkg-perl
libdrm-amdgpu1 libdrm-common libdrm-intel1 libdrm-nouveau2 libdrm-radeon1
libdrm2 libedit2 libegl-mesa0 libegl1 libelf1 libevdev2 libevent-2.1-7
libexpat1 libfido2-1 libfontconfig1 libfreetype6 libgbm1 libgcc-9-dev
libgcc-9-dev-arm64-cross libgcc-s1-arm64-cross libgdbm-compat4 libgdbm6
libgfortran5 libgl1 libgl1-mesa-dri libglapi-mesa libgles1 libgles2
libglib2.0-0 libglu1-mesa libglvnd0 libglx-mesa0 libglx0 libgomp1
libgomp1-arm64-cross libgraphite2-3 libgssapi-krb5-2 libgssapi3-heimdal
libgudev-1.0-0 libharfbuzz0b libhcrypto4-heimdal libheimbase1-heimdal
libheimntlm0-heimdal libhx509-5-heimdal libice6 libicu66 libimagequant0
libinput-bin libinput10 libisl22 libitm1 libitm1-arm64-cross libjbig0
libjpeg-turbo8 libjpeg8 libjs-jquery libjs-jquery-ui libjsoncpp1 libk5crypto3
libkeyutils1 libkrb5-26-heimdal libkrb5-3 libkrb5support0 libksba8 liblapack3
liblcms2-2 libldap-2.4-2 libldap-common libllvm12 liblsan0
liblsan0-arm64-cross libmpc3 libmpdec2 libmpfr6 libmtdev1 libnfsidmap2
libnghttp2-14 libnpth0 libpciaccess-dev libpciaccess0 libpcre2-16-0
libperl5.30 libpng16-16 libpsl5 libpthread-stubs0-dev libpython3-stdlib
libpython3.8-minimal libpython3.8-stdlib libqt5dbus5 libqt5network5
libquadmath0 libreadline8 librhash0 libroken18-heimdal librtmp1 libsasl2-2
libsasl2-modules-db libsensors-config libsensors5 libsm6 libsqlite3-0
libssh-4 libssl1.1 libstdc++-9-dev libstdc++-9-dev-arm64-cross
libstdc++6-arm64-cross libtcl8.6 libtiff5 libtirpc-common libtirpc3 libtk8.6
libtsan0 libtsan0-arm64-cross libubsan1 libubsan1-arm64-cross libuv1
libvulkan1 libwacom-common libwacom2 libwayland-client0 libwayland-server0
libwebp6 libwebpdemux2 libwebpmux3 libwind0-heimdal libwrap0 libx11-6
libx11-data libx11-xcb1 libxau-dev libxau6 libxcb-dri2-0 libxcb-dri3-0
libxcb-glx0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-present0
libxcb-randr0 libxcb-render-util0 libxcb-render0 libxcb-shape0 libxcb-shm0
libxcb-sync1 libxcb-util1 libxcb-xfixes0 libxcb-xinerama0 libxcb-xinput0
libxcb-xkb1 libxcb1 libxcb1-dev libxcursor1 libxdmcp-dev libxdmcp6
libxext-dev libxext6 libxfixes-dev libxfixes3 libxft2 libxinerama1
libxkbcommon-x11-0 libxkbcommon0 libxml2 libxrandr2 libxrender-dev
libxrender1 libxshmfence1 libxss1 libxxf86vm1 libyaml-0-2 linux-libc-dev
linux-libc-dev-arm64-cross mime-support netbase nfs-common perl
perl-modules-5.30 pinentry-curses python-matplotlib-data python3-attr
python3-cycler python3-dateutil python3-distutils python3-importlib-metadata
python3-kiwisolver python3-lib2to3 python3-markupsafe python3-minimal
python3-more-itertools python3-pkg-resources python3-pyparsing
python3-pyrsistent python3-setuptools python3-six python3-wcwidth
python3-zipp python3.8 python3.8-minimal readline-common rpcbind tk8.6-blt2.5
ttf-bitstream-vera tzdata ucf x11-common x11proto-core-dev x11proto-dev
x11proto-randr-dev x11proto-xext-dev x11proto-xf86vidmode-dev
x11proto-xinerama-dev xkb-data xorg-sgml-doctools xtrans-dev
....
Selecting previously unselected package nfs-kernel-server.
Preparing to unpack .../nfs-kernel-server_*_amd64.deb ...
Unpacking nfs-kernel-server ...
Setting up nfs-kernel-server ...
Creating config file /etc/exports with new version
Creating config file /etc/default/nfs-kernel-server with new version
Processing triggers for libc-bin ...

Install the cuda-repo-ubuntu2004-*-local repository package:

% sudo dpkg -i cuda-repo-ubuntu2004-*-local_*_amd64.deb

Console output:

Selecting previously unselected package cuda-repo-ubuntu2004-*-local.
Preparing to unpack .../cuda-repo-ubuntu2004-*-local_*_amd64.deb ...
Unpacking cuda-repo-ubuntu2004-*-local ...
Setting up cuda-repo-ubuntu2004-*-local ...
The public CUDA GPG key does not appear to be installed.
To install the key, run this command:
sudo apt-key add /var/cuda-repo-ubuntu2004-*-local/7fa2af80.pub

Install the cuda-repo-ubuntu2004-*-local repository GPG key:

% sudo apt-key add /var/cuda-repo-ubuntu2004-*-local/7fa2af80.pub

Console output:

OK

Synchronize the APT package index:

% sudo apt-get update

Console output:

Get:1 file:/var/cuda-repo-ubuntu2004-*-local InRelease
Ign:1 file:/var/cuda-repo-ubuntu2004-*-local InRelease
Get:2 file:/var/cuda-repo-ubuntu2004-*-local Release
Get:3 file:/var/cuda-repo-ubuntu2004-*-local Release.gpg
Get:4 file:/var/cuda-repo-ubuntu2004-*-local Packages
Hit:5 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:6 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:7 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:8 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Reading package lists... Done

Install the cuda-runtime-11-4 and cuda-toolkit-11-4 packages:

% sudo apt-get -y --no-install-recommends install cuda-runtime-11-4 \
cuda-toolkit-11-4

Partial console output:

The following additional packages will be installed:
adwaita-icon-theme bubblewrap ca-certificates-java cuda-cccl-11-4
cuda-command-line-tools-11-4 cuda-compiler-11-4 cuda-cudart-11-4
cuda-cudart-dev-11-4 cuda-cuobjdump-11-4 cuda-cupti-11-4 cuda-cupti-dev-11-4
cuda-cuxxfilt-11-4 cuda-documentation-11-4 cuda-driver-dev-11-4 cuda-drivers
cuda-drivers-470 cuda-gdb-11-4 cuda-libraries-11-4 cuda-libraries-dev-11-4
cuda-memcheck-11-4 cuda-nsight-11-4 cuda-nsight-compute-11-4
cuda-nsight-systems-11-4 cuda-nvcc-11-4 cuda-nvdisasm-11-4 cuda-nvml-dev-11-4
cuda-nvprof-11-4 cuda-nvprune-11-4 cuda-nvrtc-11-4 cuda-nvrtc-dev-11-4
cuda-nvtx-11-4 cuda-nvvp-11-4 cuda-samples-11-4 cuda-sanitizer-11-4
cuda-toolkit-11-4-config-common cuda-toolkit-11-config-common
cuda-toolkit-config-common cuda-tools-11-4 cuda-visual-tools-11-4 dbus
dbus-user-session dconf-gsettings-backend dconf-service dctrl-tools
default-jre default-jre-headless dictionaries-common distro-info-data dkms
emacsen-common evolution-data-server evolution-data-server-common gcr
geoclue-2.0 gir1.2-accountsservice-1.0 gir1.2-atk-1.0 gir1.2-atspi-2.0
gir1.2-freedesktop gir1.2-gck-1 gir1.2-gcr-3 gir1.2-gdesktopenums-3.0
gir1.2-gdkpixbuf-2.0 gir1.2-gdm-1.0 gir1.2-geoclue-2.0 gir1.2-glib-2.0
gir1.2-gnomebluetooth-1.0 gir1.2-gnomedesktop-3.0 gir1.2-graphene-1.0
gir1.2-gtk-3.0 gir1.2-gweather-3.0 gir1.2-ibus-1.0 gir1.2-json-1.0
gir1.2-mutter-6 gir1.2-nm-1.0 gir1.2-nma-1.0 gir1.2-pango-1.0
gir1.2-polkit-1.0 gir1.2-rsvg-2.0 gir1.2-soup-2.4 gir1.2-upowerglib-1.0 gjs
glib-networking glib-networking-common glib-networking-services
gnome-desktop3-data gnome-keyring gnome-settings-daemon
gnome-settings-daemon-common gnome-shell gnome-shell-common
gsettings-desktop-schemas gtk-update-icon-cache hicolor-icon-theme
humanity-icon-theme hunspell-en-us iso-codes java-common
keyboard-configuration kmod libaccountsservice0 libapparmor1 libargon2-1
libasound2 libasound2-data libaspell15 libasyncns0 libatk-bridge2.0-0
libatk1.0-0 libatk1.0-data libatspi2.0-0 libavahi-client3
libavahi-common-data libavahi-common3 libavahi-glib1 libboost-thread1.71.0
libcairo-gobject2 libcairo2 libcamel-1.2-62 libcanberra-gtk3-0 libcanberra0
libcap2 libcap2-bin libcolord2 libcryptsetup12 libcublas-11-4
libcublas-dev-11-4 libcufft-11-4 libcufft-dev-11-4 libcups2 libcurand-11-4
libcurand-dev-11-4 libcusolver-11-4 libcusolver-dev-11-4 libcusparse-11-4
libcusparse-dev-11-4 libdatrie1 libdconf1 libdevmapper1.02.1
libebackend-1.2-10 libebook-1.2-20 libebook-contacts-1.2-3 libecal-2.0-1
libedata-book-1.2-26 libedata-cal-2.0-1 libedataserver-1.2-24
libedataserverui-1.2-2 libenchant-2-2 libepoxy0 libflac8 libfontenc1
libfribidi0 libgck-1-0 libgcr-base-3-1 libgcr-ui-3-1 libgdata-common
libgdata22 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common libgdm1 libgeoclue-2-0
libgeocode-glib0 libgif7 libgirepository-1.0-1 libgjs0g libglib2.0-bin
libglib2.0-data libgnome-autoar-0-0 libgnome-bluetooth13
libgnome-desktop-3-19 libgoa-1.0-0b libgoa-1.0-common libgraphene-1.0-0
libgstreamer-gl1.0-0 libgstreamer-plugins-base1.0-0 libgstreamer1.0-0
libgtk-3-0 libgtk-3-common libgweather-3-16 libgweather-common
libharfbuzz-icu0 libhunspell-1.7-0 libhyphen0 libibus-1.0-5 libical3
libip4tc2 libjansson4 libjavascriptcoregtk-4.0-18 libjbig0 libjson-c4
libjson-glib-1.0-0 libjson-glib-1.0-common libkmod2 liblcms2-2 libltdl7
libmm-glib0 libmozjs-68-0 libmutter-6-0 libnm0 libnma0 libnotify4 libnpp-11-4
libnpp-dev-11-4 libnspr4 libnss3 libnvidia-cfg1-470 libnvidia-common-470
libnvidia-compute-470 libnvidia-decode-470 libnvidia-encode-470
libnvidia-extra-470 libnvidia-fbc1-470 libnvidia-gl-470 libnvidia-ifr1-470
libnvjpeg-11-4 libnvjpeg-dev-11-4 libogg0 libopenjp2-7 liborc-0.4-0
libpam-systemd libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0
libpangoxft-1.0-0 libpcsclite1 libphonenumber7 libpixman-1-0
libpolkit-agent-1-0 libpolkit-gobject-1-0 libprotobuf17 libproxy1v5
libpulse-mainloop-glib0 libpulse0 librest-0.7-0 librsvg2-2 librsvg2-common
libsecret-1-0 libsecret-common libsndfile1 libsoup-gnome2.4-1 libsoup2.4-1
libstartup-notification0 libtdb1 libtext-iconv-perl libthai-data libthai0
libtiff5 libunwind8 libupower-glib3 libvdpau1 libvorbis0a libvorbisenc2
libvorbisfile3 libwayland-cursor0 libwayland-egl1 libwebkit2gtk-4.0-37
libwebp6 libwebpdemux2 libwoff1 libwrap0 libxaw7 libxcb-res0 libxcomposite1
libxdamage1 libxfont2 libxft2 libxi6 libxkbfile1 libxmu6 libxmuu1 libxnvctrl0
libxpm4 libxslt1.1 libxt6 libxtst6 lsb-release mutter mutter-common
nsight-compute-2021.2.2 nsight-systems-2021.3.2 nvidia-compute-utils-470
nvidia-dkms-470 nvidia-driver-470 nvidia-kernel-common-470
nvidia-kernel-source-470 nvidia-modprobe nvidia-settings nvidia-utils-470
openjdk-11-jre openjdk-11-jre-headless p11-kit p11-kit-modules
pinentry-gnome3 pkg-config python3-gi python3-xkit screen-resolution-extra
shared-mime-info sound-theme-freedesktop systemd systemd-sysv
systemd-timesyncd ubuntu-mono ubuntu-wallpapers ubuntu-wallpapers-focal udev
x11-xkb-utils x11-xserver-utils xdg-dbus-proxy xserver-common
xserver-xorg-core xserver-xorg-video-nvidia-470 zenity zenity-common
....
Selecting previously unselected package cuda-runtime-11-4.
Preparing to unpack .../*-cuda-runtime-*_amd64.deb ...
Unpacking cuda-runtime-11-4 ...
....
Selecting previously unselected package cuda-toolkit-11-4.
Preparing to unpack .../*-cuda-toolkit-*_amd64.deb ...
Unpacking cuda-toolkit-11-4 ...
....
Setting up cuda-toolkit-11-4 ...
....
Setting up cuda-runtime-11-4 ...
Processing triggers for libc-bin ...

Install the cudnn-local-repo-ubuntu2004-* repository package:

% sudo dpkg -i cudnn-local-repo-ubuntu2004-*_amd64.deb

Console output:

Selecting previously unselected package cudnn-local-repo-ubuntu2004-*.
Preparing to unpack .../cudnn-local-repo-ubuntu2004-*_amd64.deb ...
Unpacking cudnn-local-repo-ubuntu2004-* ...
Setting up cudnn-local-repo-ubuntu2004-* ...

Install the cudnn-local-repo-ubuntu2004-* repository GPG key:

% sudo apt-key add /var/cudnn-local-repo-ubuntu2004-*/7fa2af80.pub

Console output:

OK

Synchronize the APT package index:

% sudo apt-get update

Console output:

Get:1 file:/var/cuda-repo-ubuntu2004-*-local InRelease
Ign:1 file:/var/cuda-repo-ubuntu2004-*-local InRelease
Get:2 file:/var/cuda-repo-ubuntu2004-*-local Release
Get:3 file:/var/cudnn-local-repo-ubuntu2004-* InRelease
Ign:3 file:/var/cudnn-local-repo-ubuntu2004-* InRelease
Get:4 file:/var/cudnn-local-repo-ubuntu2004-* Release
Get:5 file:/var/cudnn-local-repo-ubuntu2004-* Release.gpg
Get:6 file:/var/cudnn-local-repo-ubuntu2004-* Packages
Hit:7 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:8 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:9 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:10 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Reading package lists... Done

Install the libcudnn8-dev package:

% sudo apt-get -y --no-install-recommends install libcudnn8-dev

Partial console output:

The following additional packages will be installed:
libcudnn8
....
Selecting previously unselected package libcudnn8.
Preparing to unpack .../libcudnn8_*_amd64.deb ...
Unpacking libcudnn8 ...
Selecting previously unselected package libcudnn8-dev.
Preparing to unpack .../libcudnn8-dev_*_amd64.deb ...
Unpacking libcudnn8-dev ...
Setting up libcudnn8 ...
Setting up libcudnn8-dev ...
update-alternatives: using /usr/include/x86_64-linux-gnu/cudnn_v8.h to provide /usr/include/cudnn.h (libcudnn) in auto mode

Install the nv-tensorrt-repo-ubuntu2004-*-x86-host-* repository package:

% sudo dpkg -i nv-tensorrt-repo-ubuntu2004-*-x86-host-*_amd64.deb

Console output:

Selecting previously unselected package nv-tensorrt-repo-ubuntu2004-*-x86-host-ea-*.
Preparing to unpack .../nv-tensorrt-repo-ubuntu2004-*-x86-host-*_amd64.deb ...
Unpacking nv-tensorrt-repo-ubuntu2004-*-x86-host-* ...
Setting up nv-tensorrt-repo-ubuntu2004-*-x86-host-* ...

Install the nv-tensorrt-repo-ubuntu2004-*-x86-host-* repository GPG key:

% sudo apt-key add /var/nv-tensorrt-repo-ubuntu2004-*-x86-host-*/7fa2af80.pub

Console output:

OK

Synchronize the APT package index:

% sudo apt-get update

Console output:

Get:1 file:/var/cuda-repo-ubuntu2004-*-local InRelease
Ign:1 file:/var/cuda-repo-ubuntu2004-*-local InRelease
Get:2 file:/var/cuda-repo-ubuntu2004-*-local Release
Get:3 file:/var/cudnn-local-repo-ubuntu2004-* InRelease
Ign:3 file:/var/cudnn-local-repo-ubuntu2004-* InRelease
Get:4 file:/var/cudnn-local-repo-ubuntu2004-* Release
Get:5 file:/var/nv-tensorrt-repo-ubuntu2004-*-x86-host-* InRelease
Ign:5 file:/var/nv-tensorrt-repo-ubuntu2004-*-x86-host-* InRelease
Get:6 file:/var/nv-tensorrt-repo-ubuntu2004-*-x86-host-* Release
Get:7 file:/var/nv-tensorrt-repo-ubuntu2004-*-x86-host-* Release
Get:8 file:/var/nv-tensorrt-repo-ubuntu2004-*-x86-host-* Release.gpg
Get:9 file:/var/nv-tensorrt-repo-ubuntu2004-*-x86-host-* Release.gpg
Get:10 file:/var/nv-tensorrt-repo-ubuntu2004-*-x86-host-* Packages
Hit:11 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:12 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:13 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:14 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Reading package lists... Done

Install the tensorrt package:

% sudo apt-get -y --no-install-recommends install tensorrt

Partial console output:

The following additional packages will be installed:
libnvinfer-bin libnvinfer-dev libnvinfer-doc libnvinfer-plugin-dev
libnvinfer-plugin8 libnvinfer-samples libnvinfer8 libnvonnxparsers-dev
libnvonnxparsers8 libnvparsers-dev libnvparsers8
....
Selecting previously unselected package tensorrt.
Preparing to unpack .../tensorrt_*_amd64.deb ...
Unpacking tensorrt ...
....
Setting up tensorrt ...
Processing triggers for libc-bin ...

Install the nvsci, driveworks, driveworks-stm, and driveworks-cgf packages:

% sudo apt-get install -y --no-install-recommends \
./nvsci_*.deb ./driveworks_*_amd64.deb \
./driveworks-stm_*_amd64.deb ./driveworks-cgf_*_amd64.deb

Console output:

Suggested Packages:
driveworks-doc driveworks-samples driveworks-cgf-doc driveworks-cgf-samples
driveworks-cgf-ui driveworks-stm-doc driveworks-stm-samples
The following NEW packages will be installed:
driveworks driveworks-cgf driveworks-stm nvsci
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Selecting previously unselected package nvsci.
Preparing to unpack .../nvsci_*.deb ...
Unpacking nvsci ...
Selecting previously unselected package driveworks.
Preparing to unpack .../driveworks_*_amd64.deb ...
Unpacking driveworks ...
Selecting previously unselected package driveworks-stm.
Preparing to unpack .../driveworks-stm_*_amd64.deb ...
Unpacking driveworks-stm ...
Selecting previously unselected package driveworks-cgf.
Preparing to unpack .../driveworks-cgf_*_amd64.deb ...
Unpacking driveworks-cgf ...
Setting up nvsci ...
driveworks: installing nvsciipc.cfg ...
Setting up driveworks ...
Setting up driveworks-stm ...
Setting up driveworks-cgf ...
Processing triggers for libc-bin ...

The NVIDIA DriveWorks SDK precompiled for the Linux x86 architecture is then installed under /usr/local/driveworks on the host system.

Samples Binaries Installation

This section describes installing and running precompiled samples with no compilation required. As an alternative, to compile samples from source and run those samples, please see Samples Compilation From Source below.

We assume that you have followed the instructions for Core Binaries Installation for the host system x86 above.

To install the NVIDIA DriveWorks SDK samples precompiled for the Linux x86 architecture onto the host system use apt-get to install the driveworks-data, driveworks-samples, driveworks-stm-samples, and driveworks-cgf-samples packages:

% sudo apt-get install -y --no-install-recommends \
./driveworks-data_*_all.deb ./driveworks-samples_*_amd64.deb \
./driveworks-stm-samples_*_amd64.deb ./driveworks-cgf-samples_*_amd64.deb

Console output:

Suggested Packages:
driveworks-cgf-doc driveworks-doc driveworks-stm-doc
The following NEW packages will be installed:
driveworks-cgf-samples driveworks-data driveworks-samples
driveworks-stm-samples
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Selecting previously unselected package driveworks-data.
Preparing to unpack .../driveworks-data_*_all.deb ...
Unpacking driveworks-data ...
Selecting previously unselected package driveworks-samples.
Preparing to unpack .../driveworks-samples_*_amd64.deb ...
Unpacking driveworks-samples ...
Selecting previously unselected package driveworks-cgf-samples.
Preparing to unpack .../driveworks-cgf-samples_*_amd64.deb ...
Unpacking driveworks-cgf-samples ...
Selecting previously unselected package driveworks-stm-samples.
Preparing to unpack .../driveworks-stm-samples_*_amd64.deb ...
Unpacking driveworks-stm-samples ...
Setting up driveworks-data ...
Setting up driveworks-samples ...
Setting up driveworks-stm-samples ...
Setting up driveworks-cgf-samples ...

The NVIDIA DriveWorks SDK samples precompiled for the Linux x86 architecture are then installed under /usr/local/driveworks/bin on the host system.

To run the "Hello World" sample, use the following command on the host system:

% /usr/local/driveworks/bin/sample_hello_world

Partial console output:

*************************************************
Welcome to Driveworks SDK
....
Happy autonomous driving!

Other samples from within the path /usr/local/driveworks/bin may be run on the host system in a similar way. For a full list of samples, please see Samples.

Samples Compilation From Source

This section describes compiling samples from source and running those samples. As an alternative, to install and run precompiled samples with no compilation required, please see Samples Binaries Installation above.

We assume that you have followed the instructions for Core Binaries Installation and Samples Binaries Installation for the host system x86 above.

The NVIDIA DriveWorks SDK is now precompiled and preinstalled for the Linux x86 architecture on the host system under the path /usr/local/driveworks to enable compiling samples and applications that leverage the NVIDIA DriveWorks SDK. Source code and CMake project and toolchain files for the NVIDIA DriveWorks SDK samples are now located under the path /usr/local/driveworks/samples.

To compile the samples, first create the output directory and configure the project:

% mkdir -p $DRIVEWORKS_WORKSPACE/build-x86_64-linux-gnu
% cmake -B $DRIVEWORKS_WORKSPACE/build-x86_64-linux-gnu \
-S /usr/local/driveworks/samples

The environment variable $DRIVEWORKS_WORKSPACE denotes the location on the host file system below which you would like the compiled samples to be built. This environment variable must be set before running the above commands.

Console output:

-- The C compiler identification is GNU *
-- The CXX compiler identification is GNU *
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The CUDA compiler identification is NVIDIA *
-- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc
-- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc -- works
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "*")
-- Found EGL: /usr/lib/x86_64-linux-gnu/libEGL.so
-- Found /usr/lib/x86_64-linux-gnu/libEGL.so:
-- - Includes: [/usr/include]
-- - Libraries: [/usr/lib/x86_64-linux-gnu/libEGL.so]
-- DW_EXPERIMENTAL_FORCE_EGL not set, EGL Support Disabled
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- The TensorRT version is TRT *
-- Building GLFW for X11 (static)
-- Found X11: /usr/include
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- **** Samples will be installed to `$DRIVEWORKS_WORKSPACE/build-x86_64-linux-gnu/install/usr/local/driveworks/samples/bin' on the host filesystem. ****
-- Found CUDART: /usr/local/cuda/targets/x86_64-linux/include
-- Found cuBLAS: /usr/local/cuda/targets/x86_64-linux/include
-- Found 'dw/core/Version.h' in /usr/local/driveworks/targets/x86_64-Linux/include
-- Found dw_base library in /usr/local/driveworks/targets/x86_64-Linux/lib/libdw_base.so
-- Found 'dw/core/Version.h' in /usr/local/driveworks/targets/x86_64-Linux/include
-- Found dw_calibration library in /usr/local/driveworks/targets/x86_64-Linux/lib/libdw_calibration.so
-- Found 'dw/core/Version.h' in /usr/local/driveworks/targets/x86_64-Linux/include
-- Found dw_egomotion library in /usr/local/driveworks/targets/x86_64-Linux/lib/libdw_egomotion.so
-- Found 'dw/core/Version.h' in /usr/local/driveworks/targets/x86_64-Linux/include
-- Found dw_imageprocessing library in /usr/local/driveworks/targets/x86_64-Linux/lib/libdw_imageprocessing.so
-- Found 'dw/core/Version.h' in /usr/local/driveworks/targets/x86_64-Linux/include
-- Found dw_pointcloudprocessing library in /usr/local/driveworks/targets/x86_64-Linux/lib/libdw_pointcloudprocessing.so
-- Found 'dw/core/Version.h' in /usr/local/driveworks/targets/x86_64-Linux/include
-- Found dw_sensors library in /usr/local/driveworks/targets/x86_64-Linux/lib/libdw_sensors.so
-- Found 'dw/core/Version.h' in /usr/local/driveworks/targets/x86_64-Linux/include
-- Found dw_vehicleio library in /usr/local/driveworks/targets/x86_64-Linux/lib/libdw_vehicleio.so
-- Found 'dw/core/Version.h' in /usr/local/driveworks/targets/x86_64-Linux/include
-- Found dw_dnn_base library in /usr/local/driveworks/targets/x86_64-Linux/lib/libdw_dnn_base.so
-- Found 'dwvisualization/core/Visualization.h' in /usr/local/driveworks/targets/x86_64-Linux/include
-- Found driveworks_visualization library in /usr/local/driveworks/targets/x86_64-Linux/lib/libdriveworks_visualization.so
-- Found 'dwvisualization/core/Visualization.h' in /usr/local/driveworks/targets/x86_64-Linux/include
-- Found 'dw/core/Version.h' in /usr/local/driveworks/targets/x86_64-Linux/include
-- Found dwshared library in /usr/local/driveworks/targets/x86_64-Linux/lib/libdwshared.so
-- Found 'dw/core/DynamicMemory.h' in /usr/local/driveworks/targets/x86_64-Linux/include
-- Found dwdynamicmemory library in /usr/local/driveworks/targets/x86_64-Linux/lib/libdwdynamicmemory.so
-- Found cuDNN: /usr/include (found version "*")
-- Found 'dw/core/Version.h' in /usr/local/driveworks/targets/x86_64-Linux/include
-- Found dwcgf library in /usr/local/driveworks/targets/x86_64-Linux/lib/libdwcgf.so
-- Found 'dw/core/Version.h' in /usr/local/driveworks/targets/x86_64-Linux/include
-- Found dwframework_dwnodes library in /usr/local/driveworks/targets/x86_64-Linux/lib/libdwframework_dwnodes.so
-- Found NvSCI: /usr/include found components: NvSciSync
-- Configuring done
-- Generating done
-- Build files have been written to: $DRIVEWORKS_WORKSPACE/build-x86_64-linux-gnu

Build the project:

% cd $DRIVEWORKS_WORKSPACE/build-x86_64-linux-gnu
% make

Partial console output:

Scanning dependencies of target sample_hello_world
Building CXX object src/hello_world/CMakeFiles/sample_hello_world.dir/main.cpp.o
Linking CXX executable sample_hello_world
Built target sample_hello_world

Install the project:

% make install

Partial console output:

Install the project...
-- Install configuration: "Release"
....
-- Installing: $DRIVEWORKS_WORKSPACE/build-x86_64-linux-gnu/install/usr/local/driveworks/samples/bin/sample_hello_world
-- Set runtime path of "$DRIVEWORKS_WORKSPACE/build-x86_64-linux-gnu/install/usr/local/driveworks/samples/bin/sample_hello_world" to ""

To run the "Hello World" sample, use the following command on the host system:

% $DRIVEWORKS_WORKSPACE/build-x86_64-linux-gnu/install/usr/local/driveworks/samples/bin/sample_hello_world

Partial console output:

*************************************************
Welcome to Driveworks SDK
....
Happy autonomous driving!

Other samples from within the path $DRIVEWORKS_WORKSPACE/build-x86_64-linux-gnu/install/usr/local/driveworks/ samples/bin may be run on the host system in a similar way. For a full list of samples, please see Samples.

Documentation Installation

To install the NVIDIA DriveWorks SDK reference documentation onto the host system, use apt-get to install the following Debian packages using the following command on the host system.

Install the driveworks-doc, driveworks-stm-doc, and driveworks-cgf-doc packages:

% sudo apt-get install -y --no-install-recommends ./driveworks-doc_*_all.deb \
./driveworks-stm-doc_*_all.deb ./driveworks-cgf-doc_*_all.deb

Console output:

Suggested Packages:
driveworks-cgf driveworks-cgf-cross driveworks-cgf-samples driveworks
driveworks-cross driveworks-samples driveworks-stm driveworks-stm-cross
driveworks-stm-samples
The following NEW packages will be installed:
driveworks-cgf-doc driveworks-doc driveworks-stm-doc
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Selecting previously unselected package driveworks-doc.
Preparing to unpack .../driveworks-doc_*_all.deb ...
Unpacking driveworks-doc ...
Selecting previously unselected package driveworks-stm-doc.
Preparing to unpack .../driveworks-stm-doc_*_all.deb ...
Unpacking driveworks-stm-doc ...
Selecting previously unselected package driveworks-cgf-doc.
Preparing to unpack .../driveworks-cgf-doc_*_all.deb ...
Unpacking driveworks-cgf-doc ...
Setting up driveworks-doc ...
Setting up driveworks-stm-doc ...
Setting up driveworks-cgf-doc ...

The NVIDIA DriveWorks SDK documentation is then installed under /usr/local/driveworks/doc on the host system.

Verification of the File System Layout

For instructions on verifying the file system layout on the host system, please see Verifying the NVIDIA DriveWorks SDK Installation.

NVIDIA DRIVE Orin Target System Linux aarch64

Core Binaries Installation

We assume that you have flashed your NVIDIA DRIVE Orin target system using the appropriate NVIDIA DRIVE OS Debian package from the NVIDIA DRIVE OS Debian package repository and finalized your target system setup following the procedures in the "NVIDIA DRIVE OS Debian Package Installation Guide." In that guide you are asked to set an environment variable named $NV_WORKSPACE and that should remain set while following these instructions. We recommend setting $NV_WORKSPACE to /drive. The NVIDIA DriveWorks SDK will be precompiled for the Linux aarch64 architecture and preinstalled on the target system under the path /usr/local/driveworks.

NFS Server Configuration

It is convenient to configure an NFS server on the host system to make precompiled or cross-compiled samples binaries and data accessible to the target system.

Create and export a folder and restart the NFS server:

% sudo mkdir -p /srv/nfs/driveworks-aarch64-linux-gnu
% echo '/srv/nfs/driveworks-aarch64-linux-gnu *(async,rw,no_root_squash,no_all_squash,no_subtree_check)' \
| sudo tee -a /etc/exports >/dev/null
% sudo exportfs -a
% sudo service nfs-kernel-server restart
Warning
Enter all subsequent commands in this section at the target system command prompt $.

Connect to the target system using minicom, tcu_muxer, or SSH, and then mount the folder exported from the host system to the target system:

$ sudo mkdir -p /srv/nfs/driveworks-aarch64-linux-gnu
$ sudo mount -t nfs $REMOTE_HOST:/srv/nfs/driveworks-aarch64-linux-gnu \
/srv/nfs/driveworks-aarch64-linux-gnu

The environment variable $REMOTE_HOST denotes the hostname or IP address of the host system that has exported the folder. The environment variable $REMOTE_HOST must be set before running the above command.

Samples Binaries Installation

This section describes installing and running precompiled samples with no cross-compilation required. As an alternative, to cross-compile samples from source and run those samples, please see Samples Cross-Compilation From Source below.

To install the NVIDIA DriveWorks SDK samples precompiled for the Linux aarch64 architecture onto the target system, first copy the following Debian packages to the folder /srv/nfs/driveworks-aarch64-linux-gnu exported by the NFS server.

% sudo cp driveworks-data_*_all.deb driveworks-samples_*~linux*_arm64.deb \
driveworks-stm-samples_*~linux*_arm64.deb driveworks-cgf-samples_*~linux*_arm64.deb \
/srv/nfs/driveworks-aarch64-linux-gnu

If you do not have an NFS mount setup, you may use scp to copy the above Debian packages after connecting to the target system using minicom, tcu_muxer, or SSH. See "How to Run the CUDA Samples" in the "NVIDIA DRIVE OS NGC Docker Container Installation Guide" for an example of copying a file from the host system to the target system.

Warning
Enter all subsequent commands in this section at the target system command prompt $.

Connect to the target system using minicom, tcu_muxer, or SSH, and then install the driveworks-data, driveworks-samples, driveworks-stm-samples, and driveworks-cgf-samples packages:

$ sudo apt-get install -y --no-install-recommends \
/srv/nfs/driveworks-aarch64-linux-gnu/driveworks-data_*_all.deb \
/srv/nfs/driveworks-aarch64-linux-gnu/driveworks-samples_*~linux*_arm64.deb \
/srv/nfs/driveworks-aarch64-linux-gnu/driveworks-stm-samples_*~linux*_arm64.deb \
/srv/nfs/driveworks-aarch64-linux-gnu/driveworks-cgf-samples_*~linux*_arm64.deb

Console output:

Suggested Packages:
driveworks-cgf-doc driveworks-doc driveworks-stm-doc
The following NEW packages will be installed:
driveworks-cgf-samples driveworks-data driveworks-samples
driveworks-stm-samples
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Selecting previously unselected package driveworks-data.
Preparing to unpack .../driveworks-data_*_all.deb ...
Unpacking driveworks-data ...
Selecting previously unselected package driveworks-samples.
Preparing to unpack .../driveworks-samples_*~linux*_arm64.deb ...
Unpacking driveworks-samples ...
Selecting previously unselected package driveworks-cgf-samples.
Preparing to unpack .../driveworks-cgf-samples_*~linux*_arm64.deb ...
Unpacking driveworks-cgf-samples ...
Selecting previously unselected package driveworks-stm-samples.
Preparing to unpack .../driveworks-stm-samples_*~linux*_arm64.deb ...
Unpacking driveworks-stm-samples ...
Setting up driveworks-data ...
Setting up driveworks-samples ...
Setting up driveworks-stm-samples ...
Setting up driveworks-cgf-samples ...

The NVIDIA DriveWorks SDK samples precompiled for the Linux aarch64 architecture are then installed under /usr/local/driveworks/bin on the target system.

Warning
Enter all subsequent commands in this section at the target system command prompt $.

Connect to the target system using minicom, tcu_muxer, or SSH, and then to run the "Hello World" sample, use the following command on the target system:

$ /usr/local/driveworks/bin/sample_hello_world

Partial console output:

*************************************************
Welcome to Driveworks SDK
....
Happy autonomous driving!

Other samples from within the path /usr/local/driveworks/bin may be run on the target system in a similar way. For a full list of samples, please see Samples.

Samples Cross-Compilation From Source

This section describes cross-compiling samples from source and running those samples. As an alternative, to install and run precompiled samples with no cross-compilation required, please see Samples Binaries Installation above.

We assume that you have followed the instructions for Core Binaries Installation and Samples Binaries Installation for the host system x86 above.

The source code and CMake project and toolchain files for the NVIDIA DriveWorks SDK samples are now located under the path /usr/local/driveworks/samples.

To install the NVIDIA DriveWorks SDK precompiled for the Linux aarch64 architecture onto the host system, use apt-get and dpkg to install the following Debian packages in order using the following commands on the host system.

Install the cuda-repo-cross-aarch64-*-local repository package:

% sudo dpkg -i cuda-repo-cross-aarch64-*-local_*_all.deb

Console output:

Selecting previously unselected package cuda-repo-cross-aarch64-*-local.
Preparing to unpack .../cuda-repo-cross-aarch64-*-local_*_all.deb ...
Unpacking cuda-repo-cross-aarch64-*-local ...

Install the cuda-repo-cross-aarch64-*-local repository GPG key:

% sudo apt-key add /var/cuda-repo-cross-aarch64-*-local/7fa2af80.pub

Console output:

OK

Synchronize the APT package index:

% sudo apt-get update

Console output:

Get:1 file:/var/cuda-repo-cross-aarch64-*-local InRelease
Ign:1 file:/var/cuda-repo-cross-aarch64-*-local InRelease
Get:2 file:/var/cuda-repo-cross-aarch64-*-local Release
Get:3 file:/var/cuda-repo-cross-aarch64-*-local Release.gpg
Get:4 file:/var/cuda-repo-cross-aarch64-*-local Packages
Get:5 file:/var/cuda-repo-ubuntu2004-*-local InRelease
Ign:5 file:/var/cuda-repo-ubuntu2004-*-local InRelease
Get:6 file:/var/cuda-repo-ubuntu2004-*-local Release
Get:7 file:/var/cudnn-local-repo-ubuntu2004-* InRelease
Ign:7 file:/var/cudnn-local-repo-ubuntu2004-* InRelease
Get:8 file:/var/cudnn-local-repo-ubuntu2004-* Release
Get:9 file:/var/nv-tensorrt-repo-ubuntu2004-*-x86-host-* InRelease
Ign:9 file:/var/nv-tensorrt-repo-ubuntu2004-*-x86-host-* InRelease
Get:10 file:/var/nv-tensorrt-repo-ubuntu2004-*-x86-host-* Release
Hit:11 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:12 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:13 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:14 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Reading package lists... Done

Install the cuda-cross-aarch64-11-4 package:

% sudo apt-get -y --no-install-recommends install cuda-cross-aarch64-11-4

Partial console output:

The following additional packages will be installed:
binutils-aarch64-linux-gnu cpp-9-aarch64-linux-gnu cpp-aarch64-linux-gnu
cuda-cccl-cross-aarch64-11-4 cuda-cudart-cross-aarch64-11-4
cuda-cupti-cross-aarch64-11-4 cuda-driver-cross-aarch64-11-4
cuda-nsight-compute-addon-l4t-11-4 cuda-nvcc-cross-aarch64-11-4
cuda-nvml-cross-aarch64-11-4 cuda-nvprof-cross-aarch64-11-4
cuda-nvrtc-cross-aarch64-11-4 g++-9-aarch64-linux-gnu g++-aarch64-linux-gnu
gcc-10-cross-base gcc-9-aarch64-linux-gnu gcc-9-aarch64-linux-gnu-base
gcc-9-cross-base gcc-aarch64-linux-gnu libasan5-arm64-cross
libatomic1-arm64-cross libc6-arm64-cross libc6-dev-arm64-cross
libcublas-cross-aarch64-11-4 libcudla-cross-aarch64-11-4
libcufft-cross-aarch64-11-4 libcurand-cross-aarch64-11-4
libcusolver-cross-aarch64-11-4 libcusparse-cross-aarch64-11-4
libgcc-9-dev-arm64-cross libgcc-s1-arm64-cross libgomp1-arm64-cross
libitm1-arm64-cross liblsan0-arm64-cross libnpp-cross-aarch64-11-4
libstdc++-9-dev-arm64-cross libstdc++6-arm64-cross libtsan0-arm64-cross
libubsan1-arm64-cross linux-libc-dev-arm64-cross
nsight-compute-addon-l4t-2021.2.2
....
Selecting previously unselected package cuda-cross-aarch64-11-4.
Preparing to unpack .../*-cuda-cross-aarch64-*_all.deb ...
Unpacking cuda-cross-aarch64-11-4 ...
Setting up cuda-cross-aarch64-11-4 ...
Processing triggers for libc-bin ...

Install the cudnn-local-repo-cross-aarch64-* repository package:

% sudo dpkg -i cudnn-local-repo-cross-aarch64-*_all.deb

Console output:

Selecting previously unselected package cudnn-local-repo-cross-aarch64-*.
Preparing to unpack .../cudnn-local-repo-cross-aarch64-*_all.deb ...
Unpacking cudnn-local-repo-cross-aarch64-* ...
Setting up cudnn-local-repo-cross-aarch64-* ...

Install the cudnn-local-repo-cross-aarch64-* repository GPG key:

% sudo apt-key add /var/cudnn-local-repo-cross-aarch64-*/7fa2af80.pub

Console output:

OK

Synchronize the APT package index:

% sudo apt-get update

Console output:

Get:1 file:/var/cuda-repo-cross-aarch64-*-local InRelease
Ign:1 file:/var/cuda-repo-cross-aarch64-*-local InRelease
Get:2 file:/var/cuda-repo-cross-aarch64-*-local Release
Get:3 file:/var/cuda-repo-ubuntu2004-*-local InRelease
Ign:3 file:/var/cuda-repo-ubuntu2004-*-local InRelease
Get:4 file:/var/cuda-repo-ubuntu2004-*-local Release
Get:5 file:/var/cudnn-local-repo-cross-aarch64-* InRelease
Ign:5 file:/var/cudnn-local-repo-cross-aarch64-* InRelease
Get:6 file:/var/cudnn-local-repo-cross-aarch64-* Release
Get:7 file:/var/cudnn-local-repo-cross-aarch64-* Release.gpg
Get:8 file:/var/cudnn-local-repo-cross-aarch64-* Packages
Get:9 file:/var/cudnn-local-repo-ubuntu2004-* InRelease
Ign:9 file:/var/cudnn-local-repo-ubuntu2004-* InRelease
Get:10 file:/var/cudnn-local-repo-ubuntu2004-* Release
Get:11 file:/var/nv-tensorrt-repo-ubuntu2004-*-x86-host-* InRelease
Ign:11 file:/var/nv-tensorrt-repo-ubuntu2004-*-x86-host-* InRelease
Get:12 file:/var/nv-tensorrt-repo-ubuntu2004-*-x86-host-* Release
Hit:13 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:14 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:15 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:16 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Reading package lists... Done

Install the libcudnn8-cross-aarch64 package:

sudo apt-get -y --no-install-recommends install libcudnn8-cross-aarch64

Partial console output:

The following NEW packages will be installed:
libcudnn8-cross-aarch64
....
Selecting previously unselected package libcudnn8-cross-aarch64.
Preparing to unpack .../libcudnn8-cross-aarch64_*_all.deb ...
Unpacking libcudnn8-cross-aarch64 ...
Setting up libcudnn8-cross-aarch64 ...
update-alternatives: using /usr/include/aarch64-linux-gnu/cudnn_*.h to provide /usr/include/aarch64-linux-gnu/cudnn.h (libcudnn_cross_aarch64) in auto mode

Install the nv-tensorrt-repo-*-cross-* repository package:

% sudo dpkg -i nv-tensorrt-repo-*-cross-*_amd64.deb

Console output:

Selecting previously unselected package nv-tensorrt-repo-*-cross-*.
Preparing to unpack .../nv-tensorrt-repo-*-cross-*_amd64.deb ...
Unpacking nv-tensorrt-repo-*-cross-* ...
Setting up nv-tensorrt-repo-*-cross-* ...

Install the nv-tensorrt-repo-*-cross-* repository GPG key:

% sudo apt-key add /var/nv-tensorrt-repo-*-cross-*/7fa2af80.pub

Console output:

OK

Synchronize the APT package index:

% sudo apt-get update

Console output:

Get:1 file:/var/cuda-repo-cross-aarch64-*-local InRelease
Ign:1 file:/var/cuda-repo-cross-aarch64-*-local InRelease
Get:2 file:/var/cuda-repo-cross-aarch64-*-local Release
Get:3 file:/var/cuda-repo-ubuntu2004-*-local InRelease
Ign:3 file:/var/cuda-repo-ubuntu2004-*-local InRelease
Get:4 file:/var/cuda-repo-ubuntu2004-*-local Release
Get:5 file:/var/cudnn-local-repo-cross-aarch64-* InRelease
Ign:5 file:/var/cudnn-local-repo-cross-aarch64-* InRelease
Get:6 file:/var/cudnn-local-repo-cross-aarch64-* Release
Get:7 file:/var/cudnn-local-repo-ubuntu2004-* InRelease
Ign:7 file:/var/cudnn-local-repo-ubuntu2004-* InRelease
Get:8 file:/var/cudnn-local-repo-ubuntu2004-* Release
Get:9 file:/var/nv-tensorrt-repo-*-cross-* InRelease
Ign:9 file:/var/nv-tensorrt-repo-*-cross-* InRelease
Get:10 file:/var/nv-tensorrt-repo-*-cross-* Release
Get:11 file:/var/nv-tensorrt-repo-*-cross-* Release.gpg
Get:12 file:/var/nv-tensorrt-repo-*-cross-* Packages
Get:13 file:/var/nv-tensorrt-repo-ubuntu2004-*-x86-host-* InRelease
Ign:13 file:/var/nv-tensorrt-repo-ubuntu2004-*-x86-host-* InRelease
Get:14 file:/var/nv-tensorrt-repo-ubuntu2004-*-x86-host-* Release
Hit:15 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:16 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:17 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:18 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Reading package lists... Done

Install the tensorrt-cross-aarch64 package:

% sudo apt-get -y --no-install-recommends install tensorrt-cross-aarch64

Partial console output:

The following additional packages will be installed:
libnvinfer-dev-cross-aarch64 libnvinfer-plugin-dev-cross-aarch64
libnvinfer-plugin8-cross-aarch64 libnvinfer8-cross-aarch64
libnvonnxparsers-dev-cross-aarch64 libnvonnxparsers8-cross-aarch64
libnvparsers-dev-cross-aarch64 libnvparsers8-cross-aarch64
....
Selecting previously unselected package tensorrt-cross-aarch64.
Preparing to unpack .../*-tensorrt-cross-aarch64_*_all.deb ...
Unpacking tensorrt-cross-aarch64 ...
Setting up tensorrt-cross-aarch64 ...
Processing triggers for libc-bin ...

Install the driveworks-cross, driveworks-stm-cross, and driveworks-cgf-cross packages:

% sudo apt-get install -y --no-install-recommends \
./driveworks-cross_*~linux*_amd64.deb ./driveworks-stm-cross_*~linux*_amd64.deb \
./driveworks-cgf-cross_*~linux*_amd64.deb

Console output:

Suggested Packages:
driveworks-cgf-doc driveworks-doc driveworks-stm-doc
The following NEW packages will be installed:
driveworks-cgf-cross driveworks-cross driveworks-stm-cross
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Selecting previously unselected package driveworks-cross.
Preparing to unpack .../driveworks-cross_*~linux*_amd64.deb ...
Unpacking driveworks-cross ...
Selecting previously unselected package driveworks-stm-cross.
Preparing to unpack .../driveworks-stm-cross_*~linux*_amd64.deb ...
Unpacking driveworks-stm-cross ...
Selecting previously unselected package driveworks-cgf-cross.
Preparing to unpack .../driveworks-cgf-cross_*~linux*_amd64.deb ...
Unpacking driveworks-cgf-cross ...
Setting up driveworks-cross ...
Setting up driveworks-stm-cross ...
Setting up driveworks-cgf-cross ...

The NVIDIA DriveWorks SDK precompiled for the Linux aarch64 architecture is then installed under /usr/local/driveworks/targets/aarch64-Linux on the host system to enable cross-compiling samples and applications that leverage the NVIDIA DriveWorks SDK.

To cross-compile the samples, first create the output directory and configure the project:

% mkdir -p $DRIVEWORKS_WORKSPACE/build-aarch64-linux-gnu
% cmake -B $DRIVEWORKS_WORKSPACE/build-aarch64-linux-gnu \
-DCMAKE_TOOLCHAIN_FILE=/usr/local/driveworks/samples/cmake/Toolchain-V5L.cmake \
-DVIBRANTE_PDK=$NV_WORKSPACE/drive-linux -S /usr/local/driveworks/samples

The environment variable $DRIVEWORKS_WORKSPACE denotes the location on the host file system below which you would like the cross-compiled samples to be built. This environment variable and the environment variable $NV_WORKSPACE must be set before running the above commands.

Warning
Ensure that the environment variable $NV_WORKSPACE is set to the same value that was used when installing the NVIDIA DRIVE OS Debian package.

Console output:

-- VIBRANTE_PDK = $NV_WORKSPACE/drive-linux
-- VIBRANTE_PDK_BRANCH = *
-- Vibrante version *
-- The C compiler identification is GNU *
-- The CXX compiler identification is GNU *
-- Check for working C compiler: $NV_WORKSPACE/toolchains/aarch64--glibc--stable-*/bin/aarch64-linux-gcc
-- Check for working C compiler: $NV_WORKSPACE/toolchains/aarch64--glibc--stable-*/bin/aarch64-linux-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: $NV_WORKSPACE/toolchains/aarch64--glibc--stable-*/bin/aarch64-linux-g++
-- Check for working CXX compiler: $NV_WORKSPACE/toolchains/aarch64--glibc--stable-*/bin/aarch64-linux-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The CUDA compiler identification is NVIDIA *
-- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc
-- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc -- works
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "*")
-- Found EGL: $NV_WORKSPACE/drive-linux/lib-target/libEGL.so
-- Found $NV_WORKSPACE/drive-linux/lib-target/libEGL.so:
-- - Includes: [$NV_WORKSPACE/drive-linux/include]
-- - Libraries: [$NV_WORKSPACE/drive-linux/lib-target/libEGL.so]
-- Found: $NV_WORKSPACE/drive-linux/lib-target/libdrm.so
-- Header at: $NV_WORKSPACE/drive-linux/include
-- DW_EXPERIMENTAL_FORCE_EGL set and EGL Support Enabled
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Cross Compiling for Vibrante
-- The TensorRT version is TRT *
-- Building GLFW for X11 (static)
-- Found X11: $NV_WORKSPACE/drive-linux/include
-- Looking for XOpenDisplay in $NV_WORKSPACE/drive-linux/lib-target/libX11.so;$NV_WORKSPACE/drive-linux/lib-target/libXext.so
-- Looking for XOpenDisplay in $NV_WORKSPACE/drive-linux/lib-target/libX11.so;$NV_WORKSPACE/drive-linux/lib-target/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - not found
-- VIBRANTE_PDK_BRANCH = *
-- Found vibrante lib: /usr/local/driveworks/samples/3rdparty/linux-aarch64/vibrante/lib/libudev.so
-- Found vibrante lib: /usr/local/driveworks/samples/3rdparty/linux-aarch64/vibrante/lib/libusb-1.0.so
-- Found vibrante_Xlib: /usr/local/driveworks/samples/3rdparty/linux-aarch64/vibrante_Xlibs/lib/libXcursor.so
-- **** Please copy the contents of `$DRIVEWORKS_WORKSPACE/build-aarch64-linux-gnu/install/usr/local/driveworks/samples/bin' on the host filesystem to `/usr/local/driveworks/samples/bin' on the target filesystem. ****
-- Found CUDART: /usr/local/cuda/targets/aarch64-linux/include
-- Found cuBLAS: /usr/local/cuda/targets/aarch64-linux/include
-- Found 'dw/core/Version.h' in /usr/local/driveworks/targets/aarch64-Linux/include
-- Found dw_base library in /usr/local/driveworks/targets/aarch64-Linux/lib/libdw_base.so
-- Found 'dw/core/Version.h' in /usr/local/driveworks/targets/aarch64-Linux/include
-- Found dw_calibration library in /usr/local/driveworks/targets/aarch64-Linux/lib/libdw_calibration.so
-- Found 'dw/core/Version.h' in /usr/local/driveworks/targets/aarch64-Linux/include
-- Found dw_egomotion library in /usr/local/driveworks/targets/aarch64-Linux/lib/libdw_egomotion.so
-- Found 'dw/core/Version.h' in /usr/local/driveworks/targets/aarch64-Linux/include
-- Found dw_imageprocessing library in /usr/local/driveworks/targets/aarch64-Linux/lib/libdw_imageprocessing.so
-- Found 'dw/core/Version.h' in /usr/local/driveworks/targets/aarch64-Linux/include
-- Found dw_pointcloudprocessing library in /usr/local/driveworks/targets/aarch64-Linux/lib/libdw_pointcloudprocessing.so
-- Found 'dw/core/Version.h' in /usr/local/driveworks/targets/aarch64-Linux/include
-- Found dw_sensors library in /usr/local/driveworks/targets/aarch64-Linux/lib/libdw_sensors.so
-- Found 'dw/core/Version.h' in /usr/local/driveworks/targets/aarch64-Linux/include
-- Found dw_vehicleio library in /usr/local/driveworks/targets/aarch64-Linux/lib/libdw_vehicleio.so
-- Found 'dw/core/Version.h' in /usr/local/driveworks/targets/aarch64-Linux/include
-- Found dw_dnn_base library in /usr/local/driveworks/targets/aarch64-Linux/lib/libdw_dnn_base.so
-- Found 'dwvisualization/core/Visualization.h' in /usr/local/driveworks/targets/aarch64-Linux/include
-- Found driveworks_visualization library in /usr/local/driveworks/targets/aarch64-Linux/lib/libdriveworks_visualization.so
-- Found 'dwvisualization/core/Visualization.h' in /usr/local/driveworks/targets/aarch64-Linux/include
-- Found 'dw/core/Version.h' in /usr/local/driveworks/targets/aarch64-Linux/include
-- Found dwshared library in /usr/local/driveworks/targets/aarch64-Linux/lib/libdwshared.so
-- Found 'dw/core/DynamicMemory.h' in /usr/local/driveworks/targets/aarch64-Linux/include
-- Found dwdynamicmemory library in /usr/local/driveworks/targets/aarch64-Linux/lib/libdwdynamicmemory.so
-- Found cuDLA: /usr/local/cuda/targets/aarch64-linux/include
-- Found cuPVA: /usr/local/driveworks/targets/aarch64-Linux/include/cupva
-- Found cuDNN: /usr/include/aarch64-linux-gnu (found version "*")
-- Found 'dw/core/Version.h' in /usr/local/driveworks/targets/aarch64-Linux/include
-- Found dwcgf library in /usr/local/driveworks/targets/aarch64-Linux/lib/libdwcgf.so
-- Found 'dw/core/Version.h' in /usr/local/driveworks/targets/aarch64-Linux/include
-- Found dwframework_dwnodes library in /usr/local/driveworks/targets/aarch64-Linux/lib/libdwframework_dwnodes.so
-- Found NvSCI: $NV_WORKSPACE/drive-linux/include found components: NvSciSync
-- Configuring done
-- Generating done
-- Build files have been written to: $DRIVEWORKS_WORKSPACE/build-aarch64-linux-gnu

Build the project:

% cd $DRIVEWORKS_WORKSPACE/build-aarch64-linux-gnu
% make

Partial console output:

Building CXX object src/hello_world/CMakeFiles/sample_hello_world.dir/main.cpp.o
Linking CXX executable sample_hello_world
Built target sample_hello_world

You may ignore warnings about missing library dependencies during linking, since those dependencies will be available on the target system.

Install the project:

% make install

Partial console output:

Install the project...
-- Install configuration: "Release"
....
-- Installing: $DRIVEWORKS_WORKSPACE/build-aarch64-linux-gnu/install/usr/local/driveworks/samples/bin/sample_hello_world
-- Set runtime path of "$DRIVEWORKS_WORKSPACE/build-aarch64-linux-gnu/install/usr/local/driveworks/samples/bin/sample_hello_world" to ""

Copy the folder $DRIVEWORKS_WORKSPACE/build-aarch64-linux-gnu/install/usr/local/driveworks/samples/bin on the host system to the folder /srv/nfs/driveworks-aarch64-linux-gnu/usr/local/driveworks/samples/bin exported by the NFS server:

% sudo mkdir -p \
/srv/nfs/driveworks-aarch64-linux-gnu/usr/local/driveworks/samples/bin
% sudo cp -r \
$DRIVEWORKS_WORKSPACE/build-aarch64-linux-gnu/install/usr/local/driveworks/samples/bin \
/srv/nfs/driveworks-aarch64-linux-gnu/usr/local/driveworks/samples/bin

If you do not have an NFS mount setup you may use scp to copy the contents of $DRIVEWORKS_WORKSPACE/build-aarch64-linux-gnu/install/usr/local/driveworks/samples/bin to /usr/local/driveworks/samples/bin after connecting to the target system using minicom, tcu_muxer, or SSH. See "How to Run the CUDA Samples" in the "NVIDIA DRIVE OS Debian Package Installation Guide" for an example of copying a file from the host system to the target system.

Warning
Enter all subsequent commands in this section at the target system command prompt $.

Connect to the target system using minicom, tcu_muxer, or SSH, and then mount the cross-compiled samples binaries from the host system to the target system:

$ mount -t nfs \
$REMOTE_HOST:/srv/nfs/driveworks-aarch64-linux-gnu/usr/local/driveworks/samples/bin \
/usr/local/driveworks/samples/bin

The environment variable $REMOTE_HOST denotes the hostname or IP address of the host system that has exported the folder containing the cross-compiled samples binaries. The environment variable $REMOTE_HOST must be set before running the above command and the path to the cross-compiled samples binaries on the target system must be exactly /usr/local/driveworks/samples/bin otherwise the samples will not be able to find dependent libraries or data.

Warning
Enter all subsequent commands in this section at the target system command prompt $.

Connect to the target system using minicom, tcu_muxer, or SSH, and then to run the "Hello World" sample, use the following command on the target system:

$ /usr/local/driveworks/samples/bin/sample_hello_world

Partial console output:

*************************************************
Welcome to Driveworks SDK
....
Happy autonomous driving!

Other samples from within the path /usr/local/driveworks/samples/bin may be run on the target system in a similar way. For a full list of samples, please see Samples.

Verification of the File System Layout

For instructions on verifying the file system layout on the NVIDIA DRIVE Orin target system, please see Verifying the NVIDIA DriveWorks SDK Installation.

NVIDIA DRIVE Orin Target System QNX aarch64

Core Binaries Installation

We assume that you have flashed your NVIDIA DRIVE Orin target system using the appropriate NVIDIA DRIVE OS Debian package from the localrepo folder of the NVIDIA DRIVE OS Debian package repository and finalized your target system setup following the procedures in the "NVIDIA DRIVE OS Debian Package Installation Guide." In that guide you are asked to set an environment variable named $NV_WORKSPACE and that should remain set while following these instructions. We recommend setting $NV_WORKSPACE to /drive. The NVIDIA DriveWorks SDK will be precompiled for the QNX aarch64 architecture and preinstalled on the target system under the path /usr/local/driveworks.

NFS Server Configuration

The QNX file system on the NVIDIA DRIVE Orin target system may not be modified, so to run the NVIDIA DriveWorks SDK samples, the precompiled or cross-compiled samples binaries and data must be mounted from host system to target system using an NFS server running on the host system.

Create and configure the export of a folder for the samples binaries:

% sudo mkdir -p /srv/nfs/driveworks-aarch64-qnx
% echo '/srv/nfs/driveworks-aarch64-qnx *(async,rw,no_root_squash,no_all_squash,no_subtree_check)' \
| sudo tee -a /etc/exports >/dev/null

Configure the export of the folder containing the samples data:

% echo '/usr/local/driveworks/data *(async,ro,no_root_squash,no_all_squash,no_subtree_check)' \
| sudo tee -a /etc/exports >/dev/null

Apply the configuration changes to export the folders and restart the NFS server:

% sudo exportfs -a
% sudo service nfs-kernel-server restart
Warning
Enter all subsequent commands in this section at the target system command prompt $.

Connect to the target system using minicom, tcu_muxer, or SSH, and then mount the samples data from the host system to the target system:

$ fs-nfs3 $REMOTE_HOST:/usr/local/driveworks/data/samples \
/usr/local/driveworks/data/samples

The environment variable $REMOTE_HOST denotes the hostname or IP address of the host system that has exported the folder containing the samples data. The environment variable $REMOTE_HOST must be set before running the above command and the path to the samples data on the target system must be exactly /usr/local/driveworks/data otherwise the samples will not be able to find dependent data.

Due to QNX file system limitations you should not attempt to copy the contents of /usr/local/driveworks/data/samples onto the target system instead of using the NFS mount.

Addendum to the NVIDIA DRIVE OS Debian Package Installation Guide

Before flashing the NVIDIA DRIVE Orin system with the NVIDIA DRIVE OS during the procedures in the "NVIDIA DRIVE OS Debian Package Installation Guide," enter the following commands at the host command prompt:

% sudo cp $NV_WORKSPACE/extra/driveworks/usr/local/driveworks-*/targets/aarch64-QNX/config/tegra234-nvsciipc-stm.dtsi \
$NV_WORKSPACE/drive-qnx/bsp/device-tree/hardware/nvidia/platform/t23x/automotive/kernel-dts/common/qnx/tegra234-nvsciipc-stm.dtsi
% sudo cp $NV_WORKSPACE/extra/driveworks/usr/local/driveworks-*/targets/aarch64-QNX/config/tegra234-nvsciipc-stm.dtsi \
$NV_WORKSPACE/drive-foundation/platform-config/hardware/nvidia/platform/t23x/automotive/kernel-dts/common/qnx/tegra234-nvsciipc-stm.dtsi

Samples Binaries Installation

This section describes installing and running precompiled samples with no cross-compilation required. As an alternative, to cross-compile samples from source and run those samples, please see Samples Cross-Compilation From Source below.

To mount the NVIDIA DriveWorks SDK samples precompiled for the QNX aarch64 architecture onto the target system, unpack the following archives to the folder /srv/nfs/driveworks-aarch64-qnx exported by the NFS server.

% sudo tar -xzf driveworks-samples_*~qnx*_all.tar.gz \
-C /srv/nfs/driveworks-aarch64-qnx
% sudo tar -xzf driveworks-stm-samples_*~qnx*_all.tar.gz \
-C /srv/nfs/driveworks-aarch64-qnx
% sudo tar -xzf driveworks-cgf-samples_*~qnx*_all.tar.gz \
-C /srv/nfs/driveworks-aarch64-qnx
% sudo ln -s /srv/nfs/driveworks-aarch64-qnx/usr/local/driveworks-* \
/srv/nfs/driveworks-aarch64-qnx/usr/local/driveworks
Warning
Enter all subsequent commands in this section at the target system command prompt $.

Connect to the target system using minicom, tcu_muxer, or SSH, and then mount the precompiled samples binaries from the host system to the target system:

$ fs-nfs3 $REMOTE_HOST:/srv/nfs/driveworks-aarch64-qnx/usr/local/driveworks/bin \
/usr/local/driveworks/samples/bin

The environment variable $REMOTE_HOST denotes the hostname or IP address of the host system that has exported the folder containing the precompiled samples binaries. The environment variable $REMOTE_HOST must be set before running the above command and the path to the precompiled samples binaries on the target system must be exactly /usr/local/driveworks/samples/bin otherwise the samples will not be able to find dependent libraries or data.

Due to QNX file system limitations you should not attempt to copy the contents of /srv/nfs/driveworks-aarch64-qnx/usr/local/driveworks/bin onto the target system instead of using the NFS mount.

The NVIDIA DriveWorks SDK samples precompiled for the QNX arch64 architecture will be available under /usr/local/driveworks/samples/bin on the target system.

To run the "Hello World" sample, use the following command on the target system:

$ /usr/local/driveworks/samples/bin/sample_hello_world

Partial console output:

*************************************************
Welcome to Driveworks SDK
....
Happy autonomous driving!

Other samples from within the path /usr/local/driveworks/samples/bin may be run on the target system in a similar way. For a full list of samples, please see Samples.

Samples Cross-Compilation From Source

This section describes cross-compiling samples from source and running those samples. As an alternative, to install and run precompiled samples with no cross-compilation required, please see Samples Binaries Installation above.

We assume that you have followed the instructions for Core Binaries Installation and Samples Binaries Installation for the host system x86 above.

The source code and CMake project and toolchain files for the NVIDIA DriveWorks SDK samples are now located under the path /usr/local/driveworks/samples.

To install the NVIDIA DriveWorks SDK precompiled for the QNX aarch64 architecture onto the host system, use apt-get and dpkg to install the following Debian packages in order using the following commands on the host system.

Install the cuda-repo-cross-aarch64-*-local repository package:

% sudo dpkg -i cuda-repo-cross-aarch64-*-local_*_all.deb

Console output:

Selecting previously unselected package cuda-repo-cross-aarch64-*-local.
Preparing to unpack .../cuda-repo-cross-aarch64-*-local_*_all.deb ...
Unpacking cuda-repo-cross-aarch64-*-local ...

Install the cuda-repo-cross-aarch64-*-local repository GPG key:

% sudo apt-key add /var/cuda-repo-cross-aarch64-*-local/7fa2af80.pub

Console output:

OK

Synchronize the APT package index:

% sudo apt-get update

Console output:

Get:1 file:/var/cuda-repo-cross-aarch64-*-local InRelease
Ign:1 file:/var/cuda-repo-cross-aarch64-*-local InRelease
Get:2 file:/var/cuda-repo-ubuntu2004-*-local InRelease
Ign:2 file:/var/cuda-repo-ubuntu2004-*-local InRelease
Get:3 file:/var/cudnn-local-repo-ubuntu2004-* InRelease
Ign:3 file:/var/cudnn-local-repo-ubuntu2004-* InRelease
Get:5 file:/var/nv-tensorrt-repo-ubuntu2004-*-x86-host-* InRelease
Ign:5 file:/var/nv-tensorrt-repo-ubuntu2004-*-x86-host-* InRelease
Get:6 file:/var/cuda-repo-cross-aarch64-*-local Release
Get:7 file:/var/cuda-repo-ubuntu2004-*-local Release
Get:8 file:/var/cudnn-local-repo-ubuntu2004-* Release
Get:10 file:/var/nv-tensorrt-repo-ubuntu2004-*-x86-host-* Release
Get:11 file:/var/cuda-repo-cross-aarch64-*-local Release.gpg
Get:13 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:14 http://archive.ubuntu.com/ubuntu focal InRelease
Get:15 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Get:16 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Get:17 file:/var/cuda-repo-cross-aarch64-*-local Packages
Hit:15 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:16 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:17 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:18 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Reading package lists... Done

Install the cuda-cross-aarch64-11-4 package:

% sudo apt-get -y --no-install-recommends install cuda-cross-aarch64-11-4

Partial console output:

The following additional packages will be installed:
binutils-aarch64-linux-gnu cpp-9-aarch64-linux-gnu cpp-aarch64-linux-gnu
cuda-cccl-cross-aarch64-11-4 cuda-cudart-cross-aarch64-11-4
cuda-cupti-cross-aarch64-11-4 cuda-driver-cross-aarch64-11-4
cuda-nsight-compute-addon-l4t-11-4 cuda-nvcc-cross-aarch64-11-4
cuda-nvml-cross-aarch64-11-4 cuda-nvprof-cross-aarch64-11-4
cuda-nvrtc-cross-aarch64-11-4 g++-9-aarch64-linux-gnu g++-aarch64-linux-gnu
gcc-10-cross-base gcc-9-aarch64-linux-gnu gcc-9-aarch64-linux-gnu-base
gcc-9-cross-base gcc-aarch64-linux-gnu libasan5-arm64-cross
libatomic1-arm64-cross libc6-arm64-cross libc6-dev-arm64-cross
libcublas-cross-aarch64-11-4 libcudla-cross-aarch64-11-4
libcufft-cross-aarch64-11-4 libcurand-cross-aarch64-11-4
libcusolver-cross-aarch64-11-4 libcusparse-cross-aarch64-11-4
libgcc-9-dev-arm64-cross libgcc-s1-arm64-cross libgomp1-arm64-cross
libitm1-arm64-cross liblsan0-arm64-cross libnpp-cross-aarch64-11-4
libstdc++-9-dev-arm64-cross libstdc++6-arm64-cross libtsan0-arm64-cross
libubsan1-arm64-cross linux-libc-dev-arm64-cross
nsight-compute-addon-l4t-2021.2.2
....
Selecting previously unselected package cuda-cross-aarch64-11-4.
Preparing to unpack .../*-cuda-cross-aarch64-*_all.deb ...
Unpacking cuda-cross-aarch64-11-4 ...
Setting up cuda-cross-aarch64-11-4 ...
Processing triggers for libc-bin ...

Install the cudnn-local-repo-cross-aarch64-* repository package:

% sudo dpkg -i cudnn-local-repo-cross-aarch64-*_all.deb

Console output:

Selecting previously unselected package cudnn-local-repo-cross-aarch64-*.
Preparing to unpack .../cudnn-local-repo-cross-aarch64-*_all.deb ...
Unpacking cudnn-local-repo-cross-aarch64-* ...
Setting up cudnn-local-repo-cross-aarch64-* ...

Install the cudnn-local-repo-cross-aarch64-* repository GPG key:

% sudo apt-key add /var/cudnn-local-repo-cross-aarch64-*/7fa2af80.pub

Console output:

OK

Synchronize the APT package index:

% sudo apt-get update

Console output:

Get:1 file:/var/cuda-repo-cross-aarch64-*-local InRelease
Ign:1 file:/var/cuda-repo-cross-aarch64-*-local InRelease
Get:2 file:/var/cuda-repo-cross-aarch64-*-local Release
Get:3 file:/var/cuda-repo-ubuntu2004-*-local InRelease
Ign:3 file:/var/cuda-repo-ubuntu2004-*-local InRelease
Get:4 file:/var/cuda-repo-ubuntu2004-*-local Release
Get:5 file:/var/cudnn-local-repo-cross-aarch64-* InRelease
Ign:5 file:/var/cudnn-local-repo-cross-aarch64-* InRelease
Get:6 file:/var/cudnn-local-repo-cross-aarch64-* Release
Get:7 file:/var/cudnn-local-repo-cross-aarch64-* Packages
Get:8 file:/var/cudnn-local-repo-cross-aarch64-* Release.gpg
Get:9 file:/var/cudnn-local-repo-ubuntu2004-* InRelease
Ign:9 file:/var/cudnn-local-repo-ubuntu2004-* InRelease
Get:10 file:/var/cudnn-local-repo-ubuntu2004-* Release
Get:11 file:/var/nv-tensorrt-repo-ubuntu2004-*-x86-host-* InRelease
Ign:11 file:/var/nv-tensorrt-repo-ubuntu2004-*-x86-host-* InRelease
Get:12 file:/var/nv-tensorrt-repo-ubuntu2004-*-x86-host-* Release
Hit:13 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:14 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:15 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:16 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Reading package lists... Done

Install the libcudnn8-cross-aarch64 package:

sudo apt-get -y --no-install-recommends install libcudnn8-cross-aarch64

Partial console output:

The following NEW packages will be installed:
libcudnn8-cross-aarch64
....
Selecting previously unselected package libcudnn8-cross-aarch64.
Preparing to unpack .../libcudnn8-cross-aarch64_*_all.deb ...
Unpacking libcudnn8-cross-aarch64 ...
Setting up libcudnn8-cross-aarch64 ...
update-alternatives: using /usr/include/aarch64-linux-gnu/cudnn_*.h to provide /usr/include/aarch64-linux-gnu/cudnn.h (libcudnn_cross_aarch64) in auto mode

Install the nv-tensorrt-repo-*-cross-* repository package:

% sudo dpkg -i nv-tensorrt-repo-*-cross-*_amd64.deb

Console output:

Selecting previously unselected package nv-tensorrt-repo-*-cross-*.
Preparing to unpack .../nv-tensorrt-repo-*-cross-*_amd64.deb ...
Unpacking nv-tensorrt-repo-*-cross-* ...
Setting up nv-tensorrt-repo-*-cross-* ...

Install the nv-tensorrt-repo-*-cross-* repository GPG key:

% sudo apt-key add /var/nv-tensorrt-repo-*-cross-*/7fa2af80.pub

Console output:

OK

Synchronize the APT package index:

% sudo apt-get update

Console output:

Get:1 file:/var/cuda-repo-cross-aarch64-*-local InRelease
Ign:1 file:/var/cuda-repo-cross-aarch64-*-local InRelease
Get:2 file:/var/cuda-repo-cross-aarch64-*-local Release
Get:3 file:/var/cuda-repo-ubuntu2004-*-local InRelease
Ign:3 file:/var/cuda-repo-ubuntu2004-*-local InRelease
Get:4 file:/var/cuda-repo-ubuntu2004-*-local Release
Get:5 file:/var/cudnn-local-repo-cross-aarch64-* InRelease
Ign:5 file:/var/cudnn-local-repo-cross-aarch64-* InRelease
Get:6 file:/var/cudnn-local-repo-cross-aarch64-* Release
Get:7 file:/var/cudnn-local-repo-ubuntu2004-* InRelease
Ign:7 file:/var/cudnn-local-repo-ubuntu2004-* InRelease
Get:8 file:/var/cudnn-local-repo-ubuntu2004-* Release
Get:9 file:/var/nv-tensorrt-repo-*-cross-* InRelease
Ign:9 file:/var/nv-tensorrt-repo-*-cross-* InRelease
Get:10 file:/var/nv-tensorrt-repo-*-cross-* Release
Get:11 file:/var/nv-tensorrt-repo-*-cross-* Release.gpg
Get:12 file:/var/nv-tensorrt-repo-*-cross-* Packages
Get:13 file:/var/nv-tensorrt-repo-ubuntu2004-*-x86-host-* InRelease
Ign:13 file:/var/nv-tensorrt-repo-ubuntu2004-*-x86-host-* InRelease
Get:14 file:/var/nv-tensorrt-repo-ubuntu2004-*-x86-host-* Release
Hit:15 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:16 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:17 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:18 http://archive.ubuntu.com/ubuntu focal-backports InRelease

Install the tensorrt-cross-aarch64 package:

% sudo apt-get -y --no-install-recommends install tensorrt-cross-aarch64

Partial console output:

The following additional packages will be installed:
libnvinfer-dev-cross-aarch64 libnvinfer-plugin-dev-cross-aarch64
libnvinfer-plugin8-cross-aarch64 libnvinfer8-cross-aarch64
libnvonnxparsers-dev-cross-aarch64 libnvonnxparsers8-cross-aarch64
libnvparsers-dev-cross-aarch64 libnvparsers8-cross-aarch64
....
Selecting previously unselected package tensorrt-cross-aarch64.
Preparing to unpack .../*-tensorrt-cross-aarch64_*_all.deb ...
Unpacking tensorrt-cross-aarch64 ...
Setting up tensorrt-cross-aarch64 ...
Processing triggers for libc-bin ...

Install the driveworks-cross, driveworks-stm-cross, and driveworks-cgf-cross packages:

% sudo apt-get install -y --no-install-recommends \
./driveworks-cross_*~qnx*_amd64.deb ./driveworks-stm-cross_*~qnx*_amd64.deb \
./driveworks-cgf-cross_*~qnx*_amd64.deb

Console output:

Suggested Packages:
driveworks-cgf-doc driveworks-doc driveworks-stm-doc
The following NEW packages will be installed:
driveworks-cgf-cross driveworks-cross driveworks-stm-cross
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Selecting previously unselected package driveworks-cross.
Preparing to unpack .../driveworks-cross_*~qnx*_amd64.deb ...
Unpacking driveworks-cross ...
Selecting previously unselected package driveworks-stm-cross.
Preparing to unpack .../driveworks-stm-cross_*~qnx*_amd64.deb ...
Unpacking driveworks-stm-cross ...
Selecting previously unselected package driveworks-cgf-cross.
Preparing to unpack .../driveworks-cgf-cross_*~qnx*_amd64.deb ...
Unpacking driveworks-cgf-cross ...
Setting up driveworks-cross ...
Setting up driveworks-stm-cross ...
Setting up driveworks-cgf-cross ...

The NVIDIA DriveWorks SDK precompiled for the QNX aarch64 architecture is then installed under /usr/local/driveworks/targets/aarch64-QNX on the host system to enable cross-compiling samples and applications that leverage the NVIDIA DriveWorks SDK.

To cross-compile the samples, first create the output directory and configure the project:

% mkdir -p $DRIVEWORKS_WORKSPACE/build-aarch64-qnx
% export QNX_HOST=$QNX_BASE/host/linux/x86_64
% export QNX_TARGET=$QNX_BASE/target/qnx7
% export QNX_TOP=$NV_WORKSPACE/drive-qnx
% export QNX_VERSION=7.1.0
% export CUDA_PATH=/usr/local/cuda-safe-11.4
% cmake -B $DRIVEWORKS_WORKSPACE/build-aarch64-qnx \
-DCMAKE_TOOLCHAIN_FILE=/usr/local/driveworks/samples/cmake/Toolchain-V5Q.cmake \
-DCUDA_DIR=$CUDA_PATH -DVIBRANTE_PDK=$QNX_TOP \
-S /usr/local/driveworks/samples

The environment variable $DRIVEWORKS_WORKSPACE denotes the location on the host file system below which you would like the cross-compiled sample binaries to be built and the environment variable $QNX_BASE denotes the location on the host file system of the QNX Software Development Platform installation. Both environment variables and the environment variable $NV_WORKSPACE must be set before running the above commands.

Warning
Ensure that the environment variable $NV_WORKSPACE is set to the same value that was used when installing the NVIDIA DRIVE OS Debian package.

Console output:

-- VIBRANTE_PDK = $NV_WORKSPACE/drive-qnx
-- VIBRANTE_PDK_BRANCH = *
-- Vibrante version *
-- Enabling QNX QOS Compiler (qcc/q++)
-- Enabling QNX QOS Compiler (qcc/q++)
-- The C compiler identification is QCC *
-- The CXX compiler identification is QCC *
-- Check for working C compiler: /sdp/host/linux/x86_64/usr/bin/qcc
-- Check for working C compiler: /sdp/host/linux/x86_64/usr/bin/qcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /sdp/host/linux/x86_64/usr/bin/q++
-- Check for working CXX compiler: /sdp/host/linux/x86_64/usr/bin/q++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The CUDA compiler identification is NVIDIA *
-- Check for working CUDA compiler: /usr/local/cuda-safe-*/bin/nvcc
-- Check for working CUDA compiler: /usr/local/cuda-safe-*/bin/nvcc -- works
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "*")
-- Found EGL: $NV_WORKSPACE/drive-qnx/lib-target/libEGL.so
-- Found $NV_WORKSPACE/drive-qnx/lib-target/libEGL.so:
-- - Includes: [$NV_WORKSPACE/drive-qnx/include]
-- - Libraries: [$NV_WORKSPACE/drive-qnx/lib-target/libEGL.so]
-- Header at: $NV_WORKSPACE/drive-qnx/include
-- DW_EXPERIMENTAL_FORCE_EGL set and EGL Support Enabled
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Cross Compiling for Vibrante
-- The TensorRT version is TRT *
-- Building GLFW for Screen
-- VIBRANTE_PDK_BRANCH = *
-- **** Please mount `$DRIVEWORKS_WORKSPACE/build-aarch64-qnx/install/usr/local/driveworks/samples/bin' on the host filesystem onto `/usr/local/driveworks/samples/bin' on the target filesystem using NFS. ****
-- Found CUDART: /usr/local/cuda-safe-*/targets/aarch64-qnx/include
-- Found cuBLAS: /usr/local/cuda-safe-*/targets/aarch64-qnx/include
-- Found 'dw/core/Version.h' in /usr/local/driveworks/targets/aarch64-QNX/include
-- Found dw_base library in /usr/local/driveworks/targets/aarch64-QNX/lib/libdw_base.so
-- Found 'dw/core/Version.h' in /usr/local/driveworks/targets/aarch64-QNX/include
-- Found dw_calibration library in /usr/local/driveworks/targets/aarch64-QNX/lib/libdw_calibration.so
-- Found 'dw/core/Version.h' in /usr/local/driveworks/targets/aarch64-QNX/include
-- Found dw_egomotion library in /usr/local/driveworks/targets/aarch64-QNX/lib/libdw_egomotion.so
-- Found 'dw/core/Version.h' in /usr/local/driveworks/targets/aarch64-QNX/include
-- Found dw_imageprocessing library in /usr/local/driveworks/targets/aarch64-QNX/lib/libdw_imageprocessing.so
-- Found 'dw/core/Version.h' in /usr/local/driveworks/targets/aarch64-QNX/include
-- Found dw_pointcloudprocessing library in /usr/local/driveworks/targets/aarch64-QNX/lib/libdw_pointcloudprocessing.so
-- Found 'dw/core/Version.h' in /usr/local/driveworks/targets/aarch64-QNX/include
-- Found dw_sensors library in /usr/local/driveworks/targets/aarch64-QNX/lib/libdw_sensors.so
-- Found 'dw/core/Version.h' in /usr/local/driveworks/targets/aarch64-QNX/include
-- Found dw_vehicleio library in /usr/local/driveworks/targets/aarch64-QNX/lib/libdw_vehicleio.so
-- Found 'dw/core/Version.h' in /usr/local/driveworks/targets/aarch64-QNX/include
-- Found dw_dnn_base library in /usr/local/driveworks/targets/aarch64-QNX/lib/libdw_dnn_base.so
-- Found 'dwvisualization/core/Visualization.h' in /usr/local/driveworks/targets/aarch64-QNX/include
-- Found driveworks_visualization library in /usr/local/driveworks/targets/aarch64-QNX/lib/libdriveworks_visualization.so
-- Found 'dwvisualization/core/Visualization.h' in /usr/local/driveworks/targets/aarch64-QNX/include
-- Found 'dw/core/Version.h' in /usr/local/driveworks/targets/aarch64-QNX/include
-- Found dwshared library in /usr/local/driveworks/targets/aarch64-QNX/lib/libdwshared.so
-- Found 'dw/core/DynamicMemory.h' in /usr/local/driveworks/targets/aarch64-QNX/include
-- Found dwdynamicmemory library in /usr/local/driveworks/targets/aarch64-QNX/lib/libdwdynamicmemory.so
-- Found cuDLA: /usr/local/cuda-safe-*/targets/aarch64-qnx/include
-- Found cuPVA: /usr/local/driveworks/targets/aarch64-QNX/include/cupva
-- Found cuDNN: /usr/include/aarch64-unknown-nto-qnx (found version "*")
-- Found 'dw/core/Version.h' in /usr/local/driveworks/targets/aarch64-QNX/include
-- Found dwcgf library in /usr/local/driveworks/targets/aarch64-QNX/lib/libdwcgf.so
-- Found 'dw/core/Version.h' in /usr/local/driveworks/targets/aarch64-QNX/include
-- Found dwframework_dwnodes library in /usr/local/driveworks/targets/aarch64-QNX/lib/libdwframework_dwnodes.so
-- Found NvSCI: $NV_WORKSPACE/drive-qnx/include found components: NvSciSync
-- Configuring done
-- Generating done
-- Build files have been written to: $DRIVEWORKS_WORKSPACE/build-aarch64-qnx

Build the project:

% cd $DRIVEWORKS_WORKSPACE/build-aarch64-qnx
% make

Partial console output:

Scanning dependencies of target sample_hello_world
Building CXX object src/hello_world/CMakeFiles/sample_hello_world.dir/main.cpp.o
Linking CXX executable sample_hello_world
Built target sample_hello_world

You may ignore warnings about missing library dependencies during linking, since those dependencies will be available on the target system.

Install the project:

% make install

Partial console output:

Install the project...
-- Install configuration: "Release"
....
-- Installing: $DRIVEWORKS_WORKSPACE/build-aarch64-qnx/install/usr/local/driveworks/samples/bin/sample_hello_world
-- Set runtime path of "$DRIVEWORKS_WORKSPACE/build-aarch64-qnx/install/usr/local/driveworks/samples/bin/sample_hello_world" to ""

Copy the folder $DRIVEWORKS_WORKSPACE/build-aarch64-qnx/install/usr/local/driveworks/samples/bin on the host system to the folder /srv/nfs/driveworks-aarch64-qnx/usr/local/driveworks/samples/bin exported by the NFS server:

% sudo mkdir -p \
/srv/nfs/driveworks-aarch64-qnx/usr/local/driveworks/samples/bin
% sudo cp -r \
$DRIVEWORKS_WORKSPACE/build-aarch64-qnx/install/usr/local/driveworks/samples/bin \
/srv/nfs/driveworks-aarch64-qnx/usr/local/driveworks/samples/bin
Warning
Enter all subsequent commands in this section at the target system command prompt $.

Connect to the target system using minicom, tcu_muxer, or SSH, and then mount the cross-compiled samples binaries from the host system to the target system:

$ fs-nfs3 $REMOTE_HOST:/srv/nfs/driveworks-aarch64-qnx/usr/local/driveworks/samples/bin \
/usr/local/driveworks/samples/bin

The environment variable $REMOTE_HOST denotes the hostname or IP address of the host system that has exported the folder containing the cross-compiled samples binaries. The environment variable $REMOTE_HOST must be set before running the above command and the path to the cross-compiled samples binaries on the target system must be exactly /usr/local/driveworks/samples/bin otherwise the samples will not be able to find dependent libraries or data.

Due to QNX file system limitations you should not attempt to copy the contents of /srv/nfs/driveworks-aarch64-qnx/usr/local/driveworks/samples/bin onto the target system instead of using the NFS mount.

To run the "Hello World" sample, use the following command on the target system:

$ /usr/local/driveworks/samples/bin/sample_hello_world

Partial console output:

*************************************************
Welcome to Driveworks SDK
....
Happy autonomous driving!

Other samples from within the path /usr/local/driveworks/samples/bin may be run on the target system in a similar way. For a full list of samples, please see Samples.

Verification of the File System Layout

For instructions on verifying the file system layout on the NVIDIA DRIVE Orin target system, please see Verifying the NVIDIA DriveWorks SDK Installation.