NVIDIA Tegra
NVIDIA DRIVE OS 5.1 Linux

Developer Guide
5.1.0.2 Release


 
Flashing the Board
Note:
NVIDIA recommends flashing the board using the SDK Manager.
Use the Bootburn utility to flash the board with the boot loader, kernel, and file system.
Bootburn
 
Bootburn Command Usage
Bootburn Options
Kernel Parameter Combinations
Passing Additional Kernel Parameters
Updating the path for the targetfs
Bootburn is a shell script that:
Boots the device in the recovery-mode with RAMDisk.
Signs or generates the images on the host.
Transfers the images to target using ADB.
Flashes the boards.
Bootburn automatically resizes the root filesystem (rootfs) image on the target to optimize the available storage on the partition dedicated to it, either on eMMC or NOR.
Bootburn supports a host NFS share as the mount point for the target root filesystem. This provides a convenient way to copy files between the target and host for rapid development. In this case, the uncompressed target root filesystem directory on the host is leveraged directly by the target.
Bootburn relies on the Foundation layer to provide the flashing and boot loader functionality. Configure it with the CFG configuration file rather than using the Bootburn command-line parameters, because Bootburn supports limited command line options.
Bootburn Command Usage
Run the bootburn.sh script from a shell on your host Linux system by executing the command:
./bootburn.sh <options>
Bootburn Options
The supported options are as follows.
Options
Description
-a (lower case)
Use this option to flash native Android cfg.
-b <e3550a01-t186a | e3550a01-t186b | e3550a03-t186a | e3550a03-t186b | p2888-t194>
(lower-case b)
Provides the board name and revision.
e3550xxx-t194a : Xavier A
e3550xxx-t194b : Xavier B
e3550xxx-t194ia : IVI SKU Xavier A.
p2888-t194 : Xavier CVM
Where xxx is the board revision, which can be b01 or b03 based on the e3550 board revision. See Section 1.0 of the Release Notes for your release to confirm your board and revision information.
-c
(lower-case c)
Flashes ADSP firmware. Bootburn chooses the ADSP firmware to flash by default. Use this option to flash camera firmware instead.
-d <partition_name> <dtb_file>
(lower-case d)
Specifies the DTB file to flash and the target partition. The default file is defined in BoardSetFilePathsAndDefaultValues.
bpmp-fw-dtb and kernel-dtb may be specified simultaneously.
Note: This option is not intended to specify kernel-dtb in Hypervisor.
-e (lower case)
Specifies the target board for emulation. Valid emulation targets are: reilly, ohara-gfx, ohara-compute, drew-gfx, and drew-compute.
-f (lower case)
Failure analysis (FA) mode support.
-h
(lower-case h)
Provides guidance on the actions and options of bootburn.
-k quickboot_qspi_nor_linux[_initramfs].cfg
(lower-case k)
Specifies the configuration file for flashing.
-l
(lower-case l)
Flashes Linux images. (Deprecated, not supported on the Xavier platforms.)
-m (lower case)
Flashing mods. This option enables mods-specific overrides.
-o
(lower-case o)
Skips flashing of recovery partitions.
-p <key_file_path>
(lower-case p)
Signs the boot loader, secure OS (TOS), kernel and BCT binary, then flashes the device. <key_file_path> must be the full pathname of the key_file.
-q
(lower-case q)
Flashes QNX images.
-s
(lower-case s)
Skips flashing the file system.
Use the -s flag only when the target file system is already flashed.
-t <output_directory>
(lower-case t)
Specifies the output directory where images to be flashed onto the target are to be stored. The default directory is named _temp_dump, and is present in the flashing directory.
-u <partition_name1> <partition_name2> …
(lower-case u)
Updates the partition name(s) and does not write anything else. Partitions bct, mb1-bootloader (-r), and pt cannot be updated using this option.
A guest partition’s partition name includes a prefix that indicates the guest ID. For example, the kernel DTB partition of guest 1 is 1_kernel-dtb.
A guest partition’s partition name includes a prefix that indicates the guest ID. For example, the kernel DTB partition of guest 1 is 1_kernel-dtb.
To update a rebuilt kernel, use this option instead of the default bootburn command, which updates all the partitions of the boot medium (NOR):
1. Back up the original kernel binaries’ Image and zImage files.
2. Copy the updated Image and zImage files to the directory:
<top>/drive-t186ref-linux/kernel-rt_patches
3. Enter this command to update the partition:
Eg: Xavier A (x1) on B01 revision of e3550:
./bootburn.sh -b e3550b01-t194a -u kernel
Eg: Xavier B (x2) on B01 revision of e3550:
./bootburn.sh -b e3550b01-t194b -u kernel
4. To identify the partition name, consult the configuration file used for flashing.
-x
Specifies the communication port for AURIX to put Tegra in recoverymode automatically. If you are using the -x option during the AURIX setup, at the end during the AURIX reset of the flashing procedure there may be output messages of the form: "Killed sudo cat $l_Aurix > $p_FlashFiles/$l_AurixLogFile". These messages are not errors and should be ignored.
 
