Loading core/Makefile +34 −3 Original line number Diff line number Diff line Loading @@ -613,6 +613,7 @@ define generate-userimage-prop-dictionary $(if $(INTERNAL_USERIMAGES_EXT_VARIANT),$(hide) echo "fs_type=$(INTERNAL_USERIMAGES_EXT_VARIANT)" >> $(1)) $(if $(BOARD_SYSTEMIMAGE_PARTITION_SIZE),$(hide) echo "system_size=$(BOARD_SYSTEMIMAGE_PARTITION_SIZE)" >> $(1)) $(if $(BOARD_USERDATAIMAGE_PARTITION_SIZE),$(hide) echo "userdata_size=$(BOARD_USERDATAIMAGE_PARTITION_SIZE)" >> $(1)) $(if $(BOARD_CACHEIMAGE_PARTITION_SIZE),$(hide) echo "cache_size=$(BOARD_CACHEIMAGE_PARTITION_SIZE)" >> $(1)) $(if $(INTERNAL_USERIMAGES_SPARSE_EXT_FLAG),$(hide) echo "extfs_sparse_flag=$(INTERNAL_USERIMAGES_SPARSE_EXT_FLAG)" >> $(1)) $(if $(mkyaffs2_extra_flags),$(hide) echo "mkyaffs2_extra_flags=$(mkyaffs2_extra_flags)" >> $(1)) endef Loading Loading @@ -925,6 +926,35 @@ userdatatarball-nodeps: $(FS_GET_STATS) $(build-userdatatarball-target) # ----------------------------------------------------------------- # cache partition image INTERNAL_CACHEIMAGE_FILES := \ $(filter $(TARGET_OUT_CACHE)/%,$(ALL_DEFAULT_INSTALLED_MODULES)) cacheimage_intermediates := \ $(call intermediates-dir-for,PACKAGING,cache) BUILT_CACHEIMAGE_TARGET := $(PRODUCT_OUT)/cache.img define build-cacheimage-target $(call pretty,"Target cache fs image: $(INSTALLED_CACHEIMAGE_TARGET)") @mkdir -p $(TARGET_OUT_CACHE) @mkdir -p $(cacheimage_intermediates) && rm -rf $(cacheimage_intermediates)/cache_image_info.txt $(call generate-userimage-prop-dictionary, $(cacheimage_intermediates)/cache_image_info.txt) $(hide) PATH=$(foreach p,$(INTERNAL_USERIMAGES_BINARY_PATHS),$(p):)$$PATH \ ./build/tools/releasetools/build_image.py \ $(TARGET_OUT_CACHE) $(cacheimage_intermediates)/cache_image_info.txt $(INSTALLED_CACHEIMAGE_TARGET) $(hide) $(call assert-max-image-size,$(INSTALLED_CACHEIMAGE_TARGET),$(BOARD_CACHEIMAGE_PARTITION_SIZE),yaffs) endef # We just build this directly to the install location. INSTALLED_CACHEIMAGE_TARGET := $(BUILT_CACHEIMAGE_TARGET) $(INSTALLED_CACHEIMAGE_TARGET): $(INTERNAL_USERIMAGES_DEPS) $(INTERNAL_CACHEIMAGE_FILES) $(build-cacheimage-target) .PHONY: cacheimage-nodeps cacheimage-nodeps: | $(INTERNAL_USERIMAGES_DEPS) $(build-cacheimage-target) # ----------------------------------------------------------------- # bring in the installer image generation defines if necessary ifeq ($(TARGET_USE_DISKINSTALLER),true) Loading Loading @@ -1006,6 +1036,7 @@ $(BUILT_TARGET_FILES_PACKAGE): \ $(INSTALLED_RECOVERYIMAGE_TARGET) \ $(INSTALLED_SYSTEMIMAGE) \ $(INSTALLED_USERDATAIMAGE_TARGET) \ $(INSTALLED_CACHEIMAGE_TARGET) \ $(INSTALLED_ANDROID_INFO_TXT_TARGET) \ $(built_ota_tools) \ $(APKCERTS_FILE) \ Loading core/envsetup.mk +2 −0 Original line number Diff line number Diff line Loading @@ -214,6 +214,8 @@ TARGET_OUT_DATA_ETC := $(TARGET_OUT_ETC) TARGET_OUT_DATA_STATIC_LIBRARIES:= $(TARGET_OUT_STATIC_LIBRARIES) TARGET_OUT_DATA_NATIVE_TESTS := $(TARGET_OUT_DATA)/nativetest TARGET_OUT_CACHE := $(PRODUCT_OUT)/cache TARGET_OUT_VENDOR := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_VENDOR) TARGET_OUT_VENDOR_EXECUTABLES:= $(TARGET_OUT_VENDOR)/bin TARGET_OUT_VENDOR_OPTIONAL_EXECUTABLES:= $(TARGET_OUT_VENDOR)/xbin Loading core/main.mk +3 −0 Original line number Diff line number Diff line Loading @@ -743,6 +743,9 @@ endif .PHONY: userdatatarball userdatatarball: $(INSTALLED_USERDATATARBALL_TARGET) .PHONY: cacheimage cacheimage: $(INSTALLED_CACHEIMAGE_TARGET) .PHONY: bootimage bootimage: $(INSTALLED_BOOTIMAGE_TARGET) Loading tools/releasetools/build_image.py +5 −0 Original line number Diff line number Diff line Loading @@ -83,6 +83,9 @@ def ImagePropFromGlobalDict(glob_dict, mount_point): elif mount_point == "data": if "userdata_size" in glob_dict: d["partition_size"] = str(glob_dict["userdata_size"]) elif mount_point == "cache": if "cache_size" in glob_dict: d["partition_size"] = str(glob_dict["cache_size"]) return d Loading Loading @@ -117,6 +120,8 @@ def main(argv): mount_point = "system" elif image_filename == "userdata.img": mount_point = "data" elif image_filename == "cache.img": mount_point = "cache" image_properties = ImagePropFromGlobalDict(glob_dict, mount_point) if not BuildImage(in_dir, image_properties, out_file): Loading tools/releasetools/common.py +1 −0 Original line number Diff line number Diff line Loading @@ -138,6 +138,7 @@ def LoadInfoDict(zip): makeint("blocksize") makeint("system_size") makeint("userdata_size") makeint("cache_size") makeint("recovery_size") makeint("boot_size") Loading Loading
core/Makefile +34 −3 Original line number Diff line number Diff line Loading @@ -613,6 +613,7 @@ define generate-userimage-prop-dictionary $(if $(INTERNAL_USERIMAGES_EXT_VARIANT),$(hide) echo "fs_type=$(INTERNAL_USERIMAGES_EXT_VARIANT)" >> $(1)) $(if $(BOARD_SYSTEMIMAGE_PARTITION_SIZE),$(hide) echo "system_size=$(BOARD_SYSTEMIMAGE_PARTITION_SIZE)" >> $(1)) $(if $(BOARD_USERDATAIMAGE_PARTITION_SIZE),$(hide) echo "userdata_size=$(BOARD_USERDATAIMAGE_PARTITION_SIZE)" >> $(1)) $(if $(BOARD_CACHEIMAGE_PARTITION_SIZE),$(hide) echo "cache_size=$(BOARD_CACHEIMAGE_PARTITION_SIZE)" >> $(1)) $(if $(INTERNAL_USERIMAGES_SPARSE_EXT_FLAG),$(hide) echo "extfs_sparse_flag=$(INTERNAL_USERIMAGES_SPARSE_EXT_FLAG)" >> $(1)) $(if $(mkyaffs2_extra_flags),$(hide) echo "mkyaffs2_extra_flags=$(mkyaffs2_extra_flags)" >> $(1)) endef Loading Loading @@ -925,6 +926,35 @@ userdatatarball-nodeps: $(FS_GET_STATS) $(build-userdatatarball-target) # ----------------------------------------------------------------- # cache partition image INTERNAL_CACHEIMAGE_FILES := \ $(filter $(TARGET_OUT_CACHE)/%,$(ALL_DEFAULT_INSTALLED_MODULES)) cacheimage_intermediates := \ $(call intermediates-dir-for,PACKAGING,cache) BUILT_CACHEIMAGE_TARGET := $(PRODUCT_OUT)/cache.img define build-cacheimage-target $(call pretty,"Target cache fs image: $(INSTALLED_CACHEIMAGE_TARGET)") @mkdir -p $(TARGET_OUT_CACHE) @mkdir -p $(cacheimage_intermediates) && rm -rf $(cacheimage_intermediates)/cache_image_info.txt $(call generate-userimage-prop-dictionary, $(cacheimage_intermediates)/cache_image_info.txt) $(hide) PATH=$(foreach p,$(INTERNAL_USERIMAGES_BINARY_PATHS),$(p):)$$PATH \ ./build/tools/releasetools/build_image.py \ $(TARGET_OUT_CACHE) $(cacheimage_intermediates)/cache_image_info.txt $(INSTALLED_CACHEIMAGE_TARGET) $(hide) $(call assert-max-image-size,$(INSTALLED_CACHEIMAGE_TARGET),$(BOARD_CACHEIMAGE_PARTITION_SIZE),yaffs) endef # We just build this directly to the install location. INSTALLED_CACHEIMAGE_TARGET := $(BUILT_CACHEIMAGE_TARGET) $(INSTALLED_CACHEIMAGE_TARGET): $(INTERNAL_USERIMAGES_DEPS) $(INTERNAL_CACHEIMAGE_FILES) $(build-cacheimage-target) .PHONY: cacheimage-nodeps cacheimage-nodeps: | $(INTERNAL_USERIMAGES_DEPS) $(build-cacheimage-target) # ----------------------------------------------------------------- # bring in the installer image generation defines if necessary ifeq ($(TARGET_USE_DISKINSTALLER),true) Loading Loading @@ -1006,6 +1036,7 @@ $(BUILT_TARGET_FILES_PACKAGE): \ $(INSTALLED_RECOVERYIMAGE_TARGET) \ $(INSTALLED_SYSTEMIMAGE) \ $(INSTALLED_USERDATAIMAGE_TARGET) \ $(INSTALLED_CACHEIMAGE_TARGET) \ $(INSTALLED_ANDROID_INFO_TXT_TARGET) \ $(built_ota_tools) \ $(APKCERTS_FILE) \ Loading
core/envsetup.mk +2 −0 Original line number Diff line number Diff line Loading @@ -214,6 +214,8 @@ TARGET_OUT_DATA_ETC := $(TARGET_OUT_ETC) TARGET_OUT_DATA_STATIC_LIBRARIES:= $(TARGET_OUT_STATIC_LIBRARIES) TARGET_OUT_DATA_NATIVE_TESTS := $(TARGET_OUT_DATA)/nativetest TARGET_OUT_CACHE := $(PRODUCT_OUT)/cache TARGET_OUT_VENDOR := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_VENDOR) TARGET_OUT_VENDOR_EXECUTABLES:= $(TARGET_OUT_VENDOR)/bin TARGET_OUT_VENDOR_OPTIONAL_EXECUTABLES:= $(TARGET_OUT_VENDOR)/xbin Loading
core/main.mk +3 −0 Original line number Diff line number Diff line Loading @@ -743,6 +743,9 @@ endif .PHONY: userdatatarball userdatatarball: $(INSTALLED_USERDATATARBALL_TARGET) .PHONY: cacheimage cacheimage: $(INSTALLED_CACHEIMAGE_TARGET) .PHONY: bootimage bootimage: $(INSTALLED_BOOTIMAGE_TARGET) Loading
tools/releasetools/build_image.py +5 −0 Original line number Diff line number Diff line Loading @@ -83,6 +83,9 @@ def ImagePropFromGlobalDict(glob_dict, mount_point): elif mount_point == "data": if "userdata_size" in glob_dict: d["partition_size"] = str(glob_dict["userdata_size"]) elif mount_point == "cache": if "cache_size" in glob_dict: d["partition_size"] = str(glob_dict["cache_size"]) return d Loading Loading @@ -117,6 +120,8 @@ def main(argv): mount_point = "system" elif image_filename == "userdata.img": mount_point = "data" elif image_filename == "cache.img": mount_point = "cache" image_properties = ImagePropFromGlobalDict(glob_dict, mount_point) if not BuildImage(in_dir, image_properties, out_file): Loading
tools/releasetools/common.py +1 −0 Original line number Diff line number Diff line Loading @@ -138,6 +138,7 @@ def LoadInfoDict(zip): makeint("blocksize") makeint("system_size") makeint("userdata_size") makeint("cache_size") makeint("recovery_size") makeint("boot_size") Loading