NVIDIA Tegra Tegra Linux Driver Package
Development Guide
27.1 Release

 
Mass Storage Partitions Configuration
 
Partition Configuration File
Default Partition Overview
NVIDIA® Linux® for Tegra® releases support formatting mass storage media into multiple partitions for storing data, such as the device OS image, boot loader image, device firmware, and boot loader splash screens.
Partition Configuration File
 
Root Element
Device Element
Partition Element
The partition configuration file describes the entire mass storage devices and partitions in devices. For Linux® for Tegra® releases the default partition configuration file directory is available at:
<top>/Linux_for_Tegra/<board name>/cfg
During the flashing procedure, flash.sh reads in the partition configuration file and converts variables into real numbers or names as specified in <device>.conf files or in option parameters and save it in bootloader/flash.xml file. Then the bootloader/tegraflash.py reads in bootloader/flash.xml file and performs actual flashing as specified by bootloader/flash.xml file.
The partition configuration file is composed of the following XML format elements:
Root element
Device elements
Partition elements
Root Element
There is only root element in a configuration file and it has following syntax:
<?xml version="1.0"?>
 
<!-- NVIDIA Tegra Partition Layout Version 1.0.0 -->
 
<partition_layout version="01.00.0000">
<!-- Device elements go here. -->
</partition>
Device Element
There are multiple device elements in the root element and it has following syntax:
<device type="<device type>" instance="<instance>">
<!-- Partition elements go here. -->
</device>
Device Attributes Table
The following table shows supported device attributes and their legal values.
Device Attributes
Values
Description
device type
 
 
sdmmc_boot
sdmmc_user
(Required) Specifies the type of mass storage device.
boot0 and boot1 linearly combined
EMMC user partition
instance
0-3
(Required) 3 is the default primary
Partition Element
There are multiple partition elements in a device element and it has following syntax:
<partition name="<name>" type="<type>" oem_sign=”true”>
<!-- partition properties go here -->
</partition>
Partition Attributes Table
The following table shows supported partition attributes and their legal values.
Partition Attributes
Values
Description
name
<name>such as:
BCT, APP, and mb1, or <keyword>
For a complete list, see default partition overview section below.
(Required) Specifies a name for the partition. This name is used when opening a partition for read/write access. The name can have a maximum of 36 characters. There are 3 kinds of partition names: mandatory, optional, and user defined. All mandatory and optional partition names should be associated with specific partition types for specific operations and all user specified partition names should be associated with partition type “data” for no specific action by bootloader.
type
<type> such as:
boot_config_table, wb0, and data, or <keyword>
For a complete list, see default partition overview section below.
(Required) Specifies the type of partition. Certain partition types are valid only when they are associated specific partition names. Detailed example is in default partition table section below.
oem_sign
True
 
 
False/Undefined
Append generic signature header to the binary and perform OEM signing on that.
Append NULL signature header to the binary and perform NULL signing on that.
Partition Properties Table
The following table shows supported partition properties and their legal values.
Partition Elements
Values
Description
allocation_policy
sequential
Specifies the type of allocation policy. Sequential partitions begin immediately after the preceding partition. (The legacy “absolute” allocation policy has been deprecated.)
filesystem_type
basic
The basic filesystem_type specifies “raw” partition. (The legacy “ext2” filesystem has been deprecated.)
size
<byte size>
Or <keyword>
(Required) Specifies the size of the partition in bytes. Decimal and hexadecimal values are valid. Size can be the exact file size being programmed in bytes. However, to minimize changes to your CFG file size increases over time, you can set the partition size in the CFG file greater than actual file size
 
If the partition size specified is less than an erase block size, it will align itself to the partition erase block boundary.
 
If a partition filesystem_type is enhanced file system and size is on a block boundary, then size should be specified to be one additional sector.
 