WARNING: If you are using minicom with the -o option, minicom does not initialize the port and therefore does NOT check or acquire the lock files for the communication port. If minicom is running in the background and you run bootburn with the -x option, bootburn acquires the lock BEFORE accessing the communication port. So when bootburn attempts to communicate with AURIX it fails.  If you quit minicom forcefully it may not fully stop the process and it will be lingering in the background.  When bootburn attempts to connect in this state it will acquire the port but the output will still be directed to the minicom running in the background.  Avoid using the -o option when using minicom.
-z <board_info>-
(lower-case z)
Provides the board information options, which include:
--skunum: Specifies the board SKU_Info, such as: 699-62382-0010-100. The label on your board provides the value to use. SKU_Info is mandatory for the -z option.
--setskuversion: Specifies AB. The label on your board provides the value to use. AB is mandatory for the -z option.
--setprodinfo: For example, 600-62379-0100-100 AB. This option is equivalent to --skunum and --setskuversion.
--setboardserial: Specifies the five-digit serial number.
--setmacid mac0 <0xaabbccddeeff>: Specifies a 6‑byte hexadecimal serial number. Make sure when using the --setmacid option to give every device a unique MAC ID.
The -z sub-options are enclosed in quotes, and must include --skunum and --setskuversion. The other sub-options are optional. If they are provided, they are stored on the target.
For example:
-z "--skunum 699-62382-0010-100 --setskuversion AB --setprodinfo 699-62382-0010-100 AB --setboardserial 00250 --setmacid mac0 0x00504b94df"
-B <boot_device>
(upper-case B)
Specifies the boot device, which must be either qspi or emmc. emmc is the default.
-C
(upper-case C)
Specifies use of debug binaries for the boot loader.
-D
(upper-case D)
Directs bootburn debug output to stdout along with the tool’s regular output. If -D is not specified, debug output goes to a temporary file.
-E
(upper-case E)
Enables DRAM ECC.
-G
(upper-case G)
Flashes Integrity images.
-H
(upper-case H)
Flash Hypervisor.
-I <bus_id> <device_id>
(upper-case I)
Flashes a specific Tegra device when multiple devices are in recovery.
To get the bus and device ID of each Tegra device in recovery, enter the lsusb command on the host. For example, if lsusb gives the following output:
Bus 003 Device 105: ID 0955:7018 NVidia Corp.
Bus 003 Device 104: ID 0955:7018 NVidia Corp.
Then flash the second Tegra device with the -I option as in this example:
-I 003 104
-L
(upper-case L)
Enables low power modes. This option requires that the spe-fw and WB0 firmware packages be included in the bootburn configuration because low-power modes require them.
-M
(upper-case M)
Specifies development version firmware.
-R
(upper-case R)
Specifies RCM boot support, where the device boots without being flashed. When the target is in recovery mode, this option causes the flashing script to download all binaries, other than BCT, from the host. The target then reads the BCT from storage and other binaries from RAM. It boots the kernel directly on RAM.
This option is much faster than when flashing also occurs. It is especially useful during debugging.
 
