Z:\rk3326_p_hq_rf8637sa\device\rockchip\common\BoardConfig.mk
#Calculate partition size from parameter.txt
USE_DEFAULT_PARAMETER := $(shell test -f $(TARGET_DEVICE_DIR)/parameter.txt && echo true)
ifeq ($(strip $(USE_DEFAULT_PARAMETER)), true)
BOARD_SYSTEMIMAGE_PARTITION_SIZE := $(shell python device/rockchip/common/get_partition_size.py $(TARGET_DEVICE_DIR)/parameter.txt system)
BOARD_OEMIMAGE_PARTITION_SIZE := $(shell python device/rockchip/common/get_partition_size.py $(TARGET_DEVICE_DIR)/parameter.txt oem)
BOARD_VENDORIMAGE_PARTITION_SIZE := $(shell python device/rockchip/common/get_partition_size.py $(TARGET_DEVICE_DIR)/parameter.txt vendor)
BOARD_CACHEIMAGE_PARTITION_SIZE := $(shell python device/rockchip/common/get_partition_size.py $(TARGET_DEVICE_DIR)/parameter.txt cache)
BOARD_BOOTIMAGE_PARTITION_SIZE := $(shell python device/rockchip/common/get_partition_size.py $(TARGET_DEVICE_DIR)/parameter.txt boot)
BOARD_DTBOIMG_PARTITION_SIZE := $(shell python device/rockchip/common/get_partition_size.py $(TARGET_DEVICE_DIR)/parameter.txt dtbo)
BOARD_RECOVERYIMAGE_PARTITION_SIZE := $(shell python device/rockchip/common/get_partition_size.py $(TARGET_DEVICE_DIR)/parameter.txt recovery)
#$(info Calculated BOARD_SYSTEMIMAGE_PARTITION_SIZE=$(BOARD_SYSTEMIMAGE_PARTITION_SIZE) use $(TARGET_DEVICE_DIR)/parameter.txt)
else
BOARD_SYSTEMIMAGE_PARTITION_SIZE ?= 1073741824
BOARD_CACHEIMAGE_PARTITION_SIZE := 69206016
BOARD_OEMIMAGE_PARTITION_SIZE ?= 536870912
BOARD_VENDORIMAGE_PARTITION_SIZE ?= 536870912
BOARD_BOOTIMAGE_PARTITION_SIZE ?= 41943040
BOARD_RECOVERYIMAGE_PARTITION_SIZE ?= 41943040
BOARD_DTBOIMG_PARTITION_SIZE ?= 8388608
ifneq ($(strip $(TARGET_DEVICE_DIR)),)
#$(info $(TARGET_DEVICE_DIR)/parameter.txt not found! Use default BOARD_SYSTEMIMAGE_PARTITION_SIZE=$(BOARD_SYSTEMIMAGE_PARTITION_SIZE))
endif
endif
rk3326_p_hq_rf8637sa\device\rockchip\rk3326\rk3326_mid\parameter.txt
FIRMWARE_VER:9.0
MACHINE_MODEL:RK3326
MACHINE_ID:007
MANUFACTURER: RK3326
MAGIC: 0x5041524B
ATAG: 0x00200800
MACHINE: 3326
CHECK_MASK: 0x80
PWR_HLD: 0,0,A,0,1
TYPE: GPT
CMDLINE:mtdparts=rk29xxnand:0x00002000@0x00004000(uboot),0x00002000@0x00006000(trust),0x00002000@0x00008000(misc),0x00002000@0x0000a000(dtb),0x00002000@0x0000c000(dtbo),0x00000800@0x0000e000(vbmeta),0x00010000@0x0000e800(boot),0x00030000@0x0001e800(recovery),0x00028000@0x0004e800(backup),0x00002000@0x00076800(security),0x00070000@0x00078800(cache),0x00400000@0x000e8800(system),0x00008000@0x004E8800(metadata),0x00070000@0x004F0800(vendor),0x00020000@0x00560800(oem),0x00000400@0x00510800(frp),-@0x00450c00(userdata:grow)
uuid:system=af01642c-9b84-11e8-9b2a-234eb5e198a0
**********************************************************************************************
system分区大小修改:0x00400000@0x000e8800(system)
0x00400000:空间大小---修改这里
0x000e8800:空间地址
例如:0x00400000
2b0000(十六进制)转化为十进制,x 512变为字节 ,除于1024 ,然后在除于1024 ,得到最终的兆字节大小:1440mb
转化公式:
1.2b0000(十六进制)转化为(十进制)为:2949120
2.2949120 x 512字节 = 1509949440
3.1509949440 / 1024 = 1474560 KB
4.1474560 / 1024 = 1440 MB
注意:后面的空间地址=前面的空间大小 + 前面的地址大小,即:
0x00400000@0x000e8800(system),0x00008000@0x004e8800(metadata)
0x00400000 + 0x000e8800 = 0x004e8800