The size property of the secondary GPT partition, which is defined at the end of each device, should always be 0xffffffffffffffff and the actual size of the Secondary GPT partition is the size defined in the partition which immediately preceding the secondary GPT partition. The actual size of the partition immediately preceding secondary GPT is the size of remaining space left subtracted by the actual secondary GPT partition size.
file_system_attribute
-
Locks the file system. Not currently implemented.
allocation_attribute
0x8 or 0x808
The allocation attribute for all partitions must be 0x8. The partition immediately preceding secondary GPT should set this attribute to 0x808.
percent_reserved
-
Reserved for future use.
filename
<filename>
or <Keyword>
Specifies the name of the file to write into the partition.
Partition Property Keyword Table
The L4T releases adopted a <keyword> in the partition configuration file to abstract varying mandatory and optional partition names, types, and sizes. Upon detection of the <keyword> in the partition configuration file in bootloader/<device>/cfg, the flash.sh replaces <keyword> with sensible default value for the <device>. If a user replaces any of the <keyword> with a specific value, the value is honored by flash.sh and the partition is flashed as specified.
The following table shows supported partition property keywords and their legal values after translation into bootloader/flash.xml.
Partition Keywords
Default translated values in flash.xml
MB1NAME
mb1
MB1TYPE
mb1_bootloader
SPENAME
spe-fw
SPETYPE
spe_fw
MB2NAME
mb2
MB2TYPE
mb2_bootloader
MB2FILE
nvtboot.bin
MPBNAME
mts-preboot
MPBTYPE
mts_preboot
MPBFILE
preboot_d15_prod_cr.bin
APPSIZE
30064771072
APPFILE
system.img
MBPNAME
mts-bootpack
MBPTYPE
mts_bootpack
MBPFILE
mce_mts_d15_prod_cr.bin
TBCNAME
cpu-bootloader
TBCTYPE
bootloader
TBCFILE
cboot.bin
TBCDTB-NAME
bootloader-dtb
TBCDTB-FILE
Appropriate bootloader DTB file name
TOSNAME
secure-os
TOSFILE
tos.img
EKSFILE
eks.img
BPFNAME
bpmp-fw
BPFSIGN
true
BPFFILE
bpmp.bin
BPFDTB-NAME
Bpmp-fw-dtb
BPFDTB-SIGN
true
BPFDTB-FILE
Appropriate bpmp DTB file name
SCENAME
sce-fw
SCESIGN
true
SCEFILE
camera-rtcpu-sce.bin
SC7NAME
sc7
WB0TYPE
WB0
WB0FILE
warmboot.bin
FBNAME
FBNAME (Not used)
FBTYPE
data
FBSIGN
false
FBFILE
Removed/Unused
SOSFILE
Removed/Unused
LNXNAME
kernel
LNXSIZE
67108864
LNXFILE
boot.img
KERNELDTB-NAME
Kernel-dtb
KERNELDTB-FILE
Appropriate kernel DTB file name
Default Partition Overview
 
