How to Rebuild the Linux SDK filesystem without any Modifications using Filesystem Tool Build-FS

This example will go over the steps to rebuild the Linux SDK filesystem using the filesystem tool Build-FS. At the completion of this example, you will have recreated the Linux filesystem without any modifications, have flashed your recreated Linux filesystem image onto the platform, and have booted up the target platform with your recreated Linux filesystem.
  1. Run the build-fs tool using the command-line below to create a filesystem without any changes. The created filesystem shall be at path ${NV_WORKSPACE}/drive-linux/filesystem/targetfs-images/nvidia-driveos-build-fs-user-rfs.img because of the output name specified in /opt/nvidia/driveos/common/filesystems/build-fs/17/configs/driveos-user-rfs.CONFIG.json. Copy the rebuilt filesystem to replace the starting filesystem at ${NV_WORKSPACE}/drive-linux/filesystem/targetfs-images/targetfs.img.
    $ sudo -E /usr/bin/python3 -B /opt/nvidia/driveos/common/filesystems/build-fs/17/bin/build_fs.py -w ${NV_WORKSPACE}/ -i /opt/nvidia/driveos/common/filesystems/build-fs/17/configs/driveos-user-rfs.CONFIG.JSON -o ${NV_WORKSPACE}/drive-linux/filesystem/targetfs-images/
    $ sudo ln -sf ${NV_WORKSPACE}/drive-linux/filesystem/targetfs-images/driveos-user-rfs.img ${NV_WORKSPACE}/drive-linux/filesystem/targetfs-images/targetfs.img
  2. The DRIVE OS flashing tool bootburn.py PCT picks up filesystem by default at path ${NV_WORKSPACE}/drive-linux/filesystem/targetfs-images/targetfs.img.
  3. Use bootburn.py to flash the filesystem.
  4. Reboot the target.
  5. The target should have rebooted with your recreated LINUX filesystem.
After step 5, the target boots the system and reaches the command prompt as shown below:
tegra-ubuntu login:
Enter the <username>/<password> corresponding to the user account(s) created during the initial setup of the DRIVE platform.
tegra-ubuntu login: <username>
password: <password>
After successful login, the console welcome prompt is seen:
<username>@tegra-ubuntu:~$