NVIDIA Tegra
NVIDIA DRIVE OS 5.1 Linux SDK

Developer Guide
5.1.15 Release


 
Linux Filesystems
 
NVIDIA Linux Filesystems
Installation
Installing the Filesystem from Runfile
Installing the Filesystem from Debian
Reinstalling the Filesystem from Debian
Uninstalling the Filesystem Image Debian
Debian Packages for TargetFS
Creation of Debian Packages
File Packages
Master Packages
Installing the Debian Packages
Uninstalling the Debian Packages
Filesystem Differences Between Runfile and Debian
Filesystem Manifest
Prompts During Installation of Filesystem
Prompts During Installation of Filesystem from Runfile
Prompts During Installation of Filesystem from Debian
Filesystems Reference
NVIDIA DRIVE OS LINUX consists of multiple hierarchy filesystems.
Each layer of the hierarchy of filesystems is assigned a purpose and the particular purpose at that layer defines the contents of the filesystem.
The Filesystem Hierarchy Pyramid image below shows a pyramid representing the hierarchy of filesystems. Each layer builds on top of the layers below it. The pyramid is not proportional; therefore, the width or area of each layer of the pyramid does not necessary represent the about of content at that specific layered filesystem.
At the very bottom of the hierarchy, the base layer is Canonical Ubuntu Base Filesystem. This is a filesystem from Canonical and is not changed but is required to be the initial based filesystem to be built on top of.
The next layer is named driveos-core-rfs and is purposed to contain automotive specific Debian packages as well as drivers, libraries, tools, firmwares, scripts, and any other necessary files for core functionality. This filesystem is normally given to and used for production systems.
The final layer is named driveos-oobe-rfs and is an Out Of Box Experience for developers. It contains automotive specific samples, documentations, and developer friend tools. This filesystem is intended to be used by developers for developers.
A close up of a logo Description automatically generated
The itemized listing of Debian packages in DRIVE OS LINUX filesystems is available in an end-user friendly descriptive version within the filesystem path (depending on driveos-oobe-rfs or driveos-core-rfs) below:
/etc/nvidia/rootfilesystem-manifest/driveos-oobe-rfs.manifest
/etc/nvidia/rootfilesystem-manifest/driveos-core-rfs.manifest
Additionally, the filesystems also contain a listing of all installed packages (useful for NVIDIA Build-Kit) at (depending on driveos-oobe-rfs or driveos-core-rfs)::
/etc/nvidia/rootfilesystem-manifest/driveos-oobe-rfs.MANIFEST.json
/etc/nvidia/rootfilesystem-manifest/driveos-core-rfs.MANIFEST.json
The filesystem source code packaged in drive-*-linux-*oss-src.run is built using the Debian package name and version from the above *.MANIFEST.json files, followed by executing the following command for each package to obtain its source and archiving them:
$ apt-get source <package>=<package_version>
Finally, the filesystem comprises of overlay files added on top of Debian packages from different modules like drivers, libraries, tools, firmware, scripts, and samples. The set of modules is included in driveos-core-rfs and driveos-oobe-rfs. The itemized listing is available in the CopyTarget chapter.
NVIDIA Linux Filesystems
There are two files that can be downloaded for each particular filesystem but only one download is necessary. The default file to download is listed in the column "Which File to Download" of the table "Table of Filesystems" but an alternative file can be downloaded as well, and this alternative file is listed in the column "Alternative File to Download".
The alternative file is not mandatory but is specified in the table because the installation steps differ. For more information, see Installing the Filesystem from Debian.
Filesystem
Which File to Download
Purpose
Alternative File to Download
driveos-oobe-rfs
drive-t186ref-linux-<release>-<DRIVEOS_GCID>-driveos-oobe-rfs.run
Intended to be used by developers as a development or reference filesystem.
Contains NVIDIA automotive sample applications and corresponding documentations.
nvidia-driveos-<release>-driveos-oobe-rfs.deb
driveos-core-rfs
drive-t186ref-linux-<release>-<DRIVEOS_GCID>-driveos-core-rfs.run
Intended to be used by production systems.
Contains NVIDIA automotive drivers, libraries, tools, firmwares, scripts, and other required files for core functionality.
nvidia-driveos-<release>-driveos-core-rfs.deb
Where <DRIVEOS_GCID> is the GCID of NVIDIA DRIVE OS Linux.
Installation
To install a downloaded filesystem, refer to the relevant section corresponding to the type of file downloaded.
If you downloaded the file with an extension .run, see sub section Installing Filesystem from Runfile.
If you downloaded the file with an extension .deb, see sub section Installing Filesystem from Debian.
For each subsection, ensure you execute the installation commands in a BASH terminal.
For a comparison between .run and .deb, see Filesystem Installation Differences Between Runfile and Debian.
Installing the Filesystem from Runfile
Execute the runfile, and the installer will extract the filesystem into a directory at the relative location drive-t186ref-linux/targetfs/. You can then proceed to use or flash the filesystem to the target platform.
# Change directory to location of the downloaded DRIVE OS LINUX; your downloaded LINUX filesystem Runfile must be in this location as well; if not, ensure that it is.
# For our purpose, we will assume DRIVE OS LINUX was downloaded into ~/nvidia/driveos/.
nvidia@nvidia:~$ cd ~/nvidia/driveos/
nvidia@nvidia:~/nvidia/driveos$ bash drive-t186ref-linux-<release>-<DRIVEOS_GCID>-driveos-oobe-rfs.run
# Filesystem is installed into the relative directory drive-t186ref-linux/targetfs/.
nvidia@nvidia:~/nvidia/driveos$ ls -l drive-t186ref-linux/targetfs/
Where <DRIVEOS_GCID> is the GCID of NVIDIA DRIVE OS Linux.
Installing the Filesystem from Debian
Install the filesystem Debian using apt and answer the questions at each prompt. The Debian installs a filesystem image.
The Debian contains an installation script that requests additional information. In particular, you must indicate the location of DRIVE OS Linux.
Warning:
Installing filesystem from Debian updates the PCT files to point to the filesystem image instead of the filesystem directory. This action is non-reversible unless you change the PCT manually. Therefore, prior to installing the filesystem from Debian, ensure that DRIVE OS Linux installation can be updated. In the worst case scenario, uninstall DRIVE OS Linux and reinstall.
# Change directory to location of the downloaded LINUX filesystem Debian. For our purpose, we will assume the Debian was downloaded into ~/Downloads/ and DRIVE OS LINUX was installed at ~/nvidia/driveos/.
nvidia@nvidia:~$ cd ~/Downloads/
# Proceed to install the Debian and answer the questions at each prompt.
nvidia@nvidia:~/Downloads$ sudo apt install ./nvidia-driveos-<release>-<DRIVEOS_FILESYSTEM>.deb
Please specify location of installed DRIVE OS LINUX.
~/nvidia/driveos/
Installing image
Updating targetfs.img symlink
Where <DRIVEOS_FILESYSTEM> is the filesystem selected, which can be driveos-core-rfs or driveos-oobe-rfs.
Reinstalling the Filesystem from Debian
Rerun the dpkg reconfigure command to reinstall the filesystem to another DRIVE OS Linux location.
sudo dpkg-reconfigure nvidia-driveos-<release>-<DRIVEOS_FILESYSTEM>
Where <DRIVEOS_FILESYSTEM> is the filesystem selected, which can be driveos-core-rfs or driveos-oobe-rfs.
Uninstalling the Filesystem Image Debian
Open a BASH terminal and execute:
sudo apt-get purge nvidia-driveos-<release>-<DRIVEOS_FILESYSTEM>
Where <DRIVEOS_FILESYSTEM> is the filesystem selected, which can be driveos-core-rfs or driveos-oobe-rfs.
Debian Packages for TargetFS
This section describes how to replace copytarget scripts with Debian packages to standardize installation and updates.
Creation of Debian Packages
Debian packages are created during the regular build process. The current build process:
1. Top-build calls tmp and tmp-systemimage.
2. Top-build calls debianize-overlays.sh to create the five (5) target Debian packages:
nvidia-drive-os-firmware_<release>-0001.deb
nvidia-drive-os-libraries_<release>-0001.deb
nvidia-drive-os-tools_<release>-0001.deb
nvidia-drive-os-core_<release>-0001.deb
nvidia-drive-os_<release>-0001.deb
3. Top-build calls mkpkg.pl to package the target Debian package into nv-minimal-sdk.run.
nv-minimal-sdk.run contains the target Debian packages and is extracted to drive-t186ref-linux/target-images/debians/.
File Packages
nvidia-drive-os-firmware_<release>-0001.deb
Contains all firmwares necessary to install or update the target system
Contains the files which are installed by copytarget-firmware
Firmwares will be installed on the target under /lib/firmware
nvidia-drive-os-libraries_<release>-0001.deb
Contains all libraries necessary to install or update the target system
Contains the files which are installed by copytarget-libraries
Libraries will be installed on the target under
/lib
/usr/lib
/usr/share
/opt/NVidia
nvidia-drive-os-tools_<release>-0001.deb
Contains the tools that are installed or can be updated on the target system
Contains the files which are installed by copytarget-tools
Tools will be installed on the target under:
/usr/bin
/usr/local/bin
Master Packages
nvidia-drive-os-core_<release>-0001.deb
Contains no files
Contains dependencies to the packages in table: File packages
nvidia-drive-os_<release>-0001.deb
Contains no files
Contains dependencies to the packages in table: File packages and nvidia-drive-os-core_<release>-0001.deb
Installing the Debian Packages
1. Copy the Debian packages to the target system.
2. cd into the Debian packages’ directory.
3. Install each Debian package in this order:
sudo dpkg --install nvidia-drive-os-firmware_<release>-0001.deb
sudo dpkg --install nvidia-drive-os-tools_<release>-0001.deb
sudo dpkg --install nvidia-drive-os-libraries_<release>-0001.deb
sudo dpkg --install nvidia-drive-os-core_<release>-0001.deb
sudo dpkg --install nvidia-drive-os_<release>-0001.deb
Uninstalling the Debian Packages
Uninstall each Debian package in this order:
sudo dpkg --remove nvidia-drive-os
sudo dpkg --remove nvidia-drive-os-core
sudo dpkg --remove nvidia-drive-os-libraries
sudo dpkg --remove nvidia-drive-os-tools
sudo dpkg --remove nvidia-drive-os-firmware
Filesystem Differences Between Runfile and Debian
There are two methods to install the filesystem. One of the installation methods involves executing a runfile and the other installation method involves installing a Debian using apt. Of the two methods, installing the filesystem through its runfile is the default workflow and the Debian installation is an alternative, optional method.
There are more subtle differences. Installing the filesystem from a runfile extracts the filesystem into a directory that is located at drive-t186ref-lnux/targetfs/, relative to the DRIVE OS Linux installation directory. On the other hand, installing filesystem from Debian extracts the filesystem image in the DRIVE OS Linux installation directory at the relative location drive-t186ref-lnux/targetfs-images/ and a symlink is created at drive-t186ref-linux/targetfs.img.
The table compares the two installation methods.
 
