diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-09-23 09:56:06 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-09-23 10:51:51 +0000 |
commit | 5f945774db7fdc6ec7293e9d4bcdf4868f4d37cf (patch) | |
tree | 04fa06878b56967e7bd87a25bc7a494aa26b45ed | |
parent | be6d318ca6c94074cb8cd8a706bf752d5af039cd (diff) | |
parent | 42fea39d1234306b7cd4fa1319f0dcfe49a46072 (diff) | |
download | build-5f945774db7fdc6ec7293e9d4bcdf4868f4d37cf.tar.gz |
Make change and version bump to aml_sch_331111000 for mainline module file: Noneaml_sch_331111000
Change-Id: Ia4b9a770b61403e3b3bcc8918c0d3e6a09f6d114
-rw-r--r-- | core/Makefile | 90 | ||||
-rw-r--r-- | core/android_soong_config_vars.mk | 4 | ||||
-rw-r--r-- | core/build_id.mk | 2 | ||||
-rw-r--r-- | core/definitions.mk | 175 | ||||
-rw-r--r-- | core/distdir.mk | 143 | ||||
-rw-r--r-- | core/main.mk | 2 | ||||
-rw-r--r-- | core/notice_files.mk | 5 | ||||
-rw-r--r-- | core/os_licensing.mk | 36 | ||||
-rw-r--r-- | core/proguard_basic_keeps.flags | 23 | ||||
-rw-r--r-- | core/tasks/sts-lite.mk | 40 | ||||
-rw-r--r-- | core/tasks/tools/package-modules.mk | 9 | ||||
-rw-r--r-- | core/tasks/tools/vts_package_utils.mk | 2 | ||||
-rw-r--r-- | core/version_defaults.mk | 4 | ||||
-rw-r--r-- | envsetup.sh | 7 | ||||
-rw-r--r-- | target/board/module_arm64only/BoardConfig.mk | 21 | ||||
-rw-r--r-- | target/board/module_arm64only/README.md | 2 | ||||
-rw-r--r-- | target/board/module_x86_64only/BoardConfig.mk | 20 | ||||
-rw-r--r-- | target/board/module_x86_64only/README.md | 2 | ||||
-rw-r--r-- | target/product/AndroidProducts.mk | 2 | ||||
-rw-r--r-- | target/product/base_system.mk | 2 | ||||
-rw-r--r-- | target/product/default_art_config.mk | 4 | ||||
-rw-r--r-- | target/product/module_arm64only.mk | 22 | ||||
-rw-r--r-- | target/product/module_x86_64only.mk | 22 |
23 files changed, 559 insertions, 80 deletions
diff --git a/core/Makefile b/core/Makefile index de9fd52c12..664573cb25 100644 --- a/core/Makefile +++ b/core/Makefile @@ -935,6 +935,7 @@ ifdef my_installed_prebuilt_gki_apex my_apex_extracted_boot_image := $(ALL_MODULES.$(my_installed_prebuilt_gki_apex).EXTRACTED_BOOT_IMAGE) INSTALLED_BOOTIMAGE_TARGET := $(PRODUCT_OUT)/boot.img $(eval $(call copy-one-file,$(my_apex_extracted_boot_image),$(INSTALLED_BOOTIMAGE_TARGET))) + $(call declare-container-license-metadata,$(INSTALLED_BOOTIMAGE_TARGET),SPDX-license-identifier-GPL-2.0-only SPDX-license-identifier-Apache-2.0,restricted notice,$(BUILD_SYSTEM)/LINUX_KERNEL_COPYING build/soong/licenses/LICENSE,"Boot Image",boot) INTERNAL_PREBUILT_BOOTIMAGE := $(my_apex_extracted_boot_image) @@ -1102,7 +1103,7 @@ $(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(AVBTOOL) $(INTERNAL_BOOTIMAGE_FILE $(call pretty,"Target boot image: $@") $(call build_boot_board_avb_enabled,$@) -$(call declare-1p-container,$(INSTALLED_BOOTIMAGE_TARGET),) +$(call declare-container-license-metadata,$(INSTALLED_BOOTIMAGE_TARGET),SPDX-license-identifier-GPL-2.0-only SPDX-license-identifier-Apache-2.0,restricted notice,$(BUILD_SYSTEM)/LINUX_KERNEL_COPYING build/soong/licenses/LICENSE,"Boot Image",boot) $(call declare-container-license-deps,$(INSTALLED_BOOTIMAGE_TARGET),$(INTERNAL_BOOTIMAGE_FILES) $(INTERNAL_GKI_CERTIFICATE_DEPS),$(PRODUCT_OUT)/:/) UNMOUNTED_NOTICE_DEPS += $(INSTALLED_BOOTIMAGE_TARGET) @@ -1148,7 +1149,7 @@ $(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES) $(VBOOT_ $(call pretty,"Target boot image: $@") $(call build_boot_supports_vboot,$@) -$(call declare-1p-container,$(INSTALLED_BOOTIMAGE_TARGET),) +$(call declare-container-license-metadata,$(INSTALLED_BOOTIMAGE_TARGET),SPDX-license-identifier-GPL-2.0-only SPDX-license-identifier-Apache-2.0,restricted notice,$(BUILD_SYSTEM)/LINUX_KERNEL_COPYING build/soong/licenses/LICENSE,"Boot Image",boot) $(call declare-container-license-deps,$(INSTALLED_BOOTIMAGE_TARGET),$(INTERNAL_BOOTIMAGE_FILES),$(PRODUCT_OUT)/:/) UNMOUNTED_NOTICE_DEPS += $(INSTALLED_BOOTIMAGE_TARGET) @@ -1170,7 +1171,7 @@ $(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES) $(call pretty,"Target boot image: $@") $(call build_boot_novboot,$@) -$(call declare-1p-container,$(INSTALLED_BOOTIMAGE_TARGET),) +$(call declare-container-license-metadata,$(INSTALLED_BOOTIMAGE_TARGET),SPDX-license-identifier-GPL-2.0-only SPDX-license-identifier-Apache-2.0,restricted notice,$(BUILD_SYSTEM)/LINUX_KERNEL_COPYING build/soong/licenses/LICENSE,"Boot Image",boot) $(call declare-container-license-deps,$(INSTALLED_BOOTIMAGE_TARGET),$(INTERNAL_BOOTIMAGE_FILES),$(PRODUCT_OUT)/:/) UNMOUNTED_NOTICE_DEPS += $(INSTALLED_BOOTIMAGE_TARGET) @@ -1197,7 +1198,7 @@ $(INSTALLED_BOOTIMAGE_TARGET): $(INTERNAL_PREBUILT_BOOTIMAGE) $(AVBTOOL) $(BOARD --partition_name boot $(INTERNAL_AVB_BOOT_SIGNING_ARGS) \ $(BOARD_AVB_BOOT_ADD_HASH_FOOTER_ARGS) -$(call declare-1p-container,$(INSTALLED_BOOTIMAGE_TARGET),) +$(call declare-container-license-metadata,$(INSTALLED_BOOTIMAGE_TARGET),SPDX-license-identifier-GPL-2.0-only SPDX-license-identifier-Apache-2.0,restricted notice,$(BUILD_SYSTEM)/LINUX_KERNEL_COPYING build/soong/licenses/LICENSE,"Boot Image",bool) $(call declare-container-license-deps,$(INSTALLED_BOOTIMAGE_TARGET),$(INTERNAL_PREBUILT_BOOTIMAGE),$(PRODUCT_OUT)/:/) UNMOUNTED_NOTICE_DEPS += $(INSTALLED_BOOTIMAGE_TARGET) @@ -1565,7 +1566,6 @@ ifndef TARGET_BUILD_APPS # TARGET_OUT_NOTICE_FILES now that the notice files are gathered from # the src subdirectory. kernel_notice_file := $(TARGET_OUT_NOTICE_FILES)/src/kernel.txt -winpthreads_notice_file := $(TARGET_OUT_NOTICE_FILES)/src/winpthreads.txt # Some targets get included under $(PRODUCT_OUT) for debug symbols or other # reasons--not to be flashed onto any device. Targets under these directories @@ -1688,17 +1688,74 @@ endif # PRODUCT_NOTICE_SPLIT ALL_DEFAULT_INSTALLED_MODULES += $(installed_notice_html_or_xml_gz) +need_vendor_notice:=false +ifeq ($(BUILDING_VENDOR_BOOT_IMAGE),true) + need_vendor_notice:=true +endif + +ifdef BUILDING_DEBUG_VENDOR_BOOT_IMAGE + need_vendor_notice:=true +endif + +ifdef BUILDING_VENDOR_IMAGE + need_vendor_notice:=true +endif + +ifeq (true,$(need_vendor_notice)) +ifneq (,$(installed_vendor_notice_xml_gz)) +ALL_DEFAULT_INSTALLED_MODULES += $(installed_vendor_notice_xml_gz) +endif +endif + +need_vendor_notice:= + +ifdef BUILDING_ODM_IMAGE +ifneq (,$(installed_odm_notice_xml_gz)) +ALL_DEFAULT_INSTALLED_MODULES += $(installed_odm_notice_xml_gz) +endif +endif + +ifdef BUILDING_PRODUCT_IMAGE +ifneq (,$(installed_product_notice_xml_gz)) +ALL_DEFAULT_INSTALLED_MODULES += $(installed_product_notice_xml_gz) +endif +endif + +ifdef BUILDING_SYSTEM_EXT_IMAGE +ifneq (,$(installed_system_ext_notice_xml_gz)) +ALL_DEFAULT_INSTALLED_MODULES += $(installed_system_ext_notice_xml_gz) +endif +endif + +ifdef BUILDING_VENDOR_DLKM_IMAGE +ifneq (,$(installed_vendor_dlkm_notice_xml_gz) +ALL_DEFAULT_INSTALLED_MODULES += $(installed_vendor_dlkm_notice_xml_gz) +endif +endif + +ifdef BUILDING_ODM_DLKM_IMAGE +ifneq (,$(installed_odm_dlkm_notice_xml_gz)) +ALL_DEFAULT_INSTALLED_MODULES += $(installed_odm_dlkm_notice_xml_gz) +endif +endif + +ifdef BUILDING_SYSTEM_DLKM_IMAGE +ifneq (,$(installed_system_dlkm_notice_xml_gz)) +ALL_DEFAULT_INSTALLED_MODULES += $(installed_system_dlkm_notice_xml_gz) +endif +endif + endif # TARGET_BUILD_APPS -# The kernel isn't really a module, so to get its module file in there, we -# make the target NOTICE files depend on this particular file too, which will -# then be in the right directory for the find in combine-notice-files to work. +# Presently none of the prebuilts etc. comply with policy to have a license text. Fake one here. $(eval $(call copy-one-file,$(BUILD_SYSTEM)/LINUX_KERNEL_COPYING,$(kernel_notice_file))) -# No matter where it gets copied from, a copied linux kernel is licensed under "GPL 2.0 only" -$(eval $(call declare-copy-files-license-metadata,,:kernel,SPDX-license-identifier-GPL-2.0-only,notice,$(BUILD_SYSTEM)/LINUX_KERNEL_COPYING,)) +ifneq (,$(strip $(INSTALLED_KERNEL_TARGET))) +$(call declare-license-metadata,$(INSTALLED_KERNEL_TARGET),SPDX-license-identifier-GPL-2.0-only,restricted,$(BUILD_SYSTEM)/LINUX_KERNEL_COPYING,"Kernel",kernel) +endif -$(eval $(call copy-one-file,$(BUILD_SYSTEM)/WINPTHREADS_COPYING,$(winpthreads_notice_file))) +# No matter where it gets copied from, a copied linux kernel is licensed under "GPL 2.0 only" +$(eval $(call declare-copy-files-license-metadata,,:kernel,SPDX-license-identifier-GPL-2.0-only,restricted,$(BUILD_SYSTEM)/LINUX_KERNEL_COPYING,kernel)) # ################################################################# @@ -2496,7 +2553,7 @@ $(INSTALLED_BOOTIMAGE_TARGET): $(recoveryimage-deps) $(call pretty,"Target boot image from recovery: $@") $(call build-recoveryimage-target, $@, $(PRODUCT_OUT)/$(subst .img,,$(subst boot,kernel,$(notdir $@)))) -$(call declare-1p-container,$(INSTALLED_BOOTIMAGE_TARGET),) +$(call declare-container-license-metadata,$(INSTALLED_BOOTIMAGE_TARGET),SPDX-license-identifier-GPL-2.0-only SPDX-license-identifier-Apache-2.0,restricted notice,$(BUILD_SYSTEM)/LINUX_KERNEL_COPYING build/soong/licenses/LICENSE,"Boot Image",bool) $(call declare-container-license-deps,$(INSTALLED_BOOTIMAGE_TARGET),$(recoveryimage-deps),$(PRODUCT_OUT)/:/) UNMOUNTED_NOTICE_DEPS += $(INSTALLED_BOOTIMAGE_TARGET) @@ -2667,7 +2724,7 @@ $(INSTALLED_DEBUG_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INSTALLED_BOOTIMAGE_TARGET) $(call pretty,"Target boot debug image: $@") $(call build-debug-bootimage-target, $@) -$(call declare-1p-container,$(INSTALLED_DEBUG_BOOTIMAGE_TARGET),) +$(call declare-container-license-metadata,$(INSTALLED_DEBUG_BOOTIMAGE_TARGET),SPDX-license-identifier-GPL-2.0-only SPDX-license-identifier-Apache-2.0,restricted notice,$(BUILD_SYSTEM)/LINUX_KERNEL_COPYING build/soong/licenses/LICENSE,"Boot Image",boot) $(call declare-container-license-deps,$(INSTALLED_DEBUG_BOOTIMAGE_TARGET),$(INSTALLED_BOOTIMAGE_TARGET),$(PRODUCT_OUT)/:/) UNMOUNTED_NOTICE_DEPS += $(INSTALLED_DEBUG_BOOTIMAGE_TARGET) @@ -3504,7 +3561,7 @@ 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-copy-target-license-metadata,$(INSTALLED_VENDORIMAGE_TARGET),$(BOARD_PREBUILT_VENDORIMAGE)),\ $(call declare-license-metadata,$(INSTALLED_VENDORIMAGE_TARGET),legacy_proprietary,proprietary,,"Vendor Image",vendor))) endif @@ -3879,6 +3936,11 @@ $(INSTALLED_SYSTEM_DLKMIMAGE_TARGET): \ $(INSTALLED_FILES_FILE_SYSTEM_DLKM) $(build-system_dlkmimage-target) +SYSTEM_DLKM_NOTICE_DEPS += $(INSTALLED_SYSTEM_DLKMIMAGE_TARGET) + +$(call declare-1p-container,$(INSTALLED_SYSTEM_DLKMIMAGE_TARGET),) +$(call declare-container-license-deps,$(INSTALLED_SYSTEM_DLKMIMAGE_TARGET),$(INTERNAL_USERIMAGES_DEPS) $(INTERNAL_SYSTEM_DLKMIMAGE_FILES) $(INSTALLED_FILES_FILE_SYSTEM_DLKM),$(PRODUCT_OUT)/:/) + .PHONY: system_dlkmimage-nodeps sdnod system_dlkmimage-nodeps sdnod: | $(INTERNAL_USERIMAGES_DEPS) $(build-system_dlkmimage-target) diff --git a/core/android_soong_config_vars.mk b/core/android_soong_config_vars.mk index 259035e054..7e1e98ea97 100644 --- a/core/android_soong_config_vars.mk +++ b/core/android_soong_config_vars.mk @@ -76,11 +76,13 @@ $(call soong_config_set,art_module,source_build,$(ART_MODULE_BUILD_FROM_SOURCE)) # default. INDIVIDUALLY_TOGGLEABLE_PREBUILT_MODULES := \ bluetooth \ + permission \ uwb \ wifi \ $(foreach m, $(INDIVIDUALLY_TOGGLEABLE_PREBUILT_MODULES),\ - $(call soong_config_set,$(m)_module,source_build,$(MODULE_BUILD_FROM_SOURCE))) + $(if $(call soong_config_get,$(m)_module,source_build),,\ + $(call soong_config_set,$(m)_module,source_build,$(MODULE_BUILD_FROM_SOURCE)))) # Apex build mode variables ifdef APEX_BUILD_FOR_PRE_S_DEVICES diff --git a/core/build_id.mk b/core/build_id.mk index 5f69527f8c..24397784a3 100644 --- a/core/build_id.mk +++ b/core/build_id.mk @@ -18,4 +18,4 @@ # (like "CRB01"). It must be a single word, and is # capitalized by convention. -BUILD_ID=330711000 +BUILD_ID=331111000 diff --git a/core/definitions.mk b/core/definitions.mk index 0c46de9fc6..8c2cbc967d 100644 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -41,6 +41,9 @@ ALL_MODULES:= ALL_NON_MODULES:= NON_MODULES_WITHOUT_LICENSE_METADATA:= +# List of copied targets that need license metadata copied. +ALL_COPIED_TARGETS:= + # Full paths to targets that should be added to the "make droid" # set of installed targets. ALL_DEFAULT_INSTALLED_MODULES:= @@ -567,19 +570,37 @@ endef ## Target directory for license metadata files. ########################################################### define license-metadata-dir -$(call generated-sources-dir-for,META,lic,) +$(call generated-sources-dir-for,META,lic,$(filter-out $(PRODUCT_OUT)%,$(1))) endef +TARGETS_MISSING_LICENSE_METADATA:= + ########################################################### # License metadata targets corresponding to targets in $(1) ########################################################### define corresponding-license-metadata -$(strip $(foreach target, $(sort $(1)), \ +$(strip $(filter-out 0p,$(foreach target, $(sort $(1)), \ $(if $(strip $(ALL_MODULES.$(target).META_LIC)), \ $(ALL_MODULES.$(target).META_LIC), \ $(if $(strip $(ALL_TARGETS.$(target).META_LIC)), \ $(ALL_TARGETS.$(target).META_LIC), \ - $(call append-path,$(call license-metadata-dir),$(patsubst $(OUT_DIR)%,out%,$(target).meta_lic)))))) + $(eval TARGETS_MISSING_LICENSE_METADATA += $(target)) \ + ) \ + ) \ +))) +endef + +########################################################### +## Record a target $(1) copied from another target(s) $(2) that will need +## license metadata. +########################################################### +define declare-copy-target-license-metadata +$(strip $(if $(filter $(OUT_DIR)%,$(2)),$(eval _dir:=$(call license-metadata-dir,$(1)))\ + $(eval _tgt:=$(strip $(1)))\ + $(eval _meta := $(call append-path,$(_dir),$(patsubst $(OUT_DIR)%,out%,$(_tgt).meta_lic)))\ + $(eval ALL_COPIED_TARGETS.$(_tgt).SOURCES := $(ALL_COPIED_TARGETS.$(_tgt).SOURCES) $(filter $(OUT_DIR)%,$(2)))\ + $(eval ALL_COPIED_TARGETS += $(_tgt)),\ + $(eval ALL_TARGETS.$(1).META_LIC:=$(module_license_metadata)))) endef ########################################################### @@ -654,20 +675,13 @@ endef ## License metadata build rule for non-module target $(1) ########################################################### define non-module-license-metadata-rule -$(strip $(eval _dir := $(call license-metadata-dir))) +$(strip $(eval _dir := $(call license-metadata-dir,$(1)))) $(strip $(eval _tgt := $(strip $(1)))) $(strip $(eval _meta := $(call append-path,$(_dir),$(patsubst $(OUT_DIR)%,out%,$(_tgt).meta_lic)))) $(strip $(eval _deps := $(sort $(filter-out 0p: :,$(foreach d,$(strip $(ALL_NON_MODULES.$(_tgt).DEPENDENCIES)),$(ALL_TARGETS.$(call word-colon,1,$(d)).META_LIC):$(call wordlist-colon,2,9999,$(d))))))) $(strip $(eval _notices := $(sort $(ALL_NON_MODULES.$(_tgt).NOTICES)))) $(strip $(eval _path := $(sort $(ALL_NON_MODULES.$(_tgt).PATH)))) $(strip $(eval _install_map := $(ALL_NON_MODULES.$(_tgt).ROOT_MAPPINGS))) -$(strip $(eval \ - $$(foreach d,$(strip $(ALL_NON_MODULES.$(_tgt).DEPENDENCIES)), \ - $$(if $$(strip $$(ALL_TARGETS.$$(d).META_LIC)), \ - , \ - $$(eval NON_MODULES_WITHOUT_LICENSE_METADATA += $$(d))) \ - )) \ -) $(_meta): PRIVATE_KINDS := $(sort $(ALL_NON_MODULES.$(_tgt).LICENSE_KINDS)) $(_meta): PRIVATE_CONDITIONS := $(sort $(ALL_NON_MODULES.$(_tgt).LICENSE_CONDITIONS)) @@ -705,6 +719,60 @@ $(_meta) : $(foreach d,$(_deps),$(call word-colon,1,$(d))) $(foreach n,$(_notice endef ########################################################### +## Record missing dependencies for non-module target $(1) +########################################################### +define record-missing-non-module-dependencies +$(strip $(eval _tgt := $(strip $(1)))) +$(strip $(foreach d,$(strip $(ALL_NON_MODULES.$(_tgt).DEPENDENCIES)), \ + $(if $(strip $(ALL_TARGETS.$(d).META_LIC)), \ + , \ + $(eval NON_MODULES_WITHOUT_LICENSE_METADATA += $(d))) \ +)) +endef + +########################################################### +## License metadata build rule for copied target $(1) +########################################################### +define copied-target-license-metadata-rule +$(if $(strip $(ALL_TARGETS.$(1).META_LIC)),,$(call _copied-target-license-metadata-rule,$(1))) +endef + +define _copied-target-license-metadata-rule +$(strip $(eval _dir := $(call license-metadata-dir,$(1)))) +$(strip $(eval _meta := $(call append-path,$(_dir),$(patsubst $(OUT_DIR)%,out%,$(1).meta_lic)))) +$(strip $(eval ALL_TARGETS.$(1).META_LIC:=$(_meta))) +$(strip $(eval _dep:=)) +$(strip $(foreach s,$(ALL_COPIED_TARGETS.$(1).SOURCES),\ + $(eval _dmeta:=$(ALL_TARGETS.$(s).META_LIC))\ + $(if $(filter 0p,$(_dmeta)),\ + $(if $(filter-out 0p,$(_dep)),,$(eval ALL_TARGETS.$(1).META_LIC:=0p)),\ + $(if $(_dep),\ + $(if $(filter-out $(_dep),$(_dmeta)),$(error cannot copy target from multiple modules: $(1) from $(_dep) and $(_dmeta))), + $(eval _dep:=$(_dmeta)))))) +$(strip $(if $(strip $(_dep)),,$(error cannot copy target from unknown module: $(1) from $(ALL_COPIED_TARGETS.$(1).SOURCES)))) + +ifneq (0p,$(ALL_TARGETS.$(1).META_LIC)) +$(_meta): PRIVATE_DEST_TARGET := $(1) +$(_meta): PRIVATE_SOURCE_TARGETS := $(ALL_COPIED_TARGETS.$(1).SOURCES) +$(_meta): PRIVATE_SOURCE_METADATA := $(_dep) +$(_meta): PRIVATE_ARGUMENT_FILE := $(call intermediates-dir-for,PACKAGING,copynotice)/$(_meta)/arguments +$(_meta) : $(_dep) $(COPY_LICENSE_METADATA) + rm -f $$@ + mkdir -p $$(dir $$@) + mkdir -p $$(dir $$(PRIVATE_ARGUMENT_FILE)) + $$(call dump-words-to-file,\ + $$(addprefix -i ,$$(PRIVATE_DEST_TARGET))\ + $$(addprefix -s ,$$(PRIVATE_SOURCE_TARGETS))\ + $$(addprefix -d ,$$(PRIVATE_SOURCE_METADATA)),\ + $$(PRIVATE_ARGUMENT_FILE)) + OUT_DIR=$(OUT_DIR) $(COPY_LICENSE_METADATA) \ + @$$(PRIVATE_ARGUMENT_FILE) \ + -o $$@ + +endif +endef + +########################################################### ## Declare the license metadata for non-module target $(1). ## ## $(2) -- license kinds e.g. SPDX-license-identifier-Apache-2.0 @@ -717,6 +785,7 @@ define declare-license-metadata $(strip \ $(eval _tgt := $(subst //,/,$(strip $(1)))) \ $(eval ALL_NON_MODULES += $(_tgt)) \ + $(eval ALL_TARGETS.$(_tgt).META_LIC := $(call license-metadata-dir,$(1))/$(patsubst $(OUT_DIR)%,out%,$(_tgt)).meta_lic) \ $(eval ALL_NON_MODULES.$(_tgt).LICENSE_KINDS := $(strip $(2))) \ $(eval ALL_NON_MODULES.$(_tgt).LICENSE_CONDITIONS := $(strip $(3))) \ $(eval ALL_NON_MODULES.$(_tgt).NOTICES := $(strip $(4))) \ @@ -757,6 +826,7 @@ define declare-container-license-metadata $(strip \ $(eval _tgt := $(subst //,/,$(strip $(1)))) \ $(eval ALL_NON_MODULES += $(_tgt)) \ + $(eval ALL_TARGETS.$(_tgt).META_LIC := $(call license-metadata-dir,$(1))/$(patsubst $(OUT_DIR)%,out%,$(_tgt)).meta_lic) \ $(eval ALL_NON_MODULES.$(_tgt).LICENSE_KINDS := $(strip $(2))) \ $(eval ALL_NON_MODULES.$(_tgt).LICENSE_CONDITIONS := $(strip $(3))) \ $(eval ALL_NON_MODULES.$(_tgt).NOTICES := $(strip $(4))) \ @@ -827,8 +897,9 @@ endef ########################################################### define declare-license-deps $(strip \ - $(eval _tgt := $(strip $(1))) \ + $(eval _tgt := $(subst //,/,$(strip $(1)))) \ $(eval ALL_NON_MODULES += $(_tgt)) \ + $(eval ALL_TARGETS.$(_tgt).META_LIC := $(call license-metadata-dir,$(1))/$(patsubst $(OUT_DIR)%,out%,$(_tgt)).meta_lic) \ $(eval ALL_NON_MODULES.$(_tgt).DEPENDENCIES := $(strip $(ALL_NON_MODULES.$(_tgt).DEPENDENCIES) $(2))) \ ) endef @@ -843,8 +914,9 @@ endef ########################################################### define declare-container-license-deps $(strip \ - $(eval _tgt := $(strip $(1))) \ + $(eval _tgt := $(subst //,/,$(strip $(1)))) \ $(eval ALL_NON_MODULES += $(_tgt)) \ + $(eval ALL_TARGETS.$(_tgt).META_LIC := $(call license-metadata-dir,$(1))/$(patsubst $(OUT_DIR)%,out%,$(_tgt)).meta_lic) \ $(eval ALL_NON_MODULES.$(_tgt).DEPENDENCIES := $(strip $(ALL_NON_MODULES.$(_tgt).DEPENDENCIES) $(2))) \ $(eval ALL_NON_MODULES.$(_tgt).IS_CONTAINER := true) \ $(eval ALL_NON_MODULES.$(_tgt).ROOT_MAPPINGS := $(strip $(ALL_NON_MODULES.$(_tgt).ROOT_MAPPINGS) $(3))) \ @@ -856,12 +928,14 @@ endef ########################################################### define report-missing-licenses-rule .PHONY: reportmissinglicenses -reportmissinglicenses: PRIVATE_NON_MODULES:=$(sort $(NON_MODULES_WITHOUT_LICENSE_METADATA)) -reportmissinglicenses: PRIVATE_COPIED_FILES:=$(sort $(filter $(NON_MODULES_WITHOUT_LICENSE_METADATA),$(foreach _pair,$(PRODUCT_COPY_FILES), $(PRODUCT_OUT)/$(call word-colon,2,$(_pair))))) +reportmissinglicenses: PRIVATE_NON_MODULES:=$(sort $(NON_MODULES_WITHOUT_LICENSE_METADATA) $(TARGETS_MISSING_LICENSE_METADATA)) +reportmissinglicenses: PRIVATE_COPIED_FILES:=$(sort $(filter $(NON_MODULES_WITHOUT_LICENSE_METADATA) $(TARGETS_MISSING_LICENSE_METADATA),\ + $(foreach _pair,$(PRODUCT_COPY_FILES), $(PRODUCT_OUT)/$(call word-colon,2,$(_pair))))) reportmissinglicenses: @echo Reporting $$(words $$(PRIVATE_NON_MODULES)) targets without license metadata $$(foreach t,$$(PRIVATE_NON_MODULES),if ! [ -h $$(t) ]; then echo No license metadata for $$(t) >&2; fi;) $$(foreach t,$$(PRIVATE_COPIED_FILES),if ! [ -h $$(t) ]; then echo No license metadata for copied file $$(t) >&2; fi;) + echo $$(words $$(PRIVATE_NON_MODULES)) targets missing license metadata >&2 endef @@ -883,7 +957,7 @@ define report-all-notice-library-names-rule $(strip $(eval _all := $(call all-license-metadata))) .PHONY: reportallnoticelibrarynames -reportallnoticelibrarynames: PRIVATE_LIST_FILE := $(call license-metadata-dir)/filelist +reportallnoticelibrarynames: PRIVATE_LIST_FILE := $(call license-metadata-dir,COMMON)/filelist reportallnoticelibrarynames: | $(COMPLIANCENOTICE_SHIPPEDLIBS) reportallnoticelibrarynames: $(_all) @echo Reporting notice library names for at least $$(words $(_all)) license metadata files @@ -910,17 +984,12 @@ endef ########################################################### define build-license-metadata $(strip \ - $(strip $(eval _dir := $(call license-metadata-dir))) \ $(foreach t,$(sort $(ALL_0P_TARGETS)), \ $(eval ALL_TARGETS.$(t).META_LIC := 0p) \ ) \ - $(foreach t,$(sort $(ALL_NON_MODULES)), \ - $(eval ALL_TARGETS.$(t).META_LIC := $(call append-path,$(_dir),$(patsubst $(OUT_DIR)%,out%,$(t).meta_lic))) \ - ) \ $(foreach t,$(sort $(ALL_NON_MODULES)),$(eval $(call non-module-license-metadata-rule,$(t)))) \ $(foreach m,$(sort $(ALL_MODULES)),$(eval $(call license-metadata-rule,$(m)))) \ - $(eval $(call report-missing-licenses-rule)) \ - $(eval $(call report-all-notice-library-names-rule)) \ + $(foreach t,$(sort $(ALL_COPIED_TARGETS)),$(eval $(call copied-target-license-metadata-rule,$(t)))) \ $(eval $(call build-all-license-metadata-rule))) endef @@ -992,6 +1061,22 @@ $(strip \ ) endef +# Uses LOCAL_MODULE_CLASS, LOCAL_MODULE, and LOCAL_IS_HOST_MODULE +# to determine the intermediates directory. +# +# $(1): if non-empty, force the intermediates to be COMMON +# $(2): if non-empty, force the intermediates to be for the 2nd arch +# $(3): if non-empty, force the intermediates to be for the host cross os +define local-meta-intermediates-dir +$(strip \ + $(if $(strip $(LOCAL_MODULE_CLASS)),, \ + $(error $(LOCAL_PATH): LOCAL_MODULE_CLASS not defined before call to local-meta-intermediates-dir)) \ + $(if $(strip $(LOCAL_MODULE)),, \ + $(error $(LOCAL_PATH): LOCAL_MODULE not defined before call to local-meta-intermediates-dir)) \ + $(call intermediates-dir-for,META$(LOCAL_MODULE_CLASS),$(LOCAL_MODULE),$(if $(strip $(LOCAL_IS_HOST_MODULE)),HOST),$(1),$(2),$(3)) \ +) +endef + ########################################################### ## The generated sources directory. Placing generated ## source files directly in the intermediates directory @@ -2411,7 +2496,47 @@ define dump-words-to-file @$(call emit-line,$(wordlist 38001,38500,$(1)),$(2)) @$(call emit-line,$(wordlist 38501,39000,$(1)),$(2)) @$(call emit-line,$(wordlist 39001,39500,$(1)),$(2)) - @$(if $(wordlist 39501,39502,$(1)),$(error Too many words ($(words $(1))))) + @$(call emit-line,$(wordlist 39501,40000,$(1)),$(2)) + @$(call emit-line,$(wordlist 40001,40500,$(1)),$(2)) + @$(call emit-line,$(wordlist 40501,41000,$(1)),$(2)) + @$(call emit-line,$(wordlist 41001,41500,$(1)),$(2)) + @$(call emit-line,$(wordlist 41501,42000,$(1)),$(2)) + @$(call emit-line,$(wordlist 42001,42500,$(1)),$(2)) + @$(call emit-line,$(wordlist 42501,43000,$(1)),$(2)) + @$(call emit-line,$(wordlist 43001,43500,$(1)),$(2)) + @$(call emit-line,$(wordlist 43501,44000,$(1)),$(2)) + @$(call emit-line,$(wordlist 44001,44500,$(1)),$(2)) + @$(call emit-line,$(wordlist 44501,45000,$(1)),$(2)) + @$(call emit-line,$(wordlist 45001,45500,$(1)),$(2)) + @$(call emit-line,$(wordlist 45501,46000,$(1)),$(2)) + @$(call emit-line,$(wordlist 46001,46500,$(1)),$(2)) + @$(call emit-line,$(wordlist 46501,47000,$(1)),$(2)) + @$(call emit-line,$(wordlist 47001,47500,$(1)),$(2)) + @$(call emit-line,$(wordlist 47501,48000,$(1)),$(2)) + @$(call emit-line,$(wordlist 48001,48500,$(1)),$(2)) + @$(call emit-line,$(wordlist 48501,49000,$(1)),$(2)) + @$(call emit-line,$(wordlist 49001,49500,$(1)),$(2)) + @$(call emit-line,$(wordlist 49501,50000,$(1)),$(2)) + @$(call emit-line,$(wordlist 50001,50500,$(1)),$(2)) + @$(call emit-line,$(wordlist 50501,51000,$(1)),$(2)) + @$(call emit-line,$(wordlist 51001,51500,$(1)),$(2)) + @$(call emit-line,$(wordlist 51501,52000,$(1)),$(2)) + @$(call emit-line,$(wordlist 52001,52500,$(1)),$(2)) + @$(call emit-line,$(wordlist 52501,53000,$(1)),$(2)) + @$(call emit-line,$(wordlist 53001,53500,$(1)),$(2)) + @$(call emit-line,$(wordlist 53501,54000,$(1)),$(2)) + @$(call emit-line,$(wordlist 54001,54500,$(1)),$(2)) + @$(call emit-line,$(wordlist 54501,55000,$(1)),$(2)) + @$(call emit-line,$(wordlist 55001,55500,$(1)),$(2)) + @$(call emit-line,$(wordlist 55501,56000,$(1)),$(2)) + @$(call emit-line,$(wordlist 56001,56500,$(1)),$(2)) + @$(call emit-line,$(wordlist 56501,57000,$(1)),$(2)) + @$(call emit-line,$(wordlist 57001,57500,$(1)),$(2)) + @$(call emit-line,$(wordlist 57501,58000,$(1)),$(2)) + @$(call emit-line,$(wordlist 58001,58500,$(1)),$(2)) + @$(call emit-line,$(wordlist 58501,59000,$(1)),$(2)) + @$(call emit-line,$(wordlist 59001,59500,$(1)),$(2)) + @$(if $(wordlist 59501,59502,$(1)),$(error Too many words ($(words $(1))))) endef # Return jar arguments to compress files in a given directory # $(1): directory @@ -3405,11 +3530,11 @@ endef define create-suite-dependencies $(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \ $(eval $(if $(strip $(module_license_metadata)),\ - $$(foreach f,$$(my_compat_dist_$(suite)),$$(eval ALL_TARGETS.$$(call word-colon,2,$$(f)).META_LIC := $(module_license_metadata))),\ + $$(foreach f,$$(my_compat_dist_$(suite)),$$(call declare-copy-target-license-metadata,$$(call word-colon,2,$$(f)),$$(call word-colon,1,$$(f)))),\ $$(eval my_test_data += $$(foreach f,$$(my_compat_dist_$(suite)), $$(call word-colon,2,$$(f)))) \ )) \ $(eval $(if $(strip $(module_license_metadata)),\ - $$(foreach f,$$(my_compat_dist_config_$(suite)),$$(eval ALL_TARGETS.$$(call word-colon,2,$$(f)).META_LIC := $(module_license_metadata))),\ + $$(foreach f,$$(my_compat_dist_config_$(suite)),$$(call declare-copy-target-license-metadata,$$(call word-colon,2,$$(f)),$$(call word-colon,1,$$(f)))),\ $$(eval my_test_config += $$(foreach f,$$(my_compat_dist_config_$(suite)), $$(call word-colon,2,$$(f)))) \ )) \ $(if $(filter $(suite),$(ALL_COMPATIBILITY_SUITES)),,\ diff --git a/core/distdir.mk b/core/distdir.mk index aad8ff3d65..bce8e7fd3c 100644 --- a/core/distdir.mk +++ b/core/distdir.mk @@ -45,6 +45,140 @@ $(foreach file,$(2), \ $(eval _all_dist_goal_output_pairs += $$(goal):$$(dst)))) endef +.PHONY: shareprojects + +define __share-projects-rule +$(1) : PRIVATE_TARGETS := $(2) +$(1): $(2) $(COMPLIANCE_LISTSHARE) + $(hide) rm -f $$@ + mkdir -p $$(dir $$@) + $$(if $$(strip $$(PRIVATE_TARGETS)),OUT_DIR=$(OUT_DIR) $(COMPLIANCE_LISTSHARE) -o $$@ $$(PRIVATE_TARGETS),touch $$@) +endef + +# build list of projects to share in $(1) for meta_lic in $(2) +# +# $(1): the intermediate project sharing file +# $(2): the license metadata to base the sharing on +define _share-projects-rule +$(eval $(call __share-projects-rule,$(1),$(2))) +endef + +.PHONY: alllicensetexts + +define __license-texts-rule +$(2) : PRIVATE_GOAL := $(1) +$(2) : PRIVATE_TARGETS := $(3) +$(2) : PRIVATE_ROOTS := $(4) +$(2) : PRIVATE_ARGUMENT_FILE := $(call intermediates-dir-for,METAPACKAGING,licensetexts)/$(2)/arguments +$(2): $(3) $(TEXTNOTICE) + $(hide) rm -f $$@ + mkdir -p $$(dir $$@) + mkdir -p $$(dir $$(PRIVATE_ARGUMENT_FILE)) + $$(if $$(strip $$(PRIVATE_TARGETS)),$$(call dump-words-to-file,\ + -product="$$(PRIVATE_GOAL)" -title="$$(PRIVATE_GOAL)" \ + $$(addprefix -strip_prefix ,$$(PRIVATE_ROOTS)) \ + -strip_prefix=$(PRODUCT_OUT)/ -strip_prefix=$(HOST_OUT)/\ + $$(PRIVATE_TARGETS),\ + $$(PRIVATE_ARGUMENT_FILE))) + $$(if $$(strip $$(PRIVATE_TARGETS)),OUT_DIR=$(OUT_DIR) $(TEXTNOTICE) -o $$@ @$$(PRIVATE_ARGUMENT_FILE),touch $$@) +endef + +# build list of projects to share in $(2) for meta_lic in $(3) for dist goals $(1) +# Strip `out/dist/` used as proxy for 'DIST_DIR' +# +# $(1): the name of the dist goals +# $(2): the intermediate project sharing file +# $(3): the license metadata to base the sharing on +define _license-texts-rule +$(eval $(call __license-texts-rule,$(1),$(2),$(3),out/dist/)) +endef + +########################################################### +## License metadata build rule for dist target $(1) with meta_lic $(2) copied from $(3) +########################################################### +define _dist-target-license-metadata-rule +$(strip $(eval _meta :=$(2))) +$(strip $(eval _dep:=)) +# 0p is the indicator for a non-copyrightable file where no party owns the copyright. +# i.e. pure data with no copyrightable expression. +# If all of the sources are 0p and only 0p, treat the copied file as 0p. Otherwise, all +# of the sources must either be 0p or originate from a single metadata file to copy. +$(strip $(foreach s,$(strip $(3)),\ + $(eval _dmeta:=$(ALL_TARGETS.$(s).META_LIC))\ + $(if $(strip $(_dmeta)),\ + $(if $(filter-out 0p,$(_dep)),\ + $(if $(filter-out $(_dep) 0p,$(_dmeta)),\ + $(error cannot copy target from multiple modules: $(1) from $(_dep) and $(_dmeta)),\ + $(if $(filter 0p,$(_dep)),$(eval _dep:=$(_dmeta)))),\ + $(eval _dep:=$(_dmeta))\ + ),\ + $(eval TARGETS_MISSING_LICENSE_METADATA += $(s) $(1))))) + + +ifeq (0p,$(strip $(_dep))) +# Not copyrightable. No emcumbrances, no license text, no license kind etc. +$(_meta): PRIVATE_CONDITIONS := unencumbered +$(_meta): PRIVATE_SOURCES := $(3) +$(_meta): PRIVATE_INSTALLED := $(1) +# use `$(1)` which is the unique and relatively short `out/dist/$(target)` +$(_meta): PRIVATE_ARGUMENT_FILE := $(call intermediates-dir-for,METAPACKAGING,notice)/$(1)/arguments +$(_meta): $(BUILD_LICENSE_METADATA) +$(_meta) : + rm -f $$@ + mkdir -p $$(dir $$@) + mkdir -p $$(dir $$(PRIVATE_ARGUMENT_FILE)) + $$(call dump-words-to-file,\ + $$(addprefix -c ,$$(PRIVATE_CONDITIONS))\ + $$(addprefix -s ,$$(PRIVATE_SOURCES))\ + $$(addprefix -t ,$$(PRIVATE_TARGETS))\ + $$(addprefix -i ,$$(PRIVATE_INSTALLED)),\ + $$(PRIVATE_ARGUMENT_FILE)) + OUT_DIR=$(OUT_DIR) $(BUILD_LICENSE_METADATA) \ + @$$(PRIVATE_ARGUMENT_FILE) \ + -o $$@ + +else ifneq (,$(strip $(_dep))) +# Not a missing target, copy metadata and `is_container` etc. from license metadata file `$(_dep)` +$(_meta): PRIVATE_DEST_TARGET := $(1) +$(_meta): PRIVATE_SOURCE_TARGETS := $(3) +$(_meta): PRIVATE_SOURCE_METADATA := $(_dep) +# use `$(1)` which is the unique and relatively short `out/dist/$(target)` +$(_meta): PRIVATE_ARGUMENT_FILE := $(call intermediates-dir-for,METAPACKAGING,copynotice)/$(1)/arguments +$(_meta) : $(_dep) $(COPY_LICENSE_METADATA) + rm -f $$@ + mkdir -p $$(dir $$@) + mkdir -p $$(dir $$(PRIVATE_ARGUMENT_FILE)) + $$(call dump-words-to-file,\ + $$(addprefix -i ,$$(PRIVATE_DEST_TARGET))\ + $$(addprefix -s ,$$(PRIVATE_SOURCE_TARGETS))\ + $$(addprefix -d ,$$(PRIVATE_SOURCE_METADATA)),\ + $$(PRIVATE_ARGUMENT_FILE)) + OUT_DIR=$(OUT_DIR) $(COPY_LICENSE_METADATA) \ + @$$(PRIVATE_ARGUMENT_FILE) \ + -o $$@ + +endif +endef + +# use `out/dist/` as a proxy for 'DIST_DIR' +define _add_projects_to_share +$(strip $(eval _mdir := $(call intermediates-dir-for,METAPACKAGING,meta)/out/dist)) \ +$(strip $(eval _idir := $(call intermediates-dir-for,METAPACKAGING,shareprojects))) \ +$(strip $(eval _tdir := $(call intermediates-dir-for,METAPACKAGING,licensetexts))) \ +$(strip $(eval _allt := $(sort $(foreach goal,$(_all_dist_goal_output_pairs),$(call word-colon,2,$(goal)))))) \ +$(foreach target,$(_allt), \ + $(eval _goals := $(sort $(foreach dg,$(filter %:$(target),$(_all_dist_goal_output_pairs)),$(call word-colon,1,$(dg))))) \ + $(eval _srcs := $(sort $(foreach sdp,$(filter %:$(target),$(_all_dist_src_dst_pairs)),$(call word-colon,1,$(sdp))))) \ + $(eval $(call _dist-target-license-metadata-rule,out/dist/$(target),$(_mdir)/out/dist/$(target).meta_lic,$(_srcs))) \ + $(eval _f := $(_idir)/$(target).shareprojects) \ + $(eval _n := $(_tdir)/$(target).txt) \ + $(eval $(call dist-for-goals,$(_goals),$(_f):shareprojects/$(target).shareprojects)) \ + $(eval $(call dist-for-goals,$(_goals),$(_n):licensetexts/$(target).txt)) \ + $(eval $(call _share-projects-rule,$(_f),$(foreach t, $(filter-out $(TARGETS_MISSING_LICENSE_METADATA),out/dist/$(target)),$(_mdir)/$(t).meta_lic))) \ + $(eval $(call _license-texts-rule,$(_goals),$(_n),$(foreach t,$(filter-out $(TARGETS_MISSING_LICENSE_METADATA),out/dist/$(target)),$(_mdir)/$(t).meta_lic))) \ +) +endef + #------------------------------------------------------------------ # To be used at the end of the build to collect all the uses of # dist-for-goals, and write them into a file for the packaging step to use. @@ -52,6 +186,15 @@ endef # $(1): The file to write define dist-write-file $(strip \ + $(call _add_projects_to_share)\ + $(if $(strip $(ANDROID_REQUIRE_LICENSE_METADATA)),\ + $(foreach target,$(sort $(TARGETS_MISSING_LICENSE_METADATA)),$(warning target $(target) missing license metadata))\ + $(if $(strip $(TARGETS_MISSING_LICENSE_METADATA)),\ + $(if $(filter true error,$(ANDROID_REQUIRE_LICENSE_METADATA)),\ + $(error $(words $(sort $(TARGETS_MISSING_LICENSE_METADATA))) targets need license metadata))))\ + $(foreach t,$(sort $(ALL_NON_MODULES)),$(call record-missing-non-module-dependencies,$(t))) \ + $(eval $(call report-missing-licenses-rule)) \ + $(eval $(call report-all-notice-library-names-rule)) \ $(KATI_obsolete_var dist-for-goals,Cannot be used after dist-write-file) \ $(foreach goal,$(sort $(_all_dist_goals)), \ $(eval $$(goal): _dist_$$(goal))) \ diff --git a/core/main.mk b/core/main.mk index c63c6dfde9..cb927c4be9 100644 --- a/core/main.mk +++ b/core/main.mk @@ -935,7 +935,7 @@ $(foreach suite,general-tests device-tests vts tvts art-host-tests host-unit-tes $(eval my_testcases := $(HOST_OUT_TESTCASES)),\ $(eval my_testcases := $$(COMPATIBILITY_TESTCASES_OUT_$(suite))))\ $(eval target := $(my_testcases)/$(lastword $(subst /, ,$(dir $(f))))/$(notdir $(f)))\ - $(if $(strip $(ALL_TARGETS.$(target).META_LIC)),,$(eval ALL_TARGETS.$(target).META_LIC:=$(module_license_metadata)))\ + $(if $(strip $(ALL_TARGETS.$(target).META_LIC)),,$(call declare-copy-target-license-metadata,$(target),$(f)))\ $(eval COMPATIBILITY.$(suite).HOST_SHARED_LIBRARY.FILES := \ $$(COMPATIBILITY.$(suite).HOST_SHARED_LIBRARY.FILES) $(f):$(target))\ $(eval COMPATIBILITY.$(suite).HOST_SHARED_LIBRARY.FILES := \ diff --git a/core/notice_files.mk b/core/notice_files.mk index c05d4ea0be..cbfcaa4f7a 100644 --- a/core/notice_files.mk +++ b/core/notice_files.mk @@ -125,9 +125,10 @@ local_path := $(LOCAL_PATH) module_license_metadata := ifdef my_register_name - module_license_metadata := $(call local-intermediates-dir)/$(my_register_name).meta_lic + module_license_metadata := $(call local-meta-intermediates-dir)/$(my_register_name).meta_lic - $(foreach target,$(ALL_MODULES.$(my_register_name).BUILT) $(ALL_MODULES.$(my_register_name).INSTALLED) $(my_test_data) $(my_test_config),\ + $(foreach target,$(ALL_MODULES.$(my_register_name).BUILT) $(ALL_MODULES.$(my_register_name).INSTALLED) $(foreach bi,$(LOCAL_SOONG_BUILT_INSTALLED),$(call word-colon,1,$(bi))) \ + $(my_test_data) $(my_test_config),\ $(eval ALL_TARGETS.$(target).META_LIC := $(module_license_metadata))) ALL_MODULES.$(my_register_name).META_LIC := $(strip $(ALL_MODULES.$(my_register_name).META_LIC) $(module_license_metadata)) diff --git a/core/os_licensing.mk b/core/os_licensing.mk index d8d3c78945..416e4b22af 100644 --- a/core/os_licensing.mk +++ b/core/os_licensing.mk @@ -23,7 +23,6 @@ endif $(call declare-0p-target,$(target_notice_file_xml_gz)) $(call declare-0p-target,$(installed_notice_html_or_xml_gz)) -ALL_DEFAULT_INSTALLED_MODULES += $(installed_notice_html_or_xml_gz) endif .PHONY: vendorlicense @@ -35,18 +34,17 @@ VENDOR_NOTICE_DEPS += $(UNMOUNTED_NOTICE_DEPS) $(eval $(call text-notice-rule,$(target_vendor_notice_file_txt),"Vendor image", \ "Notices for files contained in all filesystem images except system/system_ext/product/odm/vendor_dlkm/odm_dlkm in this directory:", \ - $(VENDOR_NOTICE_DEPS))) + $(VENDOR_NOTICE_DEPS),$(VENDOR_NOTICE_DEPS))) $(eval $(call xml-notice-rule,$(target_vendor_notice_file_xml_gz),"Vendor image", \ "Notices for files contained in all filesystem images except system/system_ext/product/odm/vendor_dlkm/odm_dlkm in this directory:", \ - $(VENDOR_NOTICE_DEPS))) + $(VENDOR_NOTICE_DEPS),$(VENDOR_NOTICE_DEPS))) $(installed_vendor_notice_xml_gz): $(target_vendor_notice_file_xml_gz) $(copy-file-to-target) $(call declare-0p-target,$(target_vendor_notice_file_xml_gz)) $(call declare-0p-target,$(installed_vendor_notice_xml_gz)) -ALL_DEFAULT_INSTALLED_MODULES += $(installed_vendor_notice_xml_gz) endif .PHONY: odmlicense @@ -55,18 +53,17 @@ odmlicense: $(call corresponding-license-metadata, $(ODM_NOTICE_DEPS)) reportmis ifneq (,$(ODM_NOTICE_DEPS)) $(eval $(call text-notice-rule,$(target_odm_notice_file_txt),"ODM filesystem image", \ "Notices for files contained in the odm filesystem image in this directory:", \ - $(ODM_NOTICE_DEPS))) + $(ODM_NOTICE_DEPS),$(ODM_NOTICE_DEPS))) $(eval $(call xml-notice-rule,$(target_odm_notice_file_xml_gz),"ODM filesystem image", \ "Notices for files contained in the odm filesystem image in this directory:", \ - $(ODM_NOTICE_DEPS))) + $(ODM_NOTICE_DEPS),$(ODM_NOTICE_DEPS))) $(installed_odm_notice_xml_gz): $(target_odm_notice_file_xml_gz) $(copy-file-to-target) $(call declare-0p-target,$(target_odm_notice_file_xml_gz)) $(call declare-0p-target,$(installed_odm_notice_xml_gz)) -ALL_DEFAULT_INSTALLED_MODULES += $(installed_odm_notice_xml_gz) endif .PHONY: oemlicense @@ -78,18 +75,17 @@ productlicense: $(call corresponding-license-metadata, $(PRODUCT_NOTICE_DEPS)) r ifneq (,$(PRODUCT_NOTICE_DEPS)) $(eval $(call text-notice-rule,$(target_product_notice_file_txt),"Product image", \ "Notices for files contained in the product filesystem image in this directory:", \ - $(PRODUCT_NOTICE_DEPS))) + $(PRODUCT_NOTICE_DEPS),$(PRODUCT_NOTICE_DEPS))) $(eval $(call xml-notice-rule,$(target_product_notice_file_xml_gz),"Product image", \ "Notices for files contained in the product filesystem image in this directory:", \ - $(PRODUCT_NOTICE_DEPS))) + $(PRODUCT_NOTICE_DEPS),$(PRODUCT_NOTICE_DEPS))) $(installed_product_notice_xml_gz): $(target_product_notice_file_xml_gz) $(copy-file-to-target) $(call declare-0p-target,$(target_product_notice_file_xml_gz)) $(call declare-0p-target,$(installed_product_notice_xml_gz)) -ALL_DEFAULT_INSTALLED_MODULES += $(installed_product_notice_xml_gz) endif .PHONY: systemextlicense @@ -98,18 +94,17 @@ systemextlicense: $(call corresponding-license-metadata, $(SYSTEM_EXT_NOTICE_DEP ifneq (,$(SYSTEM_EXT_NOTICE_DEPS)) $(eval $(call text-notice-rule,$(target_system_ext_notice_file_txt),"System_ext image", \ "Notices for files contained in the system_ext filesystem image in this directory:", \ - $(SYSTEM_EXT_NOTICE_DEPS))) + $(SYSTEM_EXT_NOTICE_DEPS),$(SYSTEM_EXT_NOTICE_DEPS))) $(eval $(call xml-notice-rule,$(target_system_ext_notice_file_xml_gz),"System_ext image", \ "Notices for files contained in the system_ext filesystem image in this directory:", \ - $(SYSTEM_EXT_NOTICE_DEPS))) + $(SYSTEM_EXT_NOTICE_DEPS),$(SYSTEM_EXT_NOTICE_DEPS))) $(installed_system_ext_notice_xml_gz): $(target_system_ext_notice_file_xml_gz) $(copy-file-to-target) $(call declare-0p-target,$(target_system_ext_notice_file_xml_gz)) $(call declare-0p-target,$(installed_system_ext_notice_xml_gz)) -ALL_DEFAULT_INSTALLED_MODULES += $(installed_system_ext_notice_xml_gz) endif .PHONY: vendor_dlkmlicense @@ -118,18 +113,17 @@ vendor_dlkmlicense: $(call corresponding-license-metadata, $(VENDOR_DLKM_NOTICE_ ifneq (,$(VENDOR_DLKM_NOTICE_DEPS)) $(eval $(call text-notice-rule,$(target_vendor_dlkm_notice_file_txt),"Vendor_dlkm image", \ "Notices for files contained in the vendor_dlkm filesystem image in this directory:", \ - $(VENDOR_DLKM_NOTICE_DEPS))) + $(VENDOR_DLKM_NOTICE_DEPS),$(VENDOR_DLKM_NOTICE_DEPS))) $(eval $(call xml-notice-rule,$(target_vendor_dlkm_notice_file_xml_gz),"Vendor_dlkm image", \ "Notices for files contained in the vendor_dlkm filesystem image in this directory:", \ - $(VENDOR_DLKM_NOTICE_DEPS))) + $(VENDOR_DLKM_NOTICE_DEPS),$(VENDOR_DLKM_NOTICE_DEPS))) $(installed_vendor_dlkm_notice_xml_gz): $(target_vendor_dlkm_notice_file_xml_gz) $(copy-file-to-target) $(call declare-0p-target,$(target_vendor_dlkm_notice_file_xml_gz)) $(call declare-0p-target,$(installed_vendor_dlkm_notice_xml_gz)) -ALL_DEFAULT_INSTALLED_MODULES += $(installed_vendor_dlkm_notice_xml_gz) endif .PHONY: odm_dlkmlicense @@ -138,18 +132,17 @@ odm_dlkmlicense: $(call corresponding-license-metadata, $(ODM_DLKM_NOTICE_DEPS)) ifneq (,$(ODM_DLKM_NOTICE_DEPS)) $(eval $(call text-notice-rule,$(target_odm_dlkm_notice_file_txt),"ODM_dlkm filesystem image", \ "Notices for files contained in the odm_dlkm filesystem image in this directory:", \ - $(ODM_DLKM_NOTICE_DEPS))) + $(ODM_DLKM_NOTICE_DEPS),$(ODM_DLKM_NOTICE_DEPS))) $(eval $(call xml-notice-rule,$(target_odm_dlkm_notice_file_xml_gz),"ODM_dlkm filesystem image", \ "Notices for files contained in the odm_dlkm filesystem image in this directory:", \ - $(ODM_DLMK_NOTICE_DEPS))) + $(ODM_DLKM_NOTICE_DEPS),$(ODM_DLKM_NOTICE_DEPS))) $(installed_odm_dlkm_notice_xml_gz): $(target_odm_dlkm_notice_file_xml_gz) $(copy-file-to-target) $(call declare-0p-target,$(target_odm_dlkm_notice_file_xml_gz)) $(call declare-0p-target,$(installed_odm_dlkm_notice_xml_gz)) -ALL_DEFAULT_INSTALLED_MODULES += $(installed_odm_dlkm_notice_xml_gz) endif .PHONY: system_dlkmlicense @@ -158,18 +151,17 @@ system_dlkmlicense: $(call corresponding-license-metadata, $(SYSTEM_DLKM_NOTICE_ ifneq (,$(SYSTEM_DLKM_NOTICE_DEPS)) $(eval $(call text-notice-rule,$(target_system_dlkm_notice_file_txt),"System_dlkm filesystem image", \ "Notices for files contained in the system_dlkm filesystem image in this directory:", \ - $(SYSTEM_DLKM_NOTICE_DEPS))) + $(SYSTEM_DLKM_NOTICE_DEPS),$(SYSTEM_DLKM_NOTICE_DEPS))) $(eval $(call xml-notice-rule,$(target_system_dlkm_notice_file_xml_gz),"System_dlkm filesystem image", \ "Notices for files contained in the system_dlkm filesystem image in this directory:", \ - $(SYSTEM_DLMK_NOTICE_DEPS))) + $(SYSTEM_DLKM_NOTICE_DEPS),$(SYSTEM_DLKM_NOTICE_DEPS))) $(installed_system_dlkm_notice_xml_gz): $(target_system_dlkm_notice_file_xml_gz) $(copy-file-to-target) $(call declare-0p-target,$(target_system_dlkm_notice_file_xml_gz)) $(call declare-0p-target,$(installed_sysetm_dlkm_notice_xml_gz)) -ALL_DEFAULT_INSTALLED_MODULES += $(installed_system_dlkm_notice_xml_gz) endif endif # not TARGET_BUILD_APPS diff --git a/core/proguard_basic_keeps.flags b/core/proguard_basic_keeps.flags index 30c2341649..38feec37b8 100644 --- a/core/proguard_basic_keeps.flags +++ b/core/proguard_basic_keeps.flags @@ -2,6 +2,11 @@ # that isn't explicitly part of the API -dontskipnonpubliclibraryclasses -dontskipnonpubliclibraryclassmembers +# Annotations are implemented as attributes, so we have to explicitly keep them. +# Keep all runtime-visible annotations like RuntimeVisibleParameterAnnotations +# and RuntimeVisibleTypeAnnotations, as well as associated defaults. +-keepattributes RuntimeVisible*Annotation*,AnnotationDefault + # For enumeration classes, see http://proguard.sourceforge.net/manual/examples.html#enumerations -keepclassmembers enum * { public static **[] values(); @@ -70,9 +75,23 @@ # has a fallback, but again, don't use Futures.getChecked on Android regardless. -dontwarn java.lang.ClassValue +# Ignore missing annotation references for various support libraries. +# While this is not ideal, it should be relatively safe given that +# 1) runtime-visible annotations will still be kept, and 2) compile-time +# annotations are stripped by R8 anyway. +# Note: The ** prefix is used to accommodate jarjar repackaging. +# TODO(b/242088131): Remove these exemptions after resolving transitive libs +# dependencies that are provided to R8. +-dontwarn **android**.annotation*.** +-dontwarn **com.google.errorprone.annotations.** +-dontwarn javax.annotation.** +-dontwarn org.checkerframework.** +-dontwarn org.jetbrains.annotations.** + # Less spammy. -dontnote # The lite proto runtime uses reflection to access fields based on the names in -# the schema, keep all the fields. --keepclassmembers class * extends com.google.protobuf.MessageLite { <fields>; } +# the schema, keep all the fields. Wildcard is used to apply the rule to classes +# that have been renamed with jarjar. +-keepclassmembers class * extends **.protobuf.MessageLite { <fields>; } diff --git a/core/tasks/sts-lite.mk b/core/tasks/sts-lite.mk new file mode 100644 index 0000000000..dee25d4802 --- /dev/null +++ b/core/tasks/sts-lite.mk @@ -0,0 +1,40 @@ +# 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. + +ifneq ($(wildcard test/sts/README-sts-sdk.md),) +test_suite_name := sts-lite +test_suite_tradefed := sts-tradefed +test_suite_readme := test/sts/README-sts-sdk.md +sts_sdk_zip := $(HOST_OUT)/$(test_suite_name)/sts-sdk.zip + +include $(BUILD_SYSTEM)/tasks/tools/compatibility.mk + +sts_sdk_samples := $(call intermediates-dir-for,ETC,sts-sdk-samples.zip)/sts-sdk-samples.zip + +$(sts_sdk_zip): STS_LITE_ZIP := $(compatibility_zip) +$(sts_sdk_zip): STS_SDK_SAMPLES := $(sts_sdk_samples) +$(sts_sdk_zip): $(MERGE_ZIPS) $(ZIP2ZIP) $(compatibility_zip) $(sts_sdk_samples) + rm -f $@ $(STS_LITE_ZIP)_filtered + $(ZIP2ZIP) -i $(STS_LITE_ZIP) -o $(STS_LITE_ZIP)_filtered \ + -x android-sts-lite/tools/sts-tradefed-tests.jar \ + 'android-sts-lite/tools/*:sts-test/libs/' \ + 'android-sts-lite/testcases/*:sts-test/utils/' + $(MERGE_ZIPS) $@ $(STS_LITE_ZIP)_filtered $(STS_SDK_SAMPLES) + rm -f $(STS_LITE_ZIP)_filtered + +.PHONY: sts-sdk +sts-sdk: $(sts_sdk_zip) +$(call dist-for-goals, sts-sdk, $(sts_sdk_zip)) + +endif diff --git a/core/tasks/tools/package-modules.mk b/core/tasks/tools/package-modules.mk index f89d51eea0..c41aec5fc4 100644 --- a/core/tasks/tools/package-modules.mk +++ b/core/tasks/tools/package-modules.mk @@ -27,7 +27,7 @@ LOCAL_MODULE_CLASS := PACKAGING LOCAL_MODULE_STEM := $(my_package_name).zip LOCAL_UNINSTALLABLE_MODULE := true include $(BUILD_SYSTEM)/base_rules.mk -my_staging_dir := $(intermediates) +my_staging_dir := $(intermediates)/staging my_package_zip := $(LOCAL_BUILT_MODULE) my_built_modules := $(foreach p,$(my_copy_pairs),$(call word-colon,1,$(p))) @@ -94,17 +94,18 @@ ifneq ($(my_missing_error),) endif $(my_package_zip): PRIVATE_COPY_PAIRS := $(my_copy_pairs) +$(my_package_zip): PRIVATE_STAGING_DIR := $(my_staging_dir) $(my_package_zip): PRIVATE_PICKUP_FILES := $(my_pickup_files) $(my_package_zip) : $(my_built_modules) @echo "Package $@" - @rm -rf $(dir $@) && mkdir -p $(dir $@) + @rm -rf $(PRIVATE_STAGING_DIR) && mkdir -p $(PRIVATE_STAGING_DIR) $(foreach p, $(PRIVATE_COPY_PAIRS),\ $(eval pair := $(subst :,$(space),$(p)))\ mkdir -p $(dir $(word 2,$(pair))) && \ cp -Rf $(word 1,$(pair)) $(word 2,$(pair)) && ) true $(hide) $(foreach f, $(PRIVATE_PICKUP_FILES),\ - cp -RfL $(f) $(dir $@) && ) true - $(hide) cd $(dir $@) && zip -rqX $(notdir $@) * + cp -RfL $(f) $(PRIVATE_STAGING_DIR) && ) true + $(hide) cd $(PRIVATE_STAGING_DIR) && zip -rqX ../$(notdir $@) * my_makefile := my_staging_dir := diff --git a/core/tasks/tools/vts_package_utils.mk b/core/tasks/tools/vts_package_utils.mk index f1159b3bd9..06161f0b3c 100644 --- a/core/tasks/tools/vts_package_utils.mk +++ b/core/tasks/tools/vts_package_utils.mk @@ -29,6 +29,6 @@ $(foreach m,$(1),\ $(eval my_copy_dest := $(patsubst data/%,DATA/%,\ $(patsubst system/%,DATA/%,\ $(patsubst $(PRODUCT_OUT)/%,%,$(ins)))))\ - $(eval ALL_TARGETS.$(2)/$(my_copy_dest).META_LIC := $(if $(strip $(ALL_MODULES.$(m).META_LIC)),$(ALL_MODULES.$(m).META_LIC),$(ALL_MODULES.$(m).DELAYED_META_LIC)))\ + $(call declare-copy-target-license-metadata,$(2)/$(my_copy_dest),$(bui))\ $(bui):$(2)/$(my_copy_dest)))) endef diff --git a/core/version_defaults.mk b/core/version_defaults.mk index 65957c8859..ab79658354 100644 --- a/core/version_defaults.mk +++ b/core/version_defaults.mk @@ -78,7 +78,7 @@ endif .KATI_READONLY := PLATFORM_SDK_VERSION # This is the sdk extension version of this tree. -PLATFORM_SDK_EXTENSION_VERSION := 3 +PLATFORM_SDK_EXTENSION_VERSION := 4 .KATI_READONLY := PLATFORM_SDK_EXTENSION_VERSION # This is the sdk extension version that PLATFORM_SDK_VERSION ships with. @@ -103,7 +103,7 @@ ifndef PLATFORM_SECURITY_PATCH # It must be of the form "YYYY-MM-DD" on production devices. # It must match one of the Android Security Patch Level strings of the Public Security Bulletins. # If there is no $PLATFORM_SECURITY_PATCH set, keep it empty. - PLATFORM_SECURITY_PATCH := 2022-08-05 + PLATFORM_SECURITY_PATCH := 2022-11-05 endif include $(BUILD_SYSTEM)/version_util.mk diff --git a/envsetup.sh b/envsetup.sh index d08028cefa..a4cf114bf0 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -10,7 +10,8 @@ Invoke ". build/envsetup.sh" from your shell to add the following functions to y invocations of 'm' etc. - tapas: tapas [<App1> <App2> ...] [arm|x86|arm64|x86_64] [eng|userdebug|user] Sets up the build environment for building unbundled apps (APKs). -- banchan: banchan <module1> [<module2> ...] [arm|x86|arm64|x86_64] [eng|userdebug|user] +- banchan: banchan <module1> [<module2> ...] [arm|x86|arm64|x86_64|arm64_only|x86_64only] \ + [eng|userdebug|user] Sets up the build environment for building unbundled modules (APEXes). - croot: Changes directory to the top of the tree, or a subdirectory thereof. - m: Makes from the top of the tree. @@ -880,7 +881,7 @@ function tapas() function banchan() { local showHelp="$(echo $* | xargs -n 1 echo | \grep -E '^(help)$' | xargs)" - local product="$(echo $* | xargs -n 1 echo | \grep -E '^(.*_)?(arm|x86|arm64|x86_64)$' | xargs)" + local product="$(echo $* | xargs -n 1 echo | \grep -E '^(.*_)?(arm|x86|arm64|x86_64|arm64only|x86_64only)$' | xargs)" local variant="$(echo $* | xargs -n 1 echo | \grep -E '^(user|userdebug|eng)$' | xargs)" local apps="$(echo $* | xargs -n 1 echo | \grep -E -v '^(user|userdebug|eng|(.*_)?(arm|x86|arm64|x86_64))$' | xargs)" @@ -909,6 +910,8 @@ function banchan() x86) product=module_x86;; arm64) product=module_arm64;; x86_64) product=module_x86_64;; + arm64only) product=module_arm64only;; + x86_64only) product=module_x86_64only;; esac if [ -z "$variant" ]; then variant=eng diff --git a/target/board/module_arm64only/BoardConfig.mk b/target/board/module_arm64only/BoardConfig.mk new file mode 100644 index 0000000000..3cabf05d94 --- /dev/null +++ b/target/board/module_arm64only/BoardConfig.mk @@ -0,0 +1,21 @@ +# 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 build/make/target/board/BoardConfigModuleCommon.mk + +TARGET_ARCH := arm64 +TARGET_ARCH_VARIANT := armv8-a +TARGET_CPU_VARIANT := generic +TARGET_CPU_ABI := arm64-v8a diff --git a/target/board/module_arm64only/README.md b/target/board/module_arm64only/README.md new file mode 100644 index 0000000000..0dd16992f7 --- /dev/null +++ b/target/board/module_arm64only/README.md @@ -0,0 +1,2 @@ +This device is suitable for an unbundled module targeted specifically to an +arm64 device. 32 bit binaries will not be built. diff --git a/target/board/module_x86_64only/BoardConfig.mk b/target/board/module_x86_64only/BoardConfig.mk new file mode 100644 index 0000000000..b0676cbe22 --- /dev/null +++ b/target/board/module_x86_64only/BoardConfig.mk @@ -0,0 +1,20 @@ +# Copyright (C) 2020 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 build/make/target/board/BoardConfigModuleCommon.mk + +TARGET_CPU_ABI := x86_64 +TARGET_ARCH := x86_64 +TARGET_ARCH_VARIANT := x86_64 diff --git a/target/board/module_x86_64only/README.md b/target/board/module_x86_64only/README.md new file mode 100644 index 0000000000..8fd7dc4757 --- /dev/null +++ b/target/board/module_x86_64only/README.md @@ -0,0 +1,2 @@ +This device is suitable for an unbundled module targeted specifically to an +x86_64 device. 32 bit binaries will not be built. diff --git a/target/product/AndroidProducts.mk b/target/product/AndroidProducts.mk index ee702e5d16..ad6eb55e48 100644 --- a/target/product/AndroidProducts.mk +++ b/target/product/AndroidProducts.mk @@ -77,8 +77,10 @@ PRODUCT_MAKEFILES += \ $(LOCAL_DIR)/mainline_sdk.mk \ $(LOCAL_DIR)/module_arm.mk \ $(LOCAL_DIR)/module_arm64.mk \ + $(LOCAL_DIR)/module_arm64only.mk \ $(LOCAL_DIR)/module_x86.mk \ $(LOCAL_DIR)/module_x86_64.mk \ + $(LOCAL_DIR)/module_x86_64only.mk \ COMMON_LUNCH_CHOICES := \ aosp_arm64-eng \ diff --git a/target/product/base_system.mk b/target/product/base_system.mk index 6f6cd79214..c919ac462b 100644 --- a/target/product/base_system.mk +++ b/target/product/base_system.mk @@ -52,7 +52,7 @@ PRODUCT_PACKAGES += \ com.android.adbd \ com.android.adservices \ com.android.appsearch \ - com.android.bluetooth \ + com.android.btservices \ com.android.conscrypt \ com.android.extservices \ com.android.i18n \ diff --git a/target/product/default_art_config.mk b/target/product/default_art_config.mk index 993edf3284..e2bb9d5dd4 100644 --- a/target/product/default_art_config.mk +++ b/target/product/default_art_config.mk @@ -54,7 +54,7 @@ PRODUCT_APEX_BOOT_JARS := \ com.android.adservices:framework-adservices \ com.android.adservices:framework-sdksandbox \ com.android.appsearch:framework-appsearch \ - com.android.bluetooth:framework-bluetooth \ + com.android.btservices:framework-bluetooth \ com.android.conscrypt:conscrypt \ com.android.i18n:core-icu4j \ com.android.ipsec:android.net.ipsec.ike \ @@ -93,7 +93,7 @@ PRODUCT_STANDALONE_SYSTEM_SERVER_JARS := \ # Keep the list sorted by module names and then library names. # Note: For modules available in Q, DO NOT add new entries here. PRODUCT_APEX_STANDALONE_SYSTEM_SERVER_JARS := \ - com.android.bluetooth:service-bluetooth \ + com.android.btservices:service-bluetooth \ com.android.os.statsd:service-statsd \ com.android.scheduling:service-scheduling \ com.android.tethering:service-connectivity \ diff --git a/target/product/module_arm64only.mk b/target/product/module_arm64only.mk new file mode 100644 index 0000000000..4e8d53eb75 --- /dev/null +++ b/target/product/module_arm64only.mk @@ -0,0 +1,22 @@ +# +# 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. +# + +$(call inherit-product, $(SRC_TARGET_DIR)/product/module_common.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit_only.mk) + +PRODUCT_NAME := module_arm64only +PRODUCT_BRAND := Android +PRODUCT_DEVICE := module_arm64only diff --git a/target/product/module_x86_64only.mk b/target/product/module_x86_64only.mk new file mode 100644 index 0000000000..bca4541efe --- /dev/null +++ b/target/product/module_x86_64only.mk @@ -0,0 +1,22 @@ +# +# Copyright (C) 2021 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. +# + +$(call inherit-product, $(SRC_TARGET_DIR)/product/module_common.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit_only.mk) + +PRODUCT_NAME := module_x86_64only +PRODUCT_BRAND := Android +PRODUCT_DEVICE := module_x86_64only |