...
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
Refer to figure of partitions of 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:
...
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:
...
SPI-NAND & 8-bit NAND flash
The SP7350 supports the ubifs (unsorted block image file-system) 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
Partitions, 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. 2048 bytes data plus 64 bytes parity comprise the sector. Each 512 bytes has 16 bits parity and is able to correct 4 errors.
...
1K60 sector
Partitions,
...
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 , use utilize the 1K60 sector. As depicted in the figure below, 1024 bytes of raw data plus and 105 bytes parity comprise the sector and stored in of parity are collectively stored within a standard 2k sector. It is able to correct 60 bits in 1024 bytes of data. It has higher ability for error correction than standard sector.
...
...
Partitions
The NAND flash is divided into 8 partitions, as illustrated in the figure below:
...
...
If you want to adjust partitions, please remember to modify define MTDPARTS_DEFAULT in file: 'boot/uboot/include/configs/pentagram_common_sp7350.h'
Code Block #define MTDPARTS_DEFAULT sp_spinand.0:128k(nand_header),384k(xboot1),1664k(uboot1),1920k(uboot2),2m(fip),512k(env),512k(env_redund),256k(dtb),25m(kernel),32536k(rootfs)
Refer to struct BootProfileHeader defined in xboot/include/nand_boot/nandop.h for Boot Profile Header.
8-bit NAND flash
...
Note:
...
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:
Code Block |
---|
...
#define MTDPARTS_DEFAULT sp_paranand.0:128k(nand_header),384k(xboot1),1664k(uboot1),1920k(uboot2),2m(fip),512k(env),512k(env_redund),256k(dtb),25m(kernel),32536k(rootfs)
...
For 8-bit NAND flash:
Code Block |
---|
Refer to the struct BootProfileHeader defined in xboot/include/nand_boot/nandop.h
for the Boot Profile Header.
eMMC device
...
SD card
...
Files in boot partition
...