Example CFGs
The following table summarizes the usage for each partition in sdmmc_boot device:
Name
Type
Description
BCT
boot_config_table
(Mandatory) Contains the Boot Configuration Table.
mb1
mb1_bootloader
(Mandatory) Contains NVIDIA signed MB1 binary.
MB1_BCT
mb1_boot_config_table
(Mandatory) Contains the MB1 boot configuration table.
spe-fw
spe-fw
Contains the BPMP spe-fw binary.
mb2
mb2_bootloader
Contains the primary copy of the TegraBoot binary..
mts-preboot
mts_preboot
Contains Denver preboot firmware.
secondary_gpt
secondary_gpt
Contains the secondary GPT of sdmmc_boot device.
The following table summarizes the usage for each partition in sdmmc_user device:
Name
Type
Description
master_boot_record
protective_master_boot_record
(Mandatory) Contains protective MBR.
primary_gpt
primary_gpt
(Mandatory) Contains the primary GPT of sdmmc_user device. All partition defined after this entry will be configured in kernel and accessible by standard partition tools such as gdisk or parted.
APP
data
(Mandatory) Contains the RootFS. This partition must be defined after primary GPT, so that it can be accessed as fixed known special device /dev/mmcblk0p1.
mts-bootpack
Mts_bootpack
(Mandatory) Contains Denver boot pack firmware.
cpu-bootloader
bootloader
(Mandatory) Contains the final boot stage CPU bootloader binary that loads the binary in kernel partition.
bootloader-dtb
data
(Mandatory) Contains the bootloader device tree blob (DTB).
secure-os
data
(Mandatory) Contains the trusted OS.
eks
data
(Optional) Contains the encrypted keys.
adsp-fw
data
(Mandatory) Contains ADSP software.
bpmp-fw
data
(Mandatory) Contains BPMP firmware.
bpmp-fw-dtb
data
(Mandatory) Contains the BPMP firmware device tree blob (DTB).
sce-fw
data
(Optional) Contains camera-rtcpu-sce firmware.
sc7
WB0
(Mandatory) Contains warm boot binary.
FBNAME
data
(Optional) Reserved for future use. Removable.
BMP
data
(Optional) Contains BMP images (if any) for display during boot.
SOS
data
(Optional) Contains a partition used for recovery. Removable.
kernel
data
(Mandatory) Contains the U-Boot secondary bootloader by default. The U-Boot searches the root device and loads the Linux kernel from rootdev’s /boot directory. If the U-Boot is not selected during flashing, this partition contains the Linux kernel.
kernel-dtb
data
(Mandatory) Contains the kernel device tree blob (DTB).
CAC
data
(Optional) Reserved for future use. Removable.
UDA
data
(Optional) This partition, with the allocation attribute set to 0x808, automatically take all of remaining space of the device except secondary GPT space. This partition can be mounted and used to store user data.
secondary_gpt
secondary_gpt
(Mandatory) Contains the secondary GPT of sdmmc_user device.
Example CFGs
Following is example partition configuration file after flash.sh completes translations and substitutions:
<?xml version="1.0"?>
<!-- Nvidia Tegra Partition Layout Version 1.0.0 -->
<partition_layout version="01.00.0000">
<device type="sdmmc_boot" instance="3">
<partition name="BCT" type="boot_config_table">
<allocation_policy> sequential </allocation_policy>
<filesystem_type> basic </filesystem_type>
<size> 32768 </size>
<file_system_attribute> 0 </file_system_attribute>
<allocation_attribute> 8 </allocation_attribute>
<percent_reserved> 0 </percent_reserved>
</partition>
<partition name="mb1" type="mb1_bootloader">
<allocation_policy> sequential </allocation_policy>
<filesystem_type> basic </filesystem_type>
<size> 262144 </size>
<file_system_attribute> 0 </file_system_attribute>
<allocation_attribute> 8 </allocation_attribute>
<percent_reserved> 0 </percent_reserved>
<filename> mb1_dev.bin </filename>
</partition>
<partition name="MB1_BCT" type="mb1_boot_config_table">
<allocation_policy> sequential </allocation_policy>
<filesystem_type> basic </filesystem_type>
<size> 65536 </size>
<file_system_attribute> 0 </file_system_attribute>
<allocation_attribute> 8 </allocation_attribute>
<percent_reserved> 0 </percent_reserved>
</partition>
<partition name="spe-fw" type="spe_fw" oem_sign="true">
<allocation_policy> sequential </allocation_policy>
<filesystem_type> basic </filesystem_type>
<size> 131072 </size>
<file_system_attribute> 0 </file_system_attribute>
<allocation_attribute> 8 </allocation_attribute>
<percent_reserved> 0 </percent_reserved>
<filename> spe.bin </filename>
</partition>
<partition name="mb2" type="mb2_bootloader" oem_sign="true">
<allocation_policy> sequential </allocation_policy>
<filesystem_type> basic </filesystem_type>
<size> 262144 </size>
<file_system_attribute> 0 </file_system_attribute>
<allocation_attribute> 8 </allocation_attribute>
<percent_reserved> 0 </percent_reserved>
<filename> nvtboot.bin </filename>
</partition>
<partition name="mts-preboot" type="mts_preboot" oem_sign="true">
<allocation_policy> sequential </allocation_policy>
<filesystem_type> basic </filesystem_type>
<size> 262144 </size>
<file_system_attribute> 0 </file_system_attribute>
<allocation_attribute> 8 </allocation_attribute>
<percent_reserved> 0 </percent_reserved>
<filename> preboot_d15_dev_cr.bin </filename>
</partition>
<partition name="secondary_gpt" type="secondary_gpt">
<allocation_policy> sequential </allocation_policy>
<filesystem_type> basic </filesystem_type>
<size> 0xFFFFFFFFFFFFFFFF </size>
<file_system_attribute> 0 </file_system_attribute>
<allocation_attribute> 8 </allocation_attribute>
<percent_reserved> 0 </percent_reserved>
</partition>
</device>
 
<device type="sdmmc_user" instance="3">
<partition name="master_boot_record" type="protective_master_boot_record">
<allocation_policy> sequential </allocation_policy>
<filesystem_type> basic </filesystem_type>
<size> 512 </size>
<file_system_attribute> 0 </file_system_attribute>
<allocation_attribute> 8 </allocation_attribute>
<percent_reserved> 0 </percent_reserved>
</partition>
<partition name="primary_gpt" type="primary_gpt">
<allocation_policy> sequential </allocation_policy>
<filesystem_type> basic </filesystem_type>
<size> 2097152 </size>
<file_system_attribute> 0 </file_system_attribute>
<allocation_attribute> 8 </allocation_attribute>
<percent_reserved> 0 </percent_reserved>
</partition>
<partition name="APP" type="data">
<allocation_policy> sequential </allocation_policy>
<filesystem_type> basic </filesystem_type>
<size> 15032385536 </size>
<file_system_attribute> 0 </file_system_attribute>
<allocation_attribute> 0x8 </allocation_attribute>
<percent_reserved> 0 </percent_reserved>
<filename> system.img </filename>
</partition>
<partition name="mts-bootpack" type="mts_bootpack" oem_sign="true">
<allocation_policy> sequential </allocation_policy>
<filesystem_type> basic </filesystem_type>
<size> 4194304 </size>
<file_system_attribute> 0 </file_system_attribute>
<allocation_attribute> 8 </allocation_attribute>
<percent_reserved> 0 </percent_reserved>
<filename> mce_mts_d15_dev_cr.bin </filename>
</partition>
<partition name="cpu-bootloader" type="bootloader" oem_sign="true">
<allocation_policy> sequential </allocation_policy>
<filesystem_type> basic </filesystem_type>
<size> 262144 </size>
<file_system_attribute> 0 </file_system_attribute>
<allocation_attribute> 8 </allocation_attribute>
<percent_reserved> 0 </percent_reserved>
<filename> cboot.bin </filename>
</partition>
<partition name="bootloader-dtb" type="data" oem_sign="true">
<allocation_policy> sequential </allocation_policy>
<filesystem_type> basic </filesystem_type>
<size> 262144 </size>
<file_system_attribute> 0 </file_system_attribute>
<allocation_attribute> 8 </allocation_attribute>
<percent_reserved> 0 </percent_reserved>
<filename> tegra186-quill-p3310-1000-a00-00-base.dtb </filename>
</partition>
<partition name="secure-os" type="data" oem_sign="true">
<allocation_policy> sequential </allocation_policy>
<filesystem_type> basic </filesystem_type>
<size> 3145728 </size>
<file_system_attribute> 0 </file_system_attribute>
<allocation_attribute> 8 </allocation_attribute>
<percent_reserved> 0 </percent_reserved>
<filename> tos.img </filename>
</partition>
<partition name="eks" type="data" oem_sign="true">
<allocation_policy> sequential </allocation_policy>
<filesystem_type> basic </filesystem_type>
<size> 2048 </size>
<file_system_attribute> 0 </file_system_attribute>
<allocation_attribute> 8 </allocation_attribute>
<percent_reserved> 0 </percent_reserved>
<filename> eks.img </filename>
</partition>
 
<partition name="adsp-fw" type="data" oem_sign="true">
<allocation_policy> sequential </allocation_policy>
<filesystem_type> basic </filesystem_type>
<size> 4194304 </size>
<file_system_attribute> 0 </file_system_attribute>
<allocation_attribute> 8 </allocation_attribute>
<percent_reserved> 0 </percent_reserved>
</partition>
 
<partition name="bpmp-fw" type="data" oem_sign="true">
<allocation_policy> sequential </allocation_policy>
<filesystem_type> basic </filesystem_type>
<size> 618144 </size>
<file_system_attribute> 0 </file_system_attribute>
<allocation_attribute> 8 </allocation_attribute>
<percent_reserved> 0 </percent_reserved>
<filename> bpmp.bin </filename>
</partition>
<partition name="bpmp-fw-dtb" type="data" oem_sign="true">
<allocation_policy> sequential </allocation_policy>
<filesystem_type> basic </filesystem_type>
<size> 512000 </size>
<file_system_attribute> 0 </file_system_attribute>
<allocation_attribute> 8 </allocation_attribute>
<percent_reserved> 0 </percent_reserved>
<filename> tegra186-a02-bpmp-quill-p3310-1000-a00-00-te770d-ucm2.dtb </filename>
</partition>
<partition name="sce-fw" type="data" oem_sign="true">
<allocation_policy> sequential </allocation_policy>
<filesystem_type> basic </filesystem_type>
<size> 2097152 </size>
<file_system_attribute> 0 </file_system_attribute>
<allocation_attribute> 8 </allocation_attribute>
<percent_reserved> 0 </percent_reserved>
<filename> camera-rtcpu-sce.bin </filename>
</partition>
<partition name="sc7" type="WB0">
<allocation_policy> sequential </allocation_policy>
<filesystem_type> basic </filesystem_type>
<size> 6291456 </size>
<file_system_attribute> 0 </file_system_attribute>
<allocation_attribute> 8 </allocation_attribute>
<percent_reserved> 0 </percent_reserved>
<filename> warmboot_dev.bin </filename>
</partition>
<partition name="FBNAME" type="data" oem_sign="false">
<allocation_policy> sequential </allocation_policy>
<filesystem_type> basic </filesystem_type>
<size> 2097152 </size>
<file_system_attribute> 0 </file_system_attribute>
<allocation_attribute> 0x8 </allocation_attribute>
<percent_reserved> 0 </percent_reserved>
</partition>
<partition name="BMP" type="data">
<allocation_policy> sequential </allocation_policy>
<filesystem_type> basic </filesystem_type>
<size> 134217728 </size>
<file_system_attribute> 0 </file_system_attribute>
<allocation_attribute> 0x8 </allocation_attribute>
<percent_reserved> 0 </percent_reserved>
</partition>
<partition name="SOS" type="data">
<allocation_policy> sequential </allocation_policy>
<filesystem_type> basic </filesystem_type>
<size> 33554432 </size>
<file_system_attribute> 0 </file_system_attribute>
<allocation_attribute> 0x8 </allocation_attribute>
<percent_reserved> 0 </percent_reserved>
</partition>
<partition name="kernel" type="data">
<allocation_policy> sequential </allocation_policy>
<filesystem_type> basic </filesystem_type>
<size> 67108864 </size>
<file_system_attribute> 0 </file_system_attribute>
<allocation_attribute> 8 </allocation_attribute>
<percent_reserved> 0 </percent_reserved>
<filename> boot.img </filename>
</partition>
<partition name="kernel-dtb" type="data">
<allocation_policy> sequential </allocation_policy>
<filesystem_type> basic </filesystem_type>
<size> 262144 </size>
<file_system_attribute> 0 </file_system_attribute>
<allocation_attribute> 8 </allocation_attribute>
<percent_reserved> 0 </percent_reserved>
<filename> tegra186-quill-p3310-1000-a00-00-base.dtb </filename>
</partition>
<partition name="CAC" type="data">
<allocation_policy> sequential </allocation_policy>
<filesystem_type> basic </filesystem_type>
<size> 268435456 </size>
<file_system_attribute> 0 </file_system_attribute>
<allocation_attribute> 0x8 </allocation_attribute>
<percent_reserved> 0 </percent_reserved>
</partition>
<partition name="UDA" type="data">
<allocation_policy> sequential </allocation_policy>
<filesystem_type> basic </filesystem_type>
<size> 18432 </size>
<file_system_attribute> 0 </file_system_attribute>
<allocation_attribute> 0x808 </allocation_attribute>
<percent_reserved> 0 </percent_reserved>
</partition>
<partition name="secondary_gpt" type="secondary_gpt">
<allocation_policy> sequential </allocation_policy>
<filesystem_type> basic </filesystem_type>
<size> 0xFFFFFFFFFFFFFFFF </size>
<file_system_attribute> 0 </file_system_attribute>
<allocation_attribute> 8 </allocation_attribute>
<percent_reserved> 0 </percent_reserved>
</partition>
</device>
</partition_layout>