NVIDIA Tegra
NVIDIA Tegra Linux Driver Package

Development Guide
28.3 Release


 
Setting Up Your File System
 
Sample Root File System
Setting Up the Root File System
L4T requires a root file system. You must create a Linux host system and copy it to your reference board.
Sample Root File System
L4T comes with a pre-built sample root file system created for the Jetson TX1 or TX2 developer kit. If you wish to create an Ubuntu sample root file system, see:
https://wiki.ubuntu.com/ARM/RootfsFromScratch
Disclaimer
The sample root file system is provided as a convenience. NVIDIA disclaims any obligations to provide support, including bug fixes and security updates, and provides no warranty for this software.
Customers are responsible for root file system selection and support.
Setting Up the Root File System
 
Step 1: Set Up the Root File System
Step 2: Copy the rootfs to the Device
Before booting the target board, configure the root file system (rootfs) to:
Set up the rootfs
Copy it to the rootfs on the device
Step 1: Set Up the Root File System
This procedure uses the sample file system provided by NVIDIA as the base. If you wish to use your own file system, set the LDK_ROOTFS_DIR environment variable to point to the location of your rootfs and skip the steps for setting the root file system.
To set up the rootfs
1. Download the following file to your home directory:
Tegra-Linux-Sample-Root-Filesystem_<release_type>.tbz2
This file contains the NVIDIA-provided sample root file system.
2. Extract the compressed file as follows:
Navigate to the rootfs directory of the extracted NVIDIA driver package.
$ cd <your_L4T_root>/Linux_for_Tegra/rootfs
Where <your_L4T_root> is your L4T root directory, which is assumed to be your home directory (~).
Extract the sample file system to the rootfs directory.
$ sudo tar -jxpf ../../Tegra-Linux-Sample-Root-Filesystem_<release_type>.tbz2
3. Run the apply_binaries.sh script to copy the NVIDIA user space libraries into the target file system.
$ cd ..
$ sudo ./apply_binaries.sh
4. If you are using a different rootfs, or if you have already configured your rootfs, apply the NVIDIA user space libraries by setting the LDK_ROOTFS_DIR environment variable to point to your rootfs. Then run the script, as shown above, to copy the binaries into your target file system.
If the apply_binaries.sh script installs the binaries correctly, the last message output from the script is “Success!”.
You have now completed setting up the root filesystem. Proceed to flash the rootfs onto the target Tegra device.
Step 2: Copy the rootfs to the Device
Use these procedures to copy the file system to the Tegra device.
1. Pick a device to place your rootfs.
If you are using the internal EMMC, skip ahead to Flashing and Booting the Target Device.
2. If you prefer to use an external storage device for the root filesystem, use the following procedure.
To copy the file system to an external storage device
1. Plug your rootfs device into the host system.
2. If your device is not formatted as Ext4, enter the following command to format it with an Ext4 file system:
$ sudo mkfs.ext4 /dev/sd<port><device_number>
Where:
<port> is the port to which your device is mounted.
<device_number> is the device number of the device attached to the port. You can use the dmesg command to determine the port.
3. If needed, mount your device with the following command:
$ sudo mount /dev/sdX1 <mntpoint>
Where <mntpoint> is the mount point on the host system for your rootfs device.
4. Copy the file system. If LDK_ROOTFS_DIR is set, execute these commands:
$ cd ${LDK_ROOTFS_DIR}
$ sudo cp -a * <mntpoint> && sync
5. If it is not set, copy the rootfs directory that is included in the release by executing the following commands:
$ cd <your_L4T_root>/Linux_for_Tegra/rootfs
$ sudo cp -a * <mntpoint> && sync
6. After copying the content to the external disk or device, unmount the disk and connect it to the target Tegra device.
Proceed to Flashing and Booting the Target Device.