Merge "Merge TP1A.220422.001" into t-keystone-qcom-dev

This commit is contained in:
Deyao Ren 2022-05-04 16:10:09 +00:00 committed by Gerrit Code Review
commit c853473126
45 changed files with 1097 additions and 410 deletions

View File

@ -94,6 +94,8 @@ $(pcf_ignored_file): PRIVATE_IGNORED := $(sort $(product_copy_files_ignored))
$(pcf_ignored_file):
echo "$(PRIVATE_IGNORED)" | tr " " "\n" >$@
$(call declare-0p-target,$(pcf_ignored_file))
$(call dist-for-goals,droidcore-unbundled,$(pcf_ignored_file):logs/$(notdir $(pcf_ignored_file)))
pcf_ignored_file :=
@ -168,6 +170,8 @@ $(ndk_doxygen_out)/index.html: $(ndk_docs_srcs) $(SOONG_OUT_DIR)/ndk.timestamp
echo "HTML_OUTPUT=$(ndk_doxygen_out)" \
) | doxygen -
$(call declare-1p-target,$(ndk_doxygen_out)/index.html,)
# Note: Not a part of the docs target because we don't have doxygen available.
# You can run this target locally if you have doxygen installed.
ndk-docs: $(ndk_doxygen_out)/index.html
@ -223,6 +227,8 @@ $(INSTALLED_SDK_BUILD_PROP_TARGET): $(INSTALLED_BUILD_PROP_TARGET)
echo "$$x"generic >> $@.tmp; done
$(hide) mv $@.tmp $@
$(call declare-0p-target,$(INSTALLED_SDK_BUILD_PROP_TARGET))
# -----------------------------------------------------------------
# declare recovery ramdisk files
ifeq ($(BUILDING_RECOVERY_IMAGE),true)
@ -598,6 +604,8 @@ $(APKCERTS_FILE):
# In case value of PACKAGES is empty.
$(hide) touch $@
$(call declare-0p-target,$(APKCERTS_FILE))
.PHONY: apkcerts-list
apkcerts-list: $(APKCERTS_FILE)
@ -614,6 +622,7 @@ $(BUILD_SYSTEM_STATS):
@rm -f $@
@$(foreach s,$(STATS.MODULE_TYPE),echo "modules_type_make,$(s),$(words $(STATS.MODULE_TYPE.$(s)))" >>$@;)
@$(foreach s,$(STATS.SOONG_MODULE_TYPE),echo "modules_type_soong,$(s),$(STATS.SOONG_MODULE_TYPE.$(s))" >>$@;)
$(call declare-1p-target,$(BUILD_SYSTEM_STATS),build)
$(call dist-for-goals,droidcore-unbundled,$(BUILD_SYSTEM_STATS))
# -----------------------------------------------------------------
@ -634,11 +643,14 @@ $(SOONG_CONV_DATA):
@rm -f $@
@$(foreach s,$(SOONG_CONV),echo "$(s),$(SOONG_CONV.$(s).TYPE),$(sort $(SOONG_CONV.$(s).PROBLEMS)),$(sort $(filter-out $(SOONG_ALREADY_CONV),$(SOONG_CONV.$(s).DEPS))),$(sort $(SOONG_CONV.$(s).MAKEFILES)),$(sort $(SOONG_CONV.$(s).INSTALLED))" >>$@;)
$(call declare-1p-target,$(SOONG_CONV_DATA),build)
SOONG_TO_CONVERT_SCRIPT := build/make/tools/soong_to_convert.py
SOONG_TO_CONVERT := $(PRODUCT_OUT)/soong_to_convert.txt
$(SOONG_TO_CONVERT): $(SOONG_CONV_DATA) $(SOONG_TO_CONVERT_SCRIPT)
@rm -f $@
$(hide) $(SOONG_TO_CONVERT_SCRIPT) $< >$@
$(call declare-1p-target,$(SOONG_TO_CONVERT),build)
$(call dist-for-goals,droidcore-unbundled,$(SOONG_TO_CONVERT))
$(PRODUCT_OUT)/product_packages.txt:
@ -660,6 +672,7 @@ $(MK2BP_REMAINING_HTML): $(SOONG_CONV_DATA) $(MK2BP_CATALOG_SCRIPT) $(PRODUCT_PA
--out-dir="$(OUT_DIR)" \
--mode=html \
> $@
$(call declare-1p-target,$(MK2BP_REMAINING_HTML),build)
$(call dist-for-goals,droidcore-unbundled,$(MK2BP_REMAINING_HTML))
MK2BP_REMAINING_CSV := $(PRODUCT_OUT)/mk2bp_remaining.csv
@ -671,6 +684,7 @@ $(MK2BP_REMAINING_CSV): $(SOONG_CONV_DATA) $(MK2BP_CATALOG_SCRIPT) $(PRODUCT_PAC
--out-dir="$(OUT_DIR)" \
--mode=csv \
> $@
$(call declare-1p-target,$(MK2BP_REMAINING_CSV))
$(call dist-for-goals,droidcore-unbundled,$(MK2BP_REMAINING_CSV))
# -----------------------------------------------------------------
@ -683,12 +697,16 @@ $(WALL_WERROR):
echo "# Modules added default -Wall" >> $@
for m in $(sort $(SOONG_MODULES_ADDED_WALL) $(MODULES_ADDED_WALL)); do echo $$m >> $@; done
$(call declare-0p-target,$(WALL_WERROR))
$(call dist-for-goals,droidcore-unbundled,$(WALL_WERROR))
# -----------------------------------------------------------------
# C/C++ flag information for modules
$(call dist-for-goals,droidcore-unbundled,$(SOONG_MODULES_CFLAG_ARTIFACTS))
$(foreach a,$(SOONG_MODULES_CFLAG_ARTIFACTS),$(call declare-0p-target,$(call word-colon,1,$(a))))
# -----------------------------------------------------------------
# Modules missing profile files
PGO_PROFILE_MISSING := $(PRODUCT_OUT)/pgo_profile_file_missing.txt
@ -697,12 +715,15 @@ $(PGO_PROFILE_MISSING):
echo "# Modules missing PGO profile files" >> $@
for m in $(SOONG_MODULES_MISSING_PGO_PROFILE_FILE); do echo $$m >> $@; done
$(call declare-0p-target,$(PGO_PROFILE_MISSING))
$(call dist-for-goals,droidcore,$(PGO_PROFILE_MISSING))
CERTIFICATE_VIOLATION_MODULES_FILENAME := $(PRODUCT_OUT)/certificate_violation_modules.txt
$(CERTIFICATE_VIOLATION_MODULES_FILENAME):
rm -f $@
$(foreach m,$(sort $(CERTIFICATE_VIOLATION_MODULES)), echo $(m) >> $@;)
$(call declare-0p-target,$(CERTIFICATE_VIOLATION_MODULES_FILENAME))
$(call dist-for-goals,droidcore,$(CERTIFICATE_VIOLATION_MODULES_FILENAME))
# -----------------------------------------------------------------
@ -739,6 +760,8 @@ $(all_event_log_tags_file): $(all_event_log_tags_src) $(MERGETAGS) build/make/to
$(hide) mkdir -p $(dir $@)
$(hide) $(MERGETAGS) -o $@ $(PRIVATE_SRC_FILES)
$(call declare-0p-target,$(all_event_log_tags_file))
# Include tags from all packages included in this product, plus all
# tags that are part of the system (ie, not in a vendor/ or device/
# directory).
@ -817,6 +840,7 @@ $(INSTALLED_FILES_FILE_ROOT) : $(INTERNAL_ROOT_FILES) $(FILESLIST) $(FILESLIST_U
$(FILESLIST_UTIL) -c $(@:.txt=.json) > $@
$(call declare-0p-target,$(INSTALLED_FILES_FILE_ROOT))
$(call declare-0p-target,$(INSTALLED_FILES_JSON_ROOT))
ifeq ($(HOST_OS),linux)
$(call dist-for-goals, sdk sdk_addon, $(INSTALLED_FILES_FILE_ROOT))
@ -851,6 +875,7 @@ $(INSTALLED_FILES_FILE_RAMDISK) : $(INTERNAL_RAMDISK_FILES) $(FILESLIST) $(FILES
$(FILESLIST_UTIL) -c $(@:.txt=.json) > $@
$(eval $(call declare-0p-target,$(INSTALLED_FILES_FILE_RAMDISK)))
$(eval $(call declare-0p-target,$(INSTALLED_FILES_JSON_RAMDISK)))
ifeq ($(HOST_OS),linux)
$(call dist-for-goals, sdk sdk_addon, $(INSTALLED_FILES_FILE_RAMDISK))
@ -951,11 +976,14 @@ INTERNAL_BOOTIMAGE_ARGS := \
INTERNAL_INIT_BOOT_IMAGE_ARGS :=
ifneq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true)
ifneq ($(BUILDING_INIT_BOOT_IMAGE),true)
INTERNAL_BOOTIMAGE_ARGS += --ramdisk $(INSTALLED_RAMDISK_TARGET)
else
INTERNAL_INIT_BOOT_IMAGE_ARGS += --ramdisk $(INSTALLED_RAMDISK_TARGET)
# TODO(b/229701033): clean up BOARD_BUILD_GKI_BOOT_IMAGE_WITHOUT_RAMDISK.
ifneq ($(BOARD_BUILD_GKI_BOOT_IMAGE_WITHOUT_RAMDISK),true)
ifneq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true)
ifneq ($(BUILDING_INIT_BOOT_IMAGE),true)
INTERNAL_BOOTIMAGE_ARGS += --ramdisk $(INSTALLED_RAMDISK_TARGET)
else
INTERNAL_INIT_BOOT_IMAGE_ARGS += --ramdisk $(INSTALLED_RAMDISK_TARGET)
endif
endif
endif
@ -1309,6 +1337,7 @@ $(INSTALLED_FILES_FILE_VENDOR_RAMDISK): $(INTERNAL_VENDOR_RAMDISK_FILES) $(FILES
$(FILESLIST_UTIL) -c $(@:.txt=.json) > $@
$(eval $(call declare-0p-target,$(INSTALLED_FILES_FILE_VENDOR_RAMDISK)))
$(eval $(call declare-0p-target,$(INSTALLED_FILES_JSON_VENDOR_RAMDISK)))
ifdef BOARD_INCLUDE_DTB_IN_BOOTIMG
ifneq ($(BUILDING_VENDOR_KERNEL_BOOT_IMAGE),true)
@ -1429,6 +1458,9 @@ $(INSTALLED_FILES_FILE_VENDOR_KERNEL_RAMDISK): $(INTERNAL_VENDOR_KERNEL_RAMDISK_
$(FILESLIST) $(TARGET_VENDOR_KERNEL_RAMDISK_OUT) > $(@:.txt=.json)
$(FILESLIST_UTIL) -c $(@:.txt=.json) > $@
$(call declare-0p-target,$(INSTALLED_FILES_FILE_VENDOR_KERNEL_RAMDISK))
$(call declare-0p-target,$(INSTALLED_FILES_JSON_VENDOR_KERNEL_RAMDISK))
INTERNAL_VENDOR_KERNEL_BOOTIMAGE_ARGS := --vendor_ramdisk $(INTERNAL_VENDOR_KERNEL_RAMDISK_TARGET)
INSTALLED_VENDOR_KERNEL_BOOTIMAGE_TARGET := $(PRODUCT_OUT)/vendor_kernel_boot.img
$(INSTALLED_VENDOR_KERNEL_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_VENDOR_KERNEL_RAMDISK_TARGET)
@ -1458,6 +1490,14 @@ $(INSTALLED_VENDOR_KERNEL_BOOTIMAGE_TARGET):
$(MKBOOTIMG) $(INTERNAL_VENDOR_KERNEL_BOOTIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --vendor_boot $@
$(call assert-max-image-size,$@,$(BOARD_VENDOR_KERNEL_BOOTIMAGE_PARTITION_SIZE))
endif
$(call declare-1p-container,$(INSTALLED_VENDOR_KERNEL_BOOTIMAGE_TARGET),)
ifdef BOARD_INCLUDE_DTB_IN_BOOTIMG
$(call declare-container-license-deps,$(INSTALLED_VENDOR_KERNEL_BOOTIMAGE_TARGET),\
$(INTERNAL_VENDOR_KERNEL_RAMDISK_TARGET) $(INSTALLED_DTBIMAGE_TARGET),\
$(INSTALLED_VENDOR_KERNEL_BOOTIMAGE_TARGET):)
else
$(call declare-container-license-deps,$(INSTALLED_VENDOR_KERNEL_BOOTIMAGE_TARGET),$(INTERNAL_VENDOR_KERNEL_RAMDISK_TARGET),$(INSTALLED_VENDOR_KERNEL_BOOTIMAGE_TARGET):)
endif
endif # BUILDING_VENDOR_KERNEL_BOOT_IMAGE
# -----------------------------------------------------------------
@ -1484,8 +1524,9 @@ endif # BUILDING_VENDOR_KERNEL_BOOT_IMAGE
define xml-notice-rule
$(1): PRIVATE_PRODUCT := $(2)
$(1): PRIVATE_MESSAGE := $(3)
$(1): PRIVATE_DEPS := $(call corresponding-license-metadata,$(4))
$(1): $(call corresponding-license-metadata,$(4)) $(XMLNOTICE) $(BUILD_SYSTEM)/Makefile
OUT_DIR=$(OUT_DIR) $(XMLNOTICE) -o $$@ -product=$$(PRIVATE_PRODUCT) -title=$$(PRIVATE_MESSAGE) $(foreach prefix, $(5), -strip_prefix=$(prefix)) $(call corresponding-license-metadata,$(4))
OUT_DIR=$(OUT_DIR) $(XMLNOTICE) -o $$@ -product=$$(PRIVATE_PRODUCT) -title=$$(PRIVATE_MESSAGE) $(foreach prefix, $(5), -strip_prefix=$(prefix)) $$(PRIVATE_DEPS)
notice_files: $(1)
endef
@ -1727,8 +1768,12 @@ ifneq ($(filter \
$(BOARD_SYSTEM_DLKMIMAGE_FILE_SYSTEM_TYPE) \
,erofs),)
INTERNAL_USERIMAGES_DEPS += $(MKEROFS)
ifeq ($(BOARD_EROFS_USE_LEGACY_COMPRESSION),true)
BOARD_EROFS_COMPRESSOR ?= "lz4"
else
BOARD_EROFS_COMPRESSOR ?= "lz4hc,9"
endif
endif
ifneq ($(filter \
$(BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE) \
@ -1874,6 +1919,7 @@ $(if $(INTERNAL_USERIMAGES_SPARSE_F2FS_FLAG),$(hide) echo "f2fs_sparse_flag=$(IN
$(if $(BOARD_EROFS_COMPRESSOR),$(hide) echo "erofs_default_compressor=$(BOARD_EROFS_COMPRESSOR)" >> $(1))
$(if $(BOARD_EROFS_PCLUSTER_SIZE),$(hide) echo "erofs_pcluster_size=$(BOARD_EROFS_PCLUSTER_SIZE)" >> $(1))
$(if $(BOARD_EROFS_SHARE_DUP_BLOCKS),$(hide) echo "erofs_share_dup_blocks=$(BOARD_EROFS_SHARE_DUP_BLOCKS)" >> $(1))
$(if $(BOARD_EROFS_USE_LEGACY_COMPRESSION),$(hide) echo "erofs_use_legacy_compression=$(BOARD_EROFS_USE_LEGACY_COMPRESSION)" >> $(1))
$(if $(BOARD_EXT4_SHARE_DUP_BLOCKS),$(hide) echo "ext4_share_dup_blocks=$(BOARD_EXT4_SHARE_DUP_BLOCKS)" >> $(1))
$(if $(BOARD_FLASH_LOGICAL_BLOCK_SIZE), $(hide) echo "flash_logical_block_size=$(BOARD_FLASH_LOGICAL_BLOCK_SIZE)" >> $(1))
$(if $(BOARD_FLASH_ERASE_BLOCK_SIZE), $(hide) echo "flash_erase_block_size=$(BOARD_FLASH_ERASE_BLOCK_SIZE)" >> $(1))
@ -1966,6 +2012,8 @@ $(if $(filter true,$(BOARD_USES_RECOVERY_AS_BOOT)),\
$(hide) echo "recovery_as_boot=true" >> $(1))
$(if $(filter true,$(BOARD_BUILD_SYSTEM_ROOT_IMAGE)),\
$(hide) echo "system_root_image=true" >> $(1))
$(if $(filter true,$(BOARD_BUILD_GKI_BOOT_IMAGE_WITHOUT_RAMDISK)),\
$(hide) echo "gki_boot_image_without_ramdisk=true" >> $(1))
$(hide) echo "root_dir=$(TARGET_ROOT_OUT)" >> $(1)
$(if $(filter true,$(PRODUCT_USE_DYNAMIC_PARTITION_SIZE)),\
$(hide) echo "use_dynamic_partition_size=true" >> $(1))
@ -2031,8 +2079,6 @@ INTERNAL_RECOVERYIMAGE_FILES := $(filter $(TARGET_RECOVERY_OUT)/%, \
INSTALLED_FILES_FILE_RECOVERY := $(PRODUCT_OUT)/installed-files-recovery.txt
INSTALLED_FILES_JSON_RECOVERY := $(INSTALLED_FILES_FILE_RECOVERY:.txt=.json)
$(eval $(call declare-0p-target,$(INSTALLED_FILES_FILE_RECOVERY)))
ifeq ($(BOARD_USES_RECOVERY_AS_BOOT),true)
INSTALLED_BOOTIMAGE_TARGET := $(BUILT_BOOTIMAGE_TARGET)
endif
@ -2051,6 +2097,9 @@ $(INSTALLED_FILES_FILE_RECOVERY): $(INTERNAL_RECOVERYIMAGE_FILES) $(FILESLIST) $
$(FILESLIST) $(TARGET_RECOVERY_ROOT_OUT) > $(@:.txt=.json)
$(FILESLIST_UTIL) -c $(@:.txt=.json) > $@
$(eval $(call declare-0p-target,$(INSTALLED_FILES_FILE_RECOVERY)))
$(eval $(call declare-0p-target,$(INSTALLED_FILES_JSON_RECOVERY)))
recovery_sepolicy := \
$(TARGET_RECOVERY_ROOT_OUT)/sepolicy \
$(TARGET_RECOVERY_ROOT_OUT)/plat_file_contexts \
@ -2306,6 +2355,11 @@ $(INSTALLED_RECOVERY_BUILD_PROP_TARGET): \
$(hide) cat $(INSTALLED_SYSTEM_EXT_BUILD_PROP_TARGET) >> $@
$(call append-recovery-ui-properties,$(PRIVATE_RECOVERY_UI_PROPERTIES),$@)
$(call declare-1p-target,$(INSTALLED_RECOVERY_BUILD_PROP_TARGET),build)
$(call declare-license-deps,$(INSTALLED_RECOVERY_BUILD_PROP_TARGET),\
$(INSTALLED_BUILD_PROP_TARGET) $(INSTALLED_VENDOR_BUILD_PROP_TARGET) $(INSTALLED_ODM_BUILD_PROP_TARGET) \
$(INSTALLED_PRODUCT_BUILD_PROP_TARGET) $(INSTALLED_SYSTEM_EXT_BUILD_PROP_TARGET))
# Only install boot/etc/build.prop to recovery image on recovery_as_boot.
# On device with dedicated recovery partition, the file should come from the boot
# ramdisk.
@ -2313,6 +2367,9 @@ ifeq (true,$(BOARD_USES_RECOVERY_AS_BOOT))
INSTALLED_RECOVERY_RAMDISK_BUILD_PROP_TARGET := $(TARGET_RECOVERY_ROOT_OUT)/$(RAMDISK_BUILD_PROP_REL_PATH)
$(INSTALLED_RECOVERY_RAMDISK_BUILD_PROP_TARGET): $(INSTALLED_RAMDISK_BUILD_PROP_TARGET)
$(copy-file-to-target)
$(call declare-1p-target,$(INSTALLED_RECOVERY_RAMDISK_BUILD_PROP_TARGET),build)
$(call declare-license-deps,$(INSTALLED_RECOVERY_RAMDISK_BUILD_PROP_TARGET),$(INSTALLED_RAMDISK_BUILD_PROP_TARGET))
endif
INTERNAL_RECOVERYIMAGE_ARGS := --ramdisk $(recovery_ramdisk)
@ -2533,6 +2590,7 @@ $(INSTALLED_FILES_FILE_DEBUG_RAMDISK): $(FILESLIST) $(FILESLIST_UTIL)
$(FILESLIST_UTIL) -c $(@:.txt=.json) > $@
$(eval $(call declare-0p-target,$(INSTALLED_FILES_FILE_DEBUG_RAMDISK)))
$(eval $(call declare-0p-target,$(INSTALLED_FILES_JSON_DEBUG_RAMDISK)))
ifdef BUILDING_DEBUG_BOOT_IMAGE
@ -2666,7 +2724,8 @@ $(INSTALLED_FILES_FILE_VENDOR_DEBUG_RAMDISK): $(FILESLIST) $(FILESLIST_UTIL)
$(FILESLIST) $(INTERNAL_DEBUG_VENDOR_RAMDISK_SRC_DIRS) > $(@:.txt=.json)
$(FILESLIST_UTIL) -c $(@:.txt=.json) > $@
$(eval $(call declare-0p-target,$(INSTALLED_FILES_FILE_VENDOR_DEBUG_RAMDISK)))
$(call declare-0p-target,$(INSTALLED_FILES_FILE_VENDOR_DEBUG_RAMDISK))
$(call declare-0p-target,$(INSTALLED_FILES_JSON_VENDOR_DEBUG_RAMDISK))
INTERNAL_VENDOR_DEBUG_RAMDISK_TARGET := $(call intermediates-dir-for,PACKAGING,vendor_boot-debug)/vendor_ramdisk-debug.cpio$(RAMDISK_EXT)
@ -3044,6 +3103,7 @@ $(INSTALLED_FILES_FILE): $(FULL_SYSTEMIMAGE_DEPS) $(FILESLIST) $(FILESLIST_UTIL)
$(FILESLIST_UTIL) -c $(@:.txt=.json) > $@
$(eval $(call declare-0p-target,$(INSTALLED_FILES_FILE)))
$(eval $(call declare-0p-target,$(INSTALLED_FILES_JSON)))
.PHONY: installed-file-list
installed-file-list: $(INSTALLED_FILES_FILE)
@ -3320,6 +3380,7 @@ $(INSTALLED_FILES_FILE_SYSTEMOTHER) : $(INTERNAL_SYSTEMOTHERIMAGE_FILES) $(FILES
$(FILESLIST_UTIL) -c $(@:.txt=.json) > $@
$(eval $(call declare-0p-target,$(INSTALLED_FILES_FILE_SYSTEMOTHER)))
$(eval $(call declare-0p-target,$(INSTALLED_FILES_JSON_SYSTEMOTHER)))
# Determines partition size for system_other.img.
ifeq ($(PRODUCT_RETROFIT_DYNAMIC_PARTITIONS),true)
@ -3411,7 +3472,8 @@ $(INSTALLED_FILES_FILE_VENDOR) : $(INTERNAL_VENDORIMAGE_FILES) $(FILESLIST) $(FI
$(FILESLIST) $(TARGET_OUT_VENDOR) > $(@:.txt=.json)
$(FILESLIST_UTIL) -c $(@:.txt=.json) > $@
$(eval $(call declare-0p-target,$(INSTALLED_FILES_FILE_VENDOR)))
$(call declare-0p-target,$(INSTALLED_FILES_FILE_VENDOR))
$(call declare-0p-target,$(INSTALLED_FILES_JSON_VENDOR))
vendorimage_intermediates := \
$(call intermediates-dir-for,PACKAGING,vendor)
@ -3439,7 +3501,7 @@ $(INSTALLED_VENDORIMAGE_TARGET): \
VENDOR_NOTICE_DEPS += $(INSTALLED_VENDORIMAGE_TARGET)
$(call declare-1p-container,$(INSTALLED_VENDORIMAGE_TARGET),vendor)
$(call declare-container-license-metadata,$(INSTALLED_VENDORIMAGE_TARGET),legacy_proprietary,proprietary,,"Vendor Image",vendor)
$(call declare-container-license-deps,$(INSTALLED_VENDORIMAGE_TARGET),$(INTERNAL_USERIMAGES_DEPS) $(INTERNAL_VENDORIMAGE_FILES) $(RECOVERY_FROM_BOOT_PATH),$(PRODUCT_OUT)/:/)
.PHONY: vendorimage-nodeps vnod
@ -3451,6 +3513,10 @@ sync: $(INTERNAL_VENDORIMAGE_FILES)
else ifdef BOARD_PREBUILT_VENDORIMAGE
INSTALLED_VENDORIMAGE_TARGET := $(PRODUCT_OUT)/vendor.img
$(eval $(call copy-one-file,$(BOARD_PREBUILT_VENDORIMAGE),$(INSTALLED_VENDORIMAGE_TARGET)))
$(if $(strip $(ALL_TARGETS.$(INSTALLED_VENDORIMAGE_TARGET).META_LIC)),,\
$(if $(strip $(ALL_TARGETS.$(BOARD_PREBUILT_VENDORIMAGE).META_LIC)),\
$(eval ALL_TARGETS.$(INSTALLED_VENDORIMAGE_TARGET).META_LIC:=$(ALL_TARGETS.$(BOARD_PREBUILT_VENDORIMAGE).META_LIC)),\
$(call declare-license-metadata,$(INSTALLED_VENDORIMAGE_TARGET),legacy_proprietary,proprietary,,"Vendor Image",vendor)))
endif
# -----------------------------------------------------------------
@ -3471,7 +3537,8 @@ $(INSTALLED_FILES_FILE_PRODUCT) : $(INTERNAL_PRODUCTIMAGE_FILES) $(FILESLIST) $(
$(FILESLIST) $(TARGET_OUT_PRODUCT) > $(@:.txt=.json)
$(FILESLIST_UTIL) -c $(@:.txt=.json) > $@
$(eval $(call declare-0p-target,$(INSTALLED_FILES_FILE_PRODUCT)))
$(call declare-0p-target,$(INSTALLED_FILES_FILE_PRODUCT))
$(call declare-0p-target,$(INSTALLED_FILES_JSON_PRODUCT))
productimage_intermediates := \
$(call intermediates-dir-for,PACKAGING,product)
@ -3530,7 +3597,8 @@ $(INSTALLED_FILES_FILE_SYSTEM_EXT) : $(INTERNAL_SYSTEM_EXTIMAGE_FILES) $(FILESLI
$(FILESLIST) $(TARGET_OUT_SYSTEM_EXT) > $(@:.txt=.json)
$(FILESLIST_UTIL) -c $(@:.txt=.json) > $@
$(eval $(call declare-0p-target,$(INSTALLED_FILES_FILE_SYSTEM_EXT)))
$(call declare-0p-target,$(INSTALLED_FILES_FILE_SYSTEM_EXT))
$(call declare-0p-target,$(INSTALLED_FILES_JSON_SYSTEM_EXT))
system_extimage_intermediates := \
$(call intermediates-dir-for,PACKAGING,system_ext)
@ -3609,7 +3677,8 @@ $(INSTALLED_FILES_FILE_ODM) : $(INTERNAL_ODMIMAGE_FILES) $(FILESLIST) $(FILESLIS
$(FILESLIST) $(TARGET_OUT_ODM) > $(@:.txt=.json)
$(FILESLIST_UTIL) -c $(@:.txt=.json) > $@
$(eval $(call declare-0p-target,$(INSTALLED_FILES_FILE_ODM)))
$(call declare-0p-target,$(INSTALLED_FILES_FILE_ODM))
$(call declare-0p-target,$(INSTALLED_FILES_JSON_ODM))
odmimage_intermediates := \
$(call intermediates-dir-for,PACKAGING,odm)
@ -3669,7 +3738,8 @@ $(INSTALLED_FILES_FILE_VENDOR_DLKM) : $(INTERNAL_VENDOR_DLKMIMAGE_FILES) $(FILES
$(FILESLIST) $(TARGET_OUT_VENDOR_DLKM) > $(@:.txt=.json)
$(FILESLIST_UTIL) -c $(@:.txt=.json) > $@
$(eval $(call declare-0p-target,$(INSTALLED_FILES_FILE_VENDOR_DLKM)))
$(call declare-0p-target,$(INSTALLED_FILES_FILE_VENDOR_DLKM))
$(call declare-0p-target,$(INSTALLED_FILES_JSON_VENDOR_DLKM))
vendor_dlkmimage_intermediates := \
$(call intermediates-dir-for,PACKAGING,vendor_dlkm)
@ -3729,7 +3799,8 @@ $(INSTALLED_FILES_FILE_ODM_DLKM) : $(INTERNAL_ODM_DLKMIMAGE_FILES) $(FILESLIST)
$(FILESLIST) $(TARGET_OUT_ODM_DLKM) > $(@:.txt=.json)
$(FILESLIST_UTIL) -c $(@:.txt=.json) > $@
$(eval $(call declare-0p-target,$(INSTALLED_FILES_FILE_ODM_DLKM)))
$(call declare-0p-target,$(INSTALLED_FILES_FILE_ODM_DLKM))
$(call declare-0p-target,$(INSTALLED_FILES_JSON_ODM_DLKM))
odm_dlkmimage_intermediates := \
$(call intermediates-dir-for,PACKAGING,odm_dlkm)
@ -3792,7 +3863,8 @@ $(INSTALLED_FILES_FILE_SYSTEM_DLKM): $(INTERNAL_SYSTEM_DLKMIMAGE_FILES) $(FILESL
$(FILESLIST) $(TARGET_OUT_SYSTEM_DLKM) > $(@:.txt=.json)
$(FILESLIST_UTIL) -c $(@:.txt=.json) > $@
$(eval $(call declare-0p-target,$(INSTALLED_FILES_FILE_SYSTEM_DLKM)))
$(call declare-0p-target,$(INSTALLED_FILES_FILE_SYSTEM_DLKM))
$(call declare-0p-target,$(INSTALLED_FILES_JSON_SYSTEM_DLKM))
system_dlkmimage_intermediates := \
$(call intermediates-dir-for,PACKAGING,system_dlkm)
@ -4565,6 +4637,7 @@ check_vintf_system_log := $(intermediates)/check_vintf_system.log
check_vintf_all_deps += $(check_vintf_system_log)
$(check_vintf_system_log): $(HOST_OUT_EXECUTABLES)/checkvintf $(check_vintf_system_deps)
@( $< --check-one --dirmap /system:$(TARGET_OUT) > $@ 2>&1 ) || ( cat $@ && exit 1 )
$(call declare-0p-target,$(check_vintf_system_log))
check_vintf_system_log :=
vintffm_log := $(intermediates)/vintffm.log
@ -4573,6 +4646,8 @@ $(vintffm_log): $(HOST_OUT_EXECUTABLES)/vintffm $(check_vintf_system_deps)
@( $< --check --dirmap /system:$(TARGET_OUT) \
$(VINTF_FRAMEWORK_MANIFEST_FROZEN_DIR) > $@ 2>&1 ) || ( cat $@ && exit 1 )
$(call declare-0p-target,$(vintffm_log))
endif # check_vintf_system_deps
check_vintf_system_deps :=
@ -4594,6 +4669,7 @@ $(check_vintf_vendor_log): $(HOST_OUT_EXECUTABLES)/checkvintf $(check_vintf_vend
( $< --check-one --dirmap /vendor:$(TARGET_OUT_VENDOR) \
--property ro.boot.product.vendor.sku=$(filter-out EMPTY_VENDOR_SKU_PLACEHOLDER,$(vendor_sku)) \
> $@ 2>&1 ) || ( cat $@ && exit 1 ); )
$(call declare-0p-target,$(check_vintf_vendor_log))
check_vintf_vendor_log :=
endif # check_vintf_vendor_deps
check_vintf_vendor_deps :=
@ -4615,6 +4691,9 @@ $(BUILT_KERNEL_CONFIGS_FILE): $(BOARD_KERNEL_CONFIG_FILE)
$(BUILT_KERNEL_VERSION_FILE):
echo $(BOARD_KERNEL_VERSION) > $@
$(call declare-0p-target,$(BUILT_KERNEL_CONFIGS_FILE))
$(call declare-0p-target,$(BUILT_KERNEL_VERSION_FILE))
my_board_extracted_kernel := true
endif # BOARD_KERNEL_VERSION
endif # BOARD_KERNEL_CONFIG_FILE
@ -4638,6 +4717,8 @@ $(BUILT_KERNEL_CONFIGS_FILE): $(EXTRACT_KERNEL) $(firstword $(INSTALLED_KERNEL_T
--output-configs $@ \
--output-release $(BUILT_KERNEL_VERSION_FILE)
$(call declare-0p-target,$(BUILT_KERNEL_CONFIGS_FILE))
my_board_extracted_kernel := true
endif # INSTALLED_KERNEL_TARGET
endif # my_board_extracted_kernel
@ -4657,6 +4738,8 @@ $(BUILT_KERNEL_CONFIGS_FILE): \
--output-configs $@ \
--output-release $(BUILT_KERNEL_VERSION_FILE)
$(call declare-0p-target,$(BUILT_KERNEL_CONFIGS_FILE))
my_board_extracted_kernel := true
endif # INSTALLED_BOOTIMAGE_TARGET
endif # my_board_extracted_kernel
@ -4746,6 +4829,8 @@ $(check_vintf_compatible_log): $(HOST_OUT_EXECUTABLES)/checkvintf $(check_vintf_
--property ro.boot.product.vendor.sku=$(filter-out EMPTY_VENDOR_SKU_PLACEHOLDER,$(vendor_sku)) \
>> $@ 2>&1 ) || (cat $@ && exit 1); ))
$(call declare-0p-target,$(check_vintf_compatible_log))
check_vintf_compatible_log :=
check_vintf_compatible_args :=
check_vintf_compatible_deps :=
@ -4809,6 +4894,8 @@ $(check_all_partition_sizes_log): \
$(call intermediates-dir-for,PACKAGING,check-all-partition-sizes)/misc_info.txt, \
$@)
$(call declare-0p-target,$(check_all_partition_sizes_log))
.PHONY: check-all-partition-sizes
check-all-partition-sizes: $(check_all_partition_sizes_log)
@ -5018,6 +5105,9 @@ $(BUILT_OTATOOLS_PACKAGE): $(SOONG_ZIP) $(ZIP2ZIP)
cp $(SOONG_ZIP) $(ZIP2ZIP) $(MERGE_ZIPS) $(PRIVATE_ZIP_ROOT)/bin/
$(SOONG_ZIP) -o $@ -C $(PRIVATE_ZIP_ROOT) -D $(PRIVATE_ZIP_ROOT)
$(call declare-1p-container,$(BUILT_OTATOOLS_PACKAGE),build)
$(call declare-container-license-deps,$(INTERNAL_OTATOOLS_PACKAGE_FILES) $(INTERNAL_OTATOOLS_RELEASETOOLS),$(BUILT_OTATOOLS_PACKAGE):)
.PHONY: otatools-package
otatools-package: $(BUILT_OTATOOLS_PACKAGE)
@ -5314,7 +5404,9 @@ $(BUILT_TARGET_FILES_PACKAGE): PRIVATE_TOOL_EXTENSION := $(tool_extension)
updaer_dep :=
ifeq ($(AB_OTA_UPDATER),true)
updater_dep += system/update_engine/update_engine.conf
$(call declare-1p-target,system/update_engine/update_engine.conf,system/update_engine)
updater_dep += external/zucchini/version_info.h
$(call declare-license-metadata,external/zucchini/version_info.h,legacy_notice,notice,external/zucchini/LICENSE,external/zucchini)
updater_dep += $(HOST_OUT_SHARED_LIBRARIES)/liblz4.so
endif
@ -6002,6 +6094,41 @@ endif
.PHONY: target-files-package
target-files-package: $(BUILT_TARGET_FILES_PACKAGE)
$(call declare-1p-container,$(BUILT_TARGET_FILES_PACKAGE),)
$(call declare-container-license-deps,$(BUILT_TARGET_FILES_PACKAGE), $(INSTALLED_RADIOIMAGE_TARGET) \
$(INSTALLED_RECOVERYIMAGE_TARGET) \
$(INSTALLED_CACHEIMAGE_TARGET) \
$(INSTALLED_DTBOIMAGE_TARGET) \
$(INSTALLED_PVMFWIMAGE_TARGET) \
$(INSTALLED_PVMFW_EMBEDDED_AVBKEY_TARGET) \
$(INSTALLED_CUSTOMIMAGES_TARGET) \
$(INSTALLED_ANDROID_INFO_TXT_TARGET) \
$(INSTALLED_KERNEL_TARGET) \
$(INSTALLED_RAMDISK_TARGET) \
$(INSTALLED_DTBIMAGE_TARGET) \
$(INSTALLED_2NDBOOTLOADER_TARGET) \
$(BOARD_PREBUILT_DTBOIMAGE) \
$(BOARD_PREBUILT_RECOVERY_DTBOIMAGE) \
$(BOARD_RECOVERY_ACPIO) \
$(PRODUCT_SYSTEM_BASE_FS_PATH) \
$(PRODUCT_VENDOR_BASE_FS_PATH) \
$(PRODUCT_PRODUCT_BASE_FS_PATH) \
$(PRODUCT_SYSTEM_EXT_BASE_FS_PATH) \
$(PRODUCT_ODM_BASE_FS_PATH) \
$(PRODUCT_VENDOR_DLKM_BASE_FS_PATH) \
$(PRODUCT_ODM_DLKM_BASE_FS_PATH) \
$(PRODUCT_SYSTEM_DLKM_BASE_FS_PATH) \
$(LPMAKE) \
$(SELINUX_FC) \
$(INSTALLED_MISC_INFO_TARGET) \
$(APKCERTS_FILE) \
$(SOONG_APEX_KEYS_FILE) \
$(HOST_OUT_EXECUTABLES)/fs_config \
$(ADD_IMG_TO_TARGET_FILES) \
$(MAKE_RECOVERY_PATCH) \
$(BUILT_KERNEL_CONFIGS_FILE) \
$(BUILT_KERNEL_VERSION_FILE),$(BUILT_TARGET_FILES_PACKAGE):)
$(call dist-for-goals, target-files-package, $(BUILT_TARGET_FILES_PACKAGE))
# -----------------------------------------------------------------
@ -6041,12 +6168,17 @@ name := $(product_name)-ota-$(FILE_NAME_TAG)
INTERNAL_OTA_PACKAGE_TARGET := $(PRODUCT_OUT)/$(name).zip
INTERNAL_OTA_METADATA := $(PRODUCT_OUT)/ota_metadata
$(call declare-0p-target,$(INTERNAL_OTA_METADATA))
$(INTERNAL_OTA_PACKAGE_TARGET): KEY_CERT_PAIR := $(DEFAULT_KEY_CERT_PAIR)
$(INTERNAL_OTA_PACKAGE_TARGET): .KATI_IMPLICIT_OUTPUTS := $(INTERNAL_OTA_METADATA)
$(INTERNAL_OTA_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(OTA_FROM_TARGET_FILES) $(INTERNAL_OTATOOLS_FILES)
@echo "Package OTA: $@"
$(call build-ota-package-target,$@,-k $(KEY_CERT_PAIR) --output_metadata_path $(INTERNAL_OTA_METADATA))
$(call declare-1p-container,$(INTERNAL_OTA_PACKAGE_TARGET),)
$(call declare-container-license-deps,$(INTERNAL_OTA_PACKAGE_TARGET),$(BUILT_TARGET_FILES_PACKAGE) $(OTA_FROM_TARGET_FILES) $(INTERNAL_OTATOOLS_FILES),$(PRODUCT_OUT)/:/)
.PHONY: otapackage
otapackage: $(INTERNAL_OTA_PACKAGE_TARGET)
@ -6062,6 +6194,9 @@ $(INTERNAL_OTA_RETROFIT_DYNAMIC_PARTITIONS_PACKAGE_TARGET): \
@echo "Package OTA (retrofit dynamic partitions): $@"
$(call build-ota-package-target,$@,-k $(KEY_CERT_PAIR) --retrofit_dynamic_partitions)
$(call declare-1p-container,$(INTERNAL_OTA_RETROFIT_DYNAMIC_PARTITIONS_PACKAGE_TARGET),)
$(call declare-container-license-deps,$(INTERNAL_OTA_RETROFIT_DYNAMIC_PARTITIONS_PACKAGE_TARGET),$(BUILT_TARGET_FILES_PACKAGE) $(OTA_FROM_TARGET_FILES) $(INTERNAL_OTATOOLS_FILES),$(PRODUCT_OUT)/:/)
.PHONY: otardppackage
otapackage otardppackage: $(INTERNAL_OTA_RETROFIT_DYNAMIC_PARTITIONS_PACKAGE_TARGET)
@ -6077,6 +6212,10 @@ $(INTERNAL_OTA_PARTIAL_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(OTA_FROM
@echo "Package partial OTA: $@"
$(call build-ota-package-target,$@,-k $(KEY_CERT_PAIR) --partial "$(BOARD_PARTIAL_OTA_UPDATE_PARTITIONS_LIST)")
$(call declare-1p-container,$(INTERNAL_OTA_PARTIAL_PACKAGE_TARGET),)
$(call declare-container-license-deps,$(INTERNAL_OTA_PARTIAL_PACKAGE_TARGET),$(BUILT_TARGET_FILES_PACKAGE) $(OTA_FROM_TARGET_FILES) $(INTERNAL_OTATOOLS_FILES),$(PRODUCT_OUT)/:/)
.PHONY: partialotapackage
partialotapackage: $(INTERNAL_OTA_PARTIAL_PACKAGE_TARGET)
@ -6116,6 +6255,7 @@ $(DEXPREOPT_TOOLS_ZIP): PRIVATE_DEXPREOPT_TOOLS_DEPS := $(dexpreopt_tools_deps)
$(DEXPREOPT_TOOLS_ZIP): $(SOONG_ZIP)
$(hide) mkdir -p $(dir $@)
$(hide) $(SOONG_ZIP) -d -o $@ -j $(addprefix -f ,$(PRIVATE_DEXPREOPT_TOOLS_DEPS)) -f $$(realpath $(DEX2OAT))
$(call declare-1p-target,$(DEXPREOPT_TOOLS_ZIP),)
endif # DEX2OAT is set
endif # BUILD_OS == linux
@ -6148,6 +6288,8 @@ endif #!TARGET_BUILD_UNBUNDLED
.PHONY: dexpreopt_config_zip
dexpreopt_config_zip: $(DEXPREOPT_CONFIG_ZIP)
$(call declare-1p-target,$(DEXPREOPT_CONFIG_ZIP),)
# -----------------------------------------------------------------
# A zip of the symbols directory. Keep the full paths to make it
# more obvious where these files came from.
@ -6184,6 +6326,11 @@ $(SYMBOLS_ZIP): $(SOONG_ZIP) $(SYMBOLS_MAP)
$(hide) $(SYMBOLS_MAP) -merge $(SYMBOLS_MAPPING) -ignore_missing_files @$(PRIVATE_LIST_FILE)
$(SYMBOLS_ZIP): .KATI_IMPLICIT_OUTPUTS := $(SYMBOLS_MAPPING)
$(call declare-1p-container,$(SYMBOLS_ZIP),)
ifeq (,$(TARGET_BUILD_UNBUNDLED))
$(call declare-container-license-deps,$(SYMBOLS_ZIP),$(INTERNAL_ALLIMAGES_FILES) $(updater_dep),$(PRODUCT_OUT)/:/)
endif
# -----------------------------------------------------------------
# A zip of the coverage directory.
#
@ -6204,7 +6351,9 @@ $(COVERAGE_ZIP): $(SOONG_ZIP)
$(hide) $(SOONG_ZIP) -d -o $@ -C $(TARGET_OUT_COVERAGE) -l $(PRIVATE_LIST_FILE)
$(call declare-1p-container,$(COVERAGE_ZIP),)
ifeq (,$(TARGET_BUILD_UNBUNDLED))
$(call declare-container-license-deps,$(COVERAGE_ZIP),$(INTERNAL_ALLIMAGE_FILES),$(PRODUCT_OUT)/:/)
endif
SYSTEM_NOTICE_DEPS += $(COVERAGE_ZIP)
@ -6306,6 +6455,11 @@ $(PROGUARD_DICT_ZIP): $(SOONG_ZIP) $(SYMBOLS_MAP)
$(SYMBOLS_MAP) -merge $(PROGUARD_DICT_MAPPING) -strip_prefix $(PRIVATE_PACKAGING_DIR)/ -ignore_missing_files @$(PRIVATE_LIST_FILE)
$(PROGUARD_DICT_ZIP): .KATI_IMPLICIT_OUTPUTS := $(PROGUARD_DICT_MAPPING)
$(call declare-1p-container,$(PROGUARD_DICT_ZIP),)
ifeq (,$(TARGET_BUILD_UNBUNDLED))
$(call declare-container-license-deps,$(PROGUARD_DICT_ZIP),$(INTERNAL_ALLIMAGES_FILES) $(updater_dep),$(PRODUCT_OUT)/:/)
endif
#------------------------------------------------------------------
# A zip of Proguard usage files.
#
@ -6335,6 +6489,23 @@ $(PROGUARD_USAGE_ZIP): $(MERGE_ZIPS)
find $(PRIVATE_PACKAGING_DIR) -name proguard_usage.zip > $(PRIVATE_LIST_FILE)
$(MERGE_ZIPS) $@ @$(PRIVATE_LIST_FILE)
$(call declare-1p-container,$(PROGUARD_USAGE_ZIP),)
ifeq (,$(TARGET_BUILD_UNBUNDLED))
$(call declare-container-license-deps,$(PROGUARD_USAGE_ZIP),$(INSTALLED_SYSTEMIMAGE_TARGET) \
$(INSTALLED_RAMDISK_TARGET) \
$(INSTALLED_BOOTIMAGE_TARGET) \
$(INSTALLED_INIT_BOOT_IMAGE_TARGET) \
$(INSTALLED_USERDATAIMAGE_TARGET) \
$(INSTALLED_VENDORIMAGE_TARGET) \
$(INSTALLED_PRODUCTIMAGE_TARGET) \
$(INSTALLED_SYSTEM_EXTIMAGE_TARGET) \
$(INSTALLED_ODMIMAGE_TARGET) \
$(INSTALLED_VENDOR_DLKMIMAGE_TARGET) \
$(INSTALLED_ODM_DLKMIMAGE_TARGET) \
$(INSTALLED_SYSTEM_DLKMIMAGE_TARGET) \
$(updater_dep),$(PROGUARD_USAGE_ZIP):/)
endif
ifeq (true,$(PRODUCT_USE_DYNAMIC_PARTITIONS))
# Dump variables used by build_super_image.py (for building super.img and super_empty.img).
@ -6480,6 +6651,9 @@ $(INTERNAL_UPDATE_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(IMG_FROM_TARG
--additional IMAGES/VerifiedBootParams.textproto:VerifiedBootParams.textproto \
$(BUILT_TARGET_FILES_PACKAGE) $@
$(call declare-1p-container,$(INTERNAL_UPDATE_PACKAGE_TARGET),)
$(call declare-container-license-deps,$(INTERNAL_UPDATE_PACKAGE_TARGET),$(BUILT_TARGET_FILES_PACKAGE) $(IMG_FROM_TARGET_FILES),$(PRODUCT_OUT)/:/)
.PHONY: updatepackage
updatepackage: $(INTERNAL_UPDATE_PACKAGE_TARGET)
$(call dist-for-goals,updatepackage,$(INTERNAL_UPDATE_PACKAGE_TARGET))

View File

@ -22,6 +22,10 @@ ifeq (true,$(BOARD_USES_SYSTEM_OTHER_ODEX))
$(TARGET_OUT_SYSTEM_OTHER)/%.art
endif
ifneq (,$(filter-out true false relaxed strict,$(PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS))$(filter-out 1 0,$(words $(PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS))))
$(error PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS must be one of [true, false, relaxed, strict], found: $(PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS))
endif
all_offending_files :=
$(foreach makefile,$(ARTIFACT_PATH_REQUIREMENT_PRODUCTS),\
$(eval requirements := $(PRODUCTS.$(makefile).ARTIFACT_PATH_REQUIREMENTS)) \
@ -48,7 +52,7 @@ $(foreach makefile,$(ARTIFACT_PATH_REQUIREMENT_PRODUCTS),\
$(eval allowed_patterns := $(call resolve-product-relative-paths,$(allowed))) \
$(eval offending_files := $(filter-out $(allowed_patterns) $(ignore_path_patterns)%,$(files_in_requirement))) \
$(eval enforcement := $(PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS)) \
$(if $(enforcement),\
$(if $(filter-out false,$(enforcement)),\
$(call maybe-print-list-and-error,$(offending_files),\
$(INTERNAL_PRODUCT) produces files inside $(makefile)s artifact path requirement. \
$(PRODUCT_ARTIFACT_PATH_REQUIREMENT_HINT)) \

View File

@ -590,10 +590,18 @@ ifneq (true,$(LOCAL_UNINSTALLABLE_MODULE))
my_init_rc := $(foreach rc,$(LOCAL_INIT_RC_$(my_32_64_bit_suffix)) $(LOCAL_INIT_RC),$(LOCAL_PATH)/$(rc))
endif
ifneq ($(strip $(my_init_rc)),)
# Make doesn't support recovery as an output partition, but some Soong modules installed in recovery
# have init.rc files that need to be installed alongside them. Manually handle the case where the
# output file is in the recovery partition.
my_init_rc_path := $(if $(filter $(TARGET_RECOVERY_ROOT_OUT)/%,$(my_module_path)),$(TARGET_RECOVERY_ROOT_OUT)/system/etc,$(TARGET_OUT$(partition_tag)_ETC))
# Make doesn't support recovery or ramdisk as an output partition,
# but some Soong modules installed in recovery or ramdisk
# have init.rc files that need to be installed alongside them.
# Manually handle the case where the
# output file is in the recovery or ramdisk partition.
ifneq (,$(filter $(TARGET_RECOVERY_ROOT_OUT)/%,$(my_module_path)))
my_init_rc_path := $(TARGET_RECOVERY_ROOT_OUT)/system/etc
else ifneq (,$(filter $(TARGET_RAMDISK_OUT)/%,$(my_module_path)))
my_init_rc_path := $(TARGET_RAMDISK_OUT)/system/etc
else
my_init_rc_path := $(TARGET_OUT$(partition_tag)_ETC)
endif
my_init_rc_pairs := $(foreach rc,$(my_init_rc),$(rc):$(my_init_rc_path)/init/$(notdir $(rc)))
my_init_rc_installed := $(foreach rc,$(my_init_rc_pairs),$(call word-colon,2,$(rc)))
@ -713,6 +721,7 @@ ifeq ($(LOCAL_MODULE_CLASS),NATIVE_TESTS)
endif
ifdef LOCAL_MULTILIB
multi_arch := true
# These conditionals allow this functionality to be mimicked in Soong
else ifeq ($(LOCAL_MODULE_MAKEFILE),$(SOONG_ANDROID_MK))
ifeq ($(LOCAL_MODULE_CLASS),SHARED_LIBRARIES)
multi_arch := true

View File

@ -18,4 +18,4 @@
# (like "CRB01"). It must be a single word, and is
# capitalized by convention.
BUILD_ID=TP1A.220414.003
BUILD_ID=TP1A.220422.001

View File

@ -430,21 +430,6 @@ $(hide) $(HOST_OTOOL) -l $(1) | grep LC_ID_DYLIB -A 5 > $(2)
$(hide) $(HOST_NM) -gP $(1) | cut -f1-2 -d" " | (grep -v U$$ >> $(2) || true)
endef
GOMA_POOL :=
RBE_POOL :=
GOMA_OR_RBE_POOL :=
# When goma or RBE are enabled, kati will be passed --default_pool=local_pool to put
# most rules into the local pool. Explicitly set the pool to "none" for rules that
# should be run outside the local pool, i.e. with -j500.
ifneq (,$(filter-out false,$(USE_GOMA)))
GOMA_POOL := none
GOMA_OR_RBE_POOL := none
else ifneq (,$(filter-out false,$(USE_RBE)))
RBE_POOL := none
GOMA_OR_RBE_POOL := none
endif
.KATI_READONLY := GOMA_POOL RBE_POOL GOMA_OR_RBE_POOL
ifeq ($(CALLED_FROM_SETUP),true)
include $(BUILD_SYSTEM)/ccache.mk
include $(BUILD_SYSTEM)/goma.mk
@ -839,7 +824,7 @@ BUILD_DATETIME_FROM_FILE := $$(cat $(BUILD_DATETIME_FILE))
# is made which breaks compatibility with the previous platform sepolicy version,
# not just on every increase in PLATFORM_SDK_VERSION. The minor version should
# be reset to 0 on every bump of the PLATFORM_SDK_VERSION.
sepolicy_major_vers := 32
sepolicy_major_vers := 33
sepolicy_minor_vers := 0
ifneq ($(sepolicy_major_vers), $(PLATFORM_SDK_VERSION))
@ -1236,10 +1221,42 @@ define find_warning_allowed_projects
$(filter $(ANDROID_WARNING_ALLOWED_PROJECTS),$(1)/)
endef
GOMA_POOL :=
RBE_POOL :=
GOMA_OR_RBE_POOL :=
# When goma or RBE are enabled, kati will be passed --default_pool=local_pool to put
# most rules into the local pool. Explicitly set the pool to "none" for rules that
# should be run outside the local pool, i.e. with -j500.
ifneq (,$(filter-out false,$(USE_GOMA)))
GOMA_POOL := none
GOMA_OR_RBE_POOL := none
else ifneq (,$(filter-out false,$(USE_RBE)))
RBE_POOL := none
GOMA_OR_RBE_POOL := none
endif
.KATI_READONLY := GOMA_POOL RBE_POOL GOMA_OR_RBE_POOL
JAVAC_NINJA_POOL :=
R8_NINJA_POOL :=
D8_NINJA_POOL :=
ifneq ($(filter-out false,$(USE_RBE)),)
ifdef RBE_JAVAC
JAVAC_NINJA_POOL := $(RBE_POOL)
endif
ifdef RBE_R8
R8_NINJA_POOL := $(RBE_POOL)
endif
ifdef RBE_D8
D8_NINJA_POOL := $(RBE_POOL)
endif
endif
.KATI_READONLY := JAVAC_NINJA_POOL R8_NINJA_POOL D8_NINJA_POOL
# These goals don't need to collect and include Android.mks/CleanSpec.mks
# in the source tree.
dont_bother_goals := out \
product-graph dump-products
dont_bother_goals := out product-graph
# Make ANDROID Soong config variables visible to Android.mk files, for
# consistency with those defined in BoardConfig.mk files.

View File

@ -35,3 +35,7 @@ dump-many-vars :
printf "'\n";)
endif # CALLED_FROM_SETUP
ifneq (,$(RBC_DUMP_CONFIG_FILE))
$(call dump-variables-rbc,$(RBC_DUMP_CONFIG_FILE))
endif

View File

@ -326,20 +326,26 @@ endif
# raw ones.
define dump-variables-rbc
$(eval _dump_variables_rbc_excluded := \
BOARD_PLAT_PRIVATE_SEPOLICY_DIR \
BOARD_PLAT_PUBLIC_SEPOLICY_DIR \
BUILD_NUMBER \
DATE \
LOCAL_PATH \
MAKEFILE_LIST \
PRODUCTS \
PRODUCT_COPY_OUT_% \
RBC_PRODUCT_CONFIG \
RBC_BOARD_CONFIG \
SOONG_% \
TOPDIR \
TRACE_BEGIN_SOONG \
BOARD_PLAT_PUBLIC_SEPOLICY_DIR \
BOARD_PLAT_PRIVATE_SEPOLICY_DIR \
USER \
SOONG_% \
PRODUCT_COPY_OUT_%)\
$(file >$(OUT_DIR)/dump-variables-rbc-temp.txt,$(subst $(space),$(newline),$(filter-out $(_dump_variables_rbc_excluded),$(.VARIABLES))))
USER)
$(file >$(OUT_DIR)/dump-variables-rbc-temp.txt,$(subst $(space),$(newline),$(sort $(filter-out $(_dump_variables_rbc_excluded),$(.VARIABLES)))))
$(file >$(1),\
$(foreach v, $(shell grep -he "^[A-Z][A-Z0-9_]*$$" $(OUT_DIR)/dump-variables-rbc-temp.txt),\
$(v) := $(strip $($(v)))$(newline))\
$(foreach ns,$(SOONG_CONFIG_NAMESPACES),\
$(foreach v,$(SOONG_CONFIG_$(ns)),\
$(foreach ns,$(sort $(SOONG_CONFIG_NAMESPACES)),\
$(foreach v,$(sort $(SOONG_CONFIG_$(ns))),\
$$(call soong_config_set,$(ns),$(v),$(SOONG_CONFIG_$(ns)_$(v)))$(newline))))
endef

View File

@ -1254,18 +1254,14 @@ endef
# See the select-bitness-of-required-modules definition.
# $(1): product makefile
define _product-var
$(call get-product-var,$(1),$(2))
endef
define product-installed-files
$(eval _pif_modules := \
$(call _product-var,$(1),PRODUCT_PACKAGES) \
$(if $(filter eng,$(tags_to_install)),$(call _product-var,$(1),PRODUCT_PACKAGES_ENG)) \
$(if $(filter debug,$(tags_to_install)),$(call _product-var,$(1),PRODUCT_PACKAGES_DEBUG)) \
$(if $(filter tests,$(tags_to_install)),$(call _product-var,$(1),PRODUCT_PACKAGES_TESTS)) \
$(if $(filter asan,$(tags_to_install)),$(call _product-var,$(1),PRODUCT_PACKAGES_DEBUG_ASAN)) \
$(if $(filter java_coverage,$(tags_to_install)),$(call _product-var,$(1),PRODUCT_PACKAGES_DEBUG_JAVA_COVERAGE)) \
$(call get-product-var,$(1),PRODUCT_PACKAGES) \
$(if $(filter eng,$(tags_to_install)),$(call get-product-var,$(1),PRODUCT_PACKAGES_ENG)) \
$(if $(filter debug,$(tags_to_install)),$(call get-product-var,$(1),PRODUCT_PACKAGES_DEBUG)) \
$(if $(filter tests,$(tags_to_install)),$(call get-product-var,$(1),PRODUCT_PACKAGES_TESTS)) \
$(if $(filter asan,$(tags_to_install)),$(call get-product-var,$(1),PRODUCT_PACKAGES_DEBUG_ASAN)) \
$(if $(filter java_coverage,$(tags_to_install)),$(call get-product-var,$(1),PRODUCT_PACKAGES_DEBUG_JAVA_COVERAGE)) \
$(call auto-included-modules) \
) \
$(eval ### Filter out the overridden packages and executables before doing expansion) \
@ -1276,13 +1272,13 @@ define product-installed-files
$(call expand-required-modules,_pif_modules,$(_pif_modules),$(_pif_overrides)) \
$(filter-out $(HOST_OUT_ROOT)/%,$(call module-installed-files, $(_pif_modules))) \
$(call resolve-product-relative-paths,\
$(foreach cf,$(call _product-var,$(1),PRODUCT_COPY_FILES),$(call word-colon,2,$(cf))))
$(foreach cf,$(call get-product-var,$(1),PRODUCT_COPY_FILES),$(call word-colon,2,$(cf))))
endef
# Similar to product-installed-files above, but handles PRODUCT_HOST_PACKAGES instead
# This does support the :32 / :64 syntax, but does not support module overrides.
define host-installed-files
$(eval _hif_modules := $(call _product-var,$(1),PRODUCT_HOST_PACKAGES)) \
$(eval _hif_modules := $(call get-product-var,$(1),PRODUCT_HOST_PACKAGES)) \
$(eval ### Split host vs host cross modules) \
$(eval _hcif_modules := $(filter host_cross_%,$(_hif_modules))) \
$(eval _hif_modules := $(filter-out host_cross_%,$(_hif_modules))) \

View File

@ -25,7 +25,6 @@ PARSE_TIME_MAKE_GOALS := \
cts \
custom_images \
dicttool_aosp \
dump-products \
eng \
oem_image \
online-system-api-sdk-docs \

View File

@ -15,12 +15,12 @@
#
# the sort also acts as a strip to remove the single space entries that creep in because of the evals
define gather-all-products
define gather-all-makefiles-for-current-product
$(eval _all_products_visited := )\
$(sort $(call all-products-inner, $(PRODUCTS)))
$(sort $(call gather-all-makefiles-for-current-product-inner,$(INTERNAL_PRODUCT)))
endef
define all-products-inner
define gather-all-makefiles-for-current-product-inner
$(foreach p,$(1),\
$(if $(filter $(p),$(_all_products_visited)),, \
$(p) \
@ -30,30 +30,12 @@ define all-products-inner
)
endef
this_makefile := build/make/core/product-graph.mk
products_graph := $(OUT_DIR)/products.dot
ifeq ($(strip $(ANDROID_PRODUCT_GRAPH)),)
products_list := $(INTERNAL_PRODUCT)
else
ifeq ($(strip $(ANDROID_PRODUCT_GRAPH)),--all)
products_list := --all
else
products_list := $(foreach prod,$(ANDROID_PRODUCT_GRAPH),$(call resolve-short-product-name,$(prod)))
endif
endif
all_products := $(call gather-all-products)
open_parethesis := (
close_parenthesis := )
node_color_target := orange
node_color_common := beige
node_color_vendor := lavenderblush
node_color_default := white
define node-color
$(if $(filter $(1),$(PRIVATE_PRODUCTS_FILTER)),\
$(if $(filter $(1),$(PRIVATE_TOP_LEVEL_MAKEFILE)),\
$(node_color_target),\
$(if $(filter build/make/target/product/%,$(1)),\
$(node_color_common),\
@ -62,30 +44,33 @@ $(if $(filter $(1),$(PRIVATE_PRODUCTS_FILTER)),\
)
endef
open_parethesis := (
close_parenthesis := )
# Emit properties of a product node to a file.
# $(1) the product
# $(2) the output file
define emit-product-node-props
$(hide) echo \"$(1)\" [ \
label=\"$(dir $(1))\\n$(notdir $(1))\\n\\n$(subst $(close_parenthesis),,$(subst $(open_parethesis),,$(call get-product-var,$(1),PRODUCT_MODEL)))\\n$(call get-product-var,$(1),PRODUCT_DEVICE)\" \
label=\"$(dir $(1))\\n$(notdir $(1))$(if $(filter $(1),$(PRIVATE_TOP_LEVEL_MAKEFILE)),$(subst $(open_parethesis),,$(subst $(close_parenthesis),,\\n\\n$(PRODUCT_MODEL)\\n$(PRODUCT_DEVICE))))\" \
style=\"filled\" fillcolor=\"$(strip $(call node-color,$(1)))\" \
colorscheme=\"svg\" fontcolor=\"darkblue\" \
] >> $(2)
endef
$(products_graph): PRIVATE_PRODUCTS := $(all_products)
$(products_graph): PRIVATE_PRODUCTS_FILTER := $(products_list)
products_graph := $(OUT_DIR)/products.dot
$(products_graph): $(this_makefile)
@echo Product graph DOT: $@ for $(PRIVATE_PRODUCTS_FILTER)
$(hide) echo 'digraph {' > $@.in
$(hide) echo 'graph [ ratio=.5 ];' >> $@.in
$(hide) $(foreach p,$(PRIVATE_PRODUCTS), \
$(foreach d,$(PRODUCTS.$(strip $(p)).INHERITS_FROM), echo \"$(d)\" -\> \"$(p)\" >> $@.in;))
$(foreach p,$(PRIVATE_PRODUCTS),$(call emit-product-node-props,$(p),$@.in))
$(hide) echo '}' >> $@.in
$(hide) build/make/tools/filter-product-graph.py $(PRIVATE_PRODUCTS_FILTER) < $@.in > $@
$(products_graph): PRIVATE_ALL_MAKEFILES_FOR_THIS_PRODUCT := $(call gather-all-makefiles-for-current-product)
$(products_graph): PRIVATE_TOP_LEVEL_MAKEFILE := $(INTERNAL_PRODUCT)
$(products_graph):
@echo Product graph DOT: $@ for $(PRIVATE_TOP_LEVEL_MAKEFILE)
$(hide) echo 'digraph {' > $@
$(hide) echo 'graph [ ratio=.5 ];' >> $@
$(hide) $(foreach p,$(PRIVATE_ALL_MAKEFILES_FOR_THIS_PRODUCT), \
$(foreach d,$(PRODUCTS.$(strip $(p)).INHERITS_FROM), echo \"$(d)\" -\> \"$(p)\" >> $@;))
$(foreach p,$(PRIVATE_ALL_MAKEFILES_FOR_THIS_PRODUCT),$(call emit-product-node-props,$(p),$@))
$(hide) echo '}' >> $@
.PHONY: product-graph
product-graph: $(products_graph)

View File

@ -386,17 +386,6 @@ _product_single_value_vars += PRODUCT_MODULE_BUILD_FROM_SOURCE
.KATI_READONLY := _product_single_value_vars _product_list_vars
_product_var_list :=$= $(_product_single_value_vars) $(_product_list_vars)
define dump-product
$(warning ==== $(1) ====)\
$(foreach v,$(_product_var_list),\
$(warning PRODUCTS.$(1).$(v) := $(call get-product-var,$(1),$(v))))\
$(warning --------)
endef
define dump-products
$(foreach p,$(PRODUCTS),$(call dump-product,$(p)))
endef
#
# Functions for including product makefiles
#
@ -473,64 +462,18 @@ endef
#
# Does various consistency checks on all of the known products.
# Does various consistency checks on the current product.
# Takes no parameters, so $(call ) is not necessary.
#
define check-all-products
define check-current-product
$(if ,, \
$(eval _cap_names :=) \
$(foreach p,$(PRODUCTS), \
$(eval pn := $(strip $(PRODUCTS.$(p).PRODUCT_NAME))) \
$(if $(pn),,$(error $(p): PRODUCT_NAME must be defined.)) \
$(if $(filter $(pn),$(_cap_names)), \
$(error $(p): PRODUCT_NAME must be unique; "$(pn)" already used by $(strip \
$(foreach \
pp,$(PRODUCTS),
$(if $(filter $(pn),$(PRODUCTS.$(pp).PRODUCT_NAME)), \
$(pp) \
))) \
) \
) \
$(eval _cap_names += $(pn)) \
$(if $(call is-c-identifier,$(pn)),, \
$(error $(p): PRODUCT_NAME must be a valid C identifier, not "$(pn)") \
) \
$(eval pb := $(strip $(PRODUCTS.$(p).PRODUCT_BRAND))) \
$(if $(pb),,$(error $(p): PRODUCT_BRAND must be defined.)) \
$(foreach cf,$(strip $(PRODUCTS.$(p).PRODUCT_COPY_FILES)), \
$(if $(filter 2 3,$(words $(subst :,$(space),$(cf)))),, \
$(error $(p): malformed COPY_FILE "$(cf)") \
) \
) \
) \
)
endef
#
# Returns the product makefile path for the product with the provided name
#
# $(1): short product name like "generic"
#
define _resolve-short-product-name
$(eval pn := $(strip $(1)))
$(eval p := \
$(foreach p,$(PRODUCTS), \
$(if $(filter $(pn),$(PRODUCTS.$(p).PRODUCT_NAME)), \
$(p) \
)) \
)
$(eval p := $(sort $(p)))
$(if $(filter 1,$(words $(p))), \
$(p), \
$(if $(filter 0,$(words $(p))), \
$(error No matches for product "$(pn)"), \
$(error Product "$(pn)" ambiguous: matches $(p)) \
) \
)
endef
define resolve-short-product-name
$(strip $(call _resolve-short-product-name,$(1)))
$(if $(call is-c-identifier,$(PRODUCT_NAME)),, \
$(error $(INTERNAL_PRODUCT): PRODUCT_NAME must be a valid C identifier, not "$(pn)")) \
$(if $(PRODUCT_BRAND),, \
$(error $(INTERNAL_PRODUCT): PRODUCT_BRAND must be defined.)) \
$(foreach cf,$(strip $(PRODUCT_COPY_FILES)), \
$(if $(filter 2 3,$(words $(subst :,$(space),$(cf)))),, \
$(error $(p): malformed COPY_FILE "$(cf)"))))
endef
# BoardConfig variables that are also inherited in product mks. Should ideally

View File

@ -208,35 +208,26 @@ $(foreach f,$(android_products_makefiles), \
)
# Dedup, extract product names, etc.
product_paths :=$(sort $(product_paths))
all_named_products := $(call _first,$(product_paths),:)
all_product_makefiles := $(call _second,$(product_paths),:)
product_paths := $(sort $(product_paths))
all_named_products := $(sort $(call _first,$(product_paths),:))
all_product_makefiles := $(sort $(call _second,$(product_paths),:))
current_product_makefile := $(call _second,$(filter $(TARGET_PRODUCT):%,$(product_paths)),:)
COMMON_LUNCH_CHOICES := $(sort $(common_lunch_choices))
load_all_product_makefiles :=
ifneq (,$(filter product-graph, $(MAKECMDGOALS)))
ifeq ($(ANDROID_PRODUCT_GRAPH),--all)
load_all_product_makefiles := true
endif
endif
ifneq (,$(filter dump-products,$(MAKECMDGOALS)))
ifeq ($(ANDROID_DUMP_PRODUCTS),all)
load_all_product_makefiles := true
endif
endif
# Check that there are no duplicate product names
$(foreach p,$(all_named_products), \
$(if $(filter 1,$(words $(filter $(p):%,$(product_paths)))),, \
$(error Product name must be unique, "$(p)" used by $(call _second,$(filter $(p):%,$(product_paths)),:))))
ifneq ($(ALLOW_RULES_IN_PRODUCT_CONFIG),)
_product_config_saved_KATI_ALLOW_RULES := $(.KATI_ALLOW_RULES)
.KATI_ALLOW_RULES := $(ALLOW_RULES_IN_PRODUCT_CONFIG)
endif
ifeq ($(load_all_product_makefiles),true)
# Import all product makefiles.
$(call import-products, $(all_product_makefiles))
else
# Import just the current product.
$(if $(current_product_makefile),,$(error Can not locate config makefile for product "$(TARGET_PRODUCT)"))
ifeq (,$(current_product_makefile))
$(error Can not locate config makefile for product "$(TARGET_PRODUCT)")
endif
ifneq (,$(filter $(TARGET_PRODUCT),$(products_using_starlark_config)))
RBC_PRODUCT_CONFIG := true
RBC_BOARD_CONFIG := true
@ -258,44 +249,29 @@ else
endif
include $(OUT_DIR)/rbc/rbc_product_config_results.mk
endif
endif # Import all or just the current product makefile
# Quick check
$(check-all-products)
# This step was already handled in the RBC product configuration.
# Since the equivalent starlark code will not add the partial products to
# the PRODUCTS variable, it's ok for them to be set before check-all-products
ifeq ($(RBC_PRODUCT_CONFIG)$(SKIP_ARTIFACT_PATH_REQUIREMENT_PRODUCTS_CHECK),)
# Import all the products that have made artifact path requirements, so that we can verify
# the artifacts they produce.
# These are imported after check-all-products because some of them might not be real products.
# the artifacts they produce. They might be intermediate makefiles instead of real products.
$(foreach makefile,$(ARTIFACT_PATH_REQUIREMENT_PRODUCTS),\
$(if $(filter-out $(makefile),$(PRODUCTS)),$(eval $(call import-products,$(makefile))))\
)
endif
INTERNAL_PRODUCT := $(current_product_makefile)
# Strip and assign the PRODUCT_ variables.
$(call strip-product-vars)
# Quick check
$(check-current-product)
ifneq ($(ALLOW_RULES_IN_PRODUCT_CONFIG),)
.KATI_ALLOW_RULES := $(_saved_KATI_ALLOW_RULES)
_product_config_saved_KATI_ALLOW_RULES :=
endif
ifneq ($(filter dump-products, $(MAKECMDGOALS)),)
$(dump-products)
endif
# Convert a short name like "sooner" into the path to the product
# file defining that product.
#
INTERNAL_PRODUCT := $(call resolve-short-product-name, $(TARGET_PRODUCT))
ifneq ($(current_product_makefile),$(INTERNAL_PRODUCT))
$(error PRODUCT_NAME inconsistent in $(current_product_makefile) and $(INTERNAL_PRODUCT))
endif
############################################################################
# Strip and assign the PRODUCT_ variables.
$(call strip-product-vars)
current_product_makefile :=
all_product_makefiles :=
@ -457,7 +433,7 @@ endif
# Show a warning wall of text if non-compliance-GSI products set this option.
ifdef PRODUCT_INSTALL_DEBUG_POLICY_TO_SYSTEM_EXT
ifeq (,$(filter gsi_arm gsi_arm64 gsi_x86 gsi_x86_64 gsi_car_arm64 gsi_car_x86_64,$(PRODUCT_NAME)))
ifeq (,$(filter gsi_arm gsi_arm64 gsi_x86 gsi_x86_64 gsi_car_arm64 gsi_car_x86_64 gsi_tv_arm gsi_tv_arm64,$(PRODUCT_NAME)))
$(warning PRODUCT_INSTALL_DEBUG_POLICY_TO_SYSTEM_EXT is set but \
PRODUCT_NAME ($(PRODUCT_NAME)) doesn't look like a GSI for compliance \
testing. This is a special configuration for compliance GSI, so do make \

View File

@ -104,6 +104,11 @@ def __printvars_rearrange_list(value_list):
seen = {item: 0 for item in value_list}
return sorted(seen.keys()) if _options.rearrange == "sort" else seen.keys()
def __sort_pcm_names(pcm_names):
# We have to add an extension back onto the pcm names when sorting,
# or else the sort order could be wrong when one is a prefix of another.
return [x[:-3] for x in sorted([y + ".mk" for y in pcm_names], reverse=True)]
def _product_configuration(top_pcm_name, top_pcm, input_variables_init):
"""Creates configuration."""
@ -120,25 +125,19 @@ def _product_configuration(top_pcm_name, top_pcm, input_variables_init):
globals, globals_base = _init_globals(input_variables_init)
config_postfix = [] # Configs in postfix order
# Each PCM is represented by a quadruple of function, config, children names
# and readyness (that is, the configurations from inherited PCMs have been
# substituted).
configs = {top_pcm_name: (top_pcm, None, [], False)} # All known PCMs
stash = [] # Configs to push once their descendants are done
# Stack containing PCMs to be processed. An item in the stack
# is a pair of PCMs name and its height in the product inheritance tree.
pcm_stack = [(top_pcm_name, 0)]
pcm_count = 0
# Stack containing PCMs to be processed
pcm_stack = [top_pcm_name]
# Run it until pcm_stack is exhausted, but no more than N times
for n in range(1000):
if not pcm_stack:
break
(name, height) = pcm_stack.pop()
name = pcm_stack.pop()
pcm, cfg, c, _ = configs[name]
# cfg is set only after PCM has been called, leverage this
@ -146,9 +145,6 @@ def _product_configuration(top_pcm_name, top_pcm, input_variables_init):
if cfg != None:
continue
# Push ancestors until we reach this node's height
config_postfix.extend([stash.pop() for i in range(len(stash) - height)])
# Run this one, obtaining its configuration and child PCMs.
if _options.trace_modules:
print("#%d: %s" % (n, name))
@ -162,7 +158,11 @@ def _product_configuration(top_pcm_name, top_pcm, input_variables_init):
globals["PRODUCTS."+name+".mk.ARTIFACT_PATH_ALLOWED_LIST"] = handle.artifact_path_allowed_list
globals["PRODUCTS."+name+".mk.ARTIFACT_PATH_REQUIREMENT_IS_RELAXED"] = "true" if handle.artifact_path_requirement_is_relaxed[0] else ""
globals.setdefault("ARTIFACT_PATH_REQUIREMENT_PRODUCTS", [])
globals["ARTIFACT_PATH_REQUIREMENT_PRODUCTS"] += [name+".mk"]
globals["ARTIFACT_PATH_REQUIREMENT_PRODUCTS"] = sorted(globals["ARTIFACT_PATH_REQUIREMENT_PRODUCTS"] + [name+".mk"])
if handle.product_enforce_packages_exist[0]:
globals["PRODUCTS."+name+".mk.PRODUCT_ENFORCE_PACKAGES_EXIST"] = "true"
globals["PRODUCTS."+name+".mk.PRODUCT_ENFORCE_PACKAGES_EXIST_ALLOW_LIST"] = handle.product_enforce_packages_exist_allow_list
# Now we know everything about this PCM, record it in 'configs'.
children = handle.inherited_modules
@ -171,34 +171,75 @@ def _product_configuration(top_pcm_name, top_pcm, input_variables_init):
# Starlark dictionaries are guaranteed to iterate through in insertion order,
# so children.keys() will be ordered by the inherit() calls
configs[name] = (pcm, handle.cfg, children.keys(), False)
pcm_count = pcm_count + 1
if len(children) == 0:
# Leaf PCM goes straight to the config_postfix
config_postfix.append(name)
continue
# Stash this PCM, process children in the sorted order
stash.append(name)
for child_name in sorted(children, reverse = True):
for child_name in __sort_pcm_names(children.keys()):
if child_name not in configs:
configs[child_name] = (children[child_name], None, [], False)
pcm_stack.append((child_name, len(stash)))
pcm_stack.append(child_name)
if pcm_stack:
fail("Inheritance processing took too many iterations")
# Flush the stash
config_postfix.extend([stash.pop() for i in range(len(stash))])
if len(config_postfix) != pcm_count:
fail("Ran %d modules but postfix tree has only %d entries" % (pcm_count, len(config_postfix)))
for pcm_name in globals.get("ARTIFACT_PATH_REQUIREMENT_PRODUCTS", []):
for var, val in evaluate_finalized_product_variables(configs, pcm_name[:-3]).items():
globals["PRODUCTS."+pcm_name+"."+var] = val
if _options.trace_modules:
# Copy product config variables from the cfg dictionary to the
# PRODUCTS.<top_level_makefile_name>.<var_name> global variables.
for var, val in evaluate_finalized_product_variables(configs, top_pcm_name, _options.trace_modules).items():
globals["PRODUCTS."+top_pcm_name+".mk."+var] = val
# Record inheritance hierarchy in PRODUCTS.<file>.INHERITS_FROM variables.
# This is required for m product-graph.
for config in configs:
if len(configs[config][2]) > 0:
globals["PRODUCTS."+config+".mk.INHERITS_FROM"] = sorted([x + ".mk" for x in configs[config][2]])
globals["PRODUCTS"] = __words(globals.get("PRODUCTS", [])) + [top_pcm_name + ".mk"]
return (globals, globals_base)
def evaluate_finalized_product_variables(configs, top_level_pcm_name, trace=False):
configs_postfix = []
pcm_stack = [(top_level_pcm_name, True)]
for i in range(1000):
if not pcm_stack:
break
pcm_name, before = pcm_stack.pop()
if before:
pcm_stack.append((pcm_name, False))
for child in __sort_pcm_names(configs[pcm_name][2]):
pcm_stack.append((child, True))
else:
configs_postfix.append(pcm_name)
if pcm_stack:
fail("Inheritance processing took too many iterations")
# clone the configs, because in the process of evaluating the
# final cfg dictionary we will remove values from the intermediate
# cfg dictionaries. We need to be able to call evaluate_finalized_product_variables()
# multiple times, so we can't change the origional configs object.
cloned_configs = {}
for pcm_name in configs:
# skip unneeded pcms
if pcm_name not in configs_postfix:
continue
pcm, cfg, children_names, ready = configs[pcm_name]
cloned_cfg = {}
for var, val in cfg.items():
if type(val) == 'list':
cloned_cfg[var] = list(val)
else:
cloned_cfg[var] = val
cloned_configs[pcm_name] = (pcm, cloned_cfg, children_names, ready)
configs = cloned_configs
if trace:
print("\n#---Postfix---")
for x in config_postfix:
for x in configs_postfix:
print("# ", x)
# Traverse the tree from the bottom, evaluating inherited values
for pcm_name in config_postfix:
for pcm_name in configs_postfix:
pcm, cfg, children_names, ready = configs[pcm_name]
# Should run
@ -217,25 +258,7 @@ def _product_configuration(top_pcm_name, top_pcm, input_variables_init):
_substitute_inherited(configs, pcm_name, cfg)
_percolate_inherited(configs, pcm_name, cfg, children_names)
configs[pcm_name] = pcm, cfg, children_names, True
if (pcm_name + ".mk") in globals.get("ARTIFACT_PATH_REQUIREMENT_PRODUCTS", []):
for var, val in cfg.items():
globals["PRODUCTS."+pcm_name+".mk."+var] = val
# Copy product config variables from the cfg dictionary to the
# PRODUCTS.<top_level_makefile_name>.<var_name> global variables.
for var, val in configs[top_pcm_name][1].items():
globals["PRODUCTS."+top_pcm_name+".mk."+var] = val
# Record inheritance hierarchy in PRODUCTS.<file>.INHERITS_FROM variables.
# This is required for m product-graph.
for config in configs:
if len(configs[config][2]) > 0:
globals["PRODUCTS."+config+".mk.INHERITS_FROM"] = sorted([x + ".mk" for x in configs[config][2]])
globals["PRODUCTS"] = __words(globals.get("PRODUCTS", [])) + [top_pcm_name + ".mk"]
return (globals, globals_base)
return configs[top_level_pcm_name][1]
def _dictionary_difference(a, b):
result = {}
@ -382,10 +405,26 @@ def _soong_config_get(g, nsname, var):
"""Gets to the value of the variable in the namespace."""
return g.get(_soong_config_namespaces_key, {}).get(nsname, {}).get(var, None)
def _abspath(path):
def _abspath(paths):
"""Provided for compatibility, to be removed later."""
return path
cwd = rblf_shell('pwd')
results = []
for path in __words(paths):
if path[0] != "/":
path = cwd + "/" + path
resultparts = []
for part in path.split('/'):
if part == "." or part == "":
continue
elif part == "..":
if resultparts:
resultparts.pop()
else:
resultparts.append(part)
results.append("/" + "/".join(resultparts))
return " ".join(results)
def _addprefix(prefix, string_or_list):
@ -434,6 +473,8 @@ def __h_new():
artifact_path_requirements = list(),
artifact_path_allowed_list = list(),
artifact_path_requirement_is_relaxed = [False], # as a list so that we can reassign it
product_enforce_packages_exist = [False],
product_enforce_packages_exist_allow_list = [],
)
def __h_cfg(handle):
@ -498,11 +539,11 @@ def _copy_if_exists(path_pair):
# Check that l[0] exists
return [":".join(value)] if rblf_file_exists(value[0]) else []
def _enforce_product_packages_exist(pkg_string_or_list):
def _enforce_product_packages_exist(handle, pkg_string_or_list=[]):
"""Makes including non-existent modules in PRODUCT_PACKAGES an error."""
#TODO(asmundak)
pass
handle.product_enforce_packages_exist[0] = True
handle.product_enforce_packages_exist_allow_list.clear()
handle.product_enforce_packages_exist_allow_list.extend(__words(pkg_string_or_list))
def _add_product_dex_preopt_module_config(handle, modules, config):
"""Equivalent to add-product-dex-preopt-module-config from build/make/core/product.mk."""

View File

@ -14,10 +14,6 @@
# limitations under the License.
#
JAVAC_NINJA_POOL :=
R8_NINJA_POOL :=
D8_NINJA_POOL :=
# Notice: this works only with Google's RBE service.
ifneq ($(filter-out false,$(USE_RBE)),)
ifdef RBE_DIR
@ -82,20 +78,16 @@ ifneq ($(filter-out false,$(USE_RBE)),)
ifdef RBE_JAVAC
JAVAC_WRAPPER := $(strip $(JAVAC_WRAPPER) $(RBE_WRAPPER) --labels=type=compile,lang=java,compiler=javac --exec_strategy=$(javac_exec_strategy) --platform=$(java_r8_d8_platform))
JAVAC_NINJA_POOL := $(RBE_POOL)
endif
ifdef RBE_R8
R8_WRAPPER := $(strip $(RBE_WRAPPER) --labels=type=compile,compiler=r8 --exec_strategy=$(r8_exec_strategy) --platform=$(java_r8_d8_platform) --inputs=out/soong/host/linux-x86/framework/r8-compat-proguard.jar,build/make/core/proguard_basic_keeps.flags --toolchain_inputs=prebuilts/jdk/jdk11/linux-x86/bin/java)
R8_NINJA_POOL := $(RBE_POOL)
endif
ifdef RBE_D8
D8_WRAPPER := $(strip $(RBE_WRAPPER) --labels=type=compile,compiler=d8 --exec_strategy=$(d8_exec_strategy) --platform=$(java_r8_d8_platform) --inputs=out/soong/host/linux-x86/framework/d8.jar --toolchain_inputs=prebuilts/jdk/jdk11/linux-x86/bin/java)
D8_NINJA_POOL := $(RBE_POOL)
endif
rbe_dir :=
endif
.KATI_READONLY := JAVAC_NINJA_POOL R8_NINJA_POOL D8_NINJA_POOL

View File

@ -260,6 +260,9 @@ installed_static_library_notice_file_targets := \
installed_static_library_notice_file_targets += \
$(foreach lib,$(LOCAL_RLIB_LIBRARIES), \
NOTICE-$(if $(LOCAL_IS_HOST_MODULE),HOST$(if $(my_host_cross),_CROSS,),TARGET)-RLIB_LIBRARIES-$(lib))
installed_static_library_notice_file_targets += \
$(foreach lib,$(LOCAL_PROC_MACRO_LIBRARIES), \
NOTICE-$(if $(LOCAL_IS_HOST_MODULE),HOST$(if $(my_host_cross),_CROSS,),TARGET)-PROC_MACRO_LIBRARIES-$(lib))
$(notice_target): | $(installed_static_library_notice_file_targets)
$(LOCAL_INSTALLED_MODULE): | $(notice_target)

View File

@ -6,6 +6,7 @@ endif
ifdef LOCAL_DROIDDOC_STUBS_SRCJAR
$(eval $(call copy-one-file,$(LOCAL_DROIDDOC_STUBS_SRCJAR),$(OUT_DOCS)/$(LOCAL_MODULE)-stubs.srcjar))
$(eval ALL_TARGETS.$(OUT_DOCS)/$(LOCAL_MODULE)-stubs.srcjar.META_LIC := $(LOCAL_SOONG_LICENSE_METADATA))
ALL_DOCS += $(OUT_DOCS)/$(LOCAL_MODULE)-stubs.srcjar
.PHONY: $(LOCAL_MODULE)
@ -14,6 +15,7 @@ endif
ifdef LOCAL_DROIDDOC_DOC_ZIP
$(eval $(call copy-one-file,$(LOCAL_DROIDDOC_DOC_ZIP),$(OUT_DOCS)/$(LOCAL_MODULE)-docs.zip))
$(eval ALL_TARGETS.$(OUT_DOCS)/$(LOCAL_MODULE)-docs.zip.META_LIC := $(LOCAL_SOONG_LICENSE_METADATA))
$(call dist-for-goals,docs,$(OUT_DOCS)/$(LOCAL_MODULE)-docs.zip)
.PHONY: $(LOCAL_MODULE) $(LOCAL_MODULE)-docs.zip
@ -23,12 +25,15 @@ endif
ifdef LOCAL_DROIDDOC_ANNOTATIONS_ZIP
$(eval $(call copy-one-file,$(LOCAL_DROIDDOC_ANNOTATIONS_ZIP),$(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/$(LOCAL_MODULE)_annotations.zip))
$(eval ALL_TARGETS.$(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/$(LOCAL_MODULE)_annotations.zip.META_LIC := $(LOCAL_SOONG_LICENSE_METADATA))
endif
ifdef LOCAL_DROIDDOC_API_VERSIONS_XML
$(eval $(call copy-one-file,$(LOCAL_DROIDDOC_API_VERSIONS_XML),$(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/$(LOCAL_MODULE)_generated-api-versions.xml))
$(eval ALL_TARGETS.$(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/$(LOCAL_MODULE)_generated-api-versions.xml.META_LIC := $(LOCAL_SOONG_LICENSE_METADATA))
endif
ifdef LOCAL_DROIDDOC_METADATA_ZIP
$(eval $(call copy-one-file,$(LOCAL_DROIDDOC_METADATA_ZIP),$(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/$(LOCAL_MODULE)-metadata.zip))
$(eval ALL_TARGETS.$(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/$(LOCAL_MODULE)-metadata.zip.META_LIC := $(LOCAL_SOONG_LICENSE_METADATA))
endif

View File

@ -35,4 +35,5 @@ $(shareduid_violation_modules_filename): $(AAPT2)
--copy_out_system_ext $(TARGET_COPY_OUT_SYSTEM_EXT) \
> $@
$(call declare-0p-target,$(shareduid_violation_modules_filename))
$(call dist-for-goals,droidcore,$(shareduid_violation_modules_filename))

View File

@ -40,6 +40,18 @@ general_tests_configs_zip := $(PRODUCT_OUT)/general-tests_configs.zip
# Create an artifact to include all shared librariy files in general-tests.
general_tests_host_shared_libs_zip := $(PRODUCT_OUT)/general-tests_host-shared-libs.zip
# Copy kernel test modules to testcases directories
include $(BUILD_SYSTEM)/tasks/tools/vts-kernel-tests.mk
kernel_test_copy_pairs := \
$(call target-native-copy-pairs,$(kernel_test_modules),$(kernel_test_host_out))
copy_kernel_tests := $(call copy-many-files,$(kernel_test_copy_pairs))
# PHONY target to be used to build and test `vts_kernel_tests` without building full vts
.PHONY: vts_kernel_tests
vts_kernel_tests: $(copy_kernel_tests)
$(general_tests_zip) : $(copy_kernel_tests)
$(general_tests_zip) : PRIVATE_KERNEL_TEST_HOST_OUT := $(kernel_test_host_out)
$(general_tests_zip) : PRIVATE_general_tests_list_zip := $(general_tests_list_zip)
$(general_tests_zip) : .KATI_IMPLICIT_OUTPUTS := $(general_tests_list_zip) $(general_tests_configs_zip) $(general_tests_host_shared_libs_zip)
$(general_tests_zip) : PRIVATE_TOOLS := $(general_tests_tools)
@ -52,6 +64,7 @@ $(general_tests_zip) : $(COMPATIBILITY.general-tests.FILES) $(general_tests_tool
rm -f $@ $(PRIVATE_general_tests_list_zip)
mkdir -p $(PRIVATE_INTERMEDIATES_DIR) $(PRIVATE_INTERMEDIATES_DIR)/tools
echo $(sort $(COMPATIBILITY.general-tests.FILES)) | tr " " "\n" > $(PRIVATE_INTERMEDIATES_DIR)/list
find $(PRIVATE_KERNEL_TEST_HOST_OUT) >> $(PRIVATE_INTERMEDIATES_DIR)/list
grep $(HOST_OUT_TESTCASES) $(PRIVATE_INTERMEDIATES_DIR)/list > $(PRIVATE_INTERMEDIATES_DIR)/host.list || true
grep $(TARGET_OUT_TESTCASES) $(PRIVATE_INTERMEDIATES_DIR)/list > $(PRIVATE_INTERMEDIATES_DIR)/target.list || true
grep -e .*\\.config$$ $(PRIVATE_INTERMEDIATES_DIR)/host.list > $(PRIVATE_INTERMEDIATES_DIR)/host-test-configs.list || true

View File

@ -39,7 +39,7 @@ $(host_unit_tests_zip) : $(COMPATIBILITY.host-unit-tests.FILES) $(my_host_shared
echo $$shared_lib >> $@-host-libs.list; \
done
grep $(TARGET_OUT_TESTCASES) $@.list > $@-target.list || true
$(hide) $(SOONG_ZIP) -d -o $@ -P host -C $(HOST_OUT) -l $@-host.list \
$(hide) $(SOONG_ZIP) -L 0 -d -o $@ -P host -C $(HOST_OUT) -l $@-host.list \
-P target -C $(PRODUCT_OUT) -l $@-target.list \
-P host/testcases -C $(HOST_OUT) -l $@-host-libs.list
rm -f $@.list $@-host.list $@-target.list $@-host-libs.list

View File

@ -134,6 +134,9 @@ $(eval $(call text-notice-rule,$(test_suite_notice_txt),"Test suites","Notices f
$(call declare-0p-target,$(test_suite_notice_html))
$(call declare-0p-target,$(test_suite_notice_txt))
$(call declare-1p-copy-files,$(test_suite_dynamic_config),)
$(call declare-1p-copy-files,$(test_suite_prebuilt_tools),)
# Reset all input variables
test_suite_name :=
test_suite_tradefed :=

View File

@ -0,0 +1,26 @@
# Copyright (C) 2022 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-include external/linux-kselftest/android/kselftest_test_list.mk
-include external/ltp/android/ltp_package_list.mk
include $(BUILD_SYSTEM)/tasks/tools/vts_package_utils.mk
# Copy kernel test modules to testcases directories
kernel_test_host_out := $(HOST_OUT_TESTCASES)/vts_kernel_tests
kernel_test_vts_out := $(HOST_OUT)/$(test_suite_name)/android-$(test_suite_name)/testcases/vts_kernel_tests
kernel_test_modules := \
$(kselftest_modules) \
ltp \
$(ltp_packages)

View File

@ -12,35 +12,19 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-include external/linux-kselftest/android/kselftest_test_list.mk
-include external/ltp/android/ltp_package_list.mk
include $(BUILD_SYSTEM)/tasks/tools/vts_package_utils.mk
test_suite_name := vts
test_suite_tradefed := vts-tradefed
test_suite_readme := test/vts/tools/vts-core-tradefed/README
# Copy kernel test modules to testcases directories
kernel_test_host_out := $(HOST_OUT_TESTCASES)/vts_kernel_tests
kernel_test_vts_out := $(HOST_OUT)/$(test_suite_name)/android-$(test_suite_name)/testcases/vts_kernel_tests
kernel_test_modules := \
$(kselftest_modules) \
ltp \
$(ltp_packages)
include $(BUILD_SYSTEM)/tasks/tools/vts-kernel-tests.mk
kernel_test_copy_pairs := \
$(call target-native-copy-pairs,$(kernel_test_modules),$(kernel_test_vts_out)) \
$(call target-native-copy-pairs,$(kernel_test_modules),$(kernel_test_host_out))
$(call target-native-copy-pairs,$(kernel_test_modules),$(kernel_test_vts_out))
copy_kernel_tests := $(call copy-many-files,$(kernel_test_copy_pairs))
test_suite_extra_deps := $(copy_kernel_tests)
# PHONY target to be used to build and test `vts_kernel_tests` without building full vts
.PHONY: vts_kernel_tests
vts_kernel_tests: $(copy_kernel_tests)
include $(BUILD_SYSTEM)/tasks/tools/compatibility.mk
.PHONY: vts

View File

@ -48,7 +48,7 @@ MAX_PLATFORM_VERSION := TP1A
# The last stable version name of the platform that was released. During
# development, this stays at that previous version, while the codename indicates
# further work based on the previous version.
PLATFORM_VERSION_LAST_STABLE := 12
PLATFORM_VERSION_LAST_STABLE := 13
.KATI_READONLY := PLATFORM_VERSION_LAST_STABLE
# These are the current development codenames, if the build is not a final
@ -73,12 +73,12 @@ ifndef PLATFORM_SDK_VERSION
# When you increment the PLATFORM_SDK_VERSION please ensure you also
# clear out the following text file of all older PLATFORM_VERSION's:
# cts/tests/tests/os/assets/platform_versions.txt
PLATFORM_SDK_VERSION := 32
PLATFORM_SDK_VERSION := 33
endif
.KATI_READONLY := PLATFORM_SDK_VERSION
# This is the sdk extension version of this tree.
PLATFORM_SDK_EXTENSION_VERSION := 2
PLATFORM_SDK_EXTENSION_VERSION := 3
.KATI_READONLY := PLATFORM_SDK_EXTENSION_VERSION
# TODO(b/159866756): Remove this workaround when building against
@ -90,7 +90,7 @@ else
endif
# This is the sdk extension version that PLATFORM_SDK_VERSION ships with.
PLATFORM_BASE_SDK_EXTENSION_VERSION := 2
PLATFORM_BASE_SDK_EXTENSION_VERSION := 3
.KATI_READONLY := PLATFORM_BASE_SDK_EXTENSION_VERSION
# This are all known codenames.

27
finalize_branch_for_release.sh Executable file
View File

@ -0,0 +1,27 @@
#!/bin/bash
set -e
source ../envsetup.sh
# default target to modify tree and build SDK
lunch aosp_arm64-userdebug
set -x
# This script is WIP and only finalizes part of the Android branch for release.
# The full process can be found at (INTERNAL) go/android-sdk-finalization.
# VNDK snapshot (TODO)
# SDK snapshots (TODO)
# Update references in the codebase to new API version (TODO)
# ...
AIDL_TRANSITIVE_FREEZE=true m aidl-freeze-api
# TODO(b/229413853): test while simulating 'rel' for more requirements AIDL_FROZEN_REL=true
m # test build
# Build SDK (TODO)
# lunch sdk...
# m ...

View File

@ -38,6 +38,12 @@ BOARD_USES_METADATA_PARTITION := true
# updating the last seen rollback index in the tamper-evident storage.
BOARD_AVB_ROLLBACK_INDEX := 0
# The chained vbmeta settings for boot images.
BOARD_AVB_BOOT_KEY_PATH := external/avb/test/data/testkey_rsa4096.pem
BOARD_AVB_BOOT_ALGORITHM := SHA256_RSA4096
BOARD_AVB_BOOT_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
BOARD_AVB_BOOT_ROLLBACK_INDEX_LOCATION := 2
# Enable AVB chained partition for system.
# https://android.googlesource.com/platform/external/avb/+/master/README.md
BOARD_AVB_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem

View File

@ -68,7 +68,6 @@ PRODUCT_PACKAGES += \
com.android.neuralnetworks \
com.android.scheduling \
com.android.sdkext \
com.android.sepolicy \
com.android.tethering \
com.android.tzdata \
com.android.uwb \
@ -399,7 +398,6 @@ PRODUCT_SYSTEM_PROPERTIES += \
PRODUCT_PACKAGES_DEBUG := \
adb_keys \
arping \
com.android.sepolicy.cert-debug.der \
dmuserd \
idlcli \
init-debug.rc \

254
target/product/gsi/33.txt Normal file
View File

@ -0,0 +1,254 @@
LLNDK: libEGL.so
LLNDK: libGLESv1_CM.so
LLNDK: libGLESv2.so
LLNDK: libGLESv3.so
LLNDK: libRS.so
LLNDK: libandroid_net.so
LLNDK: libbinder_ndk.so
LLNDK: libc.so
LLNDK: libcgrouprc.so
LLNDK: libdl.so
LLNDK: libft2.so
LLNDK: liblog.so
LLNDK: libm.so
LLNDK: libmediandk.so
LLNDK: libnativewindow.so
LLNDK: libneuralnetworks.so
LLNDK: libselinux.so
LLNDK: libsync.so
LLNDK: libvndksupport.so
LLNDK: libvulkan.so
VNDK-SP: android.hardware.common-V2-ndk.so
VNDK-SP: android.hardware.common.fmq-V1-ndk.so
VNDK-SP: android.hardware.graphics.allocator-V1-ndk.so
VNDK-SP: android.hardware.graphics.common-V3-ndk.so
VNDK-SP: android.hardware.graphics.common@1.0.so
VNDK-SP: android.hardware.graphics.common@1.1.so
VNDK-SP: android.hardware.graphics.common@1.2.so
VNDK-SP: android.hardware.graphics.composer3-V1-ndk.so
VNDK-SP: android.hardware.graphics.mapper@2.0.so
VNDK-SP: android.hardware.graphics.mapper@2.1.so
VNDK-SP: android.hardware.graphics.mapper@3.0.so
VNDK-SP: android.hardware.graphics.mapper@4.0.so
VNDK-SP: android.hardware.renderscript@1.0.so
VNDK-SP: android.hidl.memory.token@1.0.so
VNDK-SP: android.hidl.memory@1.0-impl.so
VNDK-SP: android.hidl.memory@1.0.so
VNDK-SP: android.hidl.safe_union@1.0.so
VNDK-SP: libRSCpuRef.so
VNDK-SP: libRSDriver.so
VNDK-SP: libRS_internal.so
VNDK-SP: libbacktrace.so
VNDK-SP: libbase.so
VNDK-SP: libbcinfo.so
VNDK-SP: libblas.so
VNDK-SP: libc++.so
VNDK-SP: libcompiler_rt.so
VNDK-SP: libcutils.so
VNDK-SP: libdmabufheap.so
VNDK-SP: libgralloctypes.so
VNDK-SP: libhardware.so
VNDK-SP: libhidlbase.so
VNDK-SP: libhidlmemory.so
VNDK-SP: libion.so
VNDK-SP: libjsoncpp.so
VNDK-SP: liblzma.so
VNDK-SP: libprocessgroup.so
VNDK-SP: libunwindstack.so
VNDK-SP: libutils.so
VNDK-SP: libutilscallstack.so
VNDK-SP: libz.so
VNDK-core: android.hardware.audio.common-V1-ndk.so
VNDK-core: android.hardware.audio.common@2.0.so
VNDK-core: android.hardware.authsecret-V1-ndk.so
VNDK-core: android.hardware.automotive.occupant_awareness-V1-ndk.so
VNDK-core: android.hardware.bluetooth.audio-V1-ndk.so
VNDK-core: android.hardware.camera.common-V1-ndk.so
VNDK-core: android.hardware.camera.device-V1-ndk.so
VNDK-core: android.hardware.camera.metadata-V1-ndk.so
VNDK-core: android.hardware.camera.provider-V1-ndk.so
VNDK-core: android.hardware.configstore-utils.so
VNDK-core: android.hardware.configstore@1.0.so
VNDK-core: android.hardware.configstore@1.1.so
VNDK-core: android.hardware.confirmationui-support-lib.so
VNDK-core: android.hardware.drm-V1-ndk.so
VNDK-core: android.hardware.dumpstate-V1-ndk.so
VNDK-core: android.hardware.gnss-V2-ndk.so
VNDK-core: android.hardware.graphics.allocator@2.0.so
VNDK-core: android.hardware.graphics.allocator@3.0.so
VNDK-core: android.hardware.graphics.allocator@4.0.so
VNDK-core: android.hardware.graphics.bufferqueue@1.0.so
VNDK-core: android.hardware.graphics.bufferqueue@2.0.so
VNDK-core: android.hardware.health-V1-ndk.so
VNDK-core: android.hardware.health.storage-V1-ndk.so
VNDK-core: android.hardware.identity-V4-ndk.so
VNDK-core: android.hardware.ir-V1-ndk.so
VNDK-core: android.hardware.keymaster-V3-ndk.so
VNDK-core: android.hardware.light-V1-ndk.so
VNDK-core: android.hardware.media.bufferpool@2.0.so
VNDK-core: android.hardware.media.omx@1.0.so
VNDK-core: android.hardware.media@1.0.so
VNDK-core: android.hardware.memtrack-V1-ndk.so
VNDK-core: android.hardware.memtrack@1.0.so
VNDK-core: android.hardware.nfc-V1-ndk.so
VNDK-core: android.hardware.oemlock-V1-ndk.so
VNDK-core: android.hardware.power-V2-ndk.so
VNDK-core: android.hardware.power.stats-V1-ndk.so
VNDK-core: android.hardware.radio-V1-ndk.so
VNDK-core: android.hardware.radio.config-V1-ndk.so
VNDK-core: android.hardware.radio.data-V1-ndk.so
VNDK-core: android.hardware.radio.messaging-V1-ndk.so
VNDK-core: android.hardware.radio.modem-V1-ndk.so
VNDK-core: android.hardware.radio.network-V1-ndk.so
VNDK-core: android.hardware.radio.sim-V1-ndk.so
VNDK-core: android.hardware.radio.voice-V1-ndk.so
VNDK-core: android.hardware.rebootescrow-V1-ndk.so
VNDK-core: android.hardware.security.dice-V1-ndk.so
VNDK-core: android.hardware.security.keymint-V2-ndk.so
VNDK-core: android.hardware.security.secureclock-V1-ndk.so
VNDK-core: android.hardware.security.sharedsecret-V1-ndk.so
VNDK-core: android.hardware.sensors-V1-ndk.so
VNDK-core: android.hardware.soundtrigger3-V1-ndk.so
VNDK-core: android.hardware.soundtrigger@2.0-core.so
VNDK-core: android.hardware.soundtrigger@2.0.so
VNDK-core: android.hardware.usb-V1-ndk.so
VNDK-core: android.hardware.uwb-V1-ndk.so
VNDK-core: android.hardware.vibrator-V2-ndk.so
VNDK-core: android.hardware.weaver-V1-ndk.so
VNDK-core: android.hardware.wifi.hostapd-V1-ndk.so
VNDK-core: android.hardware.wifi.supplicant-V1-ndk.so
VNDK-core: android.hidl.token@1.0-utils.so
VNDK-core: android.hidl.token@1.0.so
VNDK-core: android.media.audio.common.types-V1-ndk.so
VNDK-core: android.media.soundtrigger.types-V1-ndk.so
VNDK-core: android.system.keystore2-V2-ndk.so
VNDK-core: android.system.suspend-V1-ndk.so
VNDK-core: android.system.suspend@1.0.so
VNDK-core: libaudioroute.so
VNDK-core: libaudioutils.so
VNDK-core: libbinder.so
VNDK-core: libbufferqueueconverter.so
VNDK-core: libcamera_metadata.so
VNDK-core: libcap.so
VNDK-core: libcn-cbor.so
VNDK-core: libcodec2.so
VNDK-core: libcrypto.so
VNDK-core: libcrypto_utils.so
VNDK-core: libcurl.so
VNDK-core: libdiskconfig.so
VNDK-core: libdumpstateutil.so
VNDK-core: libevent.so
VNDK-core: libexif.so
VNDK-core: libexpat.so
VNDK-core: libfmq.so
VNDK-core: libgatekeeper.so
VNDK-core: libgui.so
VNDK-core: libhardware_legacy.so
VNDK-core: libhidlallocatorutils.so
VNDK-core: libjpeg.so
VNDK-core: libldacBT_abr.so
VNDK-core: libldacBT_enc.so
VNDK-core: liblz4.so
VNDK-core: libmedia_helper.so
VNDK-core: libmedia_omx.so
VNDK-core: libmemtrack.so
VNDK-core: libminijail.so
VNDK-core: libmkbootimg_abi_check.so
VNDK-core: libnetutils.so
VNDK-core: libnl.so
VNDK-core: libpcre2.so
VNDK-core: libpiex.so
VNDK-core: libpng.so
VNDK-core: libpower.so
VNDK-core: libprocinfo.so
VNDK-core: libradio_metadata.so
VNDK-core: libspeexresampler.so
VNDK-core: libsqlite.so
VNDK-core: libssl.so
VNDK-core: libstagefright_bufferpool@2.0.so
VNDK-core: libstagefright_bufferqueue_helper.so
VNDK-core: libstagefright_foundation.so
VNDK-core: libstagefright_omx.so
VNDK-core: libstagefright_omx_utils.so
VNDK-core: libstagefright_xmlparser.so
VNDK-core: libsysutils.so
VNDK-core: libtinyalsa.so
VNDK-core: libtinyxml2.so
VNDK-core: libui.so
VNDK-core: libusbhost.so
VNDK-core: libwifi-system-iface.so
VNDK-core: libxml2.so
VNDK-core: libyuv.so
VNDK-core: libziparchive.so
VNDK-private: libbacktrace.so
VNDK-private: libblas.so
VNDK-private: libcompiler_rt.so
VNDK-private: libft2.so
VNDK-private: libgui.so
VNDK-product: android.hardware.audio.common@2.0.so
VNDK-product: android.hardware.configstore@1.0.so
VNDK-product: android.hardware.configstore@1.1.so
VNDK-product: android.hardware.graphics.allocator@2.0.so
VNDK-product: android.hardware.graphics.allocator@3.0.so
VNDK-product: android.hardware.graphics.allocator@4.0.so
VNDK-product: android.hardware.graphics.bufferqueue@1.0.so
VNDK-product: android.hardware.graphics.bufferqueue@2.0.so
VNDK-product: android.hardware.graphics.common@1.0.so
VNDK-product: android.hardware.graphics.common@1.1.so
VNDK-product: android.hardware.graphics.common@1.2.so
VNDK-product: android.hardware.graphics.mapper@2.0.so
VNDK-product: android.hardware.graphics.mapper@2.1.so
VNDK-product: android.hardware.graphics.mapper@3.0.so
VNDK-product: android.hardware.graphics.mapper@4.0.so
VNDK-product: android.hardware.media.bufferpool@2.0.so
VNDK-product: android.hardware.media.omx@1.0.so
VNDK-product: android.hardware.media@1.0.so
VNDK-product: android.hardware.memtrack@1.0.so
VNDK-product: android.hardware.renderscript@1.0.so
VNDK-product: android.hardware.soundtrigger@2.0.so
VNDK-product: android.hidl.memory.token@1.0.so
VNDK-product: android.hidl.memory@1.0.so
VNDK-product: android.hidl.safe_union@1.0.so
VNDK-product: android.hidl.token@1.0.so
VNDK-product: android.system.suspend@1.0.so
VNDK-product: libaudioutils.so
VNDK-product: libbacktrace.so
VNDK-product: libbase.so
VNDK-product: libc++.so
VNDK-product: libcamera_metadata.so
VNDK-product: libcap.so
VNDK-product: libcompiler_rt.so
VNDK-product: libcrypto.so
VNDK-product: libcurl.so
VNDK-product: libcutils.so
VNDK-product: libevent.so
VNDK-product: libexpat.so
VNDK-product: libfmq.so
VNDK-product: libhidlbase.so
VNDK-product: libhidlmemory.so
VNDK-product: libion.so
VNDK-product: libjpeg.so
VNDK-product: libjsoncpp.so
VNDK-product: libldacBT_abr.so
VNDK-product: libldacBT_enc.so
VNDK-product: liblz4.so
VNDK-product: liblzma.so
VNDK-product: libminijail.so
VNDK-product: libnl.so
VNDK-product: libpcre2.so
VNDK-product: libpiex.so
VNDK-product: libpng.so
VNDK-product: libprocessgroup.so
VNDK-product: libprocinfo.so
VNDK-product: libspeexresampler.so
VNDK-product: libssl.so
VNDK-product: libtinyalsa.so
VNDK-product: libtinyxml2.so
VNDK-product: libunwindstack.so
VNDK-product: libutils.so
VNDK-product: libutilscallstack.so
VNDK-product: libwifi-system-iface.so
VNDK-product: libxml2.so
VNDK-product: libyuv.so
VNDK-product: libz.so
VNDK-product: libziparchive.so

View File

@ -0,0 +1,21 @@
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
load("//build/make/core:product_config.rbc", "rblf")
load(":inherit3.rbc", _inherit3_init = "init")
def init(g, handle):
cfg = rblf.cfg(handle)
rblf.inherit(handle, "test/inherit3", _inherit3_init)

View File

@ -0,0 +1,22 @@
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
load("//build/make/core:product_config.rbc", "rblf")
load(":inherit4.rbc", _inherit4_init = "init")
def init(g, handle):
cfg = rblf.cfg(handle)
rblf.inherit(handle, "test/inherit4", _inherit4_init)
rblf.require_artifacts_in_path(handle, "vendor/", "")

View File

@ -0,0 +1,22 @@
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
load("//build/make/core:product_config.rbc", "rblf")
load(":inherit4.rbc", _inherit4_init = "init")
def init(g, handle):
cfg = rblf.cfg(handle)
rblf.inherit(handle, "test/inherit4", _inherit4_init)
rblf.require_artifacts_in_path(handle, "vendor/", "")

View File

@ -0,0 +1,21 @@
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
load("//build/make/core:product_config.rbc", "rblf")
def init(g, handle):
cfg = rblf.cfg(handle)
rblf.setdefault(handle, "PRODUCT_COPY_FILES")
cfg["PRODUCT_COPY_FILES"] += ["foo/bar/baz.txt:vendor/etc/baz.txt"]

View File

@ -0,0 +1,24 @@
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
load("//build/make/core:product_config.rbc", "rblf")
load(":inherit1.rbc", _inherit1_init = "init")
load(":inherit2.rbc", _inherit2_init = "init")
load(":inherit3.rbc", _inherit3_init = "init")
def init(g, handle):
cfg = rblf.cfg(handle)
rblf.inherit(handle, "test/inherit1", _inherit1_init)
rblf.inherit(handle, "test/inherit2", _inherit2_init)
rblf.inherit(handle, "test/inherit3", _inherit3_init)

View File

@ -0,0 +1,27 @@
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
load("//build/make/core:product_config.rbc", "rblf")
load("//build/make/tests/input_variables.rbc", input_variables_init = "init")
load(":product.rbc", "init")
def assert_eq(expected, actual):
if expected != actual:
fail("Expected '%s', got '%s'" % (expected, actual))
def test():
(globals, globals_base) = rblf.product_configuration("test/product", init, input_variables_init)
assert_eq(["foo/bar/baz.txt:vendor/etc/baz.txt"], globals["PRODUCTS.test/product.mk.PRODUCT_COPY_FILES"])
assert_eq(["foo/bar/baz.txt:vendor/etc/baz.txt"], globals["PRODUCTS.test/inherit2.mk.PRODUCT_COPY_FILES"])
assert_eq(["foo/bar/baz.txt:vendor/etc/baz.txt"], globals["PRODUCTS.test/inherit3.mk.PRODUCT_COPY_FILES"])

View File

@ -0,0 +1,21 @@
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
load("//build/make/core:product_config.rbc", "rblf")
def init(g, handle):
cfg = rblf.cfg(handle)
g.setdefault("MY_VAR", [])
g["MY_VAR"] += ["foo"]

View File

@ -0,0 +1,21 @@
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
load("//build/make/core:product_config.rbc", "rblf")
def init(g, handle):
cfg = rblf.cfg(handle)
g.setdefault("MY_VAR", [])
g["MY_VAR"] += ["bar"]

View File

@ -0,0 +1,29 @@
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
load("//build/make/core:product_config.rbc", "rblf")
load(":base.rbc", _base_init = "init")
load(":base-secondary.rbc", _base_secondary_init = "init")
def init(g, handle):
cfg = rblf.cfg(handle)
# It's important that base-secondary uses a dash, an underscore won't expose the sort order issue:
# >>> sorted(["base", "base-secondary"])
# ['base', 'base-secondary']
# >>> sorted(["base.mk", "base-secondary.mk"])
# ['base-secondary.mk', 'base.mk']
rblf.inherit(handle, "base", _base_init)
rblf.inherit(handle, "base-secondary", _base_secondary_init)

View File

@ -0,0 +1,26 @@
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
load("//build/make/core:product_config.rbc", "rblf")
load("//build/make/tests/input_variables.rbc", input_variables_init = "init")
load(":product.rbc", "init")
def assert_eq(expected, actual):
if expected != actual:
fail("Expected '%s', got '%s'" % (expected, actual))
def test():
(globals, globals_base) = rblf.product_configuration("test/device", init, input_variables_init)
assert_eq(["foo", "bar"], globals["MY_VAR"])

View File

@ -26,11 +26,17 @@ load(":product.rbc", "init")
load(":board.rbc", board_init = "init")
load(":board_input_vars.rbc", board_input_vars_init = "init")
load("//build/make/tests/single_value_inheritance:test.rbc", test_single_value_inheritance = "test")
load("//build/make/tests/artifact_path_requirements:test.rbc", test_artifact_path_requirements = "test")
load("//build/make/tests/prefixed_sort_order:test.rbc", test_prefixed_sort_order = "test")
def assert_eq(expected, actual):
if expected != actual:
fail("Expected '%s', got '%s'" % (expected, actual))
def assert_dict_subset(expected, actual):
for key, val in expected.items():
assert_eq(val, actual[key])
# Unit tests for non-trivial runtime functions
assert_eq(["a", "b", "c"], rblf.mksort("b a c c"))
assert_eq(["a", "b", "c"], rblf.mksort(["b", "a", "c", "c"]))
@ -67,6 +73,14 @@ assert_eq("foo.c no_folder", rblf.notdir("src/foo.c no_folder"))
assert_eq("", rblf.notdir("/"))
assert_eq("", rblf.notdir(""))
cwd = rblf_shell('pwd')
assert_eq(cwd+"/foo/bar", rblf.abspath("foo/bar"))
assert_eq(cwd+"/bar", rblf.abspath("foo/.././bar"))
assert_eq(cwd+"/bar", rblf.abspath("foo/..////bar//"))
assert_eq("/foo/baz", rblf.abspath("/foo/bar/../baz"))
assert_eq(cwd+"/foo/bar "+cwd+"/foo/baz", rblf.abspath("foo/bar foo/baz"))
assert_eq("/baz", rblf.abspath("/../../../../../../../../../../../../../../../../baz"))
assert_eq(
["build/make/tests/board.rbc", "build/make/tests/board_input_vars.rbc"],
rblf.expand_wildcard("build/make/tests/board*.rbc")
@ -80,31 +94,28 @@ assert_eq(
rblf.expand_wildcard("build/make/tests/run.rbc build/make/tests/nonexistent.rbc")
)
(globals, config, globals_base) = rblf.product_configuration("test/device", init, input_variables_init)
assert_eq(
{
"PRODUCT_COPY_FILES": [
"part_from:part_to",
"device_from:device_to",
"device/google/redfin/audio/audio_platform_info_noextcodec_snd.xml:||VENDOR-PATH-PH||/etc/audio/audio_platform_info_noextcodec_snd.xml",
"xyz:/etc/xyz",
"x.xml:/etc/x.xml",
"y.xml:/etc/y.xml",
"from/sub/x:to/x",
"from/sub/y:to/y",
],
"PRODUCT_HOST_PACKAGES": ["host"],
"PRODUCT_PACKAGES": [
"dev",
"inc",
"dev_after",
"board1_in",
"board1_is",
],
"PRODUCT_PRODUCT_PROPERTIES": ["part_properties"]
},
{ k:v for k, v in sorted(config.items()) }
)
(globals, globals_base) = rblf.product_configuration("test/device", init, input_variables_init)
assert_dict_subset({
"PRODUCTS.test/device.mk.PRODUCT_COPY_FILES": [
"part_from:part_to",
"device_from:device_to",
"device/google/redfin/audio/audio_platform_info_noextcodec_snd.xml:||VENDOR-PATH-PH||/etc/audio/audio_platform_info_noextcodec_snd.xml",
"xyz:/etc/xyz",
"x.xml:/etc/x.xml",
"y.xml:/etc/y.xml",
"from/sub/x:to/x",
"from/sub/y:to/y",
],
"PRODUCTS.test/device.mk.PRODUCT_HOST_PACKAGES": ["host"],
"PRODUCTS.test/device.mk.PRODUCT_PACKAGES": [
"dev",
"inc",
"dev_after",
"board1_in",
"board1_is",
],
"PRODUCTS.test/device.mk.PRODUCT_PRODUCT_PROPERTIES": ["part_properties"]
}, globals)
ns = globals["$SOONG_CONFIG_NAMESPACES"]
assert_eq(
@ -134,8 +145,10 @@ assert_eq(
{ k:v for k,v in sorted(goals.items()) }
)
(board_globals, board_config, board_globals_base) = rblf.board_configuration(board_init, board_input_vars_init)
(board_globals, board_globals_base) = rblf.board_configuration(board_init, board_input_vars_init)
assert_eq({"A_LIST_VARIABLE": ["foo", "bar"]}, board_globals)
assert_eq({"A_LIST_VARIABLE": ["foo"]}, board_globals_base)
test_single_value_inheritance()
test_artifact_path_requirements()
test_prefixed_sort_order()

View File

@ -22,7 +22,7 @@ def assert_eq(expected, actual):
fail("Expected '%s', got '%s'" % (expected, actual))
def test():
(globals, config, globals_base) = rblf.product_configuration("test/device", init, input_variables_init)
assert_eq("tablet", config["PRODUCT_CHARACTERISTICS"])
assert_eq("vendor/myvendor/certs/devkeys/devkey", config["PRODUCT_DEFAULT_DEV_CERTIFICATE"])
assert_eq(["foo", "bar"], config["PRODUCT_PACKAGES"])
(globals, globals_base) = rblf.product_configuration("test/device", init, input_variables_init)
assert_eq("tablet", globals["PRODUCTS.test/device.mk.PRODUCT_CHARACTERISTICS"])
assert_eq("vendor/myvendor/certs/devkeys/devkey", globals["PRODUCTS.test/device.mk.PRODUCT_DEFAULT_DEV_CERTIFICATE"])
assert_eq(["foo", "bar"], globals["PRODUCTS.test/device.mk.PRODUCT_PACKAGES"])

View File

@ -18,7 +18,7 @@ package {
}
blueprint_go_binary {
name: "checkshare",
name: "compliance_checkshare",
srcs: ["cmd/checkshare/checkshare.go"],
deps: ["compliance-module"],
testSrcs: ["cmd/checkshare/checkshare_test.go"],
@ -42,21 +42,21 @@ blueprint_go_binary {
}
blueprint_go_binary {
name: "listshare",
name: "compliance_listshare",
srcs: ["cmd/listshare/listshare.go"],
deps: ["compliance-module"],
testSrcs: ["cmd/listshare/listshare_test.go"],
}
blueprint_go_binary {
name: "dumpgraph",
name: "compliance_dumpgraph",
srcs: ["cmd/dumpgraph/dumpgraph.go"],
deps: ["compliance-module"],
testSrcs: ["cmd/dumpgraph/dumpgraph_test.go"],
}
blueprint_go_binary {
name: "dumpresolutions",
name: "compliance_dumpresolutions",
srcs: ["cmd/dumpresolutions/dumpresolutions.go"],
deps: ["compliance-module"],
testSrcs: ["cmd/dumpresolutions/dumpresolutions_test.go"],
@ -73,7 +73,7 @@ blueprint_go_binary {
}
blueprint_go_binary {
name: "rtrace",
name: "compliance_rtrace",
srcs: ["cmd/rtrace/rtrace.go"],
deps: ["compliance-module"],
testSrcs: ["cmd/rtrace/rtrace_test.go"],

View File

@ -1,68 +0,0 @@
#!/usr/bin/env python
# vim: ts=2 sw=2 nocindent
import re
import sys
def choose_regex(regs, line):
for func,reg in regs:
m = reg.match(line)
if m:
return (func,m)
return (None,None)
def gather(included, deps):
result = set()
for inc in included:
result.add(inc)
for d in deps:
if inc == d[1]:
result.add(d[0])
return result
def main():
deps = []
infos = []
def dependency(m):
deps.append((m.group(1), m.group(2)))
def info(m):
infos.append((m.group(1), m.group(2)))
REGS = [
(dependency, re.compile(r'"(.*)"\s*->\s*"(.*)"')),
(info, re.compile(r'"(.*)"(\s*\[.*\])')),
]
lines = sys.stdin.readlines()
lines = [line.strip() for line in lines]
for line in lines:
func,m = choose_regex(REGS, line)
if func:
func(m)
# filter
sys.stderr.write("argv: " + str(sys.argv) + "\n")
if not (len(sys.argv) == 2 and sys.argv[1] == "--all"):
targets = sys.argv[1:]
included = set(targets)
prevLen = -1
while prevLen != len(included):
prevLen = len(included)
included = gather(included, deps)
deps = [dep for dep in deps if dep[1] in included]
infos = [info for info in infos if info[0] in included]
print "digraph {"
print "graph [ ratio=.5 ];"
for dep in deps:
print '"%s" -> "%s"' % dep
for info in infos:
print '"%s"%s' % info
print "}"
if __name__ == "__main__":
main()

View File

@ -871,7 +871,7 @@ def AddImagesToTargetFiles(filename):
if has_vendor_kernel_boot:
banner("vendor_kernel_boot")
vendor_kernel_boot_image = common.GetVendorBootImage(
vendor_kernel_boot_image = common.GetVendorKernelBootImage(
"IMAGES/vendor_kernel_boot.img", "vendor_kernel_boot.img", OPTIONS.input_tmp,
"VENDOR_KERNEL_BOOT")
if vendor_kernel_boot_image:

View File

@ -348,6 +348,8 @@ def BuildImageMkfs(in_dir, prop_dict, out_file, target_out, fs_config):
build_command.extend(["-C", prop_dict["erofs_pcluster_size"]])
if "erofs_share_dup_blocks" in prop_dict:
build_command.extend(["--chunksize", "4096"])
if "erofs_use_legacy_compression" in prop_dict:
build_command.extend(["-E", "legacy-compress"])
build_command.extend([out_file, in_dir])
if "erofs_sparse_flag" in prop_dict and not disable_sparse:
@ -653,6 +655,7 @@ def ImagePropFromGlobalDict(glob_dict, mount_point):
"erofs_pcluster_size",
"erofs_share_dup_blocks",
"erofs_sparse_flag",
"erofs_use_legacy_compression",
"squashfs_sparse_flag",
"system_f2fs_compress",
"system_f2fs_sldc_flags",
@ -698,6 +701,7 @@ def ImagePropFromGlobalDict(glob_dict, mount_point):
(True, "avb_{}_hashtree_enable", "avb_hashtree_enable"),
(True, "avb_{}_key_path", "avb_key_path"),
(True, "avb_{}_salt", "avb_salt"),
(True, "erofs_use_legacy_compression", "erofs_use_legacy_compression"),
(True, "ext4_share_dup_blocks", "ext4_share_dup_blocks"),
(True, "{}_base_fs_file", "base_fs_file"),
(True, "{}_disable_sparse", "disable_sparse"),

View File

@ -113,7 +113,7 @@ SPECIAL_CERT_STRINGS = ("PRESIGNED", "EXTERNAL")
# AVB_FOOTER_ARGS_BY_PARTITION in sign_target_files_apks need to be updated
# accordingly.
AVB_PARTITIONS = ('boot', 'init_boot', 'dtbo', 'odm', 'product', 'pvmfw', 'recovery',
'system', 'system_ext', 'vendor', 'vendor_boot',
'system', 'system_ext', 'vendor', 'vendor_boot', 'vendor_kernel_boot',
'vendor_dlkm', 'odm_dlkm', 'system_dlkm')
# Chained VBMeta partitions.
@ -1784,6 +1784,9 @@ def HasRamdisk(partition_name, info_dict=None):
if info_dict.get("recovery_as_boot") == "true":
return True # the recovery-as-boot boot.img has a RECOVERY ramdisk.
if info_dict.get("gki_boot_image_without_ramdisk") == "true":
return False # A GKI boot.img has no ramdisk since Android-13.
if info_dict.get("system_root_image") == "true":
# The ramdisk content is merged into the system.img, so there is NO
# ramdisk in the boot.img or boot-<kernel version>.img.
@ -1840,7 +1843,7 @@ def GetBootableImage(name, prebuilt_name, unpack_dir, tree_subdir,
return None
def _BuildVendorBootImage(sourcedir, info_dict=None):
def _BuildVendorBootImage(sourcedir, partition_name, info_dict=None):
"""Build a vendor boot image from the specified sourcedir.
Take a ramdisk, dtb, and vendor_cmdline from the input (in 'sourcedir'), and
@ -1865,8 +1868,13 @@ def _BuildVendorBootImage(sourcedir, info_dict=None):
fn = os.path.join(sourcedir, "dtb")
if os.access(fn, os.F_OK):
cmd.append("--dtb")
cmd.append(fn)
has_vendor_kernel_boot = (info_dict.get("vendor_kernel_boot", "").lower() == "true")
# Pack dtb into vendor_kernel_boot if building vendor_kernel_boot.
# Otherwise pack dtb into vendor_boot.
if not has_vendor_kernel_boot or partition_name == "vendor_kernel_boot":
cmd.append("--dtb")
cmd.append(fn)
fn = os.path.join(sourcedir, "vendor_cmdline")
if os.access(fn, os.F_OK):
@ -1926,11 +1934,11 @@ def _BuildVendorBootImage(sourcedir, info_dict=None):
# AVB: if enabled, calculate and add hash.
if info_dict.get("avb_enable") == "true":
avbtool = info_dict["avb_avbtool"]
part_size = info_dict["vendor_boot_size"]
part_size = info_dict[f'{partition_name}_size']
cmd = [avbtool, "add_hash_footer", "--image", img.name,
"--partition_size", str(part_size), "--partition_name", "vendor_boot"]
AppendAVBSigningArgs(cmd, "vendor_boot")
args = info_dict.get("avb_vendor_boot_add_hash_footer_args")
"--partition_size", str(part_size), "--partition_name", partition_name]
AppendAVBSigningArgs(cmd, partition_name)
args = info_dict.get(f'avb_{partition_name}_add_hash_footer_args')
if args and args.strip():
cmd.extend(shlex.split(args))
RunAndCheckOutput(cmd)
@ -1964,7 +1972,31 @@ def GetVendorBootImage(name, prebuilt_name, unpack_dir, tree_subdir,
info_dict = OPTIONS.info_dict
data = _BuildVendorBootImage(
os.path.join(unpack_dir, tree_subdir), info_dict)
os.path.join(unpack_dir, tree_subdir), "vendor_boot", info_dict)
if data:
return File(name, data)
return None
def GetVendorKernelBootImage(name, prebuilt_name, unpack_dir, tree_subdir,
info_dict=None):
"""Return a File object with the desired vendor kernel boot image.
Look for it under 'unpack_dir'/IMAGES, otherwise construct it from
the source files in 'unpack_dir'/'tree_subdir'."""
prebuilt_path = os.path.join(unpack_dir, "IMAGES", prebuilt_name)
if os.path.exists(prebuilt_path):
logger.info("using prebuilt %s from IMAGES...", prebuilt_name)
return File.FromLocalFile(name, prebuilt_path)
logger.info("building image from target_files %s...", tree_subdir)
if info_dict is None:
info_dict = OPTIONS.info_dict
data = _BuildVendorBootImage(
os.path.join(unpack_dir, tree_subdir), "vendor_kernel_boot", info_dict)
if data:
return File(name, data)
return None

View File

@ -214,6 +214,7 @@ AVB_FOOTER_ARGS_BY_PARTITION = {
'pvmfw': 'avb_pvmfw_add_hash_footer_args',
'vendor': 'avb_vendor_add_hashtree_footer_args',
'vendor_boot': 'avb_vendor_boot_add_hash_footer_args',
'vendor_kernel_boot': 'avb_vendor_kernel_boot_add_hash_footer_args',
'vendor_dlkm': "avb_vendor_dlkm_add_hashtree_footer_args",
'vbmeta': 'avb_vbmeta_args',
'vbmeta_system': 'avb_vbmeta_system_args',
@ -1294,12 +1295,13 @@ def BuildVendorPartitions(output_zip_path):
vendor_misc_info["no_boot"] = "true" # boot
vendor_misc_info["vendor_boot"] = "false" # vendor_boot
vendor_misc_info["no_recovery"] = "true" # recovery
vendor_misc_info["avb_enable"] = "false" # vbmeta
vendor_misc_info["board_bpt_enable"] = "false" # partition-table
vendor_misc_info["has_dtbo"] = "false" # dtbo
vendor_misc_info["has_pvmfw"] = "false" # pvmfw
vendor_misc_info["avb_custom_images_partition_list"] = "" # custom images
vendor_misc_info["avb_enable"] = "false" # vbmeta
vendor_misc_info["avb_building_vbmeta_image"] = "false" # skip building vbmeta
vendor_misc_info["use_dynamic_partitions"] = "false" # super_empty
vendor_misc_info["build_super_partition"] = "false" # super split
with open(vendor_misc_info_path, "w") as output:
@ -1354,8 +1356,12 @@ def BuildVendorPartitions(output_zip_path):
map_file_path = "IMAGES/{}.map".format(p)
common.ZipWrite(output_zip, os.path.join(vendor_tempdir, img_file_path), img_file_path)
common.ZipWrite(output_zip, os.path.join(vendor_tempdir, map_file_path), map_file_path)
# copy recovery patch & install.sh
# copy recovery.img, boot.img, recovery patch & install.sh
if OPTIONS.rebuild_recovery:
recovery_img = "IMAGES/recovery.img"
boot_img = "IMAGES/boot.img"
common.ZipWrite(output_zip, os.path.join(vendor_tempdir, recovery_img), recovery_img)
common.ZipWrite(output_zip, os.path.join(vendor_tempdir, boot_img), boot_img)
recovery_patch_path = "VENDOR/recovery-from-boot.p"
recovery_sh_path = "VENDOR/bin/install-recovery.sh"
common.ZipWrite(output_zip, os.path.join(vendor_tempdir, recovery_patch_path), recovery_patch_path)