Rebuilding the Filesystem from ubuntu-base and Local Mirror

DRIVE OS Linux SDK provides the following additional target-specific components below. These components, along with build-fs and copytarget tools, can be used to rebuild the filesystem starting from the ubuntu-base tarball.
  1. Canonical ubuntu-base tarball: nv-driveos-linux-ubuntu-20.04-base-*_amd64.deb
  2. Canonical arm64 Debian packages: nv-driveos-linux-ubuntu-20.04-arm64-debians-*_amd64.deb
  3. NVIDIA CUDA arm64 Debian packages: cuda-repo-ubuntu2004-11-4-local*arm64.deb
  4. NVIDIA cuDNN arm64 Debian packages: cudnn-prune-87-repo-ubuntu2004-8-2-local*arm64.deb
  5. NVIDIA TensorRT arm64 Debian packages: nv-tensorrt-repo-ubuntu2004-cuda11.4-trt*arm64.deb
  6. NVIDIA Mellanox arm64 Debian packages: nv-driveos-linux-mlnx-docker-arm64-debians-*_amd64.deb
  7. NVIDIA Docker arm64 Debian packages: nv-driveos-linux-mlnx-docker-arm64-debians-*_amd64.deb
  8. NVIDIA DriveWorks arm64 Debian packages: List of Debian packages:
    1. driveworks-v*_drive-linux-*.deb
    2. driveworks_cgf-v*_drive-linux-*.deb
    3. driveworks_cgf_cross-v*_drive-linux-*.deb
    4. driveworks_cgf_samples-v*_drive-linux-*.deb
    5. driveworks_cross-v*_drive-linux-*.deb
    6. driveworks_data-v*_drive-linux-*.deb
    7. driveworks_samples-v*_drive-linux-*.deb
    8. driveworks_stm-v*_drive-linux-*.deb
    9. driveworks_stm_cross-v*_drive-linux-*.deb
    10. driveworks_stm_samples-v*_drive-linux-*.deb
The following steps are prerequisites and must be performed before executing the steps to rebuild the filesystem below:
  1. Ensure that DRIVE OS Linux SDK is installed as per the Getting Started page.
  2. Install the build-fs and Copytarget Debian packages to use these tools.
  3. Ensure the NV_WORKSPACE shell variable is set and points to the top directory where DRIVE OS Linux SDK is installed.
  4. Keep the DRIVE OS Linux SDK Debian packages in $NV_WORKSPACE and switch to the following directory:
    cd $NV_WORKSPACE

Steps to rebuild driveos-oobe-desktop-rfs filesystem from ubuntu-base

The rebuilding use case/example requires the use of a local mirror from the target-specific components above. Execute the steps below to set up the local mirror.
  1. Install the driveos-oobe-desktop-rfs SDK package to install its manifest file driveos-oobe-desktop*MANIFEST.json.
    $ sudo -E dpkg -i ./nv-driveos-linux-driveos-oobe-desktop-ubuntu-20.04-rfs-*_amd64.deb
  2. Install Canonical ubuntu-base and arm64 Debian SDK packages:
    $ sudo -E dpkg -i ./nv-driveos-linux-ubuntu-20.04-arm64-debians-<release>-<GCID>_<release>-<GCID>_amd64.deb ./nv-driveos-linux-ubuntu-20.04-base-<release>-<GCID>_<release>-<GCID>_amd64.deb
  3. Install NVIDIA Mellanox and Docker arm64 Debian packages:
    $ sudo -E dpkg -i ./nv-driveos-linux-mlnx-docker-arm64-debians--<release>-<GCID>_<release>-<GCID>_amd64.deb
  4. Copy the NVIDIA CUDA, cuDNN, TensorRT and DriveWorks arm64 Debian packages to $NV_WORKSPACE/drive-linux/filesystem/contents/debians/nvidia/.
  5. Import CUDA bits exported variables by sourcing versions using cmd below:
    $ source ${NVWORKSPACE}/drive-linux/filesystem/contents/debians/versions.conf
  6. Build the final filesystem starting from ubuntu-base:
    $ sudo -E /usr/bin/python3 -B /opt/nvidia/driveos/common/filesystems/build-fs/17/bin/build_fs.py -w ${NV_WORKSPACE}/ -i ${NV_WORKSPACE}/drive-linux/filesystem/targetfs-images/driveos-oobe-desktop-ubuntu-20.04-rfs.MANIFEST.json -o $PWD/output/
Note: To rebuild a filesystem other than driveos-oobe-desktop, provide the corresponding manifest as input instead of driveos-oobe-desktop-ubuntu-20.04-rfs.MANIFEST.json.

Similarly, to install any filesystem manifest, install the corresponding filesystem SDK package.