![]() | NVIDIA DRIVE OS 5.1 Linux SDK Developer Guide 5.1.12.0 Release |
Property | Value | Description | Example |
c["mb1-bct"] | JSON object | This contains a set of MB1-BCT cfg types for which properties need to be appended. | See below. |
c["mb1-bct"]["<cfg-type>"] | key: MB1-BCT type. value: JSON list. | List of sub-cfg filenames that need to be appended to the given MB1-BCT type. The type is selected by key, which can be one of the following strings: "misc" The following keys are NOT supported, but are listed here for future enhancements: "sdram" "wb0sdram" "scr" "pinmux" "pmic" "pmc" "misc" "prod" "gpioint" The value for this property is a JSON object with properties to be appended. | For MB1-BCT misc cfg: "misc": [...] |
c["mb1-bct"]["<cfg-type>"][i] | string | The value specifies the filename of sub-cfg. The contents of this sub-cfg is appended to MB1-BCT cfg (for the given type). There will not be any support for dirname associated with this value. In other words, the files must be in the same directory as platcfg. | Allowed: "DE.cfg" "myprops.cfg" Not allowed: "some/rel/path/file.cfg" "/some/abs/path/file.cfg" |
c["bootburn-flags"] | JSON object | Contains a set of bootburn flags for which override is provided. | See below. |
c["bootburn-flags"]["<flag>"] | key: Recognized flag for bootburn can be overridden. value: Recognized value for the given flag. | The key must be a string and is one of the valid bootburn flags: "-E" The remaining flags are NOT supported for overriding. This format will allow such extensions in the future. The value must be either a boolean or string, depending on the key: "-E" true (boolean) - This flag must be overridden to true. false (boolean) - This flag must be overridden to false. | For DRAM-ECC: "-E": true "-E": false |
Host-side Tool | Description |
tegrasign_v2 | Signs images such as boot loaders, firmware, kernel, RAMdisk, with a private key provided during flashing for flashing to a secure device and with 0-CMAC for non-secure device. |
tegrarcm_v2 | Communicates with the target when it is in recovery mode. It then sends the required binaries such as BCT, MB1, MB1_BCT, and RCM-Blob to the target for booting. It also reads the needed information, such as flashed BCT, from the target. |
tegrabct_v2 | Generates BCT files such as bct_BR.bct and bct_Mb1.bct, and populates them with the necessary data that is subsequently flashed on the target. |
nvimagegen | Generates the various images needed during flashing. The images are based on the configuration (CFG) file passed as an input argument. It appends headers, generic headers or boot headers, on top of the binaries, and signs them if required. nvimagegen then invokes tegrasign_v2 to sign the binaries with Zero Key Cipher-based MAC (CMAC) for a non-secure device or a private key for a secure device. It signs with the private key, provided from the command line, for a secure device. nvimagegen invokes the following compression tools that it expects to be present at the local directory: • tegrasign_v2 • mkfs_ext* • nvguestimagegen nvimagegen generates the FileToFlash.txt file which lists all the binary names after signing and offset on which binaries must be flashed on media. The FileToFlash.txt file is used by bootburn during flashing. nvimagegen can generate the following additional images, based on the supplied CFG file: • PT.bin—Partition table for the whole system. Quickboot interprets this table to gather information about partitions. • GPT_pri*.bin, GPT_bak*.bin—Standard GUID partition table (GPT) for media. • File system images—Supported versions are ext2, ext3, and ext4. Linux also supports Unsorted Block Images File System (UBIFS). • Kernel boot image—The generated kernel boot image is generated using compression type definition in the configuration file (CFG). The boot header and the generic header are appended at the top of the compressed kernel image. • DTB images—Different firmware have their own dtb files. nvimagegen appends the required headers on dtb files and signs it. It also amends the os_args command line present in the CFG file to the kernel dtb. • rcm_blob.bin—A blob of all the required images needed for RCM boot. |
nvskuinfo | Updates BCT information with metadata (SKUInfo) about the target board. SKUInfo includes: • SKU ID • SKU version • Board ID • Board revision • Board serial number • MAC ID Preserves the metadata stored in the BCT during flashing. It reads metadata from the previous BCT and updates it in the new BCT that is subsequently flashed. The metadata is record when the target board is initially flashed and is preserved during subsequent flashes. |
nvguestimagegen | Used in hypervisor flashing to generate images of each guest partition. • While parsing the CFG file, if nvimagegen finds a sub_config file specified, it invokes the internal nvguestimagegen tool passing the path of the sub_config_file and the partitionId arguments. • nvguestimagegen ensures that the partition_attribute field is NOT 0 for a given guest. This verification is required because subconfig-file can be specified in only one partition. • If the subconfig_file path is NOT an absolute path, it is assumed to be relative to the main global_storage.cfg configuration file |
compress_lzf | A light-weight Lempel-Ziv-Free compression tool for compressing the kernel image. |
compress_zlib | Compresses the kernel using Zlib compression. |
Jq-linux64 | JSON processor used for parsing JSON files. |
Target-side Tool | Description |
nvdd | Copies the binary to the specified device at the specified location. This tool supports char devices and block devices, including eMMC, SD card, and SATA. It also provides a read-back verification mechanism that you can use to verify that the file on the storage device is same as the file written to that device. |
e2fsck | Checks a Linux ext2/ext3/ext4 filesystem. |
losetup | Sets up and controls loop devices. |
dumpe2fs | Dumps ext2/ext3/ext4 filesystem information. |
diff | Compares files line by line. This tool is used in verification. |
resize2fs | Resizes ext2/ext3/ext4 filesystem. |
mkfs | Builds a Linux filesystem. |
Option | Description |
--device | Specifies the device where nvdd performs operations. |
--inputbin | Specifies the input file. |
--startoffset | Specifies the offset of the start of the partition. |
--partsize | Specifies the partition size. |
--outputbin | Specifies the output file containing the data read back from the partition. |
--deverase <partition> | Erases <partition>. |
--parterase | Erases the rest of the partition on the device after the file is written. |
--readback | Reads data just written back from the partition to a file for comparison with the original file for verification. Allows you to ensure that the file has been correctly written to the partition. |
--skiperase | Writes a file to a partition without first erasing the partition. |
--partunlock | Unlocks the partition before performing an erase or write operation. |
--nowrite | Verifies that the content present in the partition matches with the file, without writing the file. |
--md5sum | Verifies that the file has been correctly written to the partition. Similar to --readback, but computes the md5sum of the partition the file has been written to and compares that with the md5sum of the file provided by the user. |
--printmd5sum | Verifies that the file has been correctly written to the partition. Similar to --readback, but computes the md5sum of the partition the file has been written to and compares that with the md5sum of the file provided by the user. Also prints the md5sum of the partition. |
Bootburn Scripts and Files | |
Script | Description |
bootburn.sh | The starting point of flashing process, responsible for interacting with the user. |
bootburn_core.sh | Reads the flash command line and sets the flashing environment accordingly, for example, for simple flashing or parallel flashing. |
bootburn_active.sh | The main flashing script that sources other scripts for flashing. |
bootburn_lib.sh | Provides the function definitions. |
bootburn_adb.sh | Includes scripts that define functions necessary to communicate over ADB. Reads the FiletoFlash.txt during flashing, to flash the listed binaries. |
bootburn_helper.sh | Sets the board specific paths and files needed by bootburn.sh. |
quickboot_qspi_*.cfg | Depending on the OS and the target, one of the files is selected by bootburn. Consists of: • Final flash layout passed to nvimagegen to create images to be flashed. • FiletoFlash.txt that includes binary names and offset. |
Prebuilt Flashing Binaries | |
Directories | Description |
rcmfirmware | Prebuilt firmware used in flashing and includes: • bpmp.bin: boot and power management processor firmware • bpmp*.dtbs: device tree binaries. • tos.img: secure monitor firmware. |
rcmkernel | Prebuilt kernel image with dtb images. |
rcmbl | Boot loader images used during flash-boot and includes: • nvtboot_recovery.bin: second stage recovery boot loader MB2. • qb_cpu.bin: Quickboot CPU boot loader with its dtb appended. |
Warning: | After porting customized kernel code to another platform, failure to update the image, before flashing, may result in a bricked device. |