Generating Flashing Binaries Offline

Use the create_bsp_images.sh script to generate flashing binaries offline when the target is not connected to the host using create_bsp tools. Flashing binaries are pre-processed binaries used by the update_sample update tool.
The create_bsp tool create_bsp_images.sh requires bootburn_lib.sh and bootburn helper files for execution. The script uses default paths as in bootburn for the target. Depending on the configuration file, it processes raw binaries for flashing; including adding and signing headers. The create_bsp_images.sh image invokes tools such as nvimagegen, nvtegrabct_v2 internally, similar to bootburn.sh, to process binaries.
The create_bsp_images.sh script is available at:
<top>/drive-t186ref-foundation/tools/host/flashtools/bootburn
Prerequisites
To enable bootburn tracing support, execute the command:
sudo apt-get install -f lockfile-progs

Command Line Options

The command-line options are as follows.
Options
Description
-A
Specifies text file containing SKUInfo arguments similar to arguments for the -z option.
-B <boot_device>
Specify the boot-device. Supported boot devices are qspi and emmc. Default is qspi.
-C
Selects debug binaries for boot loaders.
-D
Enables debug prints from flashing script.
-E
Specifies ECC-enabled binaries.
-L
Enables low-power state support.
-M
Specifies development version firmware for non-production board.
-X
Enables the golden register address. Value dumps into the GR memory carveout.
-Y
Specifies the dt-overlay odm-data parameter.
-b <board_name>
Specifies the board name:
e3550-b01-t194a for Xavier A on E3550 B01.
e3550-b03-t194b for Xavier B on E3550 B03.
p3479a01-t194 on P3479.A01 with Xavier-AD SKU.
p3479a04-t194 on P3479 A04 with Xavier-AD SKU.
p3479a04-t194ad125 on P3479 A04 with Xavier-AD 125 SKU.
p3479a01-t194s on p3479 A01 with Xavier-S SKU.
p3479a04-t194s on p3479 A04 with Xavier-S SKU.
-c
Selects a safety profile: SCE with safety firmware, or APE with camera.
-d <partition_name> <filename>
Specifies a DTB file.
The default file is defined in the BoardSetFilePathsAndDefaultValues function in bootburn_helper.sh.
bpmp-fw-dtb and kernel-dtb may be specified simultaneously.
Note: This option is not intended to specify kernel-dtb in Hypervisor.
-e <emulation_target>
Specifies the target board for emulation. Valid emulation targets are: reilly, ohara-gfx, ohara-compute, drew-gfx, and drew-compute.
-g
Generates binaries at the specified path. Does not flash.
-h
Provides guidance on options for the create_bsp_images tool.
-k
Specifies the absolute path of the configuration file to be used.
If used with Hypervisor, the configuration file must have been created from bind_partitions and be located in the hypervisor output directory.
The default value for DRIVE OS Linux: quickboot_qspi_linux.cfg
The default value for DRIVE OS QNX: Quickboot_qspi_qnx.cfg
-l
(Lower case l)
Creates Linux images.
-p <pkc_file>
Specifies RSA or ECDSA key file <pkc_file> for signing images.
-q
Creates QNX images.
-r
Specifies the chip revision. Supported values are:
• 01
• 02
This option must be used with the -b option.
The -r and -b options can be used in place of the -z option.
-s
(Lower case s)
Skips creating the file system.
-z <board_info>
(Lower-case z)
Updates SKUInfo and other-information.

Processed Binaries Directory Structure

The create_bsp tools take the -g argument to specify the output directory path where processed binaries are generated. After executing create_bsp tool, a per SKU-based directory is created under the output directory.
For example, if create_bsp is executed to create binaries for --skunum 699-62382-0010-100 --setskuversion AA with -g images, a sub-directory is created under the output directory, images in this case, with a name generated by appending the skunum and setskuversion.
$ ls images
699-62382-0010-100_AA
Under the sub-directory, three sets of binaries are generated as flash-images: rcm-boot and rcm-flash.
These binaries are required at different phases during flashing.
$ ls images/699-62382-0010-100_AA/
flash-images rcm-boot rcm-flash
The generated sub-directories are as follows:
Sub-directory
Description
flash-images
Contains processed binaries flashed on the target storage medium. Also contains FileToFlash.txt, a summary file that contains information about binary names to flash at offsets for the final target flash structure.
These binaries are used for the update tool update_sample.
rcm-boot
Contains the necessary binaries to boot the target without writing binaries to the medium.
rcm-flash
Contains binaries similar to rcm-boot for booting the Linux kernel on initramfs without writing binaries to the medium. These binaries are generated from a set of prebuilt binaries that are used for flashing.

Generating Binaries with an Argument File

The create_bsp tool can take an argument file that it can iterate to generate all sets of flashing binaries listed in the SKU argument file. This is the default mode in the create_bsp tool. Do NOT use this mode with the -z option. The argument file must contain the same set of string defining target skuInfo as used with the -z as shown in bootburn help.
This example demonstrates using the create_bsp tool with the -A option for a e3550-t194 target:
Example: Sample skuarguments file skuargs.txt
1. Add the following lines to skuargs.txt file:
--skunum 699-62382-0010-100 --setskuversion BB --setboardserial 1234 --setmacid eth0 0x00044b52f69b --setprodinfo 600-62382-0100-100 JJ
--skunum 699-62382-0010-100 --setskuversion AA --setboardserial 1234 --setmacid eth0 0x00044b52f69b --setprodinfo 600-62382-0100-100 JJ
2. Execute this command to create the images directory.
mkdir images
3. Run the script as follows:
./create_bsp_images.sh -A skuargs.txt -g ./images -b e3550b01-t194a -r <chip_revision>
Where <chip_revision> is the revision number for the platform. For example, 02.
The processed images are generated under the images directory.
There is one output directory for each entry.
The images are created using the default configuration file.
If a custom configuration file is selected using the -k option with the absolute path to the custom configuration file, it overrides the default configuration file.

Generating Binaries with Command Line SKUInfo

The create_bsp tool can take skuinfo from the -z command line option. Images are created based on the sku information provided on the command line. Alternatively, use the -r and -b options to provide the board and revision information.
Note:
Do NOT use -z option with -A option.
Example Usage
This example demonstrates using the create_bsp tool with the -z option for a e3550-t194 target:
$ mkdir images
$ ./create_bsp_images.sh -z "--skunum 699-62382-0010-100 --setskuversion BB --setboardserial 1234 --setmacid eth0 0x00044b52f69b --setprodinfo 600-62382-0100-100 JJ" -g images/ -b e3550b01-t194a
Processed images are generated under the images directory:
$ ls images
699-62382-0010-100_BB
The images are created using the default configuration (CFG) file.
To override the default configuration file with a custom configuration, use the -k option to specify the absolute path to the customized configuration file.