RK: parameter 分区表
https://blog.csdn.net/qq_38312843/article/details/104701361
https://blog.csdn.net/u014674293/article/details/93650709
一.分区
dmesg
[ 1.389200] uboot: 0x000400000 -- 0x000800000 (4 MB)
[ 1.389221] trust: 0x000800000 -- 0x000c00000 (4 MB)
[ 1.389233] misc: 0x000c00000 -- 0x001000000 (4 MB)
[ 1.389243] resource: 0x001000000 -- 0x002000000 (16 MB)
[ 1.389257] kernel: 0x002000000 -- 0x003800000 (24 MB)
[ 1.389267] boot: 0x003800000 -- 0x005800000 (32 MB)
[ 1.389277] recovery: 0x005800000 -- 0x007800000 (32 MB)
[ 1.389286] backup: 0x007800000 -- 0x00e800000 (112 MB)
[ 1.389295] cache: 0x00e800000 -- 0x016800000 (128 MB)
[ 1.389305] system: 0x016800000 -- 0x096800000 (2048 MB)
[ 1.389315] metadata: 0x096800000 -- 0x097800000 (16 MB)
[ 1.389324] vendor0: 0x097800000 -- 0x09aa00000 (50 MB)
[ 1.389333] vendor1: 0x09aa00000 -- 0x09dc00000 (50 MB)
[ 1.389343] oem: 0x09dc00000 -- 0x09e400000 (8 MB)
[ 1.389352] userdata: 0x09e600000 -- 0x1d1c00000 (4918 MB)
[ 1.389398] mmcblk2: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15
CMDLINE: console=ttyFIQ0 androidboot.baseband=N/A androidboot.selinux=disabled androidboot.hardware=rk30board androidboot.console=ttyFIQ0
init=/init initrd=0x62000000,0x00800000 mtdparts=rk29xxnand:
0x00002000@0x00002000(uboot), size:0x00002000 8192x512÷1024÷1024=4M address:4MB
0x00002000@0x00004000(trust), size:0x00002000 8192x512÷1024÷1024=4M address:8MB
0x00002000@0x00006000(misc), size:0x00002000 8192x512÷1024÷1024=4M address:12MB
0x00008000@0x00008000(resource), size:0x00008000 16M address:16MB 0x00008000 32768x512÷1024÷1024=16
0x0000C000@0x00010000(kernel), size:0x0000C000 49152x512÷1024÷1024=24M address:18MB 0x00010000 65536x512÷1024÷1024=32
0x00010000@0x0001C000(boot), 32M
0x00010000@0x0002C000(recovery), 32M
0x00038000@0x0003C000(backup), 118M
0x00040000@0x00074000(cache), 128M
0x00400000@0x000B4000(system), 2048M address:
0x00008000@0x004B4000(metadata), 16M address:2408MB
0x00019000@0x004BC000(vendor0), size:0x00019000 50M address:2424MB
0x00019000@0x004D5000(vendor1), size:0x00019000 50M address:2474MB
0x00004000@0x004EE000(oem), 8M address:2524MB
-@0x004F3000(userdata)
0x00064000@0x004BC000(vendor0), 200M address:2424MB
0x00064000@0x00520000(vendor1), address:2624MB
0x00004000@0x00584000(oem),
-@0x00588000(userdata)
@符号前是分区的大小
@符号后是分区的起始地址
括号中是分区的名字
单位都是 sector(512Bytes)
比如 uboot 起始地址为 0x2000 sectors (4MB)的位置,大小为 0x2000 sectors(4M)
另外 flash 最大的 block 是 4M(0x2000 sectors),所以每个分区需要 4MB 对齐,即每个分区必须为 4MB 的整数倍。
,0x00038000@0x00038000(backup)
backup 分区前的分区为固件区 uboot、trust、misc、resource、kernel、boot、recovery 。
后续升级时不能修改分区大小
backup 分区后的分区 cache、system、metadata、baseparamer、userdata
是可以读写的,可以调整分区大小。但是修改分区大小后需要进入 recovery 系统格式化 cache
二.生成镜像时提示Out of space
1610612736-1610612736=536870912 512M
--- a/device/rockchip/common/BoardConfig.mk +++ b/device/rockchip/common/BoardConfig.mk @@ -79,7 +79,7 @@ TARGET_PROVIDES_INIT_RC ?= false BOARD_HAL_STATIC_LIBRARIES ?= libdumpstate.$(TARGET_PRODUCT) libhealthd.$(TARGET_PRODUCT) //MAX-SIZE=512M, for generate out/.../system.img -BOARD_SYSTEMIMAGE_PARTITION_SIZE ?= 1073741824 +BOARD_SYSTEMIMAGE_PARTITION_SIZE ?= 1610612736 BOARD_FLASH_BLOCK_SIZE ?= 131072