This article explain shows the layout of partitions in-system program image file, ISPBOOOT.BIN, of SP7350 and explains each partition in the file.
Internal ROM code of SP7350 will search for the file named ISPBOOOT.BIN in root directory of SD card if “boot from SD card” is setup by boot-switch of SP7350, or in root directory of USB flash drive if “boot from USB flash drive” is setup by boot-switch of SP7350. Once found the file, it loads the first-stage boot loader, called x-boot, from it and store to SRAM. The x-boot image is at offset 0 of ISPBOOOT.BIN and its size is 192 KiB at maximum. Actual size is recorded in header of x-boot image. If checksum is verified pass, it then jumps to run x-boot.
...
Partitions | Offset | Size | Descriptions |
---|---|---|---|
xboot0 | 0 | 192 kB | image of x-boot, including training firmware of DDR |
uboot0 | 0x30000 | 1344 kB | image of U-Boot |
file_header | 0x180000 | 16 kB | header for the following partitions |
xboot | 0x184000 | actual size | image of x-boot, including training firmware of DDR |
uboot1 | actual size | image of U-Boot | |
uboot2 | actual size | image of U-Boot | |
fip | actual size | image of fip, including TF-A and OP-TEE | |
env | actual size | image of environment variable of U-Boot | |
env_redund | actual size | image of environment variable of U-Boot (redundant) | |
dtb | actual size | image of device-tree blob (not used) | |
kernel | actual size | image of Linux kernel with U-Boot header | |
rootfs | actual size | image of root file-system | |
isp_script_nand | actual size | script of U-Boot for NAND in-system program | |
isp_script_emmc | actual size | script of U-Boot for eMMC in-system program | |
isp_script_nor | actual size | script of U-Boot for SPI-NOR in-system program |
Refer to code below for definition of partition_info in the file_header.
Code Block |
---|
#define SIZE_FILE_NAME (32) struct partition_info_s { u08 file_name[SIZE_FILE_NAME]; // file name of source (basename only) u08 md5sum[36]; u32 file_offset; // offset in output file u64 file_size; // file size of the partition u32 partition_start_addr; // partition's start address in NAND, there will be an offset added in U-Boot script ($isp_nand_addr_1st_part), less than 4GB is expected. u64 partition_size; // reserved size for this partition, less than 4GB is expected. u32 flags; u32 emmc_partition_start; // Unit: block u32 reserved[7]; // let size of this structure == SIZE_PARTITION_INFO_S } __attribute__((packed)); |
Refer to code below for definition of file_header.
Code Block |
---|
#define SIZE_PARTITION_INFO_S (128)
#define SIZE_INIT_SCRIPT (2048)
#define NUM_OF_PARTITION (111)
struct file_header_s {
u08 signature[32];
u08 init_script[SIZE_INIT_SCRIPT];
u32 flags;
u08 reserved[SIZE_PARTITION_INFO_S - 36];
struct partition_info_s partition_info[NUM_OF_PARTITION];
} __attribute__((packed)); // sizeof(this structure) == 16384 |