Use the -R flag to initiate RCMBOOT with any of the commands mentioned in this table.
-S
(upper case S)
Skips confirmation prompts from bootburn, as if “y” is selected for each prompt.
-T
(upper-case T)
Enables tracing. Tracing logs are stored under the bootburn directory as log_trace*.txt.
-U
Pass in the UFS provision configuration file.
-V
(upper case V)
Specifies read-back verification, where the binary images are read back (after writing) from the target’s storage and compared with the original binary images. The two sets of images are compared to detect discrepancies.
-X
(upper case X)
Enable Golden Register Address:Value Dump into GR memory carveout.
Kernel Parameter Combinations
Possible combinations of kernel parameters nfsdev, ip, and nfsroot are as follows. An error indicates that the initramfs shell is started.
nfsdev
ip
nfsroot
Result
(not set)
(not set)
(not set)
no network; root must be set in some other way
(not set)
(not set)
set
error; needs IP configuration
(not set)
set
(not set)
error; no root path to mount
(not set)
set
set
valid combination
set
(not set)
(not set)
valid combination; DHCP request is sent
set
(not set)
set
error; needs IP configuration
set
set
(not set)
error; no root path to mount
set
set
set
valid combination; no DHCP requests
Passing Additional Kernel Parameters
To pass additional kernel parameters, modify the os_args parameter of the kernel-dtb and kernel-dtb-r partitions in this file.
drive-t186ref-foundation/virtualization/pct/<platform>/linux/linux_storage_qspi.cfg
Where <platform> is:
e3550xxxb01-t194a for Xavier A (x1)
e3550xxx-t194b for Xavier B (x2)
e3550xxx-t194ia for IVI SKU Xavier A(x1)
p2888-t194 for Xavier CVM
xxx in the above platform name should be replaced with b01 or b03 based on the revision of e3550 board used.
To bind:
cd <top>/drive-t186ref-foundation
make -f Makefile.bind PCT=linux BOARD=<platform>
To flash all images for Linux:
cd <top>/drive-t186ref-foundation/tools/host/flashtools/bootburn_t19x
./bootburn.sh -b <platform> -B qspi
To flash kernel-dtb only:
cd <top>/drive-t186ref-foundation/tools/host/flashtools/bootburn_t19x
./bootburn.sh -b <platform> -u 1_kernel-dtb -B qspi
Updating the path for the targetfs
To update the path for the targetfs, modify the dirname parameter of the filesystem partition in:
drive-t186ref-foundation/tools/host/flashtools/bootburn_t19x/quickboot_qspi_nor_linux[_initramfs].cfg
This step applies to the configuration file used for qspi boot, that is, modify dirname in the file that does not have _initramfs in its filename.
Flashing Automotive Yocto Linux built from nv-git-07 sync
Bootburn, by default, does not pick up Yocto-built quickboot, kernel, etc. for flashing due to known limitations. The following steps update the Yocto-built images back to the release so that bootburn picks it up for flashing.
Install and extract the prerequisite PDK packages
On build host, navigate to the following location:
$ cd <top>/pdk/release-bins
Install the following .run files :
$./drive-t186ref-foundation-<branch>-<GCID>-toolchain.run
 
