NVIDIA Xavier - JetPack 5.0.2 - Flashing Board

From RidgeRun Developer Wiki
Revision as of 19:28, 7 December 2018 by Spalli (talk | contribs)




Previous: JetPack 4.1‎/Compiling Code/Bootloader Index Next: JetPack 4.1/Flashing Board/Flash Filesystem





Nvidia provides several scripts to help to generate the images and to flash the resulting images. Including if you are going to install uboot or fastboot. The main script to flash it is $JETPACK_DIR/Xavier/Linux_for_Tegra/flash.sh. What this script will do is to install or flash the image in the desired destination. The script is controlled by variables defined in the DTB file.


Boot Sequence

According to the U-boot guide provided by Nvidia uboot scans booteable devices as follows:

  • External SD Card
  • USB Device
  • Internal eMMC
  • NFS Device

Setting Board in Recovery Mode

To put the board into force USB Recovery Mode follow these instructions:

1. Power down the device. If connected, remove the AC adapter from the device. The device must be powered OFF, and not in a suspend or sleep state.
2. Connect the Type-C plug on the USB cable to the Recovery (USB Type-C) Port on the device and the other end to an available USB port on the host PC.
3. Connect the power adapter to the device.
4. Press and release the POWER button to power on device.
5. Press and hold the FORCE RECOVERY button: while pressing the FORCE RECOVERY button, press and release the RESET button; wait two seconds and release the FORCE RECOVERY button.
6. When the device is in recovery mode, lsusb command on host will list a line of "NVidia Corp"

All examples assume that the board is in recovery mode.

Flash Script Options

# Examples:
# ./flash.sh <target_board> mmcblk0p1                   - boot <target_board> from eMMC
# ./flash.sh <target_board> mmcblk1p1                   - boot <target_board> from SDCARD
# ./flash.sh <target_board> sda1                        - boot <target_board> from USB device
# ./flash.sh -N <IPaddr>:/nfsroot <target_board> eth0   - boot <target_board> from NFS
# ./flash.sh -k LNX <target_board> mmcblk1p1            - update <target_board> kernel
# ./flash.sh -k EBT <target_board> mmcblk1p1            - update <target_board> bootloader
#
# Optional Environment Variables:
# BCTFILE ---------------- Boot control table configuration file to be used.
# BOARDID ---------------- Pass boardid to override EEPROM value
# BOOTLOADER ------------- Bootloader binary to be flashed
# BOOTPARTLIMIT ---------- GPT data limit. (== Max BCT size + PPT size)
# BOOTPARTSIZE ----------- Total eMMC HW boot partition size.
# CFGFILE ---------------- Partition table configuration file to be used.
# CMDLINE ---------------- Target cmdline. See help for more information.
# DEVSECTSIZE ------------ Device Sector size. (default = 512Byte).
# DTBFILE ---------------- Device Tree file to be used.
# EMMCSIZE --------------- Size of target device eMMC (boot0+boot1+user).
# FLASHAPP --------------- Flash application running in host machine.
# FLASHER ---------------- Flash server running in target machine.
# IGNOREFASTBOOTCMDLINE -- Block fastboot from filling unspecified kernel
#                          cmdline parameters with its defaults.
# INITRD ----------------- Initrd image file to be flashed.
# KERNEL_IMAGE ----------- Linux kernel zImage file to be flashed.
# MTS -------------------- MTS file name such as mts_si.
# MTSPREBOOT ------------- MTS preboot file name such as mts_preboot_si.
# NFSARGS ---------------- Static Network assignments.
#			   <C-ipa>:<S-ipa>:<G-ipa>:<netmask>
# NFSROOT ---------------- NFSROOT i.e. <my IP addr>:/exported/rootfs_dir.
# ODMDATA ---------------- Odmdata to be used.
# ROOTFSSIZE ------------- Linux RootFS size (internal emmc/nand only).
# ROOTFS_DIR ------------- Linux RootFS directory name.
# SCEFILE ---------------- SCE firmware file such as camera-rtcpu-sce.bin.
# SPEFILE ---------------- SPE firmware file path such as bootloader/spe.bin.
# FAB -------------------- Target board's FAB ID.
# TEGRABOOT -------------- lowerlayer bootloader such as nvtboot.bin.
# WB0BOOT ---------------- Warmboot code such as nvtbootwb0.bin



Previous: JetPack 4.1‎/Compiling Code/Bootloader Index Next: JetPack 4.1/Flashing Board/Flash Filesystem