Merge "build: Add vendor.prop and odm.prop capability"

This commit is contained in:
Treehugger Robot 2020-02-18 21:45:08 +00:00 committed by Gerrit Code Review
commit 6ed2deb9d5
1 changed files with 34 additions and 2 deletions

View File

@ -501,6 +501,12 @@ $(INSTALLED_BUILD_PROP_TARGET): $(intermediate_system_build_prop)
INSTALLED_VENDOR_BUILD_PROP_TARGET := $(TARGET_OUT_VENDOR)/build.prop
ALL_DEFAULT_INSTALLED_MODULES += $(INSTALLED_VENDOR_BUILD_PROP_TARGET)
ifdef TARGET_VENDOR_PROP
vendor_prop_files := $(TARGET_VENDOR_PROP)
else
vendor_prop_files := $(wildcard $(TARGET_DEVICE_DIR)/vendor.prop)
endif
ifdef property_overrides_split_enabled
FINAL_VENDOR_BUILD_PROPERTIES += \
$(call collapse-pairs, $(PRODUCT_PROPERTY_OVERRIDES))
@ -508,7 +514,7 @@ FINAL_VENDOR_BUILD_PROPERTIES := $(call uniq-pairs-by-first-component, \
$(FINAL_VENDOR_BUILD_PROPERTIES),=)
endif # property_overrides_split_enabled
$(INSTALLED_VENDOR_BUILD_PROP_TARGET): $(BUILDINFO_COMMON_SH) $(POST_PROCESS_PROPS) $(intermediate_system_build_prop)
$(INSTALLED_VENDOR_BUILD_PROP_TARGET): $(BUILDINFO_COMMON_SH) $(POST_PROCESS_PROPS) $(intermediate_system_build_prop) $(vendor_prop_files)
@echo Target vendor buildinfo: $@
@mkdir -p $(dir $@)
$(hide) echo > $@
@ -544,6 +550,16 @@ endif
echo "#" >> $@;
$(hide) cat $(INSTALLED_ANDROID_INFO_TXT_TARGET) | grep 'require version-' | sed -e 's/require version-/ro.build.expect./g' >> $@
ifdef property_overrides_split_enabled
$(hide) $(foreach file,$(vendor_prop_files), \
if [ -f "$(file)" ]; then \
echo Target vendor properties from: "$(file)"; \
echo "" >> $@; \
echo "#" >> $@; \
echo "# from $(file)" >> $@; \
echo "#" >> $@; \
cat $(file) >> $@; \
echo "# end of $(file)" >> $@; \
fi;)
$(hide) $(foreach line,$(FINAL_VENDOR_BUILD_PROPERTIES), \
echo "$(line)" >> $@;)
endif # property_overrides_split_enabled
@ -595,12 +611,18 @@ endif # BOARD_USES_PRODUCTIMAGE
INSTALLED_ODM_BUILD_PROP_TARGET := $(TARGET_OUT_ODM)/etc/build.prop
ALL_DEFAULT_INSTALLED_MODULES += $(INSTALLED_ODM_BUILD_PROP_TARGET)
ifdef TARGET_ODM_PROP
odm_prop_files := $(TARGET_ODM_PROP)
else
odm_prop_files := $(wildcard $(TARGET_DEVICE_DIR)/odm.prop)
endif
FINAL_ODM_BUILD_PROPERTIES += \
$(call collapse-pairs, $(PRODUCT_ODM_PROPERTIES))
FINAL_ODM_BUILD_PROPERTIES := $(call uniq-pairs-by-first-component, \
$(FINAL_ODM_BUILD_PROPERTIES),=)
$(INSTALLED_ODM_BUILD_PROP_TARGET): $(BUILDINFO_COMMON_SH) $(POST_PROCESS_PROPS)
$(INSTALLED_ODM_BUILD_PROP_TARGET): $(BUILDINFO_COMMON_SH) $(POST_PROCESS_PROPS) $(odm_prop_files)
@echo Target odm buildinfo: $@
@mkdir -p $(dir $@)
$(hide) echo > $@
@ -608,6 +630,16 @@ $(INSTALLED_ODM_BUILD_PROP_TARGET): $(BUILDINFO_COMMON_SH) $(POST_PROCESS_PROPS)
$(hide) echo ro.odm.product.cpu.abilist32="$(TARGET_CPU_ABI_LIST_32_BIT)">>$@
$(hide) echo ro.odm.product.cpu.abilist64="$(TARGET_CPU_ABI_LIST_64_BIT)">>$@
$(hide) $(call generate-common-build-props,odm,$@)
$(hide) $(foreach file,$(odm_prop_files), \
if [ -f "$(file)" ]; then \
echo Target odm properties from: "$(file)"; \
echo "" >> $@; \
echo "#" >> $@; \
echo "# from $(file)" >> $@; \
echo "#" >> $@; \
cat $(file) >> $@; \
echo "# end of $(file)" >> $@; \
fi;)
$(hide) echo "#" >> $@; \
echo "# ADDITIONAL ODM BUILD PROPERTIES" >> $@; \
echo "#" >> $@;