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 7 Next »

This document provides a comprehensive overview of the partitions of all boot devices on SP7350 platform.

SPI-NOR flash

SP7350 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.

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 suboptimal due to the necessity to read and modify the flash.

Partitions

The SPI-NOR flash is partitioned differently based on the file system used: it is divided into 5 partitions when utilizing the initramfs file system and into 6 partitions with the jffs2 file system, as illustrated in the partition diagram of the SPI-NOR flash below:

image-20240111-160118.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 (initramfs)

depend on size of flash

image of Linux kernel with built-in initramfs

kernel (jffs2)

depend on size of flash

image of Linux kernel

rootfs (jffs2)

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 8 partitions, as illustrated in the figure below:

image-20240111-160527.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'

For SPI-NAND flash:

 

For 8-bit NAND flash:

 

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

eMMC device

image-20240111-161249.pngimage-20240111-161335.pngimage-20240111-161411.png

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