Split board-specific system properties into vendor partition
Test: building succeeded and tested on sailfish-userdebug Bug: 35696968 Change-Id: Ia1e8013411da36583fbf0d2115c54ca5d5980e20
This commit is contained in:
parent
7e48403012
commit
4e3fcca9fd
3 changed files with 20 additions and 6 deletions
|
@ -234,6 +234,7 @@ $(strip $(subst _,-, $(firstword $(1))))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
BUILDINFO_SH := build/tools/buildinfo.sh
|
BUILDINFO_SH := build/tools/buildinfo.sh
|
||||||
|
VENDOR_BUILDINFO_SH := build/tools/vendor_buildinfo.sh
|
||||||
|
|
||||||
# TARGET_BUILD_FLAVOR and ro.build.flavor are used only by the test harness to distinguish builds.
|
# TARGET_BUILD_FLAVOR and ro.build.flavor are used only by the test harness to distinguish builds.
|
||||||
TARGET_BUILD_FLAVOR := $(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT)
|
TARGET_BUILD_FLAVOR := $(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT)
|
||||||
|
@ -246,7 +247,7 @@ system_prop_file := $(TARGET_SYSTEM_PROP)
|
||||||
else
|
else
|
||||||
system_prop_file := $(wildcard $(TARGET_DEVICE_DIR)/system.prop)
|
system_prop_file := $(wildcard $(TARGET_DEVICE_DIR)/system.prop)
|
||||||
endif
|
endif
|
||||||
$(intermediate_system_build_prop): $(BUILDINFO_SH) $(INTERNAL_BUILD_ID_MAKEFILE) $(BUILD_SYSTEM)/version_defaults.mk $(system_prop_file) $(INSTALLED_ANDROID_INFO_TXT_TARGET)
|
$(intermediate_system_build_prop): $(VENDOR_BUILDINFO_SH) $(BUILDINFO_SH) $(INTERNAL_BUILD_ID_MAKEFILE) $(BUILD_SYSTEM)/version_defaults.mk $(system_prop_file) $(INSTALLED_ANDROID_INFO_TXT_TARGET)
|
||||||
@echo Target buildinfo: $@
|
@echo Target buildinfo: $@
|
||||||
@mkdir -p $(dir $@)
|
@mkdir -p $(dir $@)
|
||||||
$(hide) echo > $@
|
$(hide) echo > $@
|
||||||
|
@ -281,10 +282,8 @@ endif
|
||||||
PLATFORM_VERSION_CODENAME="$(PLATFORM_VERSION_CODENAME)" \
|
PLATFORM_VERSION_CODENAME="$(PLATFORM_VERSION_CODENAME)" \
|
||||||
PLATFORM_VERSION_ALL_CODENAMES="$(PLATFORM_VERSION_ALL_CODENAMES)" \
|
PLATFORM_VERSION_ALL_CODENAMES="$(PLATFORM_VERSION_ALL_CODENAMES)" \
|
||||||
BUILD_VERSION_TAGS="$(BUILD_VERSION_TAGS)" \
|
BUILD_VERSION_TAGS="$(BUILD_VERSION_TAGS)" \
|
||||||
TARGET_BOOTLOADER_BOARD_NAME="$(TARGET_BOOTLOADER_BOARD_NAME)" \
|
|
||||||
BUILD_FINGERPRINT="$(BUILD_FINGERPRINT_FROM_FILE)" \
|
BUILD_FINGERPRINT="$(BUILD_FINGERPRINT_FROM_FILE)" \
|
||||||
$(if $(OEM_THUMBPRINT_PROPERTIES),BUILD_THUMBPRINT="$(BUILD_THUMBPRINT)") \
|
$(if $(OEM_THUMBPRINT_PROPERTIES),BUILD_THUMBPRINT="$(BUILD_THUMBPRINT)") \
|
||||||
TARGET_BOARD_PLATFORM="$(TARGET_BOARD_PLATFORM)" \
|
|
||||||
TARGET_CPU_ABI_LIST="$(TARGET_CPU_ABI_LIST)" \
|
TARGET_CPU_ABI_LIST="$(TARGET_CPU_ABI_LIST)" \
|
||||||
TARGET_CPU_ABI_LIST_32_BIT="$(TARGET_CPU_ABI_LIST_32_BIT)" \
|
TARGET_CPU_ABI_LIST_32_BIT="$(TARGET_CPU_ABI_LIST_32_BIT)" \
|
||||||
TARGET_CPU_ABI_LIST_64_BIT="$(TARGET_CPU_ABI_LIST_64_BIT)" \
|
TARGET_CPU_ABI_LIST_64_BIT="$(TARGET_CPU_ABI_LIST_64_BIT)" \
|
||||||
|
@ -292,6 +291,11 @@ endif
|
||||||
TARGET_CPU_ABI2="$(TARGET_CPU_ABI2)" \
|
TARGET_CPU_ABI2="$(TARGET_CPU_ABI2)" \
|
||||||
TARGET_AAPT_CHARACTERISTICS="$(TARGET_AAPT_CHARACTERISTICS)" \
|
TARGET_AAPT_CHARACTERISTICS="$(TARGET_AAPT_CHARACTERISTICS)" \
|
||||||
bash $(BUILDINFO_SH) >> $@
|
bash $(BUILDINFO_SH) >> $@
|
||||||
|
ifndef vendor_build_property_overrides_split_enabled
|
||||||
|
$(hide) TARGET_BOOTLOADER_BOARD_NAME="$(TARGET_BOOTLOADER_BOARD_NAME)" \
|
||||||
|
TARGET_BOARD_PLATFORM="$(TARGET_BOARD_PLATFORM)" \
|
||||||
|
bash $(VENDOR_BUILDINFO_SH) >> $@
|
||||||
|
endif
|
||||||
$(hide) $(foreach file,$(system_prop_file), \
|
$(hide) $(foreach file,$(system_prop_file), \
|
||||||
if [ -f "$(file)" ]; then \
|
if [ -f "$(file)" ]; then \
|
||||||
echo "#" >> $@; \
|
echo "#" >> $@; \
|
||||||
|
@ -340,7 +344,7 @@ FINAL_VENDOR_BUILD_PROPERTIES := $(call uniq-pairs-by-first-component, \
|
||||||
$(FINAL_VENDOR_BUILD_PROPERTIES),=)
|
$(FINAL_VENDOR_BUILD_PROPERTIES),=)
|
||||||
endif # vendor_build_property_overrides_split_enabled
|
endif # vendor_build_property_overrides_split_enabled
|
||||||
|
|
||||||
$(INSTALLED_VENDOR_BUILD_PROP_TARGET):
|
$(INSTALLED_VENDOR_BUILD_PROP_TARGET): $(VENDOR_BUILDINFO_SH)
|
||||||
@echo Target vendor buildinfo: $@
|
@echo Target vendor buildinfo: $@
|
||||||
@mkdir -p $(dir $@)
|
@mkdir -p $(dir $@)
|
||||||
$(hide) echo > $@
|
$(hide) echo > $@
|
||||||
|
@ -348,6 +352,9 @@ $(INSTALLED_VENDOR_BUILD_PROP_TARGET):
|
||||||
$(hide) echo ro.vendor.build.date.utc=`$(DATE_FROM_FILE) +%s`>>$@
|
$(hide) echo ro.vendor.build.date.utc=`$(DATE_FROM_FILE) +%s`>>$@
|
||||||
$(hide) echo ro.vendor.build.fingerprint="$(BUILD_FINGERPRINT_FROM_FILE)">>$@
|
$(hide) echo ro.vendor.build.fingerprint="$(BUILD_FINGERPRINT_FROM_FILE)">>$@
|
||||||
ifdef vendor_build_property_overrides_split_enabled
|
ifdef vendor_build_property_overrides_split_enabled
|
||||||
|
$(hide) TARGET_BOOTLOADER_BOARD_NAME="$(TARGET_BOOTLOADER_BOARD_NAME)" \
|
||||||
|
TARGET_BOARD_PLATFORM="$(TARGET_BOARD_PLATFORM)" \
|
||||||
|
bash $(VENDOR_BUILDINFO_SH) >> $@
|
||||||
$(hide) echo "#" >> $@; \
|
$(hide) echo "#" >> $@; \
|
||||||
echo "# ADDITIONAL VENDOR BUILD PROPERTIES" >> $@; \
|
echo "# ADDITIONAL VENDOR BUILD PROPERTIES" >> $@; \
|
||||||
echo "#" >> $@;
|
echo "#" >> $@;
|
||||||
|
|
|
@ -30,7 +30,6 @@ echo "ro.product.model=$PRODUCT_MODEL"
|
||||||
echo "ro.product.brand=$PRODUCT_BRAND"
|
echo "ro.product.brand=$PRODUCT_BRAND"
|
||||||
echo "ro.product.name=$PRODUCT_NAME"
|
echo "ro.product.name=$PRODUCT_NAME"
|
||||||
echo "ro.product.device=$TARGET_DEVICE"
|
echo "ro.product.device=$TARGET_DEVICE"
|
||||||
echo "ro.product.board=$TARGET_BOOTLOADER_BOARD_NAME"
|
|
||||||
|
|
||||||
# These values are deprecated, use "ro.product.cpu.abilist"
|
# These values are deprecated, use "ro.product.cpu.abilist"
|
||||||
# instead (see below).
|
# instead (see below).
|
||||||
|
@ -49,7 +48,6 @@ if [ -n "$PRODUCT_DEFAULT_LOCALE" ] ; then
|
||||||
echo "ro.product.locale=$PRODUCT_DEFAULT_LOCALE"
|
echo "ro.product.locale=$PRODUCT_DEFAULT_LOCALE"
|
||||||
fi
|
fi
|
||||||
echo "ro.wifi.channels=$PRODUCT_DEFAULT_WIFI_CHANNELS"
|
echo "ro.wifi.channels=$PRODUCT_DEFAULT_WIFI_CHANNELS"
|
||||||
echo "ro.board.platform=$TARGET_BOARD_PLATFORM"
|
|
||||||
|
|
||||||
echo "# ro.build.product is obsolete; use ro.product.device"
|
echo "# ro.build.product is obsolete; use ro.product.device"
|
||||||
echo "ro.build.product=$TARGET_DEVICE"
|
echo "ro.build.product=$TARGET_DEVICE"
|
||||||
|
|
9
tools/vendor_buildinfo.sh
Executable file
9
tools/vendor_buildinfo.sh
Executable file
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "# begin build properties"
|
||||||
|
echo "# autogenerated by vendor_buildinfo.sh"
|
||||||
|
|
||||||
|
echo "ro.product.board=$TARGET_BOOTLOADER_BOARD_NAME"
|
||||||
|
echo "ro.board.platform=$TARGET_BOARD_PLATFORM"
|
||||||
|
|
||||||
|
echo "# end build properties"
|
Loading…
Reference in a new issue