Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

This document provides a comprehensive overview of the partitions of all boot devices on SP7350 platform. The SP7350 platform supports 5 boot devices, including SPI-NOR flash, SPI-NAND flash, 8-bit NAND flash, eMMC device, and SD card.

SPI-NOR flash

The SP7350 platform supports two kinds of root file-system for SPI-NOR flash. One is initramfs (initial ram file-system) file-system and the other is jffs2 (journalling flash file system version 2) file-system.

Initramfs file-system

The initramfs file-system is a RAM-based file system seamlessly integrated into the kernel image. Despite modifications to the root file-system during Linux operations, the kernel image stored in the SPI-NOR flash remains unaffected. This compressed file-system boasts high capacity, providing efficiency in storage utilization for the same root file-system size in flash.

Partitions for initramfs file-system

The SPI-NOR flash is divided into 5 partitions when utilizing the initramfs file system, as illustrated in the partition diagram of the SPI-NOR flash below:

image-20240112-035603.png

Please refer to the table below for an explanation of each partition:

Partition

Size (kB)

Descriptions

iboot

96

image of i-boot for external boot

xboot

192

image of x-boot, including training firmware of DDR

dtb

128

image of device-tree blob (not used)

uboot

768

image of U-Boot

fip

864

image of fip, including TF-A and OP-TEE

uImage

depend on size of flash

image of Linux kernel with built-in initramfs

Jffs2 file-system

In contrast, the jffs2 file-system resides in a dedicated partition within the SPI-NOR flash. Any alterations made to the root file-system are committed to the SPI-NOR flash. It's important to note that the performance of the jffs2 file-system may be sub-optimal due to the necessity to read and modify the flash.

Partitions for jffs2 file-system

The SPI-NOR flash is divided into 6 partitions with the jffs2 file system, as illustrated in the partition diagram of the SPI-NOR flash below:

image-20240112-035958.png

Please refer to the table below for an explanation of each partition:

Partition

Size (kB)

Descriptions

iboot

96

image of i-boot for external boot

xboot

192

image of x-boot, including training firmware of DDR

dtb

128

image of device-tree blob (not used)

uboot

768

image of U-Boot

fip

864

image of fip, including TF-A and OP-TEE

kernel

Acutal size

image of Linux kernel

rootfs

depend on size of flash

image of jfffs2 root file-system

Note

For those seeking to adjust partitions, it is crucial to update the definition of the environment variable 'mtdparts' in U-Boot. This adjustment can be made in the header file located at:

boot/uboot/include/configs/pentagram_common_sp7350.h

The existing mtdparts is as follows:

mtdparts=f8000b00.spinor:96k@0(iboot)ro,192k(xboot)ro,128k(dtb)ro,768k(uboot)ro,864k(fip)ro,0x${sz_kernel}(kernel),-(rootfs);

SPI-NAND & 8-bit NAND flash

The SP7350 supports the ubifs (unsorted block image file-system) as the root file-system for both SPI-NAND and 8-bit NAND Flash. Two types of ECC sectors are utilized: the standard 2k sector and the 1K60 sector.

Standard 2k sector

The standard 2k sector consists of 2048 bytes of user data and 28 bytes of parity. As depicted in the figure below, each 512 bytes of user data is accompanied by 7 bytes (56 bits) of parity, capable of correcting up to 4 errors. Notably, a standard 2k sector occupies 2122 bytes of space. Partitions including env, env_redund, dtb, kernel, and rootfs use the standard 2k sector.

image-20240112-015944.png

1K60 sector

The 1K60 sector comprises 1024 bytes of user data and 105 bytes of parity. It is stored within the standard 2k sector and can correct 60 bits for 1024 bytes of user data, thereby enhancing error correction capabilities. Partitions such as nand_header, xboot1, uboot1, uboot2, and fip utilize the 1K60 sector. As depicted in the figure below, 1024 bytes of raw data and 105 bytes of parity are collectively stored within a standard 2k sector.

image-20240112-015833.png

Partitions

The NAND flash is divided into 10 partitions, as illustrated in the figure below:

image-20240112-035234.png

Please refer to the table below for an explanation of each partition:

Partition

Size

Descriptions

nand_header

1 block

header of the NAND flash

xboot1

actual size

image of x-boot, including training firmware of DDR

uboot1

actual size

image of U-Boot (factory default)

uboot2

actual size

image of U-Boot (the latest update)

fip

2 MB

image of fip, including TF-A and OP-TEE

env

512 kB

image of environment variable of U-Boot

env_redund

512 kB

image of environment variable of U-Boot (redundant)

dtb

256 kB

image of device-tree blob (not used)

kernel

25 MB

image of Linux kernel

rootfs (ubifs)

depend on size of flash

image of ubifs root file-system

Note

To adjust partitions, please modify the define MTDPARTS_DEFAULT in the file:

'boot/uboot/include/configs/pentagram_common_sp7350.h'

The existing MTDPARTS_DEFAULT for SPI-NAND flash is as follows:

#define MTDPARTS_DEFAULT	"sp_spinand.0:128k(nand_header),384k(xboot1),1536k(uboot1),2048k(uboot2),2m(fip),512k(env),512k(env_redund),256k(dtb),25m(kernel),229120k(rootfs)"

The existing MTDPARTS_DEFAULT for 8-bit NAND flash is as follows:

#define MTDPARTS_DEFAULT	"sp_paranand.0:128k(nand_header),384k(xboot1),1536k(uboot1),2048k(uboot2),2m(fip),512k(env),512k(env_redund),256k(dtb),25m(kernel),-(rootfs)"

Refer to the struct BootProfileHeader defined in xboot/include/nand_boot/nandop.h for the Boot Profile Header.

eMMC device

An eMMC device is divided into 4 types of areas and can support up to 8 hardware partitions:

  • Boot Area Partition 1 and 2

  • Replay Protected Memory Block (RPMB)

  • General Purpose Partition 1, 2, 3 and 4

  • User Data Area Partition

Boot Area Partitions

An eMMC device consists of one or two Boot Area partitions. The SP7350 platform stores x-boot image in Boot Area Partition 1 as depicted below:

image-20240111-161249.png

Replay Protected Memory Block (RPMB)

Both U-Boot and Linux of the SP7350 platform support accessing to RPMB of the eMMC device.

image-20240111-161411.png

General Purpose Partitions

The SP7350 platform does not use these partitions.

Partitions in user data area partition

User Data Area Partition of an eMMC device is divided into 8 sub-partitions, plus a GUID partition table (GPT), as illustrated in the figure below:

image-20240111-161335.png

Please refer to the table below for an explanation of each partition:

Partition

Size

Descriptions

GPT

17 kB

GUID partition table, including MBR, header and 128 partition table

uboot1

1 MB

image of U-Boot (factory default)

uboot2

1 MB

image of U-Boot (the latest update)

fip

1 MB

image of fip, including TF-A and OP-TEE

env

512 kB

image of environment variable of U-Boot

env_redund

512 kB

image of environment variable of U-Boot (redundant)

dtb

256 kB

image of device-tree blob (not used)

kernel

32 MB

image of Linux kernel

rootfs (ext4)

depend on size of device

image of ubifs root file-system

SD card

image-20240111-161534.png

Files in boot partition

Refer to table below for files in root directory in boot partition:

File name

Descriptions

ISPBOOOT.BIN

x-boot image

fip.img

fip image which includes TF-A and OP-TEE images

u-boot.img

U-Boot image

uEnv.txt

uenvcmd command of U-Boot

uImage

Linux kernel image (with U-Boot header)

  • No labels