Merge "Add support for /product-services partition"
am: 3cf03b775a
Change-Id: I1b0b3628d1b96967e569093b93b12fbc5acd7ad5
This commit is contained in:
commit
5f9ddc95a2
15 changed files with 317 additions and 10 deletions
164
core/Makefile
164
core/Makefile
|
@ -467,6 +467,34 @@ endif # BOARD_USES_PRODUCTIMAGE
|
|||
|
||||
# ----------------------------------------------------------------
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# product-services build.prop
|
||||
INSTALLED_PRODUCT_SERVICES_BUILD_PROP_TARGET := $(TARGET_OUT_PRODUCT_SERVICES)/build.prop
|
||||
ALL_DEFAULT_INSTALLED_MODULES += $(INSTALLED_PRODUCT_SERVICES_BUILD_PROP_TARGET)
|
||||
|
||||
FINAL_PRODUCT_SERVICES_PROPERTIES += \
|
||||
$(call collapse-pairs, $(PRODUCT_PRODUCT_SERVICES_PROPERTIES))
|
||||
FINAL_PRODUCT_SERVICES_PROPERTIES := $(call uniq-pairs-by-first-component, \
|
||||
$(FINAL_PRODUCT_SERVICES_PROPERTIES),=)
|
||||
|
||||
$(INSTALLED_PRODUCT_SERVICES_BUILD_PROP_TARGET):
|
||||
@echo Target product-services buildinfo: $@
|
||||
@mkdir -p $(dir $@)
|
||||
$(hide) echo > $@
|
||||
ifdef BOARD_USES_PRODUCT_SERVICESIMAGE
|
||||
$(hide) echo ro.productservices.build.date=`$(DATE_FROM_FILE)`>>$@
|
||||
$(hide) echo ro.productservices.build.date.utc=`$(DATE_FROM_FILE) +%s`>>$@
|
||||
$(hide) echo ro.productservices.build.fingerprint="$(BUILD_FINGERPRINT_FROM_FILE)">>$@
|
||||
endif # BOARD_USES_PRODUCT_SERVICESIMAGE
|
||||
$(hide) echo "#" >> $@; \
|
||||
echo "# ADDITIONAL PRODUCT_SERVICES PROPERTIES" >> $@; \
|
||||
echo "#" >> $@;
|
||||
$(hide) $(foreach line,$(FINAL_PRODUCT_SERVICES_PROPERTIES), \
|
||||
echo "$(line)" >> $@;)
|
||||
$(hide) build/make/tools/post_process_props.py $@
|
||||
|
||||
# ----------------------------------------------------------------
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# sdk-build.prop
|
||||
#
|
||||
|
@ -1102,7 +1130,7 @@ endif
|
|||
ifneq (true,$(TARGET_USERIMAGES_SPARSE_SQUASHFS_DISABLED))
|
||||
INTERNAL_USERIMAGES_SPARSE_SQUASHFS_FLAG := -s
|
||||
endif
|
||||
ifneq ($(filter $(BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE) $(BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE) $(BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE),squashfs),)
|
||||
ifneq ($(filter $(BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE) $(BOARD_PRODUCT_SERVICESIMAGE_FILE_SYSTEM_TYPE) $(BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE) $(BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE),squashfs),)
|
||||
INTERNAL_USERIMAGES_DEPS += $(MAKE_SQUASHFS) $(MKSQUASHFSUSERIMG) $(IMG2SIMG)
|
||||
endif
|
||||
|
||||
|
@ -1136,7 +1164,7 @@ endif
|
|||
endif # USE_LOGICAL_PARTITIONS
|
||||
|
||||
# $(1): the path of the output dictionary file
|
||||
# $(2): a subset of "system vendor cache userdata product oem"
|
||||
# $(2): a subset of "system vendor cache userdata product productservices oem"
|
||||
# $(3): additional "key=value" pairs to append to the dictionary file.
|
||||
define generate-image-prop-dictionary
|
||||
$(if $(filter $(2),system),\
|
||||
|
@ -1186,6 +1214,17 @@ $(if $(filter $(2),product),\
|
|||
$(if $(BOARD_PRODUCTIMAGE_SQUASHFS_DISABLE_4K_ALIGN),$(hide) echo "product_squashfs_disable_4k_align=$(BOARD_PRODUCTIMAGE_SQUASHFS_DISABLE_4K_ALIGN)" >> $(1))
|
||||
$(if $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PRODUCT_BASE_FS_PATH),$(hide) echo "product_base_fs_file=$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PRODUCT_BASE_FS_PATH)" >> $(1))
|
||||
)
|
||||
$(if $(filter $(2),productservices),\
|
||||
$(if $(BOARD_PRODUCT_SERVICESIMAGE_FILE_SYSTEM_TYPE),$(hide) echo "productservices_fs_type=$(BOARD_PRODUCT_SERVICESIMAGE_FILE_SYSTEM_TYPE)" >> $(1))
|
||||
$(if $(BOARD_PRODUCT_SERVICESIMAGE_EXTFS_INODE_COUNT),$(hide) echo "productservices_extfs_inode_count=$(BOARD_PRODUCT_SERVICESIMAGE_EXTFS_INODE_COUNT)" >> $(1))
|
||||
$(if $(BOARD_PRODUCT_SERVICESIMAGE_EXTFS_RSV_PCT),$(hide) echo "productservices_extfs_rsv_pct=$(BOARD_PRODUCT_SERVICESIMAGE_EXTFS_RSV_PCT)" >> $(1))
|
||||
$(if $(BOARD_PRODUCT_SERVICESIMAGE_PARTITION_SIZE),$(hide) echo "productservices_size=$(BOARD_PRODUCT_SERVICESIMAGE_PARTITION_SIZE)" >> $(1))
|
||||
$(if $(BOARD_PRODUCT_SERVICESIMAGE_JOURNAL_SIZE),$(hide) echo "productservices_journal_size=$(BOARD_PRODUCT_SERVICESIMAGE_JOURNAL_SIZE)" >> $(1))
|
||||
$(if $(BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_COMPRESSOR),$(hide) echo "productservices_squashfs_compressor=$(BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_COMPRESSOR)" >> $(1))
|
||||
$(if $(BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_COMPRESSOR_OPT),$(hide) echo "productservices_squashfs_compressor_opt=$(BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_COMPRESSOR_OPT)" >> $(1))
|
||||
$(if $(BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_BLOCK_SIZE),$(hide) echo "productservices_squashfs_block_size=$(BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_BLOCK_SIZE)" >> $(1))
|
||||
$(if $(BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_DISABLE_4K_ALIGN),$(hide) echo "productservices_squashfs_disable_4k_align=$(BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_DISABLE_4K_ALIGN)" >> $(1))
|
||||
)
|
||||
$(if $(filter $(2),oem),\
|
||||
$(if $(BOARD_OEMIMAGE_PARTITION_SIZE),$(hide) echo "oem_size=$(BOARD_OEMIMAGE_PARTITION_SIZE)" >> $(1))
|
||||
$(if $(BOARD_OEMIMAGE_JOURNAL_SIZE),$(hide) echo "oem_journal_size=$(BOARD_OEMIMAGE_JOURNAL_SIZE)" >> $(1))
|
||||
|
@ -1209,6 +1248,7 @@ $(if $(filter eng, $(TARGET_BUILD_VARIANT)),$(hide) echo "verity_disable=true" >
|
|||
$(if $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SYSTEM_VERITY_PARTITION),$(hide) echo "system_verity_block_device=$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SYSTEM_VERITY_PARTITION)" >> $(1))
|
||||
$(if $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_VENDOR_VERITY_PARTITION),$(hide) echo "vendor_verity_block_device=$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_VENDOR_VERITY_PARTITION)" >> $(1))
|
||||
$(if $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PRODUCT_VERITY_PARTITION),$(hide) echo "product_verity_block_device=$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PRODUCT_VERITY_PARTITION)" >> $(1))
|
||||
$(if $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PRODUCT_SERVICES_VERITY_PARTITION),$(hide) echo "productservices_verity_block_device=$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PRODUCT_SERVICES_VERITY_PARTITION)" >> $(1))
|
||||
$(if $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SUPPORTS_VBOOT),$(hide) echo "vboot=$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SUPPORTS_VBOOT)" >> $(1))
|
||||
$(if $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SUPPORTS_VBOOT),$(hide) echo "vboot_key=$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_VBOOT_SIGNING_KEY)" >> $(1))
|
||||
$(if $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SUPPORTS_VBOOT),$(hide) echo "vboot_subkey=$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_VBOOT_SIGNING_SUBKEY)" >> $(1))
|
||||
|
@ -1236,6 +1276,11 @@ $(if $(BOARD_AVB_ENABLE),\
|
|||
$(hide) echo "avb_product_key_path=$(BOARD_AVB_PRODUCT_KEY_PATH)" >> $(1)
|
||||
$(hide) echo "avb_product_algorithm=$(BOARD_AVB_PRODUCT_ALGORITHM)" >> $(1)
|
||||
$(hide) echo "avb_product_rollback_index_location=$(BOARD_AVB_PRODUCT_ROLLBACK_INDEX_LOCATION)" >> $(1)))
|
||||
$(if $(BOARD_AVB_ENABLE),\
|
||||
$(if $(BOARD_AVB_PRODUCT_SERVICES_KEY_PATH),\
|
||||
$(hide) echo "avb_productservices_key_path=$(BOARD_AVB_PRODUCT_SERVICES_KEY_PATH)" >> $(1)
|
||||
$(hide) echo "avb_productservices_algorithm=$(BOARD_AVB_PRODUCT_SERVICES_ALGORITHM)" >> $(1)
|
||||
$(hide) echo "avb_productservices_rollback_index_location=$(BOARD_AVB_PRODUCT_SERVICES_ROLLBACK_INDEX_LOCATION)" >> $(1)))
|
||||
$(if $(filter true,$(BOARD_USES_RECOVERY_AS_BOOT)),\
|
||||
$(hide) echo "recovery_as_boot=true" >> $(1))
|
||||
$(if $(filter true,$(BOARD_BUILD_SYSTEM_ROOT_IMAGE)),\
|
||||
|
@ -1248,7 +1293,7 @@ endef
|
|||
# $(1): the path of the output dictionary file
|
||||
# $(2): additional "key=value" pairs to append to the dictionary file.
|
||||
define generate-userimage-prop-dictionary
|
||||
$(call generate-image-prop-dictionary,$(1),system vendor cache userdata product oem,$(2))
|
||||
$(call generate-image-prop-dictionary,$(1),system vendor cache userdata product productservices oem,$(2))
|
||||
endef
|
||||
|
||||
# $(1): the path of the input dictionary file, where each line has the format key=value
|
||||
|
@ -1310,6 +1355,9 @@ endif
|
|||
ifdef BOARD_USES_PRODUCTIMAGE
|
||||
recovery_build_props += $(INSTALLED_PRODUCT_BUILD_PROP_TARGET)
|
||||
endif
|
||||
ifdef BOARD_USES_PRODUCT_SERVICESIMAGE
|
||||
recovery_build_props += $(INSTALLED_PRODUCT_SERVICES_BUILD_PROP_TARGET)
|
||||
endif
|
||||
recovery_resources_common := $(call include-path-for, recovery)/res
|
||||
|
||||
# Set recovery_density to the density bucket of the device.
|
||||
|
@ -1648,11 +1696,27 @@ define create-system-product-symlink
|
|||
endef
|
||||
endif
|
||||
|
||||
# Create symlink /system/product-services to /product-services if necessary.
|
||||
ifdef BOARD_USES_PRODUCT_SERVICESIMAGE
|
||||
define create-system-productservices-symlink
|
||||
$(hide) if [ -d $(TARGET_OUT)/product-services ] && [ ! -h $(TARGET_OUT)/product-services ]; then \
|
||||
echo 'Non-symlink $(TARGET_OUT)/product-services detected!' 1>&2; \
|
||||
echo 'You cannot install files to $(TARGET_OUT)/product-services while building a separate product-services.img!' 1>&2; \
|
||||
exit 1; \
|
||||
fi
|
||||
$(hide) ln -sf /product-services $(TARGET_OUT)/product-services
|
||||
endef
|
||||
else
|
||||
define create-system-productservices-symlink
|
||||
endef
|
||||
endif
|
||||
|
||||
# $(1): output file
|
||||
define build-systemimage-target
|
||||
@echo "Target system fs image: $(1)"
|
||||
$(call create-system-vendor-symlink)
|
||||
$(call create-system-product-symlink)
|
||||
$(call create-system-productservices-symlink)
|
||||
@mkdir -p $(dir $(1)) $(systemimage_intermediates) && rm -rf $(systemimage_intermediates)/system_image_info.txt
|
||||
$(call generate-image-prop-dictionary, $(systemimage_intermediates)/system_image_info.txt,system, \
|
||||
skip_fsck=true)
|
||||
|
@ -1732,6 +1796,7 @@ define build-systemtarball-target
|
|||
$(call pretty,"Target system fs tarball: $(INSTALLED_SYSTEMTARBALL_TARGET)")
|
||||
$(call create-system-vendor-symlink)
|
||||
$(call create-system-product-symlink)
|
||||
$(call create-system-productservices-symlink)
|
||||
$(MKTARBALL) $(FS_GET_STATS) \
|
||||
$(PRODUCT_OUT) system $(PRIVATE_SYSTEM_TAR) \
|
||||
$(INSTALLED_SYSTEMTARBALL_TARGET) $(TARGET_OUT)
|
||||
|
@ -1816,6 +1881,10 @@ ifdef BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE
|
|||
$(hide) cd $(dir $@) && zip -qryX $(notdir $@) \
|
||||
$(TARGET_COPY_OUT_PRODUCT)
|
||||
endif
|
||||
ifdef BOARD_PRODUCT_SERVICESIMAGE_FILE_SYSTEM_TYPE
|
||||
$(hide) cd $(dir $@) && zip -qryX $(notdir $@) \
|
||||
$(TARGET_COPY_OUT_PRODUCT_SERVICES)
|
||||
endif
|
||||
ifneq ($(PDK_PLATFORM_JAVA_ZIP_CONTENTS),)
|
||||
$(hide) cd $(OUT_DIR) && zip -qryX $(patsubst $(OUT_DIR)/%,%,$@) $(PDK_PLATFORM_JAVA_ZIP_CONTENTS)
|
||||
endif
|
||||
|
@ -2217,6 +2286,58 @@ INSTALLED_PRODUCTIMAGE_TARGET := $(PRODUCT_OUT)/product.img
|
|||
$(eval $(call copy-one-file,$(BOARD_PREBUILT_PRODUCTIMAGE),$(INSTALLED_PRODUCTIMAGE_TARGET)))
|
||||
endif
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# product-services partition image
|
||||
ifdef BOARD_PRODUCT_SERVICESIMAGE_FILE_SYSTEM_TYPE
|
||||
INTERNAL_PRODUCT_SERVICESIMAGE_FILES := \
|
||||
$(filter $(TARGET_OUT_PRODUCT_SERVICES)/%,\
|
||||
$(ALL_DEFAULT_INSTALLED_MODULES)\
|
||||
$(ALL_PDK_FUSION_FILES)) \
|
||||
$(PDK_FUSION_SYMLINK_STAMP)
|
||||
|
||||
# platform.zip depends on $(INTERNAL_PRODUCT_SERVICESIMAGE_FILES).
|
||||
$(INSTALLED_PLATFORM_ZIP) : $(INTERNAL_PRODUCT_SERVICESIMAGE_FILES)
|
||||
|
||||
INSTALLED_FILES_FILE_PRODUCT_SERVICES := $(PRODUCT_OUT)/installed-files-productservices.txt
|
||||
INSTALLED_FILES_JSON_PRODUCT_SERVICES := $(INSTALLED_FILES_FILE_PRODUCT_SERVICES:.txt=.json)
|
||||
$(INSTALLED_FILES_FILE_PRODUCT_SERVICES): .KATI_IMPLICIT_OUTPUTS := $(INSTALLED_FILES_JSON_PRODUCT_SERVICES)
|
||||
$(INSTALLED_FILES_FILE_PRODUCT_SERVICES) : $(INTERNAL_PRODUCT_SERVICESIMAGE_FILES) $(FILESLIST)
|
||||
@echo Installed file list: $@
|
||||
@mkdir -p $(dir $@)
|
||||
@rm -f $@
|
||||
$(hide) $(FILESLIST) $(TARGET_OUT_PRODUCT_SERVICES) > $(@:.txt=.json)
|
||||
$(hide) build/tools/fileslist_util.py -c $(@:.txt=.json) > $@
|
||||
|
||||
productservicesimage_intermediates := \
|
||||
$(call intermediates-dir-for,PACKAGING,productservices)
|
||||
BUILT_PRODUCT_SERVICESIMAGE_TARGET := $(PRODUCT_OUT)/product-services.img
|
||||
define build-productservicesimage-target
|
||||
$(call pretty,"Target product-services fs image: $(INSTALLED_PRODUCT_SERVICESIMAGE_TARGET)")
|
||||
@mkdir -p $(TARGET_OUT_PRODUCT_SERVICES)
|
||||
@mkdir -p $(productservicesimage_intermediates) && rm -rf $(productservicesimage_intermediates)/productservices_image_info.txt
|
||||
$(call generate-userimage-prop-dictionary, $(productservicesimage_intermediates)/productservices_image_info.txt, skip_fsck=true)
|
||||
$(hide) PATH=$(foreach p,$(INTERNAL_USERIMAGES_BINARY_PATHS),$(p):)$$PATH \
|
||||
./build/tools/releasetools/build_image.py \
|
||||
$(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.
|
||||
INSTALLED_PRODUCT_SERVICESIMAGE_TARGET := $(BUILT_PRODUCT_SERVICESIMAGE_TARGET)
|
||||
$(INSTALLED_PRODUCT_SERVICESIMAGE_TARGET): $(INTERNAL_USERIMAGES_DEPS) $(INTERNAL_PRODUCT_SERVICESIMAGE_FILES) $(INSTALLED_FILES_FILE_PRODUCT_SERVICES) $(BUILD_IMAGE_SRCS)
|
||||
$(build-productservicesimage-target)
|
||||
|
||||
.PHONY: productservicesimage-nodeps psnod
|
||||
productservicesimage-nodeps psnod: | $(INTERNAL_USERIMAGES_DEPS)
|
||||
$(build-productservicesimage-target)
|
||||
|
||||
sync: $(INTERNAL_PRODUCT_SERVICESIMAGE_FILES)
|
||||
|
||||
else ifdef BOARD_PREBUILT_PRODUCT_SERVICESIMAGE
|
||||
INSTALLED_PRODUCT_SERVICESIMAGE_TARGET := $(PRODUCT_OUT)/product-services.img
|
||||
$(eval $(call copy-one-file,$(BOARD_PREBUILT_PRODUCT_SERVICESIMAGE),$(INSTALLED_PRODUCT_SERVICESIMAGE_TARGET)))
|
||||
endif
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# dtbo image
|
||||
ifdef BOARD_PREBUILT_DTBOIMAGE
|
||||
|
@ -2261,6 +2382,7 @@ SYSTEM_FOOTER_ARGS := BOARD_AVB_SYSTEM_ADD_HASHTREE_FOOTER_ARGS
|
|||
VENDOR_FOOTER_ARGS := BOARD_AVB_VENDOR_ADD_HASHTREE_FOOTER_ARGS
|
||||
RECOVERY_FOOTER_ARGS := BOARD_AVB_RECOVERY_ADD_HASH_FOOTER_ARGS
|
||||
PRODUCT_FOOTER_ARGS := BOARD_AVB_PRODUCT_ADD_HASHTREE_FOOTER_ARGS
|
||||
PRODUCT_SERVICES_FOOTER_ARGS := BOARD_AVB_PRODUCT_SERVICES_ADD_HASHTREE_FOOTER_ARGS
|
||||
|
||||
# Check and set required build variables for a chain partition.
|
||||
# $(1): the partition to enable AVB chain, e.g., BOOT or SYSTEM.
|
||||
|
@ -2378,6 +2500,9 @@ define extract-avb-chain-public-keys
|
|||
$(if $(BOARD_AVB_PRODUCT_KEY_PATH),\
|
||||
$(hide) $(AVBTOOL) extract_public_key --key $(BOARD_AVB_PRODUCT_KEY_PATH) \
|
||||
--output $(1)/product.avbpubkey)
|
||||
$(if $(BOARD_AVB_PRODUCT_SERVICES_KEY_PATH),\
|
||||
$(hide) $(AVBTOOL) extract_public_key --key $(BOARD_AVB_PRODUCT_SERVICES_KEY_PATH) \
|
||||
--output $(1)/product-services.avbpubkey)
|
||||
$(if $(BOARD_AVB_DTBO_KEY_PATH),\
|
||||
$(hide) $(AVBTOOL) extract_public_key --key $(BOARD_AVB_DTBO_KEY_PATH) \
|
||||
--output $(1)/dtbo.avbpubkey)
|
||||
|
@ -2405,6 +2530,7 @@ $(INSTALLED_VBMETAIMAGE_TARGET): \
|
|||
$(INSTALLED_SYSTEMIMAGE) \
|
||||
$(INSTALLED_VENDORIMAGE_TARGET) \
|
||||
$(INSTALLED_PRODUCTIMAGE_TARGET) \
|
||||
$(INSTALLED_PRODUCT_SERVICESIMAGE_TARGET) \
|
||||
$(INSTALLED_DTBOIMAGE_TARGET) \
|
||||
$(INSTALLED_RECOVERYIMAGE_TARGET) \
|
||||
$(BOARD_AVB_KEY_PATH)
|
||||
|
@ -2666,6 +2792,7 @@ $(BUILT_TARGET_FILES_PACKAGE): \
|
|||
$(INSTALLED_CACHEIMAGE_TARGET) \
|
||||
$(INSTALLED_VENDORIMAGE_TARGET) \
|
||||
$(INSTALLED_PRODUCTIMAGE_TARGET) \
|
||||
$(INSTALLED_PRODUCT_SERVICESIMAGE_TARGET) \
|
||||
$(INSTALLED_VBMETAIMAGE_TARGET) \
|
||||
$(INSTALLED_DTBOIMAGE_TARGET) \
|
||||
$(INTERNAL_SYSTEMOTHERIMAGE_FILES) \
|
||||
|
@ -2675,6 +2802,7 @@ $(BUILT_TARGET_FILES_PACKAGE): \
|
|||
$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SYSTEM_BASE_FS_PATH) \
|
||||
$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_VENDOR_BASE_FS_PATH) \
|
||||
$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PRODUCT_BASE_FS_PATH) \
|
||||
$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PRODUCT_SERVICES_BASE_FS_PATH) \
|
||||
$(SELINUX_FC) \
|
||||
$(APKCERTS_FILE) \
|
||||
$(SOONG_ZIP) \
|
||||
|
@ -2690,6 +2818,7 @@ $(BUILT_TARGET_FILES_PACKAGE): \
|
|||
@echo "Package target files: $@"
|
||||
$(call create-system-vendor-symlink)
|
||||
$(call create-system-product-symlink)
|
||||
$(call create-system-productservices-symlink)
|
||||
$(hide) rm -rf $@ $@.list $(zip_root)
|
||||
$(hide) mkdir -p $(dir $@) $(zip_root)
|
||||
ifneq (,$(INSTALLED_RECOVERYIMAGE_TARGET)$(filter true,$(BOARD_USES_RECOVERY_AS_BOOT)))
|
||||
|
@ -2763,6 +2892,11 @@ ifdef BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE
|
|||
$(hide) $(call package_files-copy-root, \
|
||||
$(TARGET_OUT_PRODUCT),$(zip_root)/PRODUCT)
|
||||
endif
|
||||
ifdef BOARD_PRODUCT_SERVICESIMAGE_FILE_SYSTEM_TYPE
|
||||
@# Contents of the product-services image
|
||||
$(hide) $(call package_files-copy-root, \
|
||||
$(TARGET_OUT_PRODUCT_SERVICES),$(zip_root)/PRODUCT_SERVICES)
|
||||
endif
|
||||
ifdef INSTALLED_SYSTEMOTHERIMAGE_TARGET
|
||||
@# Contents of the system_other image
|
||||
$(hide) $(call package_files-copy-root, \
|
||||
|
@ -2834,6 +2968,10 @@ ifneq ($(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PRODUCT_BASE_FS_PATH),)
|
|||
$(hide) cp $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PRODUCT_BASE_FS_PATH) \
|
||||
$(zip_root)/META/$(notdir $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PRODUCT_BASE_FS_PATH))
|
||||
endif
|
||||
ifneq ($(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PRODUCT_SERVICES_BASE_FS_PATH),)
|
||||
$(hide) cp $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PRODUCT_SERVICES_BASE_FS_PATH) \
|
||||
$(zip_root)/META/$(notdir $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PRODUCT_SERVICES_BASE_FS_PATH))
|
||||
endif
|
||||
ifneq ($(strip $(SANITIZE_TARGET)),)
|
||||
# We need to create userdata.img with real data because the instrumented libraries are in userdata.img.
|
||||
$(hide) echo "userdata_img_with_data=true" >> $(zip_root)/META/misc_info.txt
|
||||
|
@ -2910,6 +3048,10 @@ ifdef BOARD_PREBUILT_PRODUCTIMAGE
|
|||
$(hide) mkdir -p $(zip_root)/IMAGES
|
||||
$(hide) cp $(INSTALLED_PRODUCTIMAGE_TARGET) $(zip_root)/IMAGES/
|
||||
endif
|
||||
ifdef BOARD_PREBUILT_PRODUCT_SERVICESIMAGE
|
||||
$(hide) mkdir -p $(zip_root)/IMAGES
|
||||
$(hide) cp $(INSTALLED_PRODUCT_SERVICESIMAGE_TARGET) $(zip_root)/IMAGES/
|
||||
endif
|
||||
ifdef BOARD_PREBUILT_BOOTIMAGE
|
||||
$(hide) mkdir -p $(zip_root)/IMAGES
|
||||
$(hide) cp $(INSTALLED_BOOTIMAGE_TARGET) $(zip_root)/IMAGES/
|
||||
|
@ -2943,6 +3085,9 @@ endif
|
|||
ifdef BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE
|
||||
$(hide) $(call fs_config,$(zip_root)/PRODUCT,product/) > $(zip_root)/META/product_filesystem_config.txt
|
||||
endif
|
||||
ifdef BOARD_PRODUCT_SERVICESIMAGE_FILE_SYSTEM_TYPE
|
||||
$(hide) $(call fs_config,$(zip_root)/PRODUCT_SERVICES,product-services/) > $(zip_root)/META/productservices_filesystem_config.txt
|
||||
endif
|
||||
ifeq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true)
|
||||
@# When using BOARD_BUILD_SYSTEM_ROOT_IMAGE, ROOT always contains the files for the root under
|
||||
@# normal boot. BOOT/RAMDISK exists only if additionally using BOARD_USES_RECOVERY_AS_BOOT.
|
||||
|
@ -3067,6 +3212,7 @@ $(SYMBOLS_ZIP): $(INSTALLED_SYSTEMIMAGE) \
|
|||
$(INSTALLED_USERDATAIMAGE_TARGET) \
|
||||
$(INSTALLED_VENDORIMAGE_TARGET) \
|
||||
$(INSTALLED_PRODUCTIMAGE_TARGET) \
|
||||
$(INSTALLED_PRODUCT_SERVICESIMAGE_TARGET) \
|
||||
$(updater_dep)
|
||||
endif
|
||||
$(SYMBOLS_ZIP): PRIVATE_LIST_FILE := $(call intermediates-dir-for,PACKAGING,symbols)/filelist
|
||||
|
@ -3090,7 +3236,8 @@ $(COVERAGE_ZIP): $(INSTALLED_SYSTEMIMAGE) \
|
|||
$(INSTALLED_BOOTIMAGE_TARGET) \
|
||||
$(INSTALLED_USERDATAIMAGE_TARGET) \
|
||||
$(INSTALLED_VENDORIMAGE_TARGET) \
|
||||
$(INSTALLED_PRODUCTIMAGE_TARGET)
|
||||
$(INSTALLED_PRODUCTIMAGE_TARGET) \
|
||||
$(INSTALLED_PRODUCT_SERVICESIMAGE_TARGET)
|
||||
endif
|
||||
$(COVERAGE_ZIP): PRIVATE_LIST_FILE := $(call intermediates-dir-for,PACKAGING,coverage)/filelist
|
||||
$(COVERAGE_ZIP): $(SOONG_ZIP)
|
||||
|
@ -3199,6 +3346,15 @@ $(INSTALLED_QEMU_PRODUCTIMAGE): $(INSTALLED_PRODUCTIMAGE_TARGET) $(MK_QEMU_IMAGE
|
|||
productimage: $(INSTALLED_QEMU_PRODUCTIMAGE)
|
||||
droidcore: $(INSTALLED_QEMU_PRODUCTIMAGE)
|
||||
endif
|
||||
ifeq ($(BOARD_USES_PRODUCT_SERVICESIMAGE),true)
|
||||
INSTALLED_QEMU_PRODUCT_SERVICESIMAGE := $(PRODUCT_OUT)/product-services-qemu.img
|
||||
$(INSTALLED_QEMU_PRODUCT_SERVICESIMAGE): $(INSTALLED_PRODUCT_SERVICESIMAGE_TARGET) $(MK_QEMU_IMAGE_SH) $(SGDISK_HOST)
|
||||
@echo Create product-services-qemu.img
|
||||
(export SGDISK=$(SGDISK_HOST); $(MK_QEMU_IMAGE_SH) ${PRODUCT_OUT}/product-services.img)
|
||||
|
||||
productservicesimage: $(INSTALLED_QEMU_PRODUCT_SERVICESIMAGE)
|
||||
droidcore: $(INSTALLED_QEMU_PRODUCT_SERVICESIMAGE)
|
||||
endif
|
||||
endif
|
||||
# -----------------------------------------------------------------
|
||||
# The emulator package
|
||||
|
|
|
@ -75,6 +75,8 @@ else ifneq ($(filter $(TARGET_OUT_ODM)/%,$(_path)),)
|
|||
LOCAL_ODM_MODULE := true
|
||||
else ifneq ($(filter $(TARGET_OUT_PRODUCT)/%,$(_path)),)
|
||||
LOCAL_PRODUCT_MODULE := true
|
||||
else ifneq ($(filter $(TARGET_OUT_PRODUCT_SERVICES)/%,$(_path)),)
|
||||
LOCAL_PRODUCT_SERVICES_MODULE := true
|
||||
endif
|
||||
_path :=
|
||||
|
||||
|
@ -205,6 +207,8 @@ else ifeq (true,$(LOCAL_ODM_MODULE))
|
|||
partition_tag := _ODM
|
||||
else ifeq (true,$(LOCAL_PRODUCT_MODULE))
|
||||
partition_tag := _PRODUCT
|
||||
else ifeq (true,$(LOCAL_PRODUCT_SERVICES_MODULE))
|
||||
partition_tag := _PRODUCT_SERVICES
|
||||
else ifeq (NATIVE_TESTS,$(LOCAL_MODULE_CLASS))
|
||||
partition_tag := _DATA
|
||||
else
|
||||
|
|
|
@ -211,6 +211,7 @@ LOCAL_PRIVATE_PLATFORM_APIS:=
|
|||
LOCAL_PRIVILEGED_MODULE:=
|
||||
# '',full,custom,disabled,obfuscation,optimization
|
||||
LOCAL_PRODUCT_MODULE:=
|
||||
LOCAL_PRODUCT_SERVICES_MODULE:=
|
||||
LOCAL_PROGUARD_ENABLED:=
|
||||
LOCAL_PROGUARD_FLAG_FILES:=
|
||||
LOCAL_PROGUARD_FLAGS:=
|
||||
|
|
|
@ -1125,6 +1125,7 @@ dont_bother_goals := out \
|
|||
bptimage-nodeps \
|
||||
vnod vendorimage-nodeps \
|
||||
pnod productimage-nodeps \
|
||||
psnod productservicesimage-nodeps \
|
||||
systemotherimage-nodeps \
|
||||
ramdisk-nodeps \
|
||||
bootimage-nodeps \
|
||||
|
|
|
@ -180,6 +180,7 @@ TARGET_COPY_OUT_ASAN := $(TARGET_COPY_OUT_DATA)/asan
|
|||
TARGET_COPY_OUT_OEM := oem
|
||||
TARGET_COPY_OUT_ODM := odm
|
||||
TARGET_COPY_OUT_PRODUCT := product
|
||||
TARGET_COPY_OUT_PRODUCT_SERVICES := product-services
|
||||
TARGET_COPY_OUT_ROOT := root
|
||||
TARGET_COPY_OUT_RECOVERY := recovery
|
||||
|
||||
|
@ -210,6 +211,17 @@ _product_path_placeholder := ||PRODUCT-PATH-PH||
|
|||
TARGET_COPY_OUT_PRODUCT := $(_product_path_placeholder)
|
||||
###########################################
|
||||
|
||||
###########################################
|
||||
# Define TARGET_COPY_OUT_PRODUCT_SERVICES to a placeholder, for at this point
|
||||
# we don't know if the device wants to build a separate product-services.img
|
||||
# or just build product stuff into system.img.
|
||||
# A device can set up TARGET_COPY_OUT_PRODUCT_SERVICES to "product-services" in its
|
||||
# BoardConfig.mk.
|
||||
# We'll substitute with the real value after loading BoardConfig.mk.
|
||||
_productservices_path_placeholder := ||PRODUCTSERVICES-PATH-PH||
|
||||
TARGET_COPY_OUT_PRODUCT_SERVICES := $(_productservices_path_placeholder)
|
||||
###########################################
|
||||
|
||||
#################################################################
|
||||
# Set up minimal BOOTCLASSPATH list of jars to build/execute
|
||||
# java code with dalvikvm/art.
|
||||
|
@ -341,6 +353,28 @@ else ifdef BOARD_USES_PRODUCTIMAGE
|
|||
$(error TARGET_COPY_OUT_PRODUCT must be set to 'product' to use a product image)
|
||||
endif
|
||||
|
||||
###########################################
|
||||
# Now we can substitute with the real value of TARGET_COPY_OUT_PRODUCT_SERVICES
|
||||
ifeq ($(TARGET_COPY_OUT_PRODUCT_SERVICES),$(_productservices_path_placeholder))
|
||||
TARGET_COPY_OUT_PRODUCT_SERVICES := system/product-services
|
||||
else ifeq ($(filter product-services system/product-services,$(TARGET_COPY_OUT_PRODUCT_SERVICES)),)
|
||||
$(error TARGET_COPY_OUT_PRODUCT_SERVICES must be either 'product-services' or 'system/product-services', seeing '$(TARGET_COPY_OUT_PRODUCT_SERVICES)'.)
|
||||
endif
|
||||
PRODUCT_SERVICES_COPY_FILES := $(subst $(_productservices_path_placeholder),$(TARGET_COPY_OUT_PRODUCT_SERVICES),$(PRODUCT_SERVICES_COPY_FILES))
|
||||
|
||||
BOARD_USES_PRODUCT_SERVICESIMAGE :=
|
||||
ifdef BOARD_PREBUILT_PRODUCT_SERVICESIMAGE
|
||||
BOARD_USES_PRODUCT_SERVICESIMAGE := true
|
||||
endif
|
||||
ifdef BOARD_PRODUCT_SERVICESIMAGE_FILE_SYSTEM_TYPE
|
||||
BOARD_USES_PRODUCT_SERVICESIMAGE := true
|
||||
endif
|
||||
ifeq ($(TARGET_COPY_OUT_PRODUCT_SERVICES),product-services)
|
||||
BOARD_USES_PRODUCT_SERVICESIMAGE := true
|
||||
else ifdef BOARD_USES_PRODUCT_SERVICESIMAGE
|
||||
$(error TARGET_COPY_OUT_PRODUCT_SERVICES must be set to 'product-services' to use a product-services image)
|
||||
endif
|
||||
|
||||
###########################################
|
||||
# Ensure that only TARGET_RECOVERY_UPDATER_LIBS *or* AB_OTA_UPDATER is set.
|
||||
TARGET_RECOVERY_UPDATER_LIBS ?=
|
||||
|
@ -880,6 +914,39 @@ $(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_APPS_PRIVILEGED := $(TARGET_OUT_
|
|||
$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_APPS \
|
||||
$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_APPS_PRIVILEGED
|
||||
|
||||
TARGET_OUT_PRODUCT_SERVICES := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_PRODUCT_SERVICES)
|
||||
ifneq ($(filter address,$(SANITIZE_TARGET)),)
|
||||
target_out_productservices_shared_libraries_base := $(PRODUCT_SERVICES_OUT)/$(TARGET_COPY_OUT_ASAN)/product-services
|
||||
ifeq ($(SANITIZE_LITE),true)
|
||||
# When using SANITIZE_LITE, APKs must not be packaged with sanitized libraries, as they will not
|
||||
# work with unsanitized app_process. For simplicity, generate APKs into /data/asan/.
|
||||
target_out_productservices_app_base := $(PRODUCT_SERVICES_OUT)/$(TARGET_COPY_OUT_ASAN)/product-services
|
||||
else
|
||||
target_out_productservices_app_base := $(TARGET_OUT_PRODUCT_SERVICES)
|
||||
endif
|
||||
else
|
||||
target_out_productservices_shared_libraries_base := $(TARGET_OUT_PRODUCT_SERVICES)
|
||||
target_out_productservices_app_base := $(TARGET_OUT_PRODUCT_SERVICES)
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET_IS_64_BIT),true)
|
||||
TARGET_OUT_PRODUCT_SERVICES_SHARED_LIBRARIES := $(target_out_productservices_shared_libraries_base)/lib64
|
||||
else
|
||||
TARGET_OUT_PRODUCT_SERVICES_SHARED_LIBRARIES := $(target_out_productservices_shared_libraries_base)/lib
|
||||
endif
|
||||
TARGET_OUT_PRODUCT_SERVICES_JAVA_LIBRARIES:= $(TARGET_OUT_PRODUCT_SERVICES)/framework
|
||||
TARGET_OUT_PRODUCT_SERVICES_APPS := $(target_out_productservices_app_base)/app
|
||||
TARGET_OUT_PRODUCT_SERVICES_APPS_PRIVILEGED := $(target_out_productservices_app_base)/priv-app
|
||||
TARGET_OUT_PRODUCT_SERVICES_ETC := $(TARGET_OUT_PRODUCT_SERVICES)/etc
|
||||
|
||||
ifeq ($(TARGET_TRANSLATE_2ND_ARCH),true)
|
||||
$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_SERVICES_SHARED_LIBRARIES := $(target_out_productservices_shared_libraries_base)/lib/$(TARGET_2ND_ARCH)
|
||||
else
|
||||
$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_SERVICES_SHARED_LIBRARIES := $(target_out_productservices_shared_libraries_base)/lib
|
||||
endif
|
||||
$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_SERVICES_APPS := $(TARGET_OUT_PRODUCT_SERVICES_APPS)
|
||||
$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_PRODUCT_SERVICES_APPS_PRIVILEGED := $(TARGET_OUT_PRODUCT_SERVICES_APPS_PRIVILEGED)
|
||||
|
||||
TARGET_OUT_BREAKPAD := $(PRODUCT_OUT)/breakpad
|
||||
.KATI_READONLY := TARGET_OUT_BREAKPAD
|
||||
|
||||
|
|
|
@ -1183,6 +1183,9 @@ vendorimage: $(INSTALLED_VENDORIMAGE_TARGET)
|
|||
.PHONY: productimage
|
||||
productimage: $(INSTALLED_PRODUCTIMAGE_TARGET)
|
||||
|
||||
.PHONY: productservicesimage
|
||||
productservicesimage: $(INSTALLED_PRODUCT_SERVICESIMAGE_TARGET)
|
||||
|
||||
.PHONY: systemotherimage
|
||||
systemotherimage: $(INSTALLED_SYSTEMOTHERIMAGE_TARGET)
|
||||
|
||||
|
@ -1214,6 +1217,8 @@ droidcore: files \
|
|||
$(INSTALLED_FILES_JSON_VENDOR) \
|
||||
$(INSTALLED_FILES_FILE_PRODUCT) \
|
||||
$(INSTALLED_FILES_JSON_PRODUCT) \
|
||||
$(INSTALLED_FILES_FILE_PRODUCT_SERVICES) \
|
||||
$(INSTALLED_FILES_JSON_PRODUCT_SERVICES) \
|
||||
$(INSTALLED_FILES_FILE_SYSTEMOTHER) \
|
||||
$(INSTALLED_FILES_JSON_SYSTEMOTHER) \
|
||||
soong_docs
|
||||
|
@ -1284,6 +1289,8 @@ else # TARGET_BUILD_APPS
|
|||
$(INSTALLED_FILES_JSON_VENDOR) \
|
||||
$(INSTALLED_FILES_FILE_PRODUCT) \
|
||||
$(INSTALLED_FILES_JSON_PRODUCT) \
|
||||
$(INSTALLED_FILES_FILE_PRODUCT_SERVICES) \
|
||||
$(INSTALLED_FILES_JSON_PRODUCT_SERVICES) \
|
||||
$(INSTALLED_FILES_FILE_SYSTEMOTHER) \
|
||||
$(INSTALLED_FILES_JSON_SYSTEMOTHER) \
|
||||
$(INSTALLED_BUILD_PROP_TARGET) \
|
||||
|
|
|
@ -118,6 +118,8 @@ ifneq ($(PRODUCT_ENFORCE_RRO_TARGETS),)
|
|||
enforce_rro_enabled :=
|
||||
else ifeq (true,$(LOCAL_PRODUCT_MODULE))
|
||||
enforce_rro_enabled :=
|
||||
else ifeq (true,$(LOCAL_PRODUCT_SERVICES_MODULE))
|
||||
enforce_rro_enabled :=
|
||||
endif
|
||||
else ifeq ($(filter $(TARGET_OUT)/%,$(LOCAL_MODULE_PATH)),)
|
||||
enforce_rro_enabled :=
|
||||
|
|
|
@ -105,6 +105,7 @@ $(OUT_DIR)/products/$(strip $(1)).txt: $(this_makefile)
|
|||
$(hide) echo 'PRODUCT_DEFAULT_PROPERTY_OVERRIDES=$$(PRODUCTS.$(strip $(1)).PRODUCT_DEFAULT_PROPERTY_OVERRIDES)' >> $$@
|
||||
$(hide) echo 'PRODUCT_SYSTEM_DEFAULT_PROPERTIES=$$(PRODUCTS.$(strip $(1)).PRODUCT_SYSTEM_DEFAULT_PROPERTIES)' >> $$@
|
||||
$(hide) echo 'PRODUCT_PRODUCT_PROPERTIES=$$(PRODUCTS.$(strip $(1)).PRODUCT_PRODUCT_PROPERTIES)' >> $$@
|
||||
$(hide) echo 'PRODUCT_PRODUCT_SERVICES_PROPERTIES=$$(PRODUCTS.$(strip $(1)).PRODUCT_PRODUCT_SERVICES_PROPERTIES)' >> $$@
|
||||
$(hide) echo 'PRODUCT_CHARACTERISTICS=$$(PRODUCTS.$(strip $(1)).PRODUCT_CHARACTERISTICS)' >> $$@
|
||||
$(hide) echo 'PRODUCT_COPY_FILES=$$(PRODUCTS.$(strip $(1)).PRODUCT_COPY_FILES)' >> $$@
|
||||
$(hide) echo 'PRODUCT_OTA_PUBLIC_KEYS=$$(PRODUCTS.$(strip $(1)).PRODUCT_OTA_PUBLIC_KEYS)' >> $$@
|
||||
|
|
|
@ -128,6 +128,7 @@ _product_var_list := \
|
|||
PRODUCT_PROPERTY_OVERRIDES \
|
||||
PRODUCT_DEFAULT_PROPERTY_OVERRIDES \
|
||||
PRODUCT_PRODUCT_PROPERTIES \
|
||||
PRODUCT_PRODUCT_SERVICES_PROPERTIES \
|
||||
PRODUCT_CHARACTERISTICS \
|
||||
PRODUCT_COPY_FILES \
|
||||
PRODUCT_OTA_PUBLIC_KEYS \
|
||||
|
@ -167,6 +168,7 @@ _product_var_list := \
|
|||
PRODUCT_SYSTEM_VERITY_PARTITION \
|
||||
PRODUCT_VENDOR_VERITY_PARTITION \
|
||||
PRODUCT_PRODUCT_VERITY_PARTITION \
|
||||
PRODUCT_PRODUCT_SERVICES_VERITY_PARTITION \
|
||||
PRODUCT_SYSTEM_SERVER_DEBUG_INFO \
|
||||
PRODUCT_OTHER_JAVA_DEBUG_INFO \
|
||||
PRODUCT_DEX_PREOPT_MODULE_CONFIGS \
|
||||
|
@ -182,6 +184,7 @@ _product_var_list := \
|
|||
PRODUCT_SYSTEM_BASE_FS_PATH \
|
||||
PRODUCT_VENDOR_BASE_FS_PATH \
|
||||
PRODUCT_PRODUCT_BASE_FS_PATH \
|
||||
PRODUCT_PRODUCT_SERVICES_BASE_FS_PATH \
|
||||
PRODUCT_SHIPPING_API_LEVEL \
|
||||
VENDOR_PRODUCT_RESTRICT_VENDOR_FILES \
|
||||
VENDOR_EXCEPTION_MODULES \
|
||||
|
@ -378,6 +381,8 @@ _product_stash_var_list += \
|
|||
BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE \
|
||||
BOARD_PRODUCTIMAGE_PARTITION_SIZE \
|
||||
BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE \
|
||||
BOARD_PRODUCT_SERVICESIMAGE_PARTITION_SIZE \
|
||||
BOARD_PRODUCT_SERVICESIMAGE_FILE_SYSTEM_TYPE \
|
||||
BOARD_INSTALLER_CMDLINE \
|
||||
|
||||
|
||||
|
|
|
@ -373,6 +373,14 @@ PRODUCT_PRODUCT_PROPERTIES := \
|
|||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PRODUCT_PROPERTIES))
|
||||
.KATI_READONLY := PRODUCT_PRODUCT_PROPERTIES
|
||||
|
||||
|
||||
# A list of property assignments, like "key = value", with zero or more
|
||||
# whitespace characters on either side of the '='.
|
||||
# used for adding properties to build.prop of product partition
|
||||
PRODUCT_PRODUCT_SERVICES_PROPERTIES := \
|
||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PRODUCT_SERVICES_PROPERTIES))
|
||||
.KATI_READONLY := PRODUCT_PRODUCT_SERVICES_PROPERTIES
|
||||
|
||||
# Should we use the default resources or add any product specific overlays
|
||||
PRODUCT_PACKAGE_OVERLAYS := \
|
||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGE_OVERLAYS))
|
||||
|
|
|
@ -134,6 +134,7 @@ $(call add_json_bool, Use_lmkd_stats_log, $(filter true,$(TARGET_
|
|||
$(call add_json_str, VendorPath, $(TARGET_COPY_OUT_VENDOR))
|
||||
$(call add_json_str, OdmPath, $(TARGET_COPY_OUT_ODM))
|
||||
$(call add_json_str, ProductPath, $(TARGET_COPY_OUT_PRODUCT))
|
||||
$(call add_json_str, ProductServicesPath, $(TARGET_COPY_OUT_PRODUCT_SERVICES))
|
||||
$(call add_json_bool, MinimizeJavaDebugInfo, $(filter true,$(PRODUCT_MINIMIZE_JAVA_DEBUG_INFO)))
|
||||
|
||||
$(call add_json_bool, UseGoma, $(filter-out false,$(USE_GOMA)))
|
||||
|
|
2
help.sh
2
help.sh
|
@ -40,6 +40,8 @@ Common goals are:
|
|||
Stands for "Vendor, NO Dependencies"
|
||||
pnod Quickly rebuild the product image from built packages
|
||||
Stands for "Product, NO Dependencies"
|
||||
psnod Quickly rebuild the product-services image from built packages
|
||||
Stands for "ProductServices, NO Dependencies"
|
||||
|
||||
|
||||
So, for example, you could run:
|
||||
|
|
|
@ -74,7 +74,7 @@ OPTIONS.is_signing = False
|
|||
|
||||
|
||||
# Partitions that should have their care_map added to META/care_map.txt.
|
||||
PARTITIONS_WITH_CARE_MAP = ('system', 'vendor', 'product')
|
||||
PARTITIONS_WITH_CARE_MAP = ('system', 'vendor', 'product', 'product-services')
|
||||
|
||||
|
||||
class OutputFile(object):
|
||||
|
@ -196,6 +196,24 @@ def AddProduct(output_zip):
|
|||
return img.name
|
||||
|
||||
|
||||
def AddProductServices(output_zip):
|
||||
"""Turn the contents of PRODUCT_SERVICES into a product-services image and
|
||||
store it in output_zip."""
|
||||
|
||||
img = OutputFile(output_zip, OPTIONS.input_tmp, "IMAGES",
|
||||
"product-services.img")
|
||||
if os.path.exists(img.input_name):
|
||||
print("product-services.img already exists; no need to rebuild...")
|
||||
return img.input_name
|
||||
|
||||
block_list = OutputFile(
|
||||
output_zip, OPTIONS.input_tmp, "IMAGES", "product-services.map")
|
||||
CreateImage(
|
||||
OPTIONS.input_tmp, OPTIONS.info_dict, "product-services", img,
|
||||
block_list=block_list)
|
||||
return img.name
|
||||
|
||||
|
||||
def AddDtbo(output_zip):
|
||||
"""Adds the DTBO image.
|
||||
|
||||
|
@ -628,16 +646,22 @@ def AddImagesToTargetFiles(filename):
|
|||
|
||||
has_recovery = OPTIONS.info_dict.get("no_recovery") != "true"
|
||||
|
||||
# {vendor,product}.img is unlike system.img or system_other.img. Because it
|
||||
# could be built from source, or dropped into target_files.zip as a prebuilt
|
||||
# blob. We consider either of them as {vendor,product}.img being available,
|
||||
# which could be used when generating vbmeta.img for AVB.
|
||||
# {vendor,product,product-services}.img are unlike system.img or
|
||||
# system_other.img. Because it could be built from source, or dropped into
|
||||
# target_files.zip as a prebuilt blob. We consider either of them as
|
||||
# {vendor,product,product-services}.img being available, which could be
|
||||
# used when generating vbmeta.img for AVB.
|
||||
has_vendor = (os.path.isdir(os.path.join(OPTIONS.input_tmp, "VENDOR")) or
|
||||
os.path.exists(os.path.join(OPTIONS.input_tmp, "IMAGES",
|
||||
"vendor.img")))
|
||||
has_product = (os.path.isdir(os.path.join(OPTIONS.input_tmp, "PRODUCT")) or
|
||||
os.path.exists(os.path.join(OPTIONS.input_tmp, "IMAGES",
|
||||
"product.img")))
|
||||
has_productservices = (os.path.isdir(os.path.join(OPTIONS.input_tmp,
|
||||
"PRODUCTSERVICES")) or
|
||||
os.path.exists(os.path.join(OPTIONS.input_tmp,
|
||||
"IMAGES",
|
||||
"product-services.img")))
|
||||
has_system_other = os.path.isdir(os.path.join(OPTIONS.input_tmp,
|
||||
"SYSTEM_OTHER"))
|
||||
|
||||
|
@ -714,6 +738,10 @@ def AddImagesToTargetFiles(filename):
|
|||
banner("product")
|
||||
partitions['product'] = AddProduct(output_zip)
|
||||
|
||||
if has_productservices:
|
||||
banner("product-services")
|
||||
partitions['product-services'] = AddProductServices(output_zip)
|
||||
|
||||
if has_system_other:
|
||||
banner("system_other")
|
||||
AddSystemOther(output_zip)
|
||||
|
|
|
@ -875,6 +875,27 @@ def ImagePropFromGlobalDict(glob_dict, mount_point):
|
|||
copy_prop("product_extfs_inode_count", "extfs_inode_count")
|
||||
if not copy_prop("product_extfs_rsv_pct", "extfs_rsv_pct"):
|
||||
d["extfs_rsv_pct"] = "0"
|
||||
elif mount_point == "product-services":
|
||||
copy_prop("avb_productservices_hashtree_enable", "avb_hashtree_enable")
|
||||
copy_prop("avb_productservices_add_hashtree_footer_args",
|
||||
"avb_add_hashtree_footer_args")
|
||||
copy_prop("avb_productservices_key_path", "avb_key_path")
|
||||
copy_prop("avb_productservices_algorithm", "avb_algorithm")
|
||||
copy_prop("productservices_fs_type", "fs_type")
|
||||
copy_prop("productservices_size", "partition_size")
|
||||
if not copy_prop("productservices_journal_size", "journal_size"):
|
||||
d["journal_size"] = "0"
|
||||
copy_prop("productservices_verity_block_device", "verity_block_device")
|
||||
copy_prop("productservices_squashfs_compressor", "squashfs_compressor")
|
||||
copy_prop("productservices_squashfs_compressor_opt",
|
||||
"squashfs_compressor_opt")
|
||||
copy_prop("productservices_squashfs_block_size", "squashfs_block_size")
|
||||
copy_prop("productservices_squashfs_disable_4k_align",
|
||||
"squashfs_disable_4k_align")
|
||||
copy_prop("productservices_base_fs_file", "base_fs_file")
|
||||
copy_prop("productservices_extfs_inode_count", "extfs_inode_count")
|
||||
if not copy_prop("productservices_extfs_rsv_pct", "extfs_rsv_pct"):
|
||||
d["extfs_rsv_pct"] = "0"
|
||||
elif mount_point == "oem":
|
||||
copy_prop("fs_type", "fs_type")
|
||||
copy_prop("oem_size", "partition_size")
|
||||
|
@ -955,6 +976,8 @@ def main(argv):
|
|||
mount_point = "oem"
|
||||
elif image_filename == "product.img":
|
||||
mount_point = "product"
|
||||
elif image_filename == "product-services.img":
|
||||
mount_point = "product-services"
|
||||
else:
|
||||
print("error: unknown image file name ", image_filename, file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
|
|
@ -78,7 +78,8 @@ SPECIAL_CERT_STRINGS = ("PRESIGNED", "EXTERNAL")
|
|||
|
||||
|
||||
# The partitions allowed to be signed by AVB (Android verified boot 2.0).
|
||||
AVB_PARTITIONS = ('boot', 'recovery', 'system', 'vendor', 'product', 'dtbo')
|
||||
AVB_PARTITIONS = ('boot', 'recovery', 'system', 'vendor', 'product',
|
||||
'product-services', 'dtbo')
|
||||
|
||||
|
||||
class ErrorCode(object):
|
||||
|
|
Loading…
Reference in a new issue