Merge "Notice files and non-module targets." am: dd780ca8d0

Original change: https://android-review.googlesource.com/c/platform/build/+/2001031

Change-Id: I0c582424e6e4c11a38f0dba4f77dde0deb3f1ec1
This commit is contained in:
Treehugger Robot 2022-03-16 20:33:28 +00:00 committed by Automerger Merge Worker
commit a9e626d783
4 changed files with 481 additions and 149 deletions

View file

@ -4,6 +4,17 @@
# intermedites-dir-for # intermedites-dir-for
LOCAL_PATH := $(BUILD_SYSTEM) LOCAL_PATH := $(BUILD_SYSTEM)
SYSTEM_NOTICE_DEPS :=
VENDOR_NOTICE_DEPS :=
UNMOUNTED_NOTICE_DEPS :=
ODM_NOTICE_DEPS :=
OEM_NOTICE_DEPS :=
PRODUCT_NOTICE_DEPS :=
SYSTEM_EXT_NOTICE_DEPS :=
VENDOR_DLKM_NOTICE_DEPS :=
ODM_DLKM_NOTICE_DEPS :=
SYSTEM_DLKM_NOTICE_DEPS :=
# ----------------------------------------------------------------- # -----------------------------------------------------------------
# Define rules to copy PRODUCT_COPY_FILES defined by the product. # Define rules to copy PRODUCT_COPY_FILES defined by the product.
# PRODUCT_COPY_FILES contains words like <source file>:<dest file>[:<owner>]. # PRODUCT_COPY_FILES contains words like <source file>:<dest file>[:<owner>].
@ -816,6 +827,8 @@ $(INSTALLED_FILES_FILE_RAMDISK) : $(INTERNAL_RAMDISK_FILES) $(FILESLIST) $(FILES
$(FILESLIST) $(TARGET_RAMDISK_OUT) > $(@:.txt=.json) $(FILESLIST) $(TARGET_RAMDISK_OUT) > $(@:.txt=.json)
$(FILESLIST_UTIL) -c $(@:.txt=.json) > $@ $(FILESLIST_UTIL) -c $(@:.txt=.json) > $@
$(eval $(call declare-0p-target,$(INSTALLED_FILES_FILE_RAMDISK)))
ifeq ($(HOST_OS),linux) ifeq ($(HOST_OS),linux)
$(call dist-for-goals, sdk sdk_addon, $(INSTALLED_FILES_FILE_RAMDISK)) $(call dist-for-goals, sdk sdk_addon, $(INSTALLED_FILES_FILE_RAMDISK))
endif endif
@ -843,6 +856,11 @@ ifeq (true,$(BOARD_USES_GENERIC_KERNEL_IMAGE))
endif endif
$(hide) $(MKBOOTFS) -d $(TARGET_OUT) $(TARGET_RAMDISK_OUT) | $(COMPRESSION_COMMAND) > $@ $(hide) $(MKBOOTFS) -d $(TARGET_OUT) $(TARGET_RAMDISK_OUT) | $(COMPRESSION_COMMAND) > $@
$(call declare-1p-container,$(INSTALLED_RAMDISK_TARGET),)
$(call declare-container-license-deps,$(INSTALLED_RAMDISK_TARGET),$(INTERNAL_RAMDISK_FILE),$(PRODUCT_OUT)/:/)
UNMOUNTED_NOTICE_DEPS += $(INSTALLED_RAMDISK_TARGET)
.PHONY: ramdisk-nodeps .PHONY: ramdisk-nodeps
ramdisk-nodeps: $(MKBOOTFS) | $(COMPRESSION_COMMAND_DEPS) ramdisk-nodeps: $(MKBOOTFS) | $(COMPRESSION_COMMAND_DEPS)
@echo "make $@: ignoring dependencies" @echo "make $@: ignoring dependencies"
@ -1040,6 +1058,11 @@ $(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(AVBTOOL) $(INTERNAL_BOOTIMAGE_FILE
$(call pretty,"Target boot image: $@") $(call pretty,"Target boot image: $@")
$(call build_boot_board_avb_enabled,$@) $(call build_boot_board_avb_enabled,$@)
$(call declare-1p-container,$(INSTALLED_BOOTIMAGE_TARGET),)
$(call declare-container-license-deps,$(INSTALLED_BOOTIMAGE_TARGET),$(INTERNAL_BOOTIMAGE_FILES) $(INTERNAL_GKI_CERTIFICATE_DEPS),$(PRODUCT_OUT)/:/)
UNMOUNTED_NOTICE_DEPS += $(INSTALLED_BOOTIMAGE_TARGET)
.PHONY: bootimage-nodeps .PHONY: bootimage-nodeps
bootimage-nodeps: $(MKBOOTIMG) $(AVBTOOL) $(BOARD_AVB_BOOT_KEY_PATH) $(INTERNAL_GKI_CERTIFICATE_DEPS) bootimage-nodeps: $(MKBOOTIMG) $(AVBTOOL) $(BOARD_AVB_BOOT_KEY_PATH) $(INTERNAL_GKI_CERTIFICATE_DEPS)
@echo "make $@: ignoring dependencies" @echo "make $@: ignoring dependencies"
@ -1058,6 +1081,11 @@ $(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES) $(BOOT_S
$(call pretty,"Target boot image: $@") $(call pretty,"Target boot image: $@")
$(call build_boot_supports_boot_signer,$@) $(call build_boot_supports_boot_signer,$@)
$(call declare-1p-container,$(INSTALLED_BOOTIMAGE_TARGET),)
$(call declare-container-license-deps,$(INSTALLED_BOOTIMAGE_TARGET),$(INTERNAL_BOOTIMAGE_FILES),$(PRODUCT_OUT)/:/)
UNMOUNTED_NOTICE_DEPS += $(INSTALLED_BOOTIMAGE_TARGET)
.PHONY: bootimage-nodeps .PHONY: bootimage-nodeps
bootimage-nodeps: $(MKBOOTIMG) $(BOOT_SIGNER) bootimage-nodeps: $(MKBOOTIMG) $(BOOT_SIGNER)
@echo "make $@: ignoring dependencies" @echo "make $@: ignoring dependencies"
@ -1076,6 +1104,11 @@ $(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES) $(VBOOT_
$(call pretty,"Target boot image: $@") $(call pretty,"Target boot image: $@")
$(call build_boot_supports_vboot,$@) $(call build_boot_supports_vboot,$@)
$(call declare-1p-container,$(INSTALLED_BOOTIMAGE_TARGET),)
$(call declare-container-license-deps,$(INSTALLED_BOOTIMAGE_TARGET),$(INTERNAL_BOOTIMAGE_FILES),$(PRODUCT_OUT)/:/)
UNMOUNTED_NOTICE_DEPS += $(INSTALLED_BOOTIMAGE_TARGET)
.PHONY: bootimage-nodeps .PHONY: bootimage-nodeps
bootimage-nodeps: $(MKBOOTIMG) $(VBOOT_SIGNER) $(FUTILITY) bootimage-nodeps: $(MKBOOTIMG) $(VBOOT_SIGNER) $(FUTILITY)
@echo "make $@: ignoring dependencies" @echo "make $@: ignoring dependencies"
@ -1093,6 +1126,11 @@ $(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES)
$(call pretty,"Target boot image: $@") $(call pretty,"Target boot image: $@")
$(call build_boot_novboot,$@) $(call build_boot_novboot,$@)
$(call declare-1p-container,$(INSTALLED_BOOTIMAGE_TARGET),)
$(call declare-container-license-deps,$(INSTALLED_BOOTIMAGE_TARGET),$(INTERNAL_BOOTIMAGE_FILES),$(PRODUCT_OUT)/:/)
UNMOUNTED_NOTICE_DEPS += $(INSTALLED_BOOTIMAGE_TARGET)
.PHONY: bootimage-nodeps .PHONY: bootimage-nodeps
bootimage-nodeps: $(MKBOOTIMG) bootimage-nodeps: $(MKBOOTIMG)
@echo "make $@: ignoring dependencies" @echo "make $@: ignoring dependencies"
@ -1114,6 +1152,11 @@ $(INSTALLED_BOOTIMAGE_TARGET): $(INTERNAL_PREBUILT_BOOTIMAGE) $(AVBTOOL) $(BOARD
$(call get-partition-size-argument,$(BOARD_BOOTIMAGE_PARTITION_SIZE)) \ $(call get-partition-size-argument,$(BOARD_BOOTIMAGE_PARTITION_SIZE)) \
--partition_name boot $(INTERNAL_AVB_BOOT_SIGNING_ARGS) \ --partition_name boot $(INTERNAL_AVB_BOOT_SIGNING_ARGS) \
$(BOARD_AVB_BOOT_ADD_HASH_FOOTER_ARGS) $(BOARD_AVB_BOOT_ADD_HASH_FOOTER_ARGS)
$(call declare-1p-container,$(INSTALLED_BOOTIMAGE_TARGET),)
$(call declare-container-license-deps,$(INSTALLED_BOOTIMAGE_TARGET),$(INTERNAL_PREBUILT_BOOTIMAGE),$(PRODUCT_OUT)/:/)
UNMOUNTED_NOTICE_DEPS += $(INSTALLED_BOOTIMAGE_TARGET)
else else
$(INSTALLED_BOOTIMAGE_TARGET): $(INTERNAL_PREBUILT_BOOTIMAGE) $(INSTALLED_BOOTIMAGE_TARGET): $(INTERNAL_PREBUILT_BOOTIMAGE)
cp $(INTERNAL_PREBUILT_BOOTIMAGE) $@ cp $(INTERNAL_PREBUILT_BOOTIMAGE) $@
@ -1149,13 +1192,20 @@ $(INSTALLED_INIT_BOOT_IMAGE_TARGET): $(AVBTOOL) $(BOARD_AVB_INIT_BOOT_KEY_PATH)
$(call get-partition-size-argument,$(BOARD_INIT_BOOT_IMAGE_PARTITION_SIZE)) \ $(call get-partition-size-argument,$(BOARD_INIT_BOOT_IMAGE_PARTITION_SIZE)) \
--partition_name init_boot $(INTERNAL_AVB_INIT_BOOT_SIGNING_ARGS) \ --partition_name init_boot $(INTERNAL_AVB_INIT_BOOT_SIGNING_ARGS) \
$(BOARD_AVB_INIT_BOOT_ADD_HASH_FOOTER_ARGS) $(BOARD_AVB_INIT_BOOT_ADD_HASH_FOOTER_ARGS)
$(call declare-1p-container,$(INSTALLED_INIT_BOOT_IMAGE_TARGET),)
$(call declare-container-license-deps,$(INSTALLED_INIT_BOOT_IMAGE_TARGET),$(INTERNAL_GENERIC_RAMDISK_BOOT_SIGNATURE),$(PRODUCT_OUT)/:/)
else else
$(INSTALLED_INIT_BOOT_IMAGE_TARGET): $(INSTALLED_INIT_BOOT_IMAGE_TARGET):
$(call pretty,"Target init_boot image: $@") $(call pretty,"Target init_boot image: $@")
$(MKBOOTIMG) $(INTERNAL_INIT_BOOT_IMAGE_ARGS) $(INTERNAL_MKBOOTIMG_VERSION_ARGS) $(BOARD_MKBOOTIMG_INIT_ARGS) --output $@ $(MKBOOTIMG) $(INTERNAL_INIT_BOOT_IMAGE_ARGS) $(INTERNAL_MKBOOTIMG_VERSION_ARGS) $(BOARD_MKBOOTIMG_INIT_ARGS) --output $@
$(call assert-max-image-size,$@,$(BOARD_INIT_BOOT_IMAGE_PARTITION_SIZE)) $(call assert-max-image-size,$@,$(BOARD_INIT_BOOT_IMAGE_PARTITION_SIZE))
$(call declare-1p-target,$(INSTALLED_INIT_BOOT_IMAGE_TARGET),)
endif endif
UNMOUNTED_NOTICE_DEPS += $(INSTALLED_INIT_BOOT_IMAGE_TARGET)
else # BUILDING_INIT_BOOT_IMAGE is not true else # BUILDING_INIT_BOOT_IMAGE is not true
ifdef BOARD_PREBUILT_INIT_BOOT_IMAGE ifdef BOARD_PREBUILT_INIT_BOOT_IMAGE
@ -1170,11 +1220,18 @@ $(INSTALLED_INIT_BOOT_IMAGE_TARGET): $(INTERNAL_PREBUILT_INIT_BOOT_IMAGE) $(AVBT
$(call get-partition-size-argument,$(BOARD_INIT_BOOT_IMAGE_PARTITION_SIZE)) \ $(call get-partition-size-argument,$(BOARD_INIT_BOOT_IMAGE_PARTITION_SIZE)) \
--partition_name boot $(INTERNAL_AVB_INIT_BOOT_SIGNING_ARGS) \ --partition_name boot $(INTERNAL_AVB_INIT_BOOT_SIGNING_ARGS) \
$(BOARD_AVB_INIT_BOOT_ADD_HASH_FOOTER_ARGS) $(BOARD_AVB_INIT_BOOT_ADD_HASH_FOOTER_ARGS)
$(call declare-1p-container,$(INSTALLED_INIT_BOOT_IMAGE_TARGET),)
$(call declare-container-license-deps,$(INSTALLED_INIT_BOOT_IMAGE_TARGET),$(INTERNAL_PREBUILT_INIT_BOOT_IMAGE),$(PRODUCT_OUT)/:/)
else else
$(INSTALLED_INIT_BOOT_IMAGE_TARGET): $(INTERNAL_PREBUILT_INIT_BOOT_IMAGE) $(INSTALLED_INIT_BOOT_IMAGE_TARGET): $(INTERNAL_PREBUILT_INIT_BOOT_IMAGE)
cp $(INTERNAL_PREBUILT_INIT_BOOT_IMAGE) $@ cp $(INTERNAL_PREBUILT_INIT_BOOT_IMAGE) $@
$(call declare-1p-target,$(INSTALLED_INIT_BOOT_IMAGE_TARGET),)
endif # BOARD_AVB_ENABLE endif # BOARD_AVB_ENABLE
UNMOUNTED_NOTICE_DEPS += $(INSTALLED_INIT_BOOT_IMAGE_TARGET)
else # BOARD_PREBUILT_INIT_BOOT_IMAGE not defined else # BOARD_PREBUILT_INIT_BOOT_IMAGE not defined
INSTALLED_INIT_BOOT_IMAGE_TARGET := INSTALLED_INIT_BOOT_IMAGE_TARGET :=
endif # BOARD_PREBUILT_INIT_BOOT_IMAGE endif # BOARD_PREBUILT_INIT_BOOT_IMAGE
@ -1212,6 +1269,11 @@ $(INSTALLED_VENDOR_RAMDISK_TARGET): $(INTERNAL_VENDOR_RAMDISK_TARGET)
@echo "Target vendor ramdisk: $@" @echo "Target vendor ramdisk: $@"
$(copy-file-to-target) $(copy-file-to-target)
$(call declare-1p-container,$(INSTALLED_VENDOR_RAMDISK_TARGET),)
$(call declare-container-license-deps,$(INSTALLED_VENDOR_RAMDISK_TARGET),$(INTERNAL_VENDOR_RAMDISK_TARGET),$(PRODUCT_OUT)/:/)
VENDOR_NOTICE_DEPS += $(INSTALLED_VENDOR_RAMDISK_TARGET)
INSTALLED_FILES_FILE_VENDOR_RAMDISK := $(PRODUCT_OUT)/installed-files-vendor-ramdisk.txt INSTALLED_FILES_FILE_VENDOR_RAMDISK := $(PRODUCT_OUT)/installed-files-vendor-ramdisk.txt
INSTALLED_FILES_JSON_VENDOR_RAMDISK := $(INSTALLED_FILES_FILE_VENDOR_RAMDISK:.txt=.json) INSTALLED_FILES_JSON_VENDOR_RAMDISK := $(INSTALLED_FILES_FILE_VENDOR_RAMDISK:.txt=.json)
$(INSTALLED_FILES_FILE_VENDOR_RAMDISK): .KATI_IMPLICIT_OUTPUTS := $(INSTALLED_FILES_JSON_VENDOR_RAMDISK) $(INSTALLED_FILES_FILE_VENDOR_RAMDISK): .KATI_IMPLICIT_OUTPUTS := $(INSTALLED_FILES_JSON_VENDOR_RAMDISK)
@ -1223,6 +1285,8 @@ $(INSTALLED_FILES_FILE_VENDOR_RAMDISK): $(INTERNAL_VENDOR_RAMDISK_FILES) $(FILES
$(FILESLIST) $(TARGET_VENDOR_RAMDISK_OUT) > $(@:.txt=.json) $(FILESLIST) $(TARGET_VENDOR_RAMDISK_OUT) > $(@:.txt=.json)
$(FILESLIST_UTIL) -c $(@:.txt=.json) > $@ $(FILESLIST_UTIL) -c $(@:.txt=.json) > $@
$(eval $(call declare-0p-target,$(INSTALLED_FILES_FILE_VENDOR_RAMDISK)))
ifdef BOARD_INCLUDE_DTB_IN_BOOTIMG ifdef BOARD_INCLUDE_DTB_IN_BOOTIMG
INTERNAL_VENDOR_BOOTIMAGE_ARGS += --dtb $(INSTALLED_DTBIMAGE_TARGET) INTERNAL_VENDOR_BOOTIMAGE_ARGS += --dtb $(INSTALLED_DTBIMAGE_TARGET)
endif endif
@ -1304,6 +1368,10 @@ $(INSTALLED_VENDOR_BOOTIMAGE_TARGET):
$(MKBOOTIMG) $(INTERNAL_VENDOR_BOOTIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --vendor_ramdisk $(INTERNAL_VENDOR_RAMDISK_TARGET) $(INTERNAL_VENDOR_RAMDISK_FRAGMENT_ARGS) --vendor_boot $@ $(MKBOOTIMG) $(INTERNAL_VENDOR_BOOTIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --vendor_ramdisk $(INTERNAL_VENDOR_RAMDISK_TARGET) $(INTERNAL_VENDOR_RAMDISK_FRAGMENT_ARGS) --vendor_boot $@
$(call assert-max-image-size,$@,$(BOARD_VENDOR_BOOTIMAGE_PARTITION_SIZE)) $(call assert-max-image-size,$@,$(BOARD_VENDOR_BOOTIMAGE_PARTITION_SIZE))
endif endif
$(call declare-1p-container,$(INSTALLED_VENDOR_BOOTIMAGE_TARGET),)
$(call declare-container-license-deps,$(INSTALLED_VENDOR_BOOTIMAGE_TARGET),$(INTERNAL_VENDOR_RAMDISK_TARGET) $(INSTALLED_DTB_IMAGE_TARGET) $(INTERNAL_VENDOR_RAMDISK_FRAGMENT_TARGETS) $(INTERNAL_VENDOR_BOOTCONDIG_TARGET),$(PRODUCT_OUT)/:/)
VENDOR_NOTICE_DEPS += $(INSTALLED_VENDOR_BOOTIMAGE_TARGET)
endif # BUILDING_VENDOR_BOOT_IMAGE endif # BUILDING_VENDOR_BOOT_IMAGE
# ----------------------------------------------------------------- # -----------------------------------------------------------------
@ -1320,6 +1388,54 @@ endif # BUILDING_VENDOR_BOOT_IMAGE
.PHONY: notice_files .PHONY: notice_files
# Convert license metadata into xml notice file.
# $(1) - Output target notice filename
# $(2) - Product name
# $(3) - File title
# $(4) - License metadata file roots
# $(5) - Prefixes to strip
#
define xml-notice-rule
$(1): PRIVATE_PRODUCT := $(2)
$(1): PRIVATE_MESSAGE := $(3)
$(1): $(call corresponding-license-metadata,$(4)) $(XMLNOTICE) $(BUILD_SYSTEM)/Makefile
$(XMLNOTICE) -o $$@ -product=$$(PRIVATE_PRODUCT) -title=$$(PRIVATE_MESSAGE) $(foreach prefix, $(5), -strip_prefix=$(prefix)) $(call corresponding-license-metadata,$(4))
notice_files: $(1)
endef
# Convert license metadata into text notice file.
# $(1) - Output target notice filename
# $(2) - Product name
# $(3) - File title
# $(4) - License metadata file roots
# $(5) - Prefixes to strip
#
define text-notice-rule
$(1): PRIVATE_PRODUCT := $(2)
$(1): PRIVATE_MESSAGE := $(3)
$(1): $(call corresponding-license-metadata,$(4)) $(TEXTNOTICE) $(BUILD_SYSTEM)/Makefile
$(TEXTNOTICE) -o $$@ -product=$$(PRIVATE_PRODUCT) -title=$$(PRIVATE_MESSAGE) $(foreach prefix, $(5), -strip_prefix=$(prefix)) $(call corresponding-license-metadata,$(4))
notice_files: $(1)
endef
# Conversion license metadata into html notice file.
# $(1) - Output target notice filename
# $(2) - Product name
# $(3) - File title
# $(4) - License metadata file roots
# $(5) - Prefixes to strip
#
define html-notice-rule
$(1): PRIVATE_PRODUCT := $(2)
$(1): PRIVATE_MESSAGE := $(3)
$(1): $(call corresponding-license-metadata,$(4)) $(HTMLNOTICE) $(BUILD_SYSTEM)/Makefile
$(HTMLNOTICE) -o $$@ -product=$$(PRIVATE_PRODUCT) -title=$$(PRIVATE_MESSAGE) $(foreach prefix, $(5), -strip_prefix=$(prefix)) $(call corresponding-license-metadata,$(4))
notice_files: $(1)
endef
# Create the rule to combine the files into text and html/xml forms # Create the rule to combine the files into text and html/xml forms
# $(1) - xml_excluded_system_product_odm_vendor_dlkm_odm_dlkm| # $(1) - xml_excluded_system_product_odm_vendor_dlkm_odm_dlkm|
# xml_excluded_vendor_product_odm_vendor_dlkm_odm_dlkm| # xml_excluded_vendor_product_odm_vendor_dlkm_odm_dlkm|
@ -1380,60 +1496,42 @@ exclude_target_dirs := apex
# TODO(b/69865032): Make PRODUCT_NOTICE_SPLIT the default behavior. # TODO(b/69865032): Make PRODUCT_NOTICE_SPLIT the default behavior.
ifneq ($(PRODUCT_NOTICE_SPLIT),true) ifneq ($(PRODUCT_NOTICE_SPLIT),true)
target_notice_file_html := $(TARGET_OUT_INTERMEDIATES)/NOTICE.html #target_notice_file_html := $(TARGET_OUT_INTERMEDIATES)/NOTICE.html
target_notice_file_html_gz := $(TARGET_OUT_INTERMEDIATES)/NOTICE.html.gz target_notice_file_html_gz := $(TARGET_OUT_INTERMEDIATES)/NOTICE.html.gz
installed_notice_html_or_xml_gz := $(TARGET_OUT)/etc/NOTICE.html.gz installed_notice_html_or_xml_gz := $(TARGET_OUT)/etc/NOTICE.html.gz
$(eval $(call combine-notice-files, html, \
$(target_notice_file_txt), \
$(target_notice_file_html), \
"Notices for files contained in the filesystem images in this directory:", \
$(TARGET_OUT_NOTICE_FILES), \
$(ALL_DEFAULT_INSTALLED_MODULES) $(kernel_notice_file), \
$(exclude_target_dirs)))
$(target_notice_file_html_gz): $(target_notice_file_html) | $(MINIGZIP)
$(hide) $(MINIGZIP) -9 < $< > $@
$(installed_notice_html_or_xml_gz): $(target_notice_file_html_gz)
$(copy-file-to-target)
$(call declare-0p-target,$(target_notice_file_html_gz)) $(call declare-0p-target,$(target_notice_file_html_gz))
$(call declare-0p-target,$(installed_notice_html_or_xml_gz)) $(call declare-0p-target,$(installed_notice_html_or_xml_gz))
else else
target_notice_file_xml := $(TARGET_OUT_INTERMEDIATES)/NOTICE.xml # target_notice_file_xml := $(TARGET_OUT_INTERMEDIATES)/NOTICE.xml
target_notice_file_xml_gz := $(TARGET_OUT_INTERMEDIATES)/NOTICE.xml.gz target_notice_file_xml_gz := $(TARGET_OUT_INTERMEDIATES)/NOTICE.xml.gz
installed_notice_html_or_xml_gz := $(TARGET_OUT)/etc/NOTICE.xml.gz installed_notice_html_or_xml_gz := $(TARGET_OUT)/etc/NOTICE.xml.gz
target_vendor_notice_file_txt := $(TARGET_OUT_INTERMEDIATES)/NOTICE_VENDOR.txt target_vendor_notice_file_txt := $(TARGET_OUT_INTERMEDIATES)/NOTICE_VENDOR.txt
target_vendor_notice_file_xml := $(TARGET_OUT_INTERMEDIATES)/NOTICE_VENDOR.xml
target_vendor_notice_file_xml_gz := $(TARGET_OUT_INTERMEDIATES)/NOTICE_VENDOR.xml.gz target_vendor_notice_file_xml_gz := $(TARGET_OUT_INTERMEDIATES)/NOTICE_VENDOR.xml.gz
installed_vendor_notice_xml_gz := $(TARGET_OUT_VENDOR)/etc/NOTICE.xml.gz installed_vendor_notice_xml_gz := $(TARGET_OUT_VENDOR)/etc/NOTICE.xml.gz
target_product_notice_file_txt := $(TARGET_OUT_INTERMEDIATES)/NOTICE_PRODUCT.txt target_product_notice_file_txt := $(TARGET_OUT_INTERMEDIATES)/NOTICE_PRODUCT.txt
target_product_notice_file_xml := $(TARGET_OUT_INTERMEDIATES)/NOTICE_PRODUCT.xml
target_product_notice_file_xml_gz := $(TARGET_OUT_INTERMEDIATES)/NOTICE_PRODUCT.xml.gz target_product_notice_file_xml_gz := $(TARGET_OUT_INTERMEDIATES)/NOTICE_PRODUCT.xml.gz
installed_product_notice_xml_gz := $(TARGET_OUT_PRODUCT)/etc/NOTICE.xml.gz installed_product_notice_xml_gz := $(TARGET_OUT_PRODUCT)/etc/NOTICE.xml.gz
target_system_ext_notice_file_txt := $(TARGET_OUT_INTERMEDIATES)/NOTICE_SYSTEM_EXT.txt target_system_ext_notice_file_txt := $(TARGET_OUT_INTERMEDIATES)/NOTICE_SYSTEM_EXT.txt
target_system_ext_notice_file_xml := $(TARGET_OUT_INTERMEDIATES)/NOTICE_SYSTEM_EXT.xml
target_system_ext_notice_file_xml_gz := $(TARGET_OUT_INTERMEDIATES)/NOTICE_SYSTEM_EXT.xml.gz target_system_ext_notice_file_xml_gz := $(TARGET_OUT_INTERMEDIATES)/NOTICE_SYSTEM_EXT.xml.gz
installed_system_ext_notice_xml_gz := $(TARGET_OUT_SYSTEM_EXT)/etc/NOTICE.xml.gz installed_system_ext_notice_xml_gz := $(TARGET_OUT_SYSTEM_EXT)/etc/NOTICE.xml.gz
target_odm_notice_file_txt := $(TARGET_OUT_INTERMEDIATES)/NOTICE_ODM.txt target_odm_notice_file_txt := $(TARGET_OUT_INTERMEDIATES)/NOTICE_ODM.txt
target_odm_notice_file_xml := $(TARGET_OUT_INTERMEDIATES)/NOTICE_ODM.xml
target_odm_notice_file_xml_gz := $(TARGET_OUT_INTERMEDIATES)/NOTICE_ODM.xml.gz target_odm_notice_file_xml_gz := $(TARGET_OUT_INTERMEDIATES)/NOTICE_ODM.xml.gz
installed_odm_notice_xml_gz := $(TARGET_OUT_ODM)/etc/NOTICE.xml.gz installed_odm_notice_xml_gz := $(TARGET_OUT_ODM)/etc/NOTICE.xml.gz
target_vendor_dlkm_notice_file_txt := $(TARGET_OUT_INTERMEDIATES)/NOTICE_VENDOR_DLKM.txt target_vendor_dlkm_notice_file_txt := $(TARGET_OUT_INTERMEDIATES)/NOTICE_VENDOR_DLKM.txt
target_vendor_dlkm_notice_file_xml := $(TARGET_OUT_INTERMEDIATES)/NOTICE_VENDOR_DLKM.xml
target_vendor_dlkm_notice_file_xml_gz := $(TARGET_OUT_INTERMEDIATES)/NOTICE_VENDOR_DLKM.xml.gz target_vendor_dlkm_notice_file_xml_gz := $(TARGET_OUT_INTERMEDIATES)/NOTICE_VENDOR_DLKM.xml.gz
installed_vendor_dlkm_notice_xml_gz := $(TARGET_OUT_VENDOR_DLKM)/etc/NOTICE.xml.gz installed_vendor_dlkm_notice_xml_gz := $(TARGET_OUT_VENDOR_DLKM)/etc/NOTICE.xml.gz
target_odm_dlkm_notice_file_txt := $(TARGET_OUT_INTERMEDIATES)/NOTICE_ODM_DLKM.txt target_odm_dlkm_notice_file_txt := $(TARGET_OUT_INTERMEDIATES)/NOTICE_ODM_DLKM.txt
target_odm_dlkm_notice_file_xml := $(TARGET_OUT_INTERMEDIATES)/NOTICE_ODM_DLKM.xml
target_odm_dlkm_notice_file_xml_gz := $(TARGET_OUT_INTERMEDIATES)/NOTICE_ODM_DLKM.xml.gz target_odm_dlkm_notice_file_xml_gz := $(TARGET_OUT_INTERMEDIATES)/NOTICE_ODM_DLKM.xml.gz
installed_odm_dlkm_notice_xml_gz := $(TARGET_OUT_ODM_DLKM)/etc/NOTICE.xml.gz installed_odm_dlkm_notice_xml_gz := $(TARGET_OUT_ODM_DLKM)/etc/NOTICE.xml.gz
target_system_dlkm_notice_file_txt := $(TARGET_OUT_INTERMEDIATES)/NOTICE_SYSTEM_DLKM.txt target_system_dlkm_notice_file_txt := $(TARGET_OUT_INTERMEDIATES)/NOTICE_SYSTEM_DLKM.txt
target_system_dlkm_notice_file_xml := $(TARGET_OUT_INTERMEDIATES)/NOTICE_SYSTEM_DLKM.xml
target_system_dlkm_notice_file_xml_gz := $(TARGET_OUT_INTERMEDIATES)/NOTICE_SYSTEM_DLKM.xml.gz target_system_dlkm_notice_file_xml_gz := $(TARGET_OUT_INTERMEDIATES)/NOTICE_SYSTEM_DLKM.xml.gz
installed_system_dlkm_notice_xml_gz := $(TARGET_OUT_SYSTEM_DLKM)/etc/NOTICE.xml.gz installed_system_dlkm_notice_xml_gz := $(TARGET_OUT_SYSTEM_DLKM)/etc/NOTICE.xml.gz
@ -1508,129 +1606,6 @@ system_xml_directories := xml_system
system_notice_file_message := "Notices for files contained in the system filesystem image in this directory:" system_notice_file_message := "Notices for files contained in the system filesystem image in this directory:"
endif endif
$(eval $(call combine-notice-files, $(system_xml_directories), \
$(target_notice_file_txt), \
$(target_notice_file_xml), \
$(system_notice_file_message), \
$(TARGET_OUT_NOTICE_FILES), \
$(license_modules_system), \
$(exclude_target_dirs)))
$(eval $(call combine-notice-files, xml_excluded_system_product_odm_vendor_dlkm_odm_dlkm, \
$(target_vendor_notice_file_txt), \
$(target_vendor_notice_file_xml), \
"Notices for files contained in all filesystem images except system/system_ext/product/odm/vendor_dlkm/odm_dlkm in this directory:", \
$(TARGET_OUT_NOTICE_FILES), \
$(license_modules_vendor), \
$(exclude_target_dirs)))
$(eval $(call combine-notice-files, xml_product, \
$(target_product_notice_file_txt), \
$(target_product_notice_file_xml), \
"Notices for files contained in the product filesystem image in this directory:", \
$(TARGET_OUT_NOTICE_FILES), \
$(license_modules_product), \
$(exclude_target_dirs)))
$(eval $(call combine-notice-files, xml_system_ext, \
$(target_system_ext_notice_file_txt), \
$(target_system_ext_notice_file_xml), \
"Notices for files contained in the system_ext filesystem image in this directory:", \
$(TARGET_OUT_NOTICE_FILES), \
$(license_modules_system_ext), \
$(exclude_target_dirs)))
$(eval $(call combine-notice-files, xml_odm, \
$(target_odm_notice_file_txt), \
$(target_odm_notice_file_xml), \
"Notices for files contained in the odm filesystem image in this directory:", \
$(TARGET_OUT_NOTICE_FILES), \
$(license_modules_odm), \
$(exclude_target_dirs)))
$(eval $(call combine-notice-files, xml_vendor_dlkm, \
$(target_vendor_dlkm_notice_file_txt), \
$(target_vendor_dlkm_notice_file_xml), \
"Notices for files contained in the vendor_dlkm filesystem image in this directory:", \
$(TARGET_OUT_NOTICE_FILES), \
$(license_modules_vendor_dlkm), \
$(exclude_target_dirs)))
$(eval $(call combine-notice-files, xml_odm_dlkm, \
$(target_odm_dlkm_notice_file_txt), \
$(target_odm_dlkm_notice_file_xml), \
"Notices for files contained in the odm_dlkm filesystem image in this directory:", \
$(TARGET_OUT_NOTICE_FILES), \
$(license_modules_odm_dlkm), \
$(exclude_target_dirs)))
$(eval $(call combine-notice-files, xml_system_dlkm, \
$(target_system_dlkm_notice_file_txt), \
$(target_system_dlkm_notice_file_xml), \
"Notices for files contained in the system_dlkm filesystem image in this directory:", \
$(TARGET_OUT_NOTICE_FILES), \
$(license_modules_system_dlkm), \
$(exclude_target_dirs)))
$(target_notice_file_xml_gz): $(target_notice_file_xml) | $(MINIGZIP)
$(hide) $(MINIGZIP) -9 < $< > $@
$(target_vendor_notice_file_xml_gz): $(target_vendor_notice_file_xml) | $(MINIGZIP)
$(hide) $(MINIGZIP) -9 < $< > $@
$(target_product_notice_file_xml_gz): $(target_product_notice_file_xml) | $(MINIGZIP)
$(hide) $(MINIGZIP) -9 < $< > $@
$(target_system_ext_notice_file_xml_gz): $(target_system_ext_notice_file_xml) | $(MINIGZIP)
$(hide) $(MINIGZIP) -9 < $< > $@
$(target_odm_notice_file_xml_gz): $(target_odm_notice_file_xml) | $(MINIGZIP)
$(hide) $(MINIGZIP) -9 < $< > $@
$(target_vendor_dlkm_notice_file_xml_gz): $(target_vendor_dlkm_notice_file_xml) | $(MINIGZIP)
$(hide) $(MINIGZIP) -9 < $< > $@
$(target_odm_dlkm_notice_file_xml_gz): $(target_odm_dlkm_notice_file_xml) | $(MINIGZIP)
$(hide) $(MINIGZIP) -9 < $< > $@
$(target_system_dlkm_notice_file_xml_gz): $(target_system_dlkm_notice_file_xml) | $(MINIGZIP)
$(hide) $(MINIGZIP) -9 < $< > $@
$(installed_notice_html_or_xml_gz): $(target_notice_file_xml_gz)
$(copy-file-to-target)
$(installed_vendor_notice_xml_gz): $(target_vendor_notice_file_xml_gz)
$(copy-file-to-target)
$(installed_product_notice_xml_gz): $(target_product_notice_file_xml_gz)
$(copy-file-to-target)
$(installed_system_ext_notice_xml_gz): $(target_system_ext_notice_file_xml_gz)
$(copy-file-to-target)
$(installed_odm_notice_xml_gz): $(target_odm_notice_file_xml_gz)
$(copy-file-to-target)
$(installed_vendor_dlkm_notice_xml_gz): $(target_vendor_dlkm_notice_file_xml_gz)
$(copy-file-to-target)
$(installed_odm_dlkm_notice_xml_gz): $(target_odm_dlkm_notice_file_xml_gz)
$(copy-file-to-target)
$(installed_system_dlkm_notice_xml_gz): $(target_system_dlkm_notice_file_xml_gz)
$(copy-file-to-target)
$(call declare-0p-target,$(target_notice_file_xml))
$(call declare-0p-target,$(target_notice_file_xml_gz))
$(call declare-0p-target,$(target_vendor_notice_file_xml))
$(call declare-0p-target,$(target_vendor_notice_file_xml_gz))
$(call declare-0p-target,$(target_product_notice_file_xml))
$(call declare-0p-target,$(target_product_notice_file_xml_gz))
$(call declare-0p-target,$(target_system_ext_notice_file_xml))
$(call declare-0p-target,$(target_system_ext_notice_file_xml_gz))
$(call declare-0p-target,$(target_odm_notice_file_xml))
$(call declare-0p-target,$(target_odm_notice_file_xml_gz))
$(call declare-0p-target,$(target_vendor_dlkm_notice_file_xml))
$(call declare-0p-target,$(target_vendor_dlkm_notice_file_xml_gz))
$(call declare-0p-target,$(target_odm_dlkm_notice_file_xml))
$(call declare-0p-target,$(target_odm_dlkm_notice_file_xml_gz))
$(call declare-0p-target,$(target_system_dlkm_notice_file_xml))
$(call declare-0p-target,$(target_system_dlkm_notice_file_xml_gz))
$(call declare-0p-target,$(installed_notice_html_or_xml_gz))
$(call declare-0p-target,$(installed_vendor_notice_xml_gz))
$(call declare-0p-target,$(installed_product_notice_xml_gz))
$(call declare-0p-target,$(installed_system_ext_notice_xml_gz))
$(call declare-0p-target,$(installed_odm_notice_xml_gz))
$(call declare-0p-target,$(installed_vendor_dlkm_notice_xml_gz))
$(call declare-0p-target,$(installed_odm_dlkm_notice_xml_gz))
$(call declare-0p-target,$(installed_sysetm_dlkm_notice_xml_gz))
ALL_DEFAULT_INSTALLED_MODULES += $(installed_notice_html_or_xml_gz)
ALL_DEFAULT_INSTALLED_MODULES += $(installed_vendor_notice_xml_gz)
ALL_DEFAULT_INSTALLED_MODULES += $(installed_product_notice_xml_gz)
ALL_DEFAULT_INSTALLED_MODULES += $(installed_system_ext_notice_xml_gz)
ALL_DEFAULT_INSTALLED_MODULES += $(installed_odm_notice_xml_gz)
ALL_DEFAULT_INSTALLED_MODULES += $(installed_vendor_dlkm_notice_xml_gz)
ALL_DEFAULT_INSTALLED_MODULES += $(installed_odm_dlkm_notice_xml_gz)
ALL_DEFAULT_INSTALLED_MODULES += $(installed_system_dlkm_notice_xml_gz)
endif # PRODUCT_NOTICE_SPLIT endif # PRODUCT_NOTICE_SPLIT
ALL_DEFAULT_INSTALLED_MODULES += $(installed_notice_html_or_xml_gz) ALL_DEFAULT_INSTALLED_MODULES += $(installed_notice_html_or_xml_gz)
@ -1642,6 +1617,9 @@ endif # TARGET_BUILD_APPS
# then be in the right directory for the find in combine-notice-files to work. # then be in the right directory for the find in combine-notice-files to work.
$(eval $(call copy-one-file,$(BUILD_SYSTEM)/LINUX_KERNEL_COPYING,$(kernel_notice_file))) $(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,))
$(eval $(call copy-one-file,$(BUILD_SYSTEM)/WINPTHREADS_COPYING,$(winpthreads_notice_file))) $(eval $(call copy-one-file,$(BUILD_SYSTEM)/WINPTHREADS_COPYING,$(winpthreads_notice_file)))
@ -2007,6 +1985,8 @@ INTERNAL_RECOVERYIMAGE_FILES := $(filter $(TARGET_RECOVERY_OUT)/%, \
INSTALLED_FILES_FILE_RECOVERY := $(PRODUCT_OUT)/installed-files-recovery.txt INSTALLED_FILES_FILE_RECOVERY := $(PRODUCT_OUT)/installed-files-recovery.txt
INSTALLED_FILES_JSON_RECOVERY := $(INSTALLED_FILES_FILE_RECOVERY:.txt=.json) 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) ifeq ($(BOARD_USES_RECOVERY_AS_BOOT),true)
INSTALLED_BOOTIMAGE_TARGET := $(BUILT_BOOTIMAGE_TARGET) INSTALLED_BOOTIMAGE_TARGET := $(BUILT_BOOTIMAGE_TARGET)
endif endif
@ -2420,6 +2400,11 @@ $(foreach b,$(INSTALLED_BOOTIMAGE_TARGET), $(eval $(call add-dependency,$(b),$(c
$(INSTALLED_BOOTIMAGE_TARGET): $(recoveryimage-deps) $(INSTALLED_BOOTIMAGE_TARGET): $(recoveryimage-deps)
$(call pretty,"Target boot image from recovery: $@") $(call pretty,"Target boot image from recovery: $@")
$(call build-recoveryimage-target, $@, $(PRODUCT_OUT)/$(subst .img,,$(subst boot,kernel,$(notdir $@)))) $(call build-recoveryimage-target, $@, $(PRODUCT_OUT)/$(subst .img,,$(subst boot,kernel,$(notdir $@))))
$(call declare-1p-container,$(INSTALLED_BOOTIMAGE_TARGET),)
$(call declare-container-license-deps,$(INSTALLED_BOOTIMAGE_TARGET),$(recoveryimage-deps),$(PRODUCT_OUT)/:/)
UNMOUNTED_NOTICE_DEPS += $(INSTALLED_BOOTIMAGE_TARGET)
endif # BOARD_USES_RECOVERY_AS_BOOT endif # BOARD_USES_RECOVERY_AS_BOOT
$(INSTALLED_RECOVERYIMAGE_TARGET): $(recoveryimage-deps) $(INSTALLED_RECOVERYIMAGE_TARGET): $(recoveryimage-deps)
@ -2433,6 +2418,12 @@ $(RECOVERY_RESOURCE_ZIP): $(INSTALLED_RECOVERYIMAGE_TARGET) | $(ZIPTIME)
$(remove-timestamps-from-package) $(remove-timestamps-from-package)
endif endif
$(call declare-1p-container,$(INSTALLED_RECOVERYIMAGE_TARGET),)
$(call declare-container-license-deps,$(INSTALLED_RECOVERYIMAGE_TARGET),$(recoveryimage-deps),$(PRODUCT_OUT)/:/)
UNMOUNTED_NOTICE_DEPS += $(INSTALLED_RECOVERYIMAGE_TARGET)
.PHONY: recoveryimage-nodeps .PHONY: recoveryimage-nodeps
recoveryimage-nodeps: recoveryimage-nodeps:
@echo "make $@: ignoring dependencies" @echo "make $@: ignoring dependencies"
@ -2495,6 +2486,8 @@ $(INSTALLED_FILES_FILE_DEBUG_RAMDISK): $(FILESLIST) $(FILESLIST_UTIL)
$(FILESLIST) $(INTERNAL_DEBUG_RAMDISK_SRC_DIRS) > $(@:.txt=.json) $(FILESLIST) $(INTERNAL_DEBUG_RAMDISK_SRC_DIRS) > $(@:.txt=.json)
$(FILESLIST_UTIL) -c $(@:.txt=.json) > $@ $(FILESLIST_UTIL) -c $(@:.txt=.json) > $@
$(eval $(call declare-0p-target,$(INSTALLED_FILES_FILE_DEBUG_RAMDISK)))
ifdef BUILDING_DEBUG_BOOT_IMAGE ifdef BUILDING_DEBUG_BOOT_IMAGE
# ----------------------------------------------------------------- # -----------------------------------------------------------------
@ -2511,6 +2504,11 @@ $(INSTALLED_DEBUG_RAMDISK_TARGET): $(MKBOOTFS) | $(COMPRESSION_COMMAND_DEPS)
$(hide) mkdir -p $(dir $@) $(hide) mkdir -p $(dir $@)
$(MKBOOTFS) -d $(TARGET_OUT) $(INTERNAL_DEBUG_RAMDISK_SRC_DIRS) | $(COMPRESSION_COMMAND) > $@ $(MKBOOTFS) -d $(TARGET_OUT) $(INTERNAL_DEBUG_RAMDISK_SRC_DIRS) | $(COMPRESSION_COMMAND) > $@
$(call declare-1p-container,$(INSTALLED_DEBUG_RAMDISK_TARGET),)
$(call declare-container-license-deps,$(INSTALLED_DEBUG_RAMDISK_TARGET),$(INSTALLED_RAMDISK_TARGET),$(PRODUCT_OUT)/:/)
UNMOUNTED_NOTICE_DEPS += $(INSTALLED_DEBUG_RAMDISK_TARGET)
.PHONY: ramdisk_debug-nodeps .PHONY: ramdisk_debug-nodeps
ramdisk_debug-nodeps: $(MKBOOTFS) | $(COMPRESSION_COMMAND_DEPS) ramdisk_debug-nodeps: $(MKBOOTFS) | $(COMPRESSION_COMMAND_DEPS)
@echo "make $@: ignoring dependencies" @echo "make $@: ignoring dependencies"
@ -2573,6 +2571,11 @@ $(INSTALLED_DEBUG_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INSTALLED_BOOTIMAGE_TARGET)
$(call pretty,"Target boot debug image: $@") $(call pretty,"Target boot debug image: $@")
$(call build-debug-bootimage-target, $@) $(call build-debug-bootimage-target, $@)
$(call declare-1p-container,$(INSTALLED_DEBUG_BOOTIMAGE_TARGET),)
$(call declare-container-license-deps,$(INSTALLED_DEBUG_BOOTIMAGE_TARGET),$(INSTALLED_BOOTIMAGE_TARGET),$(PRODUCT_OUT)/:/)
UNMOUNTED_NOTICE_DEPS += $(INSTALLED_DEBUG_BOOTIMAGE_TARGET)
.PHONY: bootimage_debug-nodeps .PHONY: bootimage_debug-nodeps
bootimage_debug-nodeps: $(MKBOOTIMG) $(AVBTOOL) bootimage_debug-nodeps: $(MKBOOTIMG) $(AVBTOOL)
echo "make $@: ignoring dependencies" echo "make $@: ignoring dependencies"
@ -2617,6 +2620,8 @@ $(INSTALLED_FILES_FILE_VENDOR_DEBUG_RAMDISK): $(FILESLIST) $(FILESLIST_UTIL)
$(FILESLIST) $(INTERNAL_DEBUG_VENDOR_RAMDISK_SRC_DIRS) > $(@:.txt=.json) $(FILESLIST) $(INTERNAL_DEBUG_VENDOR_RAMDISK_SRC_DIRS) > $(@:.txt=.json)
$(FILESLIST_UTIL) -c $(@:.txt=.json) > $@ $(FILESLIST_UTIL) -c $(@:.txt=.json) > $@
$(eval $(call declare-0p-target,$(INSTALLED_FILES_FILE_VENDOR_DEBUG_RAMDISK)))
INTERNAL_VENDOR_DEBUG_RAMDISK_TARGET := $(call intermediates-dir-for,PACKAGING,vendor_boot-debug)/vendor_ramdisk-debug.cpio$(RAMDISK_EXT) INTERNAL_VENDOR_DEBUG_RAMDISK_TARGET := $(call intermediates-dir-for,PACKAGING,vendor_boot-debug)/vendor_ramdisk-debug.cpio$(RAMDISK_EXT)
$(INTERNAL_VENDOR_DEBUG_RAMDISK_TARGET): $(INSTALLED_FILES_FILE_VENDOR_DEBUG_RAMDISK) $(INTERNAL_VENDOR_DEBUG_RAMDISK_TARGET): $(INSTALLED_FILES_FILE_VENDOR_DEBUG_RAMDISK)
@ -2630,6 +2635,11 @@ $(INSTALLED_VENDOR_DEBUG_RAMDISK_TARGET): $(INTERNAL_VENDOR_DEBUG_RAMDISK_TARGET
@echo "Target debug vendor ramdisk: $@" @echo "Target debug vendor ramdisk: $@"
$(copy-file-to-target) $(copy-file-to-target)
$(call declare-1p-container,$(INSTALLED_VENDOR_DEBUG_RAMDISK_TARGET),)
$(call declare-container-license-deps,$(INSTALLED_VENDOR_DEBUG_RAMDISK_TARGET),$(INTERNAL_VENDOR_DEBUG_RAMDISK_TARGET),$(PRODUCT_OUT)/:/)
VENDOR_NOTICE_DEPS += $(INSTALLED_VENDOR_DEBUG_RAMDISK_TARGET)
# ----------------------------------------------------------------- # -----------------------------------------------------------------
# vendor_boot-debug.img. # vendor_boot-debug.img.
INSTALLED_VENDOR_DEBUG_BOOTIMAGE_TARGET := $(PRODUCT_OUT)/vendor_boot-debug.img INSTALLED_VENDOR_DEBUG_BOOTIMAGE_TARGET := $(PRODUCT_OUT)/vendor_boot-debug.img
@ -2660,6 +2670,11 @@ $(INSTALLED_VENDOR_DEBUG_BOOTIMAGE_TARGET): $(INTERNAL_VENDOR_RAMDISK_FRAGMENT_T
$(call assert-max-image-size,$@,$(BOARD_VENDOR_BOOTIMAGE_PARTITION_SIZE)) $(call assert-max-image-size,$@,$(BOARD_VENDOR_BOOTIMAGE_PARTITION_SIZE))
$(if $(BOARD_AVB_VENDOR_BOOT_KEY_PATH),$(call test-key-sign-vendor-bootimage,$@)) $(if $(BOARD_AVB_VENDOR_BOOT_KEY_PATH),$(call test-key-sign-vendor-bootimage,$@))
$(call declare-1p-container,$(INSTALLED_VENDOR_DEBUG_BOOTIMAGE_TARGET),)
$(call declare-container-license-deps,$(INSTALLED_VENDOR_DEBUG_BOOTIMAGE_TARGET),$(INTERNAL_VENDOR_DEBUG_RAMDISK_TARGET),$(PRODUCT_OUT)/:/)
VENDOR_NOTICE_DEPS += $(INSTALLED_VENDOR_DEBUG_BOOTIMAGE_TARGET)
endif # BUILDING_DEBUG_VENDOR_BOOT_IMAGE endif # BUILDING_DEBUG_VENDOR_BOOT_IMAGE
# Appends a few test harness specific properties into the adb_debug.prop. # Appends a few test harness specific properties into the adb_debug.prop.
@ -2708,6 +2723,11 @@ $(INSTALLED_TEST_HARNESS_RAMDISK_TARGET): $(MKBOOTFS) | $(COMPRESSION_COMMAND_DE
$(hide) mkdir -p $(dir $@) $(hide) mkdir -p $(dir $@)
$(MKBOOTFS) -d $(TARGET_OUT) $(INTERNAL_TEST_HARNESS_RAMDISK_SRC_DIRS) | $(COMPRESSION_COMMAND) > $@ $(MKBOOTFS) -d $(TARGET_OUT) $(INTERNAL_TEST_HARNESS_RAMDISK_SRC_DIRS) | $(COMPRESSION_COMMAND) > $@
$(call declare-1p-container,$(INSTALLED_TEST_HARNESS_RAMDISK_TARGET),)
$(call declare-container-license-deps,$(INSTALLED_TEST_HARNESS_RAMDISK_TARGET),$(INTERNAL_TEST_HARNESS_RAMDISK_SRC_DEPS),$(PRODUCT_OUT)/:/)
UNMOUNTED_NOTICE_DEPS += $(INSTALLED_TEST_HARNESS_RAMDISK_TARGET)
.PHONY: ramdisk_test_harness-nodeps .PHONY: ramdisk_test_harness-nodeps
ramdisk_test_harness-nodeps: $(MKBOOTFS) | $(COMPRESSION_COMMAND_DEPS) ramdisk_test_harness-nodeps: $(MKBOOTFS) | $(COMPRESSION_COMMAND_DEPS)
@echo "make $@: ignoring dependencies" @echo "make $@: ignoring dependencies"
@ -2752,6 +2772,11 @@ $(INSTALLED_TEST_HARNESS_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INSTALLED_DEBUG_BOOTI
$(call pretty,"Target boot test harness image: $@") $(call pretty,"Target boot test harness image: $@")
$(call build-boot-test-harness-target,$@) $(call build-boot-test-harness-target,$@)
$(call declare-1p-container,$(INSTALLED_TEST_HARNESS_BOOTIMAGE_TARGET),)
$(call declare-container-license-deps,$(INSTALLED_TEST_HARNESS_BOOTIMAGE_TARGET),$(INSTALLED_DEBUG_BOOTIMAGE_TARGET),$(PRODUCT_OUT)/:/)
UNMOUNTED_NOTICE_DEPS += $(INSTALLED_TEST_HARNESS_BOOTIMAGE_TARGET)
.PHONY: bootimage_test_harness-nodeps .PHONY: bootimage_test_harness-nodeps
bootimage_test_harness-nodeps: $(MKBOOTIMG) $(AVBTOOL) bootimage_test_harness-nodeps: $(MKBOOTIMG) $(AVBTOOL)
echo "make $@: ignoring dependencies" echo "make $@: ignoring dependencies"
@ -2783,6 +2808,11 @@ $(INSTALLED_VENDOR_TEST_HARNESS_RAMDISK_TARGET): $(INTERNAL_VENDOR_TEST_HARNESS_
@echo "Target test harness vendor ramdisk: $@" @echo "Target test harness vendor ramdisk: $@"
$(copy-file-to-target) $(copy-file-to-target)
$(call declare-1p-container,$(INSTALLED_VENDOR_TEST_HARNESS_RAMDISK_TARGET),)
$(call declare-container-license-deps,$(INSTALLED_VENDOR_TEST_HARNESS_RAMDISK_TARGET),$(INTERNAL_VENDOR_TEST_HARNESS_RAMDISK_TARGET),$(PRODUCT_OUT)/:/)
VENDOR_NOTICE_DEPS += $(INSTALLED_VENDOR_TEST_HARNESS_RAMDISK_TARGET)
# ----------------------------------------------------------------- # -----------------------------------------------------------------
# vendor_boot-test-harness.img. # vendor_boot-test-harness.img.
INSTALLED_VENDOR_TEST_HARNESS_BOOTIMAGE_TARGET := $(PRODUCT_OUT)/vendor_boot-test-harness.img INSTALLED_VENDOR_TEST_HARNESS_BOOTIMAGE_TARGET := $(PRODUCT_OUT)/vendor_boot-test-harness.img
@ -2800,6 +2830,11 @@ $(INSTALLED_VENDOR_TEST_HARNESS_BOOTIMAGE_TARGET): $(INTERNAL_VENDOR_RAMDISK_FRA
$(call assert-max-image-size,$@,$(BOARD_VENDOR_BOOTIMAGE_PARTITION_SIZE)) $(call assert-max-image-size,$@,$(BOARD_VENDOR_BOOTIMAGE_PARTITION_SIZE))
$(if $(BOARD_AVB_VENDOR_BOOT_KEY_PATH),$(call test-key-sign-vendor-bootimage,$@)) $(if $(BOARD_AVB_VENDOR_BOOT_KEY_PATH),$(call test-key-sign-vendor-bootimage,$@))
$(call declare-1p-container,$(INSTALLED_VENDOR_TEST_HARNESS_BOOTIMAGE_TARGET),)
$(call declare-container-license-deps,$(INSTALLED_VENDOR_TEST_HARNESS_BOOTIMAGE_TARGET),$(INTERNAL_VENDOR_TEST_HARNESS_RAMDISK_TARGET),$(PRODUCT_OUT)/:/)
VENDOR_NOTICE_DEPS += $(INSTALLED_VENDOR_TEST_HARNESS_BOOTIMAGE_TARGET)
endif # BUILDING_DEBUG_VENDOR_BOOT_IMAGE endif # BUILDING_DEBUG_VENDOR_BOOT_IMAGE
endif # BUILDING_DEBUG_BOOT_IMAGE || BUILDING_DEBUG_VENDOR_BOOT_IMAGE endif # BUILDING_DEBUG_BOOT_IMAGE || BUILDING_DEBUG_VENDOR_BOOT_IMAGE
@ -2962,6 +2997,8 @@ $(INSTALLED_FILES_FILE): $(FULL_SYSTEMIMAGE_DEPS) $(FILESLIST) $(FILESLIST_UTIL)
$(FILESLIST) $(TARGET_OUT) > $(@:.txt=.json) $(FILESLIST) $(TARGET_OUT) > $(@:.txt=.json)
$(FILESLIST_UTIL) -c $(@:.txt=.json) > $@ $(FILESLIST_UTIL) -c $(@:.txt=.json) > $@
$(eval $(call declare-0p-target,$(INSTALLED_FILES_FILE)))
.PHONY: installed-file-list .PHONY: installed-file-list
installed-file-list: $(INSTALLED_FILES_FILE) installed-file-list: $(INSTALLED_FILES_FILE)
@ -2994,7 +3031,7 @@ $(BUILT_SYSTEMIMAGE): $(FULL_SYSTEMIMAGE_DEPS) $(INSTALLED_FILES_FILE)
$(call build-systemimage-target,$@) $(call build-systemimage-target,$@)
$(call declare-1p-container,$(BUILT_SYSTEMIMAGE),system/extras) $(call declare-1p-container,$(BUILT_SYSTEMIMAGE),system/extras)
$(call declare-container-license-deps,$(BUILT_SYSTEMIMAGE),$(FULL_SYSTEMIMAGE_DEPS),$(PRODUCT_OUT)/:) $(call declare-container-license-deps,$(BUILT_SYSTEMIMAGE),$(FULL_SYSTEMIMAGE_DEPS),$(PRODUCT_OUT)/:/)
INSTALLED_SYSTEMIMAGE_TARGET := $(PRODUCT_OUT)/system.img INSTALLED_SYSTEMIMAGE_TARGET := $(PRODUCT_OUT)/system.img
SYSTEMIMAGE_SOURCE_DIR := $(TARGET_OUT) SYSTEMIMAGE_SOURCE_DIR := $(TARGET_OUT)
@ -3042,8 +3079,7 @@ $(call declare-container-license-deps,$(INSTALLED_SYSTEMIMAGE_TARGET),$(BUILT_SY
systemimage: $(INSTALLED_SYSTEMIMAGE_TARGET) systemimage: $(INSTALLED_SYSTEMIMAGE_TARGET)
.PHONY: systemlicense SYSTEM_NOTICE_DEPS += $(INSTALLED_SYSTEMIMAGE_TARGET)
systemlicense: $(call license-metadata-dir)/$(INSTALLED_SYSTEMIMAGE_TARGET).meta_lic reportmissinglicenses
.PHONY: systemimage-nodeps snod .PHONY: systemimage-nodeps snod
systemimage-nodeps snod: $(filter-out systemimage-nodeps snod,$(MAKECMDGOALS)) \ systemimage-nodeps snod: $(filter-out systemimage-nodeps snod,$(MAKECMDGOALS)) \
@ -3100,6 +3136,11 @@ INSTALLED_USERDATAIMAGE_TARGET_DEPS := \
$(INSTALLED_USERDATAIMAGE_TARGET): $(INSTALLED_USERDATAIMAGE_TARGET_DEPS) $(INSTALLED_USERDATAIMAGE_TARGET): $(INSTALLED_USERDATAIMAGE_TARGET_DEPS)
$(build-userdataimage-target) $(build-userdataimage-target)
$(call declare-1p-container,$(INSTALLED_USERDATAIMAGE_TARGET),)
$(call declare-container-license-deps,$(INSTALLED_USERDATAIMAGE_TARGET),$(INSTALLED_USERDATAIMAGE_TARGET_DEPS),$(PRODUCT_OUT)/:/)
UNMOUNTED_NOTICE_DEPS += $(INSTALLED_USERDATAIMAGE_TARGET)
.PHONY: userdataimage-nodeps .PHONY: userdataimage-nodeps
userdataimage-nodeps: | $(INTERNAL_USERIMAGES_DEPS) userdataimage-nodeps: | $(INTERNAL_USERIMAGES_DEPS)
$(build-userdataimage-target) $(build-userdataimage-target)
@ -3147,6 +3188,11 @@ $(BUILT_BPTJSON_TARGET): $(INSTALLED_BPTIMAGE_TARGET)
$(INSTALLED_BPTIMAGE_TARGET): $(BPTTOOL) $(BOARD_BPT_INPUT_FILES) $(INSTALLED_BPTIMAGE_TARGET): $(BPTTOOL) $(BOARD_BPT_INPUT_FILES)
$(build-bptimage-target) $(build-bptimage-target)
$(call declare-1p-container,$(INSTALLED_BPTIMAGE_TARGET),)
$(call declare-container-license-deps,$(INSTALLED_BPTIMAGE_TARGET),$(BOARD_BPT_INPUT_FILES),$(PRODUCT_OUT)/:/)
UNMOUNTED_NOTICE_DEPS += $(INSTALLED_BPTIMAGE_TARGET)
.PHONY: bptimage-nodeps .PHONY: bptimage-nodeps
bptimage-nodeps: bptimage-nodeps:
$(build-bptimage-target) $(build-bptimage-target)
@ -3180,6 +3226,11 @@ INSTALLED_CACHEIMAGE_TARGET := $(BUILT_CACHEIMAGE_TARGET)
$(INSTALLED_CACHEIMAGE_TARGET): $(INTERNAL_USERIMAGES_DEPS) $(INTERNAL_CACHEIMAGE_FILES) $(INSTALLED_CACHEIMAGE_TARGET): $(INTERNAL_USERIMAGES_DEPS) $(INTERNAL_CACHEIMAGE_FILES)
$(build-cacheimage-target) $(build-cacheimage-target)
$(call declare-1p-container,$(INSTALLED_CACHEIMAGE_TARGET),)
$(call declare-container-license-deps,$(INSTALLED_CACHEIMAGE_TARGET),$(INTERNAL_USERIMAGES_DEPS) $(INTERNAL_CACHEIMAGE_FILES),$(PRODUCT_OUT)/:/)
UNMOUNTED_NOTICE_DEPS += $(INSTALLED_CACHEIMAGE_TARGET)
.PHONY: cacheimage-nodeps .PHONY: cacheimage-nodeps
cacheimage-nodeps: | $(INTERNAL_USERIMAGES_DEPS) cacheimage-nodeps: | $(INTERNAL_USERIMAGES_DEPS)
$(build-cacheimage-target) $(build-cacheimage-target)
@ -3219,6 +3270,8 @@ $(INSTALLED_FILES_FILE_SYSTEMOTHER) : $(INTERNAL_SYSTEMOTHERIMAGE_FILES) $(FILES
$(FILESLIST) $(TARGET_OUT_SYSTEM_OTHER) > $(@:.txt=.json) $(FILESLIST) $(TARGET_OUT_SYSTEM_OTHER) > $(@:.txt=.json)
$(FILESLIST_UTIL) -c $(@:.txt=.json) > $@ $(FILESLIST_UTIL) -c $(@:.txt=.json) > $@
$(eval $(call declare-0p-target,$(INSTALLED_FILES_FILE_SYSTEMOTHER)))
# Determines partition size for system_other.img. # Determines partition size for system_other.img.
ifeq ($(PRODUCT_RETROFIT_DYNAMIC_PARTITIONS),true) ifeq ($(PRODUCT_RETROFIT_DYNAMIC_PARTITIONS),true)
ifneq ($(filter system,$(BOARD_SUPER_PARTITION_BLOCK_DEVICES)),) ifneq ($(filter system,$(BOARD_SUPER_PARTITION_BLOCK_DEVICES)),)
@ -3253,6 +3306,11 @@ ifneq (true,$(SANITIZE_LITE))
# Only create system_other when not building the second stage of a SANITIZE_LITE build. # Only create system_other when not building the second stage of a SANITIZE_LITE build.
$(INSTALLED_SYSTEMOTHERIMAGE_TARGET): $(INTERNAL_USERIMAGES_DEPS) $(INTERNAL_SYSTEMOTHERIMAGE_FILES) $(INSTALLED_FILES_FILE_SYSTEMOTHER) $(INSTALLED_SYSTEMOTHERIMAGE_TARGET): $(INTERNAL_USERIMAGES_DEPS) $(INTERNAL_SYSTEMOTHERIMAGE_FILES) $(INSTALLED_FILES_FILE_SYSTEMOTHER)
$(build-systemotherimage-target) $(build-systemotherimage-target)
$(call declare-1p-container,$(INSTALLED_SYSTEMOTHERIMAGE_TARGET),)
$(call declare-container-license-deps,$(INSTALLED_SYSTEMOTHERIMAGE_TARGET),$(INTERNAL_USERIMAGES_DEPS) $(INTERNAL_SYSTEMOTHERIMAGE_FILES),$(PRODUCT_OUT)/:/)
UNMOUNTED_NOTICE_DEPS += $(INSTALLED_SYSTEMOTHERIMAGE_TARGET)
endif endif
.PHONY: systemotherimage-nodeps .PHONY: systemotherimage-nodeps
@ -3303,6 +3361,8 @@ $(INSTALLED_FILES_FILE_VENDOR) : $(INTERNAL_VENDORIMAGE_FILES) $(FILESLIST) $(FI
$(FILESLIST) $(TARGET_OUT_VENDOR) > $(@:.txt=.json) $(FILESLIST) $(TARGET_OUT_VENDOR) > $(@:.txt=.json)
$(FILESLIST_UTIL) -c $(@:.txt=.json) > $@ $(FILESLIST_UTIL) -c $(@:.txt=.json) > $@
$(eval $(call declare-0p-target,$(INSTALLED_FILES_FILE_VENDOR)))
vendorimage_intermediates := \ vendorimage_intermediates := \
$(call intermediates-dir-for,PACKAGING,vendor) $(call intermediates-dir-for,PACKAGING,vendor)
BUILT_VENDORIMAGE_TARGET := $(PRODUCT_OUT)/vendor.img BUILT_VENDORIMAGE_TARGET := $(PRODUCT_OUT)/vendor.img
@ -3327,6 +3387,11 @@ $(INSTALLED_VENDORIMAGE_TARGET): \
$(RECOVERY_FROM_BOOT_PATCH) $(RECOVERY_FROM_BOOT_PATCH)
$(build-vendorimage-target) $(build-vendorimage-target)
VENDOR_NOTICE_DEPS += $(INSTALLED_VENDORIMAGE_TARGET)
$(call declare-1p-container,$(INSTALLED_VENDORIMAGE_TARGET),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 .PHONY: vendorimage-nodeps vnod
vendorimage-nodeps vnod: | $(INTERNAL_USERIMAGES_DEPS) vendorimage-nodeps vnod: | $(INTERNAL_USERIMAGES_DEPS)
$(build-vendorimage-target) $(build-vendorimage-target)
@ -3355,6 +3420,8 @@ $(INSTALLED_FILES_FILE_PRODUCT) : $(INTERNAL_PRODUCTIMAGE_FILES) $(FILESLIST) $(
$(FILESLIST) $(TARGET_OUT_PRODUCT) > $(@:.txt=.json) $(FILESLIST) $(TARGET_OUT_PRODUCT) > $(@:.txt=.json)
$(FILESLIST_UTIL) -c $(@:.txt=.json) > $@ $(FILESLIST_UTIL) -c $(@:.txt=.json) > $@
$(eval $(call declare-0p-target,$(INSTALLED_FILES_FILE_PRODUCT)))
productimage_intermediates := \ productimage_intermediates := \
$(call intermediates-dir-for,PACKAGING,product) $(call intermediates-dir-for,PACKAGING,product)
BUILT_PRODUCTIMAGE_TARGET := $(PRODUCT_OUT)/product.img BUILT_PRODUCTIMAGE_TARGET := $(PRODUCT_OUT)/product.img
@ -3378,6 +3445,11 @@ $(INSTALLED_PRODUCTIMAGE_TARGET): \
$(INSTALLED_FILES_FILE_PRODUCT) $(INSTALLED_FILES_FILE_PRODUCT)
$(build-productimage-target) $(build-productimage-target)
PRODUCT_NOTICE_DEPS += $(INSTALLED_PRODUCTIMAGE_TARGET)
$(call declare-1p-container,$(INSTALLED_PRODUCTIMAGE_TARGET),)
$(call declare-container-license-deps,$(INSTALLED_PRODUCTIMAGE_TARGET),$(INTERNAL_USERIMAGES_DEPS) $(INTERNAL_PRODUCTIMAGE_FILES) $(INSTALLED_FILES_FILE_PRODUCT),$(PRODUCT_OUT)/:/)
.PHONY: productimage-nodeps pnod .PHONY: productimage-nodeps pnod
productimage-nodeps pnod: | $(INTERNAL_USERIMAGES_DEPS) productimage-nodeps pnod: | $(INTERNAL_USERIMAGES_DEPS)
$(build-productimage-target) $(build-productimage-target)
@ -3406,6 +3478,8 @@ $(INSTALLED_FILES_FILE_SYSTEM_EXT) : $(INTERNAL_SYSTEM_EXTIMAGE_FILES) $(FILESLI
$(FILESLIST) $(TARGET_OUT_SYSTEM_EXT) > $(@:.txt=.json) $(FILESLIST) $(TARGET_OUT_SYSTEM_EXT) > $(@:.txt=.json)
$(FILESLIST_UTIL) -c $(@:.txt=.json) > $@ $(FILESLIST_UTIL) -c $(@:.txt=.json) > $@
$(eval $(call declare-0p-target,$(INSTALLED_FILES_FILE_SYSTEM_EXT)))
system_extimage_intermediates := \ system_extimage_intermediates := \
$(call intermediates-dir-for,PACKAGING,system_ext) $(call intermediates-dir-for,PACKAGING,system_ext)
BUILT_SYSTEM_EXTIMAGE_TARGET := $(PRODUCT_OUT)/system_ext.img BUILT_SYSTEM_EXTIMAGE_TARGET := $(PRODUCT_OUT)/system_ext.img
@ -3431,6 +3505,11 @@ $(INSTALLED_SYSTEM_EXTIMAGE_TARGET): \
$(INSTALLED_FILES_FILE_SYSTEM_EXT) $(INSTALLED_FILES_FILE_SYSTEM_EXT)
$(build-system_extimage-target) $(build-system_extimage-target)
SYSTEM_EXT_NOTICE_DEPS += $(INSTALLED_SYSTEM_EXTIMAGE_TARGET)
$(call declare-1p-container,$(INSTALLED_SYSTEM_EXTIMAGE_TARGET),)
$(call declare-container-license-deps,$(INSTALLED_SYSTEM_EXTIMAGE_TARGET),$(INTERNAL_USERIMAGES_DEPS) $(INTERNAL_SYSTEM_EXTIMAGE_FILES) $(INSTALLED_FILES_FILE_SYSTEM_EXT),$(PRODUCT_OUT)/:/)
.PHONY: systemextimage-nodeps senod .PHONY: systemextimage-nodeps senod
systemextimage-nodeps senod: | $(INTERNAL_USERIMAGES_DEPS) systemextimage-nodeps senod: | $(INTERNAL_USERIMAGES_DEPS)
$(build-system_extimage-target) $(build-system_extimage-target)
@ -3477,6 +3556,8 @@ $(INSTALLED_FILES_FILE_ODM) : $(INTERNAL_ODMIMAGE_FILES) $(FILESLIST) $(FILESLIS
$(FILESLIST) $(TARGET_OUT_ODM) > $(@:.txt=.json) $(FILESLIST) $(TARGET_OUT_ODM) > $(@:.txt=.json)
$(FILESLIST_UTIL) -c $(@:.txt=.json) > $@ $(FILESLIST_UTIL) -c $(@:.txt=.json) > $@
$(eval $(call declare-0p-target,$(INSTALLED_FILES_FILE_ODM)))
odmimage_intermediates := \ odmimage_intermediates := \
$(call intermediates-dir-for,PACKAGING,odm) $(call intermediates-dir-for,PACKAGING,odm)
BUILT_ODMIMAGE_TARGET := $(PRODUCT_OUT)/odm.img BUILT_ODMIMAGE_TARGET := $(PRODUCT_OUT)/odm.img
@ -3501,6 +3582,11 @@ $(INSTALLED_ODMIMAGE_TARGET): \
$(INSTALLED_FILES_FILE_ODM) $(INSTALLED_FILES_FILE_ODM)
$(build-odmimage-target) $(build-odmimage-target)
ODM_NOTICE_DEPS += $(INSTALLED_ODMIMAGE_TARGET)
$(call declare-1p-container,$(INSTALLED_ODMIMAGE_TARGET),)
$(call declare-container-license-deps,$(INSTALLED_ODMIMAGE_TARGET),$(INTERNAL_USERIMAGES_DEPS) $(INTERNAL_ODMIMAGE_FILES) $(INSTALLED_FILES_FILE_ODM),$(PRODUCT_OUT)/:/)
.PHONY: odmimage-nodeps onod .PHONY: odmimage-nodeps onod
odmimage-nodeps onod: | $(INTERNAL_USERIMAGES_DEPS) odmimage-nodeps onod: | $(INTERNAL_USERIMAGES_DEPS)
$(build-odmimage-target) $(build-odmimage-target)
@ -3529,6 +3615,8 @@ $(INSTALLED_FILES_FILE_VENDOR_DLKM) : $(INTERNAL_VENDOR_DLKMIMAGE_FILES) $(FILES
$(FILESLIST) $(TARGET_OUT_VENDOR_DLKM) > $(@:.txt=.json) $(FILESLIST) $(TARGET_OUT_VENDOR_DLKM) > $(@:.txt=.json)
$(FILESLIST_UTIL) -c $(@:.txt=.json) > $@ $(FILESLIST_UTIL) -c $(@:.txt=.json) > $@
$(eval $(call declare-0p-target,$(INSTALLED_FILES_FILE_VENDOR_DLKM)))
vendor_dlkmimage_intermediates := \ vendor_dlkmimage_intermediates := \
$(call intermediates-dir-for,PACKAGING,vendor_dlkm) $(call intermediates-dir-for,PACKAGING,vendor_dlkm)
BUILT_VENDOR_DLKMIMAGE_TARGET := $(PRODUCT_OUT)/vendor_dlkm.img BUILT_VENDOR_DLKMIMAGE_TARGET := $(PRODUCT_OUT)/vendor_dlkm.img
@ -3553,6 +3641,11 @@ $(INSTALLED_VENDOR_DLKMIMAGE_TARGET): \
$(INSTALLED_FILES_FILE_VENDOR_DLKM) $(INSTALLED_FILES_FILE_VENDOR_DLKM)
$(build-vendor_dlkmimage-target) $(build-vendor_dlkmimage-target)
VENDOR_DLKM_NOTICE_DEPS += $(INSTALLED_VENDOR_DLKMIMAGE_TARGET)
$(call declare-1p-container,$(INSTALLED_VENDOR_DLKMIMAGE_TARGET),)
$(call declare-container-license-deps,$(INSTALLED_VENDOR_DLKMIMAGE_TARGET),$(INTERNAL_USERIMAGES_DEPS) $(INTERNAL_VENDOR_DLKMIMAGE_FILES) $(INSTALLED_FILES_FILE_VENDOR_DLKM),$(PRODUCT_OUT)/:/)
.PHONY: vendor_dlkmimage-nodeps vdnod .PHONY: vendor_dlkmimage-nodeps vdnod
vendor_dlkmimage-nodeps vdnod: | $(INTERNAL_USERIMAGES_DEPS) vendor_dlkmimage-nodeps vdnod: | $(INTERNAL_USERIMAGES_DEPS)
$(build-vendor_dlkmimage-target) $(build-vendor_dlkmimage-target)
@ -3581,6 +3674,8 @@ $(INSTALLED_FILES_FILE_ODM_DLKM) : $(INTERNAL_ODM_DLKMIMAGE_FILES) $(FILESLIST)
$(FILESLIST) $(TARGET_OUT_ODM_DLKM) > $(@:.txt=.json) $(FILESLIST) $(TARGET_OUT_ODM_DLKM) > $(@:.txt=.json)
$(FILESLIST_UTIL) -c $(@:.txt=.json) > $@ $(FILESLIST_UTIL) -c $(@:.txt=.json) > $@
$(eval $(call declare-0p-target,$(INSTALLED_FILES_FILE_ODM_DLKM)))
odm_dlkmimage_intermediates := \ odm_dlkmimage_intermediates := \
$(call intermediates-dir-for,PACKAGING,odm_dlkm) $(call intermediates-dir-for,PACKAGING,odm_dlkm)
BUILT_ODM_DLKMIMAGE_TARGET := $(PRODUCT_OUT)/odm_dlkm.img BUILT_ODM_DLKMIMAGE_TARGET := $(PRODUCT_OUT)/odm_dlkm.img
@ -3605,6 +3700,11 @@ $(INSTALLED_ODM_DLKMIMAGE_TARGET): \
$(INSTALLED_FILES_FILE_ODM_DLKM) $(INSTALLED_FILES_FILE_ODM_DLKM)
$(build-odm_dlkmimage-target) $(build-odm_dlkmimage-target)
ODM_DLKM_NOTICE_DEPS += $(INSTALLED_ODM_DLKMIMAGE_TARGET)
$(call declare-1p-container,$(INSTALLED_ODM_DLKMIMAGE_TARGET),)
$(call declare-container-license-deps,$(INSTALLED_ODM_DLKMIMAGE_TARGET),$(INTERNAL_USERIMAGES_DEPS) $(INTERNAL_ODM_DLKMIMAGE_FILES) $(INSTALLED_FILES_FILE_ODM_DLKM),$(PRODUCT_OUT)/:/)
.PHONY: odm_dlkmimage-nodeps odnod .PHONY: odm_dlkmimage-nodeps odnod
odm_dlkmimage-nodeps odnod: | $(INTERNAL_USERIMAGES_DEPS) odm_dlkmimage-nodeps odnod: | $(INTERNAL_USERIMAGES_DEPS)
$(build-odm_dlkmimage-target) $(build-odm_dlkmimage-target)
@ -3636,6 +3736,8 @@ $(INSTALLED_FILES_FILE_SYSTEM_DLKM): $(INTERNAL_SYSTEM_DLKMIMAGE_FILES) $(FILESL
$(FILESLIST) $(TARGET_OUT_SYSTEM_DLKM) > $(@:.txt=.json) $(FILESLIST) $(TARGET_OUT_SYSTEM_DLKM) > $(@:.txt=.json)
$(FILESLIST_UTIL) -c $(@:.txt=.json) > $@ $(FILESLIST_UTIL) -c $(@:.txt=.json) > $@
$(eval $(call declare-0p-target,$(INSTALLED_FILES_FILE_SYSTEM_DLKM)))
system_dlkmimage_intermediates := \ system_dlkmimage_intermediates := \
$(call intermediates-dir-for,PACKAGING,system_dlkm) $(call intermediates-dir-for,PACKAGING,system_dlkm)
BUILT_SYSTEM_DLKMIMAGE_TARGET := $(PRODUCT_OUT)/system_dlkm.img BUILT_SYSTEM_DLKMIMAGE_TARGET := $(PRODUCT_OUT)/system_dlkm.img
@ -3684,6 +3786,11 @@ $(INSTALLED_DTBOIMAGE_TARGET): $(BOARD_PREBUILT_DTBOIMAGE) $(AVBTOOL) $(BOARD_AV
$(call get-partition-size-argument,$(BOARD_DTBOIMG_PARTITION_SIZE)) \ $(call get-partition-size-argument,$(BOARD_DTBOIMG_PARTITION_SIZE)) \
--partition_name dtbo $(INTERNAL_AVB_DTBO_SIGNING_ARGS) \ --partition_name dtbo $(INTERNAL_AVB_DTBO_SIGNING_ARGS) \
$(BOARD_AVB_DTBO_ADD_HASH_FOOTER_ARGS) $(BOARD_AVB_DTBO_ADD_HASH_FOOTER_ARGS)
$(call declare-1p-container,$(INSTALLED_DTBOIMAGE_TARGET),)
$(call declare-container-license-deps,$(INSTALLED_DTBOIMAGE_TARGET),$(BOARD_PREBUILT_DTBOIMAGE),$(PRODUCT_OUT)/:/)
UNMOUNTED_NOTICE_DEPS += $(INSTALLED_DTBOIMAGE_TARGET)
else else
$(INSTALLED_DTBOIMAGE_TARGET): $(BOARD_PREBUILT_DTBOIMAGE) $(INSTALLED_DTBOIMAGE_TARGET): $(BOARD_PREBUILT_DTBOIMAGE)
cp $(BOARD_PREBUILT_DTBOIMAGE) $@ cp $(BOARD_PREBUILT_DTBOIMAGE) $@
@ -3713,6 +3820,11 @@ $(INSTALLED_PVMFWIMAGE_TARGET): $(PREBUILT_PVMFWIMAGE_TARGET) $(AVBTOOL) $(BOARD
$(call get-partition-size-argument,$(BOARD_PVMFWIMAGE_PARTITION_SIZE)) \ $(call get-partition-size-argument,$(BOARD_PVMFWIMAGE_PARTITION_SIZE)) \
--partition_name pvmfw $(INTERNAL_AVB_PVMFW_SIGNING_ARGS) \ --partition_name pvmfw $(INTERNAL_AVB_PVMFW_SIGNING_ARGS) \
$(BOARD_AVB_PVMFW_ADD_HASH_FOOTER_ARGS) $(BOARD_AVB_PVMFW_ADD_HASH_FOOTER_ARGS)
$(call declare-1p-container,$(INSTALLED_PVMFWIMAGE_TARGET),)
$(call declare-container-license-deps,$(INSTALLED_PVMFWIMAGE_TARGET),$(PREBUILT_PVMFWIMAGE_TARGET),$(PRODUCT_OUT)/:/)
UNMOUNTED_NOTICE_DEPS += $(INSTALLED_PVMFWIMAGE_TARGET)
else else
$(eval $(call copy-one-file,$(PREBUILT_PVMFWIMAGE_TARGET),$(INSTALLED_PVMFWIMAGE_TARGET))) $(eval $(call copy-one-file,$(PREBUILT_PVMFWIMAGE_TARGET),$(INSTALLED_PVMFWIMAGE_TARGET)))
endif endif
@ -3800,6 +3912,8 @@ $(INSTALLED_PRODUCT_SYSTEM_OTHER_AVBKEY_TARGET): $(AVBTOOL) $(BOARD_AVB_SYSTEM_O
@mkdir -p $(dir $@) @mkdir -p $(dir $@)
$(AVBTOOL) extract_public_key --key $(BOARD_AVB_SYSTEM_OTHER_KEY_PATH) --output $@ $(AVBTOOL) extract_public_key --key $(BOARD_AVB_SYSTEM_OTHER_KEY_PATH) --output $@
$(eval $(call declare-0p-target,$(INSTALLED_PRODUCT_SYSTEM_OTHER_AVBKEY_TARGET),))
ifndef BOARD_AVB_SYSTEM_OTHER_ROLLBACK_INDEX ifndef BOARD_AVB_SYSTEM_OTHER_ROLLBACK_INDEX
BOARD_AVB_SYSTEM_OTHER_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP) BOARD_AVB_SYSTEM_OTHER_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
endif endif
@ -4206,6 +4320,10 @@ $(INSTALLED_VBMETA_SYSTEMIMAGE_TARGET): \
$(call images-for-partitions,$(BOARD_AVB_VBMETA_SYSTEM)) \ $(call images-for-partitions,$(BOARD_AVB_VBMETA_SYSTEM)) \
$(BOARD_AVB_VBMETA_SYSTEM_KEY_PATH) $(BOARD_AVB_VBMETA_SYSTEM_KEY_PATH)
$(call build-chained-vbmeta-image,vbmeta_system) $(call build-chained-vbmeta-image,vbmeta_system)
$(call declare-1p-container,$(INSTALLED_VBMETA_SYSTEMIMAGE_TARGET),)
SYSTEM_NOTICE_DEPS += $(INSTALLED_VBMETA_SYSTEMIMAGE_TARGET)
endif endif
endif # BUILDING_SYSTEM_IMAGE endif # BUILDING_SYSTEM_IMAGE
@ -4216,6 +4334,10 @@ $(INSTALLED_VBMETA_VENDORIMAGE_TARGET): \
$(call images-for-partitions,$(BOARD_AVB_VBMETA_VENDOR)) \ $(call images-for-partitions,$(BOARD_AVB_VBMETA_VENDOR)) \
$(BOARD_AVB_VBMETA_VENDOR_KEY_PATH) $(BOARD_AVB_VBMETA_VENDOR_KEY_PATH)
$(call build-chained-vbmeta-image,vbmeta_vendor) $(call build-chained-vbmeta-image,vbmeta_vendor)
$(call declare-1p-container,$(INSTALLED_VBMETA_VENDORIMAGE_TARGET),)
UNMOUNTED_NOTICE_DEPS += $(INSTALLED_VBMETA_VENDORIMAGE_TARGET)
endif endif
define build-vbmetaimage-target define build-vbmetaimage-target
@ -4259,6 +4381,10 @@ $(INSTALLED_VBMETAIMAGE_TARGET): \
$(BOARD_AVB_KEY_PATH) $(BOARD_AVB_KEY_PATH)
$(build-vbmetaimage-target) $(build-vbmetaimage-target)
$(call declare-1p-container,$(INSTALLED_VBMETAIMAGE_TARGET),)
UNMOUNTED_NOTICE_DEPS += $(INSTALLED_VBMETAIMAGE_TARGET)
.PHONY: vbmetaimage-nodeps .PHONY: vbmetaimage-nodeps
vbmetaimage-nodeps: PRIVATE_AVB_VBMETA_SIGNING_ARGS := \ vbmetaimage-nodeps: PRIVATE_AVB_VBMETA_SIGNING_ARGS := \
--algorithm $(BOARD_AVB_ALGORITHM) --key $(BOARD_AVB_KEY_PATH) --algorithm $(BOARD_AVB_ALGORITHM) --key $(BOARD_AVB_KEY_PATH)
@ -5009,6 +5135,8 @@ ifeq ($(TARGET_FLATTEN_APEX),false)
$(hide) echo "target_flatten_apex=false" >> $@ $(hide) echo "target_flatten_apex=false" >> $@
endif endif
$(call declare-0p-target,$(INSTALLED_MISC_INFO_TARGET))
.PHONY: misc_info .PHONY: misc_info
misc_info: $(INSTALLED_MISC_INFO_TARGET) misc_info: $(INSTALLED_MISC_INFO_TARGET)
@ -6150,6 +6278,8 @@ $(INSTALLED_SUPERIMAGE_EMPTY_TARGET): $(LPMAKE) $(BUILD_SUPER_IMAGE)
$(call dist-for-goals,dist_files,$(INSTALLED_SUPERIMAGE_EMPTY_TARGET)) $(call dist-for-goals,dist_files,$(INSTALLED_SUPERIMAGE_EMPTY_TARGET))
$(call declare-0p-target,$(INSTALLED_SUPERIMAGE_EMPTY_TARGET))
endif # BUILDING_SUPER_EMPTY_IMAGE endif # BUILDING_SUPER_EMPTY_IMAGE
@ -6519,3 +6649,11 @@ $(call dist-for-goals,haiku-java,$(SOONG_JAVA_FUZZ_PACKAGING_ARCH_MODULES))
.PHONY: haiku-rust .PHONY: haiku-rust
haiku-rust: $(SOONG_RUST_FUZZ_PACKAGING_ARCH_MODULES) $(ALL_RUST_FUZZ_TARGETS) haiku-rust: $(SOONG_RUST_FUZZ_PACKAGING_ARCH_MODULES) $(ALL_RUST_FUZZ_TARGETS)
$(call dist-for-goals,haiku-rust,$(SOONG_RUST_FUZZ_PACKAGING_ARCH_MODULES)) $(call dist-for-goals,haiku-rust,$(SOONG_RUST_FUZZ_PACKAGING_ARCH_MODULES))
# -----------------------------------------------------------------
# OS Licensing
include $(BUILD_SYSTEM)/os_licensing.mk
# When appending new code to this file, please insert above OS Licensing

View file

@ -580,9 +580,12 @@ endef
# License metadata targets corresponding to targets in $(1) # License metadata targets corresponding to targets in $(1)
########################################################### ###########################################################
define corresponding-license-metadata define corresponding-license-metadata
$(strip $(eval _dir := $(call license-metadata-dir)) \ $(strip $(foreach target, $(sort $(1)), \
$(foreach target, $(sort $(1)), $(_dir)/$(target).meta_lic) \ $(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 license-metadata-dir)/$(target).meta_lic))))
endef endef
########################################################### ###########################################################
@ -868,9 +871,11 @@ endef
define report-missing-licenses-rule define report-missing-licenses-rule
.PHONY: reportmissinglicenses .PHONY: reportmissinglicenses
reportmissinglicenses: PRIVATE_NON_MODULES:=$(sort $(NON_MODULES_WITHOUT_LICENSE_METADATA)) 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: reportmissinglicenses:
@echo Reporting $$(words $$(PRIVATE_NON_MODULES)) targets without license metadata @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_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;)
endef endef

171
core/os_licensing.mk Normal file
View file

@ -0,0 +1,171 @@
.PHONY: systemlicense
systemlicense: $(call corresponding-license-metadata, $(SYSTEM_NOTICE_DEPS)) reportmissinglicenses
ifneq (,$(SYSTEM_NOTICE_DEPS))
SYSTEM_NOTICE_DEPS += $(UNMOUNTED_NOTICE_DEPS)
ifneq ($(PRODUCT_NOTICE_SPLIT),true)
$(eval $(call html-notice-rule,$(target_notice_file_html_gz),"System image",$(system_notice_file_message),$(SYSTEM_NOTICE_DEPS),$(SYSTEM_NOTICE_DEPS)))
$(installed_notice_html_or_xml_gz): $(target_notice_file_html_gz)
$(copy-file-to-target)
else
$(eval $(call xml-notice-rule,$(target_notice_file_xml_gz),"System image",$(system_notice_file_message),$(SYSTEM_NOTICE_DEPS),$(SYSTEM_NOTICE_DEPS)))
$(eval $(call text-notice-rule,$(target_notice_file_txt),"System image",$(system_notice_file_message),$(SYSTEM_NOTICE_DEPS),$(SYSTEM_NOTICE_DEPS)))
$(installed_notice_html_or_xml_gz): $(target_notice_file_xml_gz)
$(copy-file-to-target)
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
vendorlicense: $(call corresponding-license-metadata, $(VENDOR_NOTICE_DEPS)) reportmissinglicenses
ifneq (,$(VENDOR_NOTICE_DEPS))
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)))
$(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)))
$(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
odmlicense: $(call corresponding-license-metadata, $(ODM_NOTICE_DEPS)) reportmissinglicenses
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)))
$(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)))
$(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
oemlicense: $(call corresponding-license-metadata, $(OEM_NOTICE_DEPS)) reportmissinglicenses
.PHONY: productlicense
productlicense: $(call corresponding-license-metadata, $(PRODUCT_NOTICE_DEPS)) reportmissinglicenses
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)))
$(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)))
$(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
systemextlicense: $(call corresponding-license-metadata, $(SYSTEM_EXT_NOTICE_DEPS)) reportmissinglicenses
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)))
$(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)))
$(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
vendor_dlkmlicense: $(call corresponding-license-metadata, $(VENDOR_DLKM_NOTICE_DEPS)) reportmissinglicenses
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)))
$(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)))
$(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
odm_dlkmlicense: $(call corresponding-license-metadata, $(ODM_DLKM_NOTICE_DEPS)) reportmissinglicenses
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)))
$(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)))
$(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
system_dlkmlicense: $(call corresponding-license-metadata, $(SYSTEM_DLKM_NOTICE_DEPS)) reportmissinglicenses
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)))
$(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)))
$(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

View file

@ -321,6 +321,8 @@ $(eval $(call build-properties,\
$(empty),\ $(empty),\
$(empty))) $(empty)))
$(eval $(call declare-1p-target,$(INSTALLED_BUILD_PROP_TARGET)))
# ----------------------------------------------------------------- # -----------------------------------------------------------------
# vendor/build.prop # vendor/build.prop
# #
@ -359,6 +361,8 @@ $(eval $(call build-properties,\
$(empty),\ $(empty),\
$(empty))) $(empty)))
$(eval $(call declare-1p-target,$(INSTALLED_VENDOR_BUILD_PROP_TARGET)))
# ----------------------------------------------------------------- # -----------------------------------------------------------------
# product/etc/build.prop # product/etc/build.prop
# #
@ -411,6 +415,8 @@ $(eval $(call build-properties,\
$(_footers_),\ $(_footers_),\
$(_skip_common_properties))) $(_skip_common_properties)))
$(eval $(call declare-1p-target,$(INSTALLED_PRODUCT_BUILD_PROP_TARGET)))
_skip_common_properties := _skip_common_properties :=
# ---------------------------------------------------------------- # ----------------------------------------------------------------
@ -436,6 +442,8 @@ $(eval $(call build-properties,\
$(empty),\ $(empty),\
$(empty))) $(empty)))
$(eval $(call declare-1p-target,$(INSTALLED_ODM_BUILD_PROP_TARGET)))
# ---------------------------------------------------------------- # ----------------------------------------------------------------
# vendor_dlkm/etc/build.prop # vendor_dlkm/etc/build.prop
# #
@ -450,6 +458,8 @@ $(eval $(call build-properties,\
$(empty),\ $(empty),\
$(empty))) $(empty)))
$(eval $(call declare-1p-target,$(INSTALLED_VENDOR_DLKM_BUILD_PROP_TARGET)))
# ---------------------------------------------------------------- # ----------------------------------------------------------------
# odm_dlkm/etc/build.prop # odm_dlkm/etc/build.prop
# #
@ -464,6 +474,8 @@ $(eval $(call build-properties,\
$(empty),\ $(empty),\
$(empty))) $(empty)))
$(eval $(call declare-1p-target,$(INSTALLED_ODM_DLKM_BUILD_PROP_TARGET)))
# ---------------------------------------------------------------- # ----------------------------------------------------------------
# system_dlkm/build.prop # system_dlkm/build.prop
# #
@ -478,6 +490,8 @@ $(eval $(call build-properties,\
$(empty),\ $(empty),\
$(empty))) $(empty)))
$(eval $(call declare-1p-target,$(INSTALLED_SYSTEM_DLKM_BUILD_PROP_TARGET)))
# ----------------------------------------------------------------- # -----------------------------------------------------------------
# system_ext/etc/build.prop # system_ext/etc/build.prop
# #
@ -499,6 +513,8 @@ $(eval $(call build-properties,\
$(empty),\ $(empty),\
$(empty))) $(empty)))
$(eval $(call declare-1p-target,$(INSTALLED_SYSTEM_EXT_BUILD_PROP_TARGET)))
# ---------------------------------------------------------------- # ----------------------------------------------------------------
# ramdisk/boot/etc/build.prop # ramdisk/boot/etc/build.prop
# #
@ -513,3 +529,5 @@ $(eval $(call build-properties,\
$(empty),\ $(empty),\
$(empty),\ $(empty),\
$(empty))) $(empty)))
$(eval $(call declare-1p-target,$(INSTALLED_RAMDISK_BUILD_PROP_TARGET)))