Flashing Preprocessed Binaries

Note:
The bash scripts is currently planned to be deprecated and removed in 5.2.
 
Note:
The command line syntax for all Bash and Python scripts are the same, except for the extensions. For example, flash_bsp_images.sh and flash_bsp_images.py.
This topic describes how to flash prebuilt binaries that create_bsp_images.sh generated. Such binaries are generated offline, when the target is disconnected from the host.
The flash BSP tool, flash_bsp_image.sh, calls the following scripts:
bootburn_lib.sh
bootburn_adb.sh
bootburn_helper.sh
Flash BSP flashes binaries that are generated offline by create_bsp_tool.sh.
Flash BSP uses the following tools:
tegrarcm_v2
adb
nvdd
nvskuinfo
flash_bsp_images.sh is at:
<top>/drive-t186ref-foundation/tools/host/flashtools/bootburn_t19x/
flash_bsp_images.py is at:
<top>/drive-t186ref-foundation/tools/host/flashtools/bootburn_t19x_py/

Usage

The options flash_bsp_images.sh supports are as follows.
Option
Description
-D
Enables debug messages from the Flashing script.
-I <bus_id> <device_id>
Flashes a specific Xavier when multiple devices are in recovery.
Obtain the bus and device ID information of each NVIDIA device in recovery by executing the lsusb command on the host.
For example, if the lsusb command 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 NVIDIA device with the -I option as in the following example:
-I 003 104
-P <path>
Specifies a directory from which flash_bsp_images.sh picks prebuild binaries. The script does not generate the binaries.
-R
Specifies RCM support. Boots without Flashing Software(BCT is used from Media). Default flash-boot
-V <path>
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.
-b <board_and_rev>
Specifies the board name. The default value is e3550 t194.
-h
Provides guidance on the flash_bsp_images tool options.
Note: flash_bsp_images.sh supports only the options described in this table, which are a subset of the options listed by this -h option. (This -h option lists all options supported by bootburn_lib.sh.)
-o
Skips flashing of recovery partitions.
-z <board_info>
Updates and flashes SKUInfo and other-info.
--asymmetric
Flag to specify asymmetric boot chain flashing.
--customer-data
Specified customer data such as skuinfo and others to be updated during flashing.
See Updating Customer Data into BCT for information on how to use it.

Directory Structure of Preprocessed Binaries

The Flash BSP tools -P argument specifies the output directory path with the processed binaries.
The examples in this topic assume all images are in the images directory
For flashing, Flash BSP obtains the prebuilt images to flash from:
./images/<SKUInfo>-<SKUVersion>
For example:
$ ls images
 
The following subdirectories are present in the images/<SKUInfo> directory:
flash-images
rcm-boot
rcm-flash
For example:
$ ls images/699-63550-0001-300_GD/
flash-images rcm-boot rcm-flash
These directories contain different binaries that are used at different phases in flashing.
To flash the prebuilt binaries
1. Connect the target to host PC and put target in recovery.
2. Flash the binaries to the target. For example:
./flash_bsp_images.sh -P images/699-63550-0001-500_AB -b e3550b03-t194a
Because this command omits the -z option, the Flash BSP tool reads SKUInfo from the target and preserves it in the BCT.

Flashing the Prebuilt Binaries

To flash the prebuilt binaries
3. Connect the target to host PC and put target in recovery.
4. Flash the binaries to the target.
For example, the following commands can be used to flash Xavier A and Xavier B, respectively:
./flash_bsp_images.sh -P images/699-63550-0001-500_AB -b e3550b03-t194a
./flash_bsp_images.sh -P images/699-63550-0001-500_AB -b e3550b03-t194b
Because this command omits the -z option, the Flash BSP tool reads SKUInfo from the target and preserves it in the BCT.

Flashing SKUInfo

The subdirectory name under the output directory, images in this example, is very important because it contains SKUInfo. Flash BSP parses SKUInfo to obtain platform detail.
Flash BSP tools also accepts the -z option with arguments to fill SKUInfo in BR-BCT file. The same BR_BCT file (with SKUInfo passed with -z ) is updated to target.
To flash SKUInfo and the prebuilt binaries
1. Connect the target to host PC and put target in recovery.
2. Flash the binaries to the target. For example:
$ ./flash_bsp_images.sh -P images/699-63550-0001-500_AB -b e3550b03-t194a -z "--skunum 699-63550-0001-500 --setskuversion AB --setboardserial 01234 --setprodinfo 699-63550-0001-500 AB --setmacid mac0 0x000ba4eba5"
 
Note:
The original copy of BCT SKUInfo is modified after flash_bsp.sh executes.

Flashing Asymmetric Boot Chain Images

The asymmetric images generated by generate_asymmetric_boot_chains.py can be flashed using the following command:
./flash_bsp_images.sh -b <board_name> -P <output_path> --asymmetric
Where <output_path> is the path to the directory where images for asymmetric boot chains are generated and <board_name> is the target board name. For example:
./flash_bsp_images.sh -b e3550b03-t194a -P asymmetric_images/699-63550-0001-300_GD –asymmetric

Flashing SKUInfo and Other Customer Data

Customer data, such as skuinfo and others, can be updated using the --customer-data option to flash_bsp_images.sh when flashing.
See Updating Customer Data into BCT for details on how to use the --customer-data option.

Flashing Flow

The flashing flow of flash BSP is similar to the bootburn flow except that flash BSP does not generate binaries.