Runfile
Debian
Is directory created; if so, where?
Yes, drive-t186ref-linux/targetfs/.
No.
Is image extracted; if so, where?
No.
Yes, drive-t186ref-linux/targetfs-images/<DRIVEOS_FILESYSTEM>.img.
Is symlink created; if so, where and what does it point to?
No.
Yes.
Created at drive-t186ref-linux/targetfs.img and points to drive-t186ref-linux/targetfs-images/<DRIVEOS_FILESYSTEM>.img.
Where <DRIVEOS_FILESYSTEM> is the filesystem selected, which can be driveos-core-rfs or driveos-oobe-rfs.
Filesystem Manifest
Each filesystem is accompanied by a Filesystem Manifest. The manifest is located with the filesystem at /opt/nvidia/driveos/<release>/filesystems/<DRIVEOS_FILESYSTEM>/<DRIVEOS_FILESYSTEM>.MANIFEST.json and can be used to identify the information defined in the NVIDIA DRIVE OS Build-Kit config for generating the filesystem. For more information, see NVIDIA Build-Kit documentation.
Prompts During Installation of Filesystem
During installation of filesystem, certain criteria may trigger one or more interactive prompts for you to confirm or specify additional information. When prompts are issued, you must answer in order to continue.
There are silent install variables that allow non-interactive installation. These silent install variables are specified in the respective tables of each installation method and an explanation to use them is provided. Silent install variables are set as environment variables and if exposed to the installers, are used.
Prompts During Installation of Filesystem from Runfile
Interactive Prompt
Default
Trigger
Instructions
Silent Install Variable Bypass Criteria
<DIRECTORY_PATH> folder not empty, do you wish to delete contents [Y/n]
Where <DIRECTORY_PATH> is the absolute directory path where the installer is attempting to install filesystem to.
y (yes)
This prompt will be presented to the user to confirm if the following condition is met unless the silent install variable criteria has been set with the appropriate value.
Destination directory <DIRECTORY_PATH> already exists but may or may not be empty.
 
