aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzuWei Lin <szuweilin@google.com>2018-07-18 18:06:25 +0800
committerSzuWei Lin <szuweilin@google.com>2018-08-03 14:47:43 +0800
commita2da9a33614515f0894c0c2785e095f6944cb3ef (patch)
treea3c9bb37ad76bf14264a15235d530ef3879ed33d
parent635887d5acbc648df550329d8651cabae3231313 (diff)
downloadbuild-a2da9a33614515f0894c0c2785e095f6944cb3ef.tar.gz
Enable dyanmic image size for GSI
The original size number of GSI are fixed size. Change to give size by the content with appending 64M bytes space. Bug: 71970853 Test: `make systemimage` and check the out system.img Change-Id: I345f5e22c2fee7b553fc3337e9bff0ba28f579e1 Merged-In: I345f5e22c2fee7b553fc3337e9bff0ba28f579e1
-rw-r--r--target/board/BoardConfigGsiCommon.mk3
-rw-r--r--target/board/generic/BoardConfig.mk2
-rw-r--r--target/board/generic_arm64/BoardConfig.mk2
-rw-r--r--target/board/generic_arm_a/BoardConfig.mk3
-rw-r--r--target/board/generic_arm_ab/BoardConfig.mk3
-rw-r--r--target/board/generic_x86/BoardConfig.mk1
-rwxr-xr-xtarget/board/generic_x86_64/BoardConfig.mk1
-rw-r--r--target/board/treble_common.mk3
-rw-r--r--target/board/treble_common_32.mk4
-rw-r--r--target/board/treble_common_64.mk3
-rw-r--r--target/product/aosp_arm.mk3
-rw-r--r--target/product/aosp_arm64.mk3
-rw-r--r--target/product/aosp_x86.mk3
-rw-r--r--target/product/aosp_x86_64.mk3
-rw-r--r--target/product/treble_common.mk3
15 files changed, 21 insertions, 19 deletions
diff --git a/target/board/BoardConfigGsiCommon.mk b/target/board/BoardConfigGsiCommon.mk
index 24614dedc0..e91051493a 100644
--- a/target/board/BoardConfigGsiCommon.mk
+++ b/target/board/BoardConfigGsiCommon.mk
@@ -10,6 +10,9 @@ TARGET_USERIMAGES_USE_EXT4 := true
TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true
TARGET_USES_MKE2FS := true
+# Enable dyanmic system image size and reserved 64MB in it.
+BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE := 67108864
+
# Android Verified Boot (AVB):
# Builds a special vbmeta.img that disables AVB verification.
# Otherwise, AVB will prevent the device from booting the generic system.img.
diff --git a/target/board/generic/BoardConfig.mk b/target/board/generic/BoardConfig.mk
index 19d1b03c78..738c037312 100644
--- a/target/board/generic/BoardConfig.mk
+++ b/target/board/generic/BoardConfig.mk
@@ -48,8 +48,6 @@ TARGET_CPU_ABI2 := armeabi
include build/make/target/board/BoardConfigEmuCommon.mk
include build/make/target/board/BoardConfigGsiCommon.mk
-# Partition size is default 1.5GB (1536MB) for 64 bits projects
-BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1610612736
BOARD_USERDATAIMAGE_PARTITION_SIZE := 576716800
# Wifi.
diff --git a/target/board/generic_arm64/BoardConfig.mk b/target/board/generic_arm64/BoardConfig.mk
index ccfbbca844..c1983ad465 100644
--- a/target/board/generic_arm64/BoardConfig.mk
+++ b/target/board/generic_arm64/BoardConfig.mk
@@ -55,8 +55,6 @@ endif
include build/make/target/board/BoardConfigEmuCommon.mk
include build/make/target/board/BoardConfigGsiCommon.mk
-# Partition size is default 1.5GB (1536MB) for 64 bits projects
-BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1610612736
BOARD_USERDATAIMAGE_PARTITION_SIZE := 576716800
# Emulator system image is going to be used as GSI and some vendor still hasn't
diff --git a/target/board/generic_arm_a/BoardConfig.mk b/target/board/generic_arm_a/BoardConfig.mk
index f0e1a39498..57a5196a96 100644
--- a/target/board/generic_arm_a/BoardConfig.mk
+++ b/target/board/generic_arm_a/BoardConfig.mk
@@ -16,9 +16,6 @@
include build/make/target/board/treble_common_32.mk
-# Overwrite the setting in treble_common_32.mk for non-A/B arm GSI
-BOARD_SYSTEMIMAGE_PARTITION_SIZE := 943718400 # 900MB
-
TARGET_ARCH := arm
TARGET_ARCH_VARIANT := armv7-a-neon
TARGET_CPU_ABI := armeabi-v7a
diff --git a/target/board/generic_arm_ab/BoardConfig.mk b/target/board/generic_arm_ab/BoardConfig.mk
index 7c04cd5733..7d9ea9c0e5 100644
--- a/target/board/generic_arm_ab/BoardConfig.mk
+++ b/target/board/generic_arm_ab/BoardConfig.mk
@@ -16,9 +16,6 @@
include build/make/target/board/treble_common_32.mk
-# Overwrite the setting in treble_common_32.mk for non-A/B arm GSI
-BOARD_SYSTEMIMAGE_PARTITION_SIZE := 943718400 # 900MB
-
TARGET_ARCH := arm
TARGET_ARCH_VARIANT := armv7-a-neon
TARGET_CPU_ABI := armeabi-v7a
diff --git a/target/board/generic_x86/BoardConfig.mk b/target/board/generic_x86/BoardConfig.mk
index ae2e6414d8..650073e68b 100644
--- a/target/board/generic_x86/BoardConfig.mk
+++ b/target/board/generic_x86/BoardConfig.mk
@@ -23,7 +23,6 @@ TARGET_PRELINK_MODULE := false
include build/make/target/board/BoardConfigEmuCommon.mk
include build/make/target/board/BoardConfigGsiCommon.mk
-BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2684354560
# Resize to 4G to accomodate ASAN and CTS
BOARD_USERDATAIMAGE_PARTITION_SIZE := 4294967296
diff --git a/target/board/generic_x86_64/BoardConfig.mk b/target/board/generic_x86_64/BoardConfig.mk
index 7fc822d607..1426630443 100755
--- a/target/board/generic_x86_64/BoardConfig.mk
+++ b/target/board/generic_x86_64/BoardConfig.mk
@@ -27,7 +27,6 @@ TARGET_PRELINK_MODULE := false
include build/make/target/board/BoardConfigEmuCommon.mk
include build/make/target/board/BoardConfigGsiCommon.mk
-BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2684354560 # 2.5 GB
BOARD_USERDATAIMAGE_PARTITION_SIZE := 576716800
BOARD_SEPOLICY_DIRS += device/generic/goldfish/sepolicy/x86
diff --git a/target/board/treble_common.mk b/target/board/treble_common.mk
index c347060e01..7da7b30d4b 100644
--- a/target/board/treble_common.mk
+++ b/target/board/treble_common.mk
@@ -36,6 +36,9 @@ TARGET_USERIMAGES_USE_F2FS := true
TARGET_USERIMAGES_SPARSE_EXT_DISABLED := false
TARGET_USES_MKE2FS := true
+# Enable dyanmic system image size and reserved 64MB in it.
+BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE := 67108864
+
# Generic AOSP image always requires separate vendor.img
TARGET_COPY_OUT_VENDOR := vendor
diff --git a/target/board/treble_common_32.mk b/target/board/treble_common_32.mk
index dbe0899488..b66c41eb04 100644
--- a/target/board/treble_common_32.mk
+++ b/target/board/treble_common_32.mk
@@ -15,7 +15,3 @@
#
include build/make/target/board/treble_common.mk
-
-# Partition size defaults to 1 GB (1024 MB) for 32-bit products. It can
-# be overwritten in specific BoardConfig.mk, if so desired.
-BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1073741824
diff --git a/target/board/treble_common_64.mk b/target/board/treble_common_64.mk
index 0a6eb172d4..8980dfde1d 100644
--- a/target/board/treble_common_64.mk
+++ b/target/board/treble_common_64.mk
@@ -18,6 +18,3 @@ include build/make/target/board/treble_common.mk
# Enable 64-bits binder
TARGET_USES_64_BIT_BINDER := true
-
-# Partition size is default 1.5GB (1536MB) for 64 bits projects
-BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1610612736
diff --git a/target/product/aosp_arm.mk b/target/product/aosp_arm.mk
index a34998b693..dc49498537 100644
--- a/target/product/aosp_arm.mk
+++ b/target/product/aosp_arm.mk
@@ -34,6 +34,9 @@ PRODUCT_COPY_FILES += \
include $(SRC_TARGET_DIR)/product/full.mk
+# Enable dynamic partition size
+PRODUCT_USE_DYNAMIC_PARTITION_SIZE := true
+
# Enable A/B update
AB_OTA_UPDATER := true
AB_OTA_PARTITIONS := system
diff --git a/target/product/aosp_arm64.mk b/target/product/aosp_arm64.mk
index faa963781c..0d9e055899 100644
--- a/target/product/aosp_arm64.mk
+++ b/target/product/aosp_arm64.mk
@@ -50,6 +50,9 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base_telephony.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/board/generic_arm64/device.mk)
+# Enable dynamic partition size
+PRODUCT_USE_DYNAMIC_PARTITION_SIZE := true
+
# Enable A/B update
AB_OTA_UPDATER := true
AB_OTA_PARTITIONS := system
diff --git a/target/product/aosp_x86.mk b/target/product/aosp_x86.mk
index cbb678353d..abaab5d66f 100644
--- a/target/product/aosp_x86.mk
+++ b/target/product/aosp_x86.mk
@@ -35,6 +35,9 @@ PRODUCT_COPY_FILES += \
include $(SRC_TARGET_DIR)/product/full_x86.mk
+# Enable dynamic partition size
+PRODUCT_USE_DYNAMIC_PARTITION_SIZE := true
+
# Enable A/B update
AB_OTA_UPDATER := true
AB_OTA_PARTITIONS := system
diff --git a/target/product/aosp_x86_64.mk b/target/product/aosp_x86_64.mk
index 993aa81257..2168740250 100644
--- a/target/product/aosp_x86_64.mk
+++ b/target/product/aosp_x86_64.mk
@@ -47,6 +47,9 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base_telephony.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/board/generic_x86_64/device.mk)
+# Enable dynamic partition size
+PRODUCT_USE_DYNAMIC_PARTITION_SIZE := true
+
# Enable A/B update
AB_OTA_UPDATER := true
AB_OTA_PARTITIONS := system
diff --git a/target/product/treble_common.mk b/target/product/treble_common.mk
index f12df91711..a2173906e8 100644
--- a/target/product/treble_common.mk
+++ b/target/product/treble_common.mk
@@ -23,6 +23,9 @@
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony.mk)
+# Enable dynamic partition size
+PRODUCT_USE_DYNAMIC_PARTITION_SIZE := true
+
# Split selinux policy
PRODUCT_FULL_TREBLE_OVERRIDE := true