Note:
Installation of this .run file from the packaged PDK release must be done on the build host, even when the Yocto builds are done on the release tree synced from nv-git-07.
Copy Yocto-built images to the release-binary folders
Change to the Yocto deploy directory:
$ cd <top>/yocto/build/tmp/deploy/images/${MACHINE}
Copy quickboot and quickboot-DTBs to the release:
$ cp qb/* <top>/pdk/release-bins/drive-t186ref-foundation/bootloader
Copy linux-DTBs to the release:
$ cp *.dtb <top>/pdk/release-bins/drive-t186ref-linux/kernel
Copy kernel image to the release:
$ cp *Image* <top>/pdk/release-bins/drive-t186ref-linux/kernel-rt_patches
Copy initramfs to the release:
$ cp tegra-initramfs-boot-*.cpio <top>/pdk/release-bins/drive-t186ref-linux/kernel/yocto-tegra-initramfs-rootfs.img
Backup ubuntu targetfs and extract genivi rootfs in its place:
$ tar -C <top>/pdk/release-bins/drive-t186ref-linux/targetfs -xf tegra-genivi-12-image-tegra-$MACHINE.tar.gz
Copy the built EBRFS to the PDK:
$ cp tegra-early-boot-rootfs-*.cpio <top>/pdk/release-bins/drive-t186ref-linux/kernel
 
Install Aurix Firmware in the rootfs
Install the following .run file :
./drive-t186ref-linux-<branch>-<GCID>-tegra2aurix_updater.run
Set up Foundation infrastructure
Set up the git environment:
$ cd <top>/pdk/release-bins
$ export NV_GIT_TOP=$PWD
Change <PDK_TOP> and <TARGET_BOARD> in .cfg files:
$ cd <top>/pdk/release-bins
$ find ./drive-t186ref-foundation -name "*.cfg" -exec sed -i -e "s,=<PDK_TOP>,=$PWD,g" {} \;
$ find ./drive-t186ref-foundation/tools/host/flashtools/ -name "*.cfg" -exec sed -i -e "s,<TARGET_BOARD>,t186ref,g" {} \;
Export CROSS_COMPILE variable:
$ cd <top>/pdk/release-bins/drive-t186ref-foundation
 
$ export CROSS_COMPILE=<top>/pdk/release-bins/toolchains/tegra-4.9-nv/usr/bin/aarch64-gnu-linux/aarch64-gnu-linux-
 
$ touch .cross_compile
 
Bind and flash the genivi rootfs
Execute the following commands to bind and flash genivi rootfs:
$ make -f Makefile.bind PCT=linux-ebp BOARD=<board_id>
 
$ cd <top>/pdk/release-bins/drive-t186ref-foundation/tools/host/flashtools/bootburn
 
$ ./bootburn.sh -b <board_id> -B qspi
 
Where <board_id> is:
e3550xxx-t194a for Xavier A
e3550xxx-t194b for Xavier B
e3550xxxt194ia for IVI SKU Xavier A
p2888-t194 for Xavier CVM
Replace xxx above with b01 or b03 based on the revision of e3550 board used.
Flashing Using the AURIX Console
Use this procedure to flash the platform using the AURIX serial console to interface with the Infineon AURIX 32-bit TriCore microcontroller.
Note:
Prior ADB configurations (such as ADB server running, ADB aliases with paths) may interfere with the Bootburn shell and cause it to fail with USB errors. Running bootburn.sh with bash -x reveals these issues.
Prerequisites
Manually installed Foundation and Linux SDK releases.
After you have successfully installed the software, the following directories are created:
<top>/toolchains
<top>/drive-t186ref-foundation
<top>/drive-t186ref-linux
You have set up your platform.
You have placed the device in recovery mode.
You have configured the port and baud rate of a serial controller, such as Minicom.
To flash the platform with a new image
1. Connect the USB A cable to the platform:
If no other USB/Serial adapters are connected to the host, the ttyUSB port are as follows:
AURIX UART: /dev/ttyUSB3
Tegra A UART: /dev/ttyUSB2
Tegra B UART: /dev/ttyUSB6
If other USB serial adapters are already in use, the host takes relative numbering.
2. Use the AURIX serial console to put the board into Recovery mode for flashing.
3. On the host system, verify that Tegra is in recovery mode using the following lsusb command to display the NVIDIA device.
lsusb | grep -i nvidia
Bus 001 Device 006: ID 0955:7721 Nvidia Corp
4. Flash your board using one of the following commands:
Xavier A (x1):
./bootburn.sh -b e3550xxx-t194a -B qspi
Xavier B (x2):
./bootburn.sh -b e3550xxx-t194b -B qspi
IVI SKU Xavier A (x1):
./bootburn.sh -b e3550xxx-t194ia -B qspi
Replace xxx in the board ID with b01 or b03 based on the e3550 board revision used.
Note:
This command flashes Linux with Hypervisor on QSPI-NOR flash and file system on eMMC. To mount the rootfs over NFS, it is also possible to flash the kernel and not the filesystem.
If you use additional options, the -b option must be the first argument.
5. Once flashing is complete, exit recovery mode and reboot the board from the AURIX console as follows.
tegrarecovery <device> off
poweroff
Where <device> is x1 or x2.
6. Wait a few seconds then power on the board from the AURIX console.
poweron
7. Verify that the recovery switch is in the normal boot position.
8. Ensure that the Tegra device that is not being flashed is not running processes that cannot be interrupted before rebooting.
To boot after flashing
1. Upon first boot after flashing, run the drive-setup.sh script from a terminal window on the target to set up the necessary packages.
sudo /<root>/drive-setup.sh install-run-once-pkgs
2. Once the run-once installation is completed, reboot DRIVE™ Development Platform from the Tegra UART serial console.
sudo reboot
After the reboot, the desktop displays the welcome page.
Note:
If multiple monitors are connected, you can use the xfce display setting to configure the screen settings and layout.
If a login is required, the default password for the account is nvidia.
Run startx& in the Tegra console if no xfce desktop is displayed.