This prompt is presented to prevent automated destruction of potential existing data.
_NV_NON_INTERACTIVE=yes
Prompts During Installation of Filesystem from Debian
Interactive Prompt
Acceptable Input
Default
Trigger
Instructions
Silent Install Variable Bypass Criteria
Please input NV_WORKSPACE path.
NV_WORKSPACE: Path where DRIVEOS SDK is installed
Valid Unix directory path, ensure input is terminated with a trailing slash.
-
This prompt will be presented to the user to confirm if the following condition is met unless the silent install variable criteria has been set with the appropriate value.
${NV_WORKSPACE} is not defined in the environment.
This prompt is required to be answered to indicate to Debian installation script the location to create filesystem image.
NV_WORKSPACE=<DIRECTORY_PATH>
Where <DIRECTORY_PATH> is the valid DRIVE OS LINUX installed directory; ensure this directory path ends with a slash "/".
"<FILEPATH>" already exists, do you wish to replace the img [y/N] ?
Where
<FILEPATH> is the absolute filepath where the installer is attempting to install filesystem image to.
"y" - yes
"n" - no
n (no)
This prompt will be presented to the user to confirm if the following condition is met unless the silent install variable criteria has been set with the appropriate value.
File <FILEPATH> already exists.
This prompt is presented to prevent automated destruction of potential existing data.
_NV_OVERWRITE_IMAGE=yes
Note: It is irrelevant whether ${NV_WORKSPACE} has been set or not because ${NV_WORKSPACE} will be set by prior prompt (above) if not already.
"<SYMLINK_PATH>" symlink already exists, and points to "<SYMLINK_POINTED_PATH>", Do you wish to continue to update the symlink to currently installing rootfs [y/N]?
Where:
<SYMLINK_PATH> is the absolute symlink path which the installer is attempting to update.
<SYMLINK_POINTED_PATH> is the location the existing symlink is pointing to currently.
 
"y" - yes
"n" - no
n (no)
This prompt will be presented to the user to confirm if the following conditions are met unless the silent install variable criteria has been set with the appropriate value.
Symlink <SYMLINK_PATH> already exists.
This prompt is presented to prevent automated destruction of potential existing data.
_NV_OVERWRITE_SYMLINK=yes
Filesystems Reference
Filesystem
Filesystem Built On Top Of
Runfile
Debian
Image Format and Name
Manifest Location
driveos-oobe-rfs
driveos-core-rfs
driveos-oobe-rfs.run
driveos-oobe-rfs.deb
ext4
driveos-oobe-rfs.img
/opt/nvidia/driveos/<release>/filesystems/driveos-oobe-rfs/driveos-oobe-rfs.MANIFEST.json
driveos-core-rfs
ubuntu-base-18.04.1-base-arm64.tar.gz
driveos-core-rfs.run
driveos-core-rfs.deb
ext4
driveos-core-rfs.img
/opt/nvidia/driveos/<release>/filesystems/driveos-core-rfs/driveos-core-rfs.MANIFEST.json