|
|
|
@@ -2237,7 +2237,6 @@ define build-systemimage-target
|
|
|
|
|
$(hide) PATH=$(foreach p,$(INTERNAL_USERIMAGES_BINARY_PATHS),$(p):)$$PATH \
|
|
|
|
|
build/make/tools/releasetools/build_image.py \
|
|
|
|
|
$(TARGET_OUT) $(systemimage_intermediates)/system_image_info.txt $(1) $(TARGET_OUT) \
|
|
|
|
|
$(systemimage_intermediates)/generated_system_image_info.txt \
|
|
|
|
|
|| ( mkdir -p $${DIST_DIR}; cp $(INSTALLED_FILES_FILE) $${DIST_DIR}/installed-files-rescued.txt; \
|
|
|
|
|
exit 1 )
|
|
|
|
|
endef
|
|
|
|
@@ -2285,22 +2284,7 @@ endif # INSTALLED_BOOTIMAGE_TARGET
|
|
|
|
|
$(INSTALLED_SYSTEMIMAGE_TARGET): $(BUILT_SYSTEMIMAGE) $(RECOVERY_FROM_BOOT_PATCH)
|
|
|
|
|
@echo "Install system fs image: $@"
|
|
|
|
|
$(copy-file-to-target)
|
|
|
|
|
ifdef RECOVERY_FROM_BOOT_PATCH
|
|
|
|
|
ifeq ($(PRODUCT_USE_DYNAMIC_PARTITION_SIZE),true)
|
|
|
|
|
ifeq ($(BOARD_SYSTEMIMAGE_PARTITION_SIZE),)
|
|
|
|
|
# system image size is dynamic, hence system_size in generated_system_image_info.txt does not
|
|
|
|
|
# have room for recovery from boot patch. Increase system_size so that check-all-partition-sizes
|
|
|
|
|
# accounts for the size of the patch.
|
|
|
|
|
sed -i'.bak' -e 's/^system_size=.*$$/system_size='"$$(( \
|
|
|
|
|
$(call read-image-prop-dictionary,$(systemimage_intermediates)/generated_system_image_info.txt,system_size) + \
|
|
|
|
|
$$($(call get-file-size,$(RECOVERY_FROM_BOOT_PATCH))) ))"'/' \
|
|
|
|
|
$(systemimage_intermediates)/generated_system_image_info.txt
|
|
|
|
|
endif
|
|
|
|
|
endif
|
|
|
|
|
endif
|
|
|
|
|
$(hide) $(call assert-max-image-size,$@ $(RECOVERY_FROM_BOOT_PATCH),\
|
|
|
|
|
$(call read-image-prop-dictionary,\
|
|
|
|
|
$(systemimage_intermediates)/generated_system_image_info.txt,system_size))
|
|
|
|
|
$(hide) $(call assert-max-image-size,$@ $(RECOVERY_FROM_BOOT_PATCH),$(BOARD_SYSTEMIMAGE_PARTITION_SIZE))
|
|
|
|
|
|
|
|
|
|
systemimage: $(INSTALLED_SYSTEMIMAGE_TARGET)
|
|
|
|
|
|
|
|
|
@@ -2309,9 +2293,7 @@ systemimage-nodeps snod: $(filter-out systemimage-nodeps snod,$(MAKECMDGOALS)) \
|
|
|
|
|
| $(INTERNAL_USERIMAGES_DEPS)
|
|
|
|
|
@echo "make $@: ignoring dependencies"
|
|
|
|
|
$(call build-systemimage-target,$(INSTALLED_SYSTEMIMAGE_TARGET))
|
|
|
|
|
$(hide) $(call assert-max-image-size,$(INSTALLED_SYSTEMIMAGE_TARGET),\
|
|
|
|
|
$(call read-image-prop-dictionary,\
|
|
|
|
|
$(systemimage_intermediates)/generated_system_image_info.txt,system_size))
|
|
|
|
|
$(hide) $(call assert-max-image-size,$(INSTALLED_SYSTEMIMAGE_TARGET),$(BOARD_SYSTEMIMAGE_PARTITION_SIZE))
|
|
|
|
|
|
|
|
|
|
ifneq (,$(filter systemimage-nodeps snod, $(MAKECMDGOALS)))
|
|
|
|
|
ifeq (true,$(WITH_DEXPREOPT))
|
|
|
|
@@ -2677,11 +2659,8 @@ define build-systemotherimage-target
|
|
|
|
|
$(call generate-image-prop-dictionary, $(systemotherimage_intermediates)/system_other_image_info.txt,system,skip_fsck=true)
|
|
|
|
|
$(hide) PATH=$(foreach p,$(INTERNAL_USERIMAGES_BINARY_PATHS),$(p):)$$PATH \
|
|
|
|
|
build/make/tools/releasetools/build_image.py \
|
|
|
|
|
$(TARGET_OUT_SYSTEM_OTHER) $(systemotherimage_intermediates)/system_other_image_info.txt $(INSTALLED_SYSTEMOTHERIMAGE_TARGET) $(TARGET_OUT)\
|
|
|
|
|
$(systemotherimage_intermediates)/generated_system_other_image_info.txt
|
|
|
|
|
$(hide) $(call assert-max-image-size,$(INSTALLED_SYSTEMOTHERIMAGE_TARGET),\
|
|
|
|
|
$(call read-image-prop-dictionary,\
|
|
|
|
|
$(systemotherimage_intermediates)/generated_system_other_image_info.txt,system_other_size))
|
|
|
|
|
$(TARGET_OUT_SYSTEM_OTHER) $(systemotherimage_intermediates)/system_other_image_info.txt $(INSTALLED_SYSTEMOTHERIMAGE_TARGET) $(TARGET_OUT)
|
|
|
|
|
$(hide) $(call assert-max-image-size,$(INSTALLED_SYSTEMOTHERIMAGE_TARGET),$(BOARD_SYSTEMIMAGE_PARTITION_SIZE))
|
|
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
# We just build this directly to the install location.
|
|
|
|
@@ -2820,11 +2799,8 @@ define build-vendorimage-target
|
|
|
|
|
$(call build-image-kernel-modules,$(BOARD_VENDOR_KERNEL_MODULES),$(TARGET_OUT_VENDOR),vendor/,$(call intermediates-dir-for,PACKAGING,depmod_vendor)))
|
|
|
|
|
$(hide) PATH=$(foreach p,$(INTERNAL_USERIMAGES_BINARY_PATHS),$(p):)$$PATH \
|
|
|
|
|
build/make/tools/releasetools/build_image.py \
|
|
|
|
|
$(TARGET_OUT_VENDOR) $(vendorimage_intermediates)/vendor_image_info.txt $(INSTALLED_VENDORIMAGE_TARGET) $(TARGET_OUT) \
|
|
|
|
|
$(vendorimage_intermediates)/generated_vendor_image_info.txt
|
|
|
|
|
$(hide) $(call assert-max-image-size,$(INSTALLED_VENDORIMAGE_TARGET),\
|
|
|
|
|
$(call read-image-prop-dictionary,\
|
|
|
|
|
$(vendorimage_intermediates)/generated_vendor_image_info.txt,vendor_size))
|
|
|
|
|
$(TARGET_OUT_VENDOR) $(vendorimage_intermediates)/vendor_image_info.txt $(INSTALLED_VENDORIMAGE_TARGET) $(TARGET_OUT)
|
|
|
|
|
$(hide) $(call assert-max-image-size,$(INSTALLED_VENDORIMAGE_TARGET),$(BOARD_VENDORIMAGE_PARTITION_SIZE))
|
|
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
# We just build this directly to the install location.
|
|
|
|
@@ -2878,11 +2854,8 @@ define build-productimage-target
|
|
|
|
|
$(call generate-image-prop-dictionary, $(productimage_intermediates)/product_image_info.txt,product,skip_fsck=true)
|
|
|
|
|
$(hide) PATH=$(foreach p,$(INTERNAL_USERIMAGES_BINARY_PATHS),$(p):)$$PATH \
|
|
|
|
|
./build/tools/releasetools/build_image.py \
|
|
|
|
|
$(TARGET_OUT_PRODUCT) $(productimage_intermediates)/product_image_info.txt $(INSTALLED_PRODUCTIMAGE_TARGET) $(TARGET_OUT) \
|
|
|
|
|
$(productimage_intermediates)/generated_product_image_info.txt
|
|
|
|
|
$(hide) $(call assert-max-image-size,$(INSTALLED_PRODUCTIMAGE_TARGET),\
|
|
|
|
|
$(call read-image-prop-dictionary,\
|
|
|
|
|
$(productimage_intermediates)/generated_product_image_info.txt,product_size))
|
|
|
|
|
$(TARGET_OUT_PRODUCT) $(productimage_intermediates)/product_image_info.txt $(INSTALLED_PRODUCTIMAGE_TARGET) $(TARGET_OUT)
|
|
|
|
|
$(hide) $(call assert-max-image-size,$(INSTALLED_PRODUCTIMAGE_TARGET),$(BOARD_PRODUCTIMAGE_PARTITION_SIZE))
|
|
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
# We just build this directly to the install location.
|
|
|
|
@@ -2933,11 +2906,8 @@ define build-product_servicesimage-target
|
|
|
|
|
$(call generate-image-prop-dictionary, $(product_servicesimage_intermediates)/product_services_image_info.txt,product_services, skip_fsck=true)
|
|
|
|
|
$(hide) PATH=$(foreach p,$(INTERNAL_USERIMAGES_BINARY_PATHS),$(p):)$$PATH \
|
|
|
|
|
./build/tools/releasetools/build_image.py \
|
|
|
|
|
$(TARGET_OUT_PRODUCT_SERVICES) $(product_servicesimage_intermediates)/product_services_image_info.txt $(INSTALLED_PRODUCT_SERVICESIMAGE_TARGET) $(TARGET_OUT) \
|
|
|
|
|
$(product_servicesimage_intermediates)/generated_product_services_image_info.txt
|
|
|
|
|
$(hide) $(call assert-max-image-size,$(INSTALLED_PRODUCT_SERVICESIMAGE_TARGET),\
|
|
|
|
|
$(call read-image-prop-dictionary,\
|
|
|
|
|
$(product_servicesimage_intermediates)/generated_product_services_image_info.txt,product_services_size))
|
|
|
|
|
$(TARGET_OUT_PRODUCT_SERVICES) $(productservicesimage_intermediates)/productservices_image_info.txt $(INSTALLED_PRODUCT_SERVICESIMAGE_TARGET) $(TARGET_OUT)
|
|
|
|
|
$(hide) $(call assert-max-image-size,$(INSTALLED_PRODUCT_SERVICESIMAGE_TARGET),$(BOARD_PRODUCT_SERVICESIMAGE_PARTITION_SIZE))
|
|
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
# We just build this directly to the install location.
|
|
|
|
@@ -2989,11 +2959,8 @@ define build-odmimage-target
|
|
|
|
|
$(call build-image-kernel-modules,$(BOARD_ODM_KERNEL_MODULES),$(TARGET_OUT_ODM),odm/,$(call intermediates-dir-for,PACKAGING,depmod_odm)))
|
|
|
|
|
$(hide) PATH=$(foreach p,$(INTERNAL_USERIMAGES_BINARY_PATHS),$(p):)$$PATH \
|
|
|
|
|
./build/tools/releasetools/build_image.py \
|
|
|
|
|
$(TARGET_OUT_ODM) $(odmimage_intermediates)/odm_image_info.txt $(INSTALLED_ODMIMAGE_TARGET) $(TARGET_OUT) \
|
|
|
|
|
$(odmimage_intermediates)/generated_odm_image_info.txt
|
|
|
|
|
$(hide) $(call assert-max-image-size,$(INSTALLED_ODMIMAGE_TARGET),\
|
|
|
|
|
$(call read-image-prop-dictionary,\
|
|
|
|
|
$(odmimage_intermediates)/generated_odm_image_info.txt,odm_size))
|
|
|
|
|
$(TARGET_OUT_ODM) $(odmimage_intermediates)/odm_image_info.txt $(INSTALLED_ODMIMAGE_TARGET) $(TARGET_OUT)
|
|
|
|
|
$(hide) $(call assert-max-image-size,$(INSTALLED_ODMIMAGE_TARGET),$(BOARD_ODMIMAGE_PARTITION_SIZE))
|
|
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
# We just build this directly to the install location.
|
|
|
|
@@ -3363,7 +3330,8 @@ ifeq (true,$(PRODUCT_BUILD_SUPER_PARTITION))
|
|
|
|
|
# (1): list of items like "system", "vendor", "product", "product_services"
|
|
|
|
|
# return: map each item into a command ( wrapped in $$() ) that reads the size
|
|
|
|
|
define read-size-of-partitions
|
|
|
|
|
$(foreach p,$(1),$(call read-image-prop-dictionary,$($(p)image_intermediates)/generated_$(p)_image_info.txt,$(p)_size))
|
|
|
|
|
$(foreach image,$(call images-for-partitions,$(1)),$$( \
|
|
|
|
|
build/make/tools/releasetools/sparse_img.py --get_partition_size $(image)))
|
|
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
# round result to BOARD_SUPER_PARTITION_ALIGNMENT
|
|
|
|
@@ -3387,7 +3355,9 @@ droid_targets: check-all-partition-sizes
|
|
|
|
|
.PHONY: check-all-partition-sizes check-all-partition-sizes-nodeps
|
|
|
|
|
|
|
|
|
|
# Add image dependencies so that generated_*_image_info.txt are written before checking.
|
|
|
|
|
check-all-partition-sizes: $(call images-for-partitions,$(BOARD_SUPER_PARTITION_PARTITION_LIST))
|
|
|
|
|
check-all-partition-sizes: \
|
|
|
|
|
build/make/tools/releasetools/sparse_img.py \
|
|
|
|
|
$(call images-for-partitions,$(BOARD_SUPER_PARTITION_PARTITION_LIST))
|
|
|
|
|
|
|
|
|
|
ifeq ($(PRODUCT_RETROFIT_DYNAMIC_PARTITIONS),true)
|
|
|
|
|
# Check sum(super partition block devices) == super partition
|
|
|
|
|