The ConnectCore 6UL uses a NAND flash as main storage media.
The flash is divided into logical partitions per the U-Boot variable mtdparts
, which contains a string in the format described by the Linux kernel parameters in drivers/mtd/parsers/cmdlinepart.c
.
Partitioning strategies
Digi reserves one MTD partition for each piece of the system such as the bootloader, kernel, and root file system. The Linux system partitions then have a UBI volume (named after the MTD partition) to hold a UBIFS file system. This strategy, which is the default for the ConnectCore 6UL, has the disadvantage of not optimizing the reserved physical blocks for bad block handling or NAND wear leveling.
Digi Embedded Yocto also supports a new partitioning strategy that uses one MTD partition (named system) with multiple UBI volumes for the Linux system partitions. To learn about this strategy and how to prepare your ConnectCore 6UL to use this partition table, see Single-MTD system partitioning.
Multi-MTD system partitioning
The multi-MTD system partitioning strategy uses one UBI volume per MTD partition. This is the default for the ConnectCore 6UL.
Standard partition table
The default partition table set in the U-Boot mtdparts
variable establishes the following partitions:
-
bootloader: Contains the U-Boot bootloader image that is executed when the device is powered on. It starts the installed operating system and allows some device configurations.
-
environment: Contains the U-Boot environment and its redundant copy.
-
safe: Contains the encryption key for encrypted partitions. Refer to the TrustFence documentation for more information on encrypted partitions.
-
linux: Contains the Linux kernel, device tree files, and U-Boot boot scripts. U-Boot reads the operating system files from this partition.
-
recovery: Contains a recovery Linux ramdisk image that can be launched (instead of the default operating system) to perform firmware updates on the device.
-
rootfs: Contains the Linux root file system.
-
update: Serves as a placeholder partition to store firmware update files prior to launching a firmware update process on the device.
Dual boot partition table
On a dual boot-enabled system (see Prepare your target for dual boot) the mtdparts
variable establishes the following partitions:
-
bootloader: Contains the U-Boot bootloader image that is executed when the device is powered on. It starts the installed operating system and allows some device configurations.
-
environment: Contains the U-Boot environment and its redundant copy.
-
safe: Contains the encryption key for encrypted partitions. Refer to the TrustFence documentation for more information on encrypted partitions.
-
linux_a: Contains the Linux kernel, device tree files, and U-Boot boot scripts. U-Boot reads the operating system files from this default partition.
-
linux_b: Same as linux_a (for system B).
-
rootfs_a: Linux root file system partition (for system A)
-
rootfs_b: Linux root file system partition (for system B)
Single-MTD system partitioning
The single-MTD system partitioning strategy uses multiple UBI volumes on one MTD partition named system.
Standard partition table
The default partition table set in the U-Boot mtdparts
variable establishes the following partitions:
-
bootloader: Contains the U-Boot bootloader image that is executed when the device is powered on. It starts the installed operating system and allows some device configurations.
-
environment: Contains the U-Boot environment and its redundant copy.
-
safe: Contains the encryption key for encrypted partitions. Refer to the TrustFence documentation for more information on encrypted partitions.
-
system: Contains the Linux system partitions as UBI volumes.
-
linux: (UBI volume) Contains the Linux kernel, device tree files, and U-Boot boot scripts. U-Boot reads the operating system files from this volume.
-
recovery: (UBI volume) Contains a recovery Linux ramdisk image that can be launched (instead of the default operating system) to perform firmware updates on the device.
-
rootfs: (UBI volume) Contains the Linux root file system.
-
update: (UBI volume) Placeholder volume to store firmware update files prior to launching a firmware update process on the device.
-
Dual boot partition table
On a dual boot-enabled system (see Prepare your target for dual boot) the mtdparts
variable establishes the following partitions:
-
bootloader: Contains the U-Boot bootloader image that is executed when the device is powered on. It starts the installed operating system and allows some device configurations.
-
environment: Contains the U-Boot environment and its redundant copy.
-
safe: Contains the encryption key for encrypted partitions. Refer to the TrustFence documentation for more information on encrypted partitions.
-
system: Contains the Linux system partitions as UBI volumes.
-
linux_a: (UBI volume) Contains the Linux kernel, device tree files, and U-Boot boot scripts. U-Boot reads the operating system files from this default volume.
-
linux_b: (UBI volume) Same as linux_a (for system B).
-
rootfs_a: (UBI volume) Linux root file system volume (for system A)
-
rootfs_b: (UBI volume) Linux root file system volume (for system B)
-
Limitations
The single-MTD system partition strategy has the following limitations:
-
Partition encryption is not supported. Partition encryption works at the MTD partition level; support for this functionality would require U-Boot to have decryption capabilities it does not currently have.
-
Read-only rootfs is not yet supported.
Change the partitioning strategy
You can control the partition table strategy using variable singlemtdsys
and running some scripts to repartition the NAND.
The scripts See Program the firmware, for instructions on performing a full firmware install. |
From Multi-MTD to Single-MTD system partition
-
Set U-Boot variable
singlemtdsys
to "yes":=> setenv singlemtdsys yes
-
Run the script
partition_nand_linux
to recreate the partition table in variablemtdparts
:=> run partition_nand_linux
-
Run the script
ubivolscript
to generate the default system UBI volumes:=> run ubivolscript
-
Save the environment:
=> saveenv
From Single-MTD to Multi-MTD system partition
-
Clear U-Boot variable
singlemtdsys
:=> setenv singlemtdsys
-
Run the script
partition_nand_linux
to recreate the partition table in variablemtdparts
:=> run partition_nand_linux
-
Save the environment:
=> saveenv