| Jiyong Park | e134686 | 2020-05-18 14:31:30 +0900 | [diff] [blame] | 1 | # | 
|  | 2 | # Copyright (C) 2020 The Android Open Source Project | 
|  | 3 | # | 
|  | 4 | # Licensed under the Apache License, Version 2.0 (the "License"); | 
|  | 5 | # you may not use this file except in compliance with the License. | 
|  | 6 | # You may obtain a copy of the License at | 
|  | 7 | # | 
|  | 8 | #      http://www.apache.org/licenses/LICENSE-2.0 | 
|  | 9 | # | 
|  | 10 | # Unless required by applicable law or agreed to in writing, software | 
|  | 11 | # distributed under the License is distributed on an "AS IS" BASIS, | 
|  | 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 
|  | 13 | # See the License for the specific language governing permissions and | 
|  | 14 | # limitations under the License. | 
|  | 15 | # | 
|  | 16 |  | 
| Jiyong Park | c0bd8c7 | 2020-06-29 10:46:22 +0900 | [diff] [blame] | 17 | # sysprop.mk defines rules for generating <partition>/[etc/]build.prop files | 
| Jiyong Park | e134686 | 2020-05-18 14:31:30 +0900 | [diff] [blame] | 18 |  | 
|  | 19 | # ----------------------------------------------------------------- | 
|  | 20 | # property_overrides_split_enabled | 
|  | 21 | property_overrides_split_enabled := | 
|  | 22 | ifeq ($(BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED), true) | 
|  | 23 | property_overrides_split_enabled := true | 
|  | 24 | endif | 
|  | 25 |  | 
| Jiyong Park | e134686 | 2020-05-18 14:31:30 +0900 | [diff] [blame] | 26 | BUILDINFO_SH := build/make/tools/buildinfo.sh | 
| Jiyong Park | ae55638 | 2020-05-20 18:33:43 +0900 | [diff] [blame] | 27 | POST_PROCESS_PROPS := $(HOST_OUT_EXECUTABLES)/post_process_props$(HOST_EXECUTABLE_SUFFIX) | 
| Jiyong Park | e134686 | 2020-05-18 14:31:30 +0900 | [diff] [blame] | 28 |  | 
| Jiyong Park | 35a83d1 | 2020-05-26 02:01:05 +0900 | [diff] [blame] | 29 | # Emits a set of sysprops common to all partitions to a file. | 
| Jiyong Park | e134686 | 2020-05-18 14:31:30 +0900 | [diff] [blame] | 30 | # $(1): Partition name | 
|  | 31 | # $(2): Output file name | 
|  | 32 | define generate-common-build-props | 
| Jiyong Park | 35a83d1 | 2020-05-26 02:01:05 +0900 | [diff] [blame] | 33 | echo "####################################" >> $(2);\ | 
|  | 34 | echo "# from generate-common-build-props" >> $(2);\ | 
|  | 35 | echo "# These properties identify this partition image." >> $(2);\ | 
|  | 36 | echo "####################################" >> $(2);\ | 
|  | 37 | $(if $(filter system,$(1)),\ | 
|  | 38 | echo "ro.product.$(1).brand=$(PRODUCT_SYSTEM_BRAND)" >> $(2);\ | 
|  | 39 | echo "ro.product.$(1).device=$(PRODUCT_SYSTEM_DEVICE)" >> $(2);\ | 
|  | 40 | echo "ro.product.$(1).manufacturer=$(PRODUCT_SYSTEM_MANUFACTURER)" >> $(2);\ | 
|  | 41 | echo "ro.product.$(1).model=$(PRODUCT_SYSTEM_MODEL)" >> $(2);\ | 
|  | 42 | echo "ro.product.$(1).name=$(PRODUCT_SYSTEM_NAME)" >> $(2);\ | 
|  | 43 | ,\ | 
|  | 44 | echo "ro.product.$(1).brand=$(PRODUCT_BRAND)" >> $(2);\ | 
|  | 45 | echo "ro.product.$(1).device=$(TARGET_DEVICE)" >> $(2);\ | 
|  | 46 | echo "ro.product.$(1).manufacturer=$(PRODUCT_MANUFACTURER)" >> $(2);\ | 
|  | 47 | echo "ro.product.$(1).model=$(PRODUCT_MODEL)" >> $(2);\ | 
|  | 48 | echo "ro.product.$(1).name=$(TARGET_PRODUCT)" >> $(2);\ | 
| Prashant Patil | 7d9cda1 | 2022-09-28 15:52:08 +0100 | [diff] [blame] | 49 | # Attestation specific properties for AOSP/GSI build running on device. | 
| wufei3 | 99fafae | 2023-08-09 14:00:58 +0800 | [diff] [blame] | 50 | if [ -n "$(strip $(PRODUCT_MODEL_FOR_ATTESTATION))" ]; then \ | 
|  | 51 | echo "ro.product.model_for_attestation=$(PRODUCT_MODEL_FOR_ATTESTATION)" >> $(2);\ | 
|  | 52 | fi; \ | 
|  | 53 | if [ -n "$(strip $(PRODUCT_BRAND_FOR_ATTESTATION))" ]; then \ | 
|  | 54 | echo "ro.product.brand_for_attestation=$(PRODUCT_BRAND_FOR_ATTESTATION)" >> $(2);\ | 
|  | 55 | fi; \ | 
|  | 56 | if [ -n "$(strip $(PRODUCT_NAME_FOR_ATTESTATION))" ]; then \ | 
|  | 57 | echo "ro.product.name_for_attestation=$(PRODUCT_NAME_FOR_ATTESTATION)" >> $(2);\ | 
|  | 58 | fi; \ | 
|  | 59 | if [ -n "$(strip $(PRODUCT_DEVICE_FOR_ATTESTATION))" ]; then \ | 
|  | 60 | echo "ro.product.device_for_attestation=$(PRODUCT_DEVICE_FOR_ATTESTATION)" >> $(2);\ | 
|  | 61 | fi; \ | 
|  | 62 | if [ -n "$(strip $(PRODUCT_MANUFACTURER_FOR_ATTESTATION))" ]; then \ | 
|  | 63 | echo "ro.product.manufacturer_for_attestation=$(PRODUCT_MANUFACTURER_FOR_ATTESTATION)" >> $(2);\ | 
|  | 64 | fi; \ | 
| Jiyong Park | 35a83d1 | 2020-05-26 02:01:05 +0900 | [diff] [blame] | 65 | )\ | 
| Christopher Ferris | 66b6fd6 | 2022-04-08 15:20:23 -0700 | [diff] [blame] | 66 | $(if $(filter true,$(ZYGOTE_FORCE_64)),\ | 
|  | 67 | $(if $(filter vendor,$(1)),\ | 
|  | 68 | echo "ro.$(1).product.cpu.abilist=$(TARGET_CPU_ABI_LIST_64_BIT)" >> $(2);\ | 
|  | 69 | echo "ro.$(1).product.cpu.abilist32=" >> $(2);\ | 
|  | 70 | echo "ro.$(1).product.cpu.abilist64=$(TARGET_CPU_ABI_LIST_64_BIT)" >> $(2);\ | 
|  | 71 | )\ | 
|  | 72 | ,\ | 
|  | 73 | $(if $(filter system vendor odm,$(1)),\ | 
|  | 74 | echo "ro.$(1).product.cpu.abilist=$(TARGET_CPU_ABI_LIST)" >> $(2);\ | 
|  | 75 | echo "ro.$(1).product.cpu.abilist32=$(TARGET_CPU_ABI_LIST_32_BIT)" >> $(2);\ | 
|  | 76 | echo "ro.$(1).product.cpu.abilist64=$(TARGET_CPU_ABI_LIST_64_BIT)" >> $(2);\ | 
|  | 77 | )\ | 
| SzuWei Lin | baf5c81 | 2020-12-31 16:59:27 +0800 | [diff] [blame] | 78 | )\ | 
| Jiyong Park | 35a83d1 | 2020-05-26 02:01:05 +0900 | [diff] [blame] | 79 | echo "ro.$(1).build.date=`$(DATE_FROM_FILE)`" >> $(2);\ | 
|  | 80 | echo "ro.$(1).build.date.utc=`$(DATE_FROM_FILE) +%s`" >> $(2);\ | 
| Tiffany Yang | 19450e3 | 2023-05-23 17:36:54 -0700 | [diff] [blame] | 81 | # Allow optional assignments for ARC forward-declarations (b/249168657) | 
|  | 82 | # TODO: Remove any tag-related inconsistencies once the goals from | 
|  | 83 | # go/arc-android-sigprop-changes have been achieved. | 
|  | 84 | echo "ro.$(1).build.fingerprint?=$(BUILD_FINGERPRINT_FROM_FILE)" >> $(2);\ | 
|  | 85 | echo "ro.$(1).build.id?=$(BUILD_ID)" >> $(2);\ | 
|  | 86 | echo "ro.$(1).build.tags?=$(BUILD_VERSION_TAGS)" >> $(2);\ | 
| Jiyong Park | 35a83d1 | 2020-05-26 02:01:05 +0900 | [diff] [blame] | 87 | echo "ro.$(1).build.type=$(TARGET_BUILD_VARIANT)" >> $(2);\ | 
|  | 88 | echo "ro.$(1).build.version.incremental=$(BUILD_NUMBER_FROM_FILE)" >> $(2);\ | 
| Tianjie | e88ac67 | 2020-10-15 17:22:48 -0700 | [diff] [blame] | 89 | echo "ro.$(1).build.version.release=$(PLATFORM_VERSION_LAST_STABLE)" >> $(2);\ | 
|  | 90 | echo "ro.$(1).build.version.release_or_codename=$(PLATFORM_VERSION)" >> $(2);\ | 
| Jiyong Park | 35a83d1 | 2020-05-26 02:01:05 +0900 | [diff] [blame] | 91 | echo "ro.$(1).build.version.sdk=$(PLATFORM_SDK_VERSION)" >> $(2);\ | 
| Jiyong Park | e134686 | 2020-05-18 14:31:30 +0900 | [diff] [blame] | 92 |  | 
| Jiyong Park | e134686 | 2020-05-18 14:31:30 +0900 | [diff] [blame] | 93 | endef | 
|  | 94 |  | 
| Jiyong Park | c0bd8c7 | 2020-06-29 10:46:22 +0900 | [diff] [blame] | 95 | # Rule for generating <partition>/[etc/]build.prop file | 
| Jiyong Park | e28fa80 | 2020-05-26 00:21:20 +0900 | [diff] [blame] | 96 | # | 
|  | 97 | # $(1): partition name | 
|  | 98 | # $(2): path to the output | 
|  | 99 | # $(3): path to the input *.prop files. The contents of the files are directly | 
|  | 100 | #       emitted to the output | 
|  | 101 | # $(4): list of variable names each of which contains name=value pairs | 
|  | 102 | # $(5): optional list of prop names to force remove from the output. Properties from both | 
| Alexander Mishkovets | 5a6bc22 | 2020-11-11 15:25:37 +0100 | [diff] [blame] | 103 | #       $(3) and (4) are affected | 
|  | 104 | # $(6): optional list of files to append at the end. The content of each file is emitted | 
|  | 105 | #       to the output | 
| Oleksiy Avramchenko | d3d0f7d | 2020-12-15 14:38:32 +0100 | [diff] [blame] | 106 | # $(7): optional flag to skip common properties generation | 
| Jiyong Park | e28fa80 | 2020-05-26 00:21:20 +0900 | [diff] [blame] | 107 | define build-properties | 
|  | 108 | ALL_DEFAULT_INSTALLED_MODULES += $(2) | 
|  | 109 |  | 
| Jiyong Park | d721e87 | 2020-06-22 17:30:57 +0900 | [diff] [blame] | 110 | $(eval # Properties can be assigned using `prop ?= value` or `prop = value` syntax.) | 
|  | 111 | $(eval # Eliminate spaces around the ?= and = separators.) | 
| Jiyong Park | e28fa80 | 2020-05-26 00:21:20 +0900 | [diff] [blame] | 112 | $(foreach name,$(strip $(4)),\ | 
| Jiyong Park | d721e87 | 2020-06-22 17:30:57 +0900 | [diff] [blame] | 113 | $(eval _temp := $$(call collapse-pairs,$$($(name)),?=))\ | 
|  | 114 | $(eval _resolved_$(name) := $$(call collapse-pairs,$$(_temp),=))\ | 
| Jiyong Park | e28fa80 | 2020-05-26 00:21:20 +0900 | [diff] [blame] | 115 | ) | 
|  | 116 |  | 
| Jiyong Park | 0b4fccb | 2020-06-26 17:38:00 +0900 | [diff] [blame] | 117 | $(eval # Implement the legacy behavior when BUILD_BROKEN_DUP_SYSPROP is on.) | 
|  | 118 | $(eval # Optional assignments are all converted to normal assignments and) | 
|  | 119 | $(eval # when their duplicates the first one wins) | 
|  | 120 | $(if $(filter true,$(BUILD_BROKEN_DUP_SYSPROP)),\ | 
|  | 121 | $(foreach name,$(strip $(4)),\ | 
|  | 122 | $(eval _temp := $$(subst ?=,=,$$(_resolved_$(name))))\ | 
|  | 123 | $(eval _resolved_$(name) := $$(call uniq-pairs-by-first-component,$$(_resolved_$(name)),=))\ | 
|  | 124 | )\ | 
|  | 125 | $(eval _option := --allow-dup)\ | 
| Jiyong Park | e28fa80 | 2020-05-26 00:21:20 +0900 | [diff] [blame] | 126 | ) | 
|  | 127 |  | 
| Inseob Kim | 2a70ea0 | 2021-06-09 17:36:08 +0900 | [diff] [blame] | 128 | $(2): $(POST_PROCESS_PROPS) $(INTERNAL_BUILD_ID_MAKEFILE) $(3) $(6) | 
| Jiyong Park | e28fa80 | 2020-05-26 00:21:20 +0900 | [diff] [blame] | 129 | $(hide) echo Building $$@ | 
|  | 130 | $(hide) mkdir -p $$(dir $$@) | 
|  | 131 | $(hide) rm -f $$@ && touch $$@ | 
| Oleksiy Avramchenko | d3d0f7d | 2020-12-15 14:38:32 +0100 | [diff] [blame] | 132 | ifneq ($(strip $(7)), true) | 
| Jiyong Park | e28fa80 | 2020-05-26 00:21:20 +0900 | [diff] [blame] | 133 | $(hide) $$(call generate-common-build-props,$(call to-lower,$(strip $(1))),$$@) | 
| Oleksiy Avramchenko | d3d0f7d | 2020-12-15 14:38:32 +0100 | [diff] [blame] | 134 | endif | 
| Jiyong Park | e28fa80 | 2020-05-26 00:21:20 +0900 | [diff] [blame] | 135 | $(hide) $(foreach file,$(strip $(3)),\ | 
|  | 136 | if [ -f "$(file)" ]; then\ | 
|  | 137 | echo "" >> $$@;\ | 
|  | 138 | echo "####################################" >> $$@;\ | 
|  | 139 | echo "# from $(file)" >> $$@;\ | 
|  | 140 | echo "####################################" >> $$@;\ | 
|  | 141 | cat $(file) >> $$@;\ | 
|  | 142 | fi;) | 
|  | 143 | $(hide) $(foreach name,$(strip $(4)),\ | 
|  | 144 | echo "" >> $$@;\ | 
|  | 145 | echo "####################################" >> $$@;\ | 
|  | 146 | echo "# from variable $(name)" >> $$@;\ | 
|  | 147 | echo "####################################" >> $$@;\ | 
|  | 148 | $$(foreach line,$$(_resolved_$(name)),\ | 
|  | 149 | echo "$$(line)" >> $$@;\ | 
|  | 150 | )\ | 
|  | 151 | ) | 
| Justin Yun | 07ceaa7 | 2021-04-02 16:29:06 +0900 | [diff] [blame] | 152 | $(hide) $(POST_PROCESS_PROPS) $$(_option) --sdk-version $(PLATFORM_SDK_VERSION) $$@ $(5) | 
| Alexander Mishkovets | 5a6bc22 | 2020-11-11 15:25:37 +0100 | [diff] [blame] | 153 | $(hide) $(foreach file,$(strip $(6)),\ | 
|  | 154 | if [ -f "$(file)" ]; then\ | 
|  | 155 | cat $(file) >> $$@;\ | 
|  | 156 | fi;) | 
| Jiyong Park | e28fa80 | 2020-05-26 00:21:20 +0900 | [diff] [blame] | 157 | $(hide) echo "# end of file" >> $$@ | 
| Bob Badour | e9bdbc5 | 2022-03-10 11:31:07 -0800 | [diff] [blame] | 158 |  | 
| Bob Badour | 1d31e2d | 2023-03-01 10:31:25 -0800 | [diff] [blame] | 159 | $(call declare-1p-target,$(2)) | 
| Jiyong Park | e28fa80 | 2020-05-26 00:21:20 +0900 | [diff] [blame] | 160 | endef | 
|  | 161 |  | 
| Jiyong Park | e134686 | 2020-05-18 14:31:30 +0900 | [diff] [blame] | 162 | # ----------------------------------------------------------------- | 
| Jiyong Park | bb26c6f | 2020-05-26 03:18:36 +0900 | [diff] [blame] | 163 | # Define fingerprint, thumbprint, and version tags for the current build | 
| Jiyong Park | e28fa80 | 2020-05-26 00:21:20 +0900 | [diff] [blame] | 164 | # | 
| Jiyong Park | bb26c6f | 2020-05-26 03:18:36 +0900 | [diff] [blame] | 165 | # BUILD_VERSION_TAGS is a comma-separated list of tags chosen by the device | 
|  | 166 | # implementer that further distinguishes the build. It's basically defined | 
|  | 167 | # by the device implementer. Here, we are adding a mandatory tag that | 
|  | 168 | # identifies the signing config of the build. | 
| Jiyong Park | e134686 | 2020-05-18 14:31:30 +0900 | [diff] [blame] | 169 | BUILD_VERSION_TAGS := $(BUILD_VERSION_TAGS) | 
|  | 170 | ifeq ($(TARGET_BUILD_TYPE),debug) | 
|  | 171 | BUILD_VERSION_TAGS += debug | 
|  | 172 | endif | 
|  | 173 | # The "test-keys" tag marks builds signed with the old test keys, | 
|  | 174 | # which are available in the SDK.  "dev-keys" marks builds signed with | 
|  | 175 | # non-default dev keys (usually private keys from a vendor directory). | 
|  | 176 | # Both of these tags will be removed and replaced with "release-keys" | 
|  | 177 | # when the target-files is signed in a post-build step. | 
|  | 178 | ifeq ($(DEFAULT_SYSTEM_DEV_CERTIFICATE),build/make/target/product/security/testkey) | 
|  | 179 | BUILD_KEYS := test-keys | 
|  | 180 | else | 
|  | 181 | BUILD_KEYS := dev-keys | 
|  | 182 | endif | 
|  | 183 | BUILD_VERSION_TAGS += $(BUILD_KEYS) | 
|  | 184 | BUILD_VERSION_TAGS := $(subst $(space),$(comma),$(sort $(BUILD_VERSION_TAGS))) | 
|  | 185 |  | 
| Jiyong Park | bb26c6f | 2020-05-26 03:18:36 +0900 | [diff] [blame] | 186 | # BUILD_FINGERPRINT is used used to uniquely identify the combined build and | 
|  | 187 | # product; used by the OTA server. | 
| Jiyong Park | e134686 | 2020-05-18 14:31:30 +0900 | [diff] [blame] | 188 | ifeq (,$(strip $(BUILD_FINGERPRINT))) | 
|  | 189 | ifeq ($(strip $(HAS_BUILD_NUMBER)),false) | 
|  | 190 | BF_BUILD_NUMBER := $(BUILD_USERNAME)$$($(DATE_FROM_FILE) +%m%d%H%M) | 
|  | 191 | else | 
| Jeongik Cha | 8a64fb1 | 2023-06-09 11:51:18 +0900 | [diff] [blame] | 192 | BF_BUILD_NUMBER := $(BUILD_NUMBER_FROM_FILE) | 
| Jiyong Park | e134686 | 2020-05-18 14:31:30 +0900 | [diff] [blame] | 193 | endif | 
|  | 194 | BUILD_FINGERPRINT := $(PRODUCT_BRAND)/$(TARGET_PRODUCT)/$(TARGET_DEVICE):$(PLATFORM_VERSION)/$(BUILD_ID)/$(BF_BUILD_NUMBER):$(TARGET_BUILD_VARIANT)/$(BUILD_VERSION_TAGS) | 
|  | 195 | endif | 
|  | 196 | # unset it for safety. | 
|  | 197 | BF_BUILD_NUMBER := | 
|  | 198 |  | 
|  | 199 | BUILD_FINGERPRINT_FILE := $(PRODUCT_OUT)/build_fingerprint.txt | 
|  | 200 | ifneq (,$(shell mkdir -p $(PRODUCT_OUT) && echo $(BUILD_FINGERPRINT) >$(BUILD_FINGERPRINT_FILE) && grep " " $(BUILD_FINGERPRINT_FILE))) | 
|  | 201 | $(error BUILD_FINGERPRINT cannot contain spaces: "$(file <$(BUILD_FINGERPRINT_FILE))") | 
|  | 202 | endif | 
|  | 203 | BUILD_FINGERPRINT_FROM_FILE := $$(cat $(BUILD_FINGERPRINT_FILE)) | 
|  | 204 | # unset it for safety. | 
|  | 205 | BUILD_FINGERPRINT := | 
|  | 206 |  | 
| Jiyong Park | bb26c6f | 2020-05-26 03:18:36 +0900 | [diff] [blame] | 207 | # BUILD_THUMBPRINT is used to uniquely identify the system build; used by the | 
|  | 208 | # OTA server. This purposefully excludes any product-specific variables. | 
| Jiyong Park | e134686 | 2020-05-18 14:31:30 +0900 | [diff] [blame] | 209 | ifeq (,$(strip $(BUILD_THUMBPRINT))) | 
|  | 210 | BUILD_THUMBPRINT := $(PLATFORM_VERSION)/$(BUILD_ID)/$(BUILD_NUMBER_FROM_FILE):$(TARGET_BUILD_VARIANT)/$(BUILD_VERSION_TAGS) | 
|  | 211 | endif | 
|  | 212 |  | 
|  | 213 | BUILD_THUMBPRINT_FILE := $(PRODUCT_OUT)/build_thumbprint.txt | 
| Jeongik Cha | 05210f9 | 2023-04-27 11:05:22 +0900 | [diff] [blame] | 214 | ifeq ($(strip $(HAS_BUILD_NUMBER)),true) | 
|  | 215 | $(BUILD_THUMBPRINT_FILE): $(BUILD_NUMBER_FILE) | 
|  | 216 | endif | 
| Jiyong Park | e134686 | 2020-05-18 14:31:30 +0900 | [diff] [blame] | 217 | ifneq (,$(shell mkdir -p $(PRODUCT_OUT) && echo $(BUILD_THUMBPRINT) >$(BUILD_THUMBPRINT_FILE) && grep " " $(BUILD_THUMBPRINT_FILE))) | 
|  | 218 | $(error BUILD_THUMBPRINT cannot contain spaces: "$(file <$(BUILD_THUMBPRINT_FILE))") | 
|  | 219 | endif | 
|  | 220 | BUILD_THUMBPRINT_FROM_FILE := $$(cat $(BUILD_THUMBPRINT_FILE)) | 
|  | 221 | # unset it for safety. | 
|  | 222 | BUILD_THUMBPRINT := | 
|  | 223 |  | 
| Jiyong Park | bb26c6f | 2020-05-26 03:18:36 +0900 | [diff] [blame] | 224 | # ----------------------------------------------------------------- | 
|  | 225 | # Define human readable strings that describe this build | 
|  | 226 | # | 
| Jiyong Park | e134686 | 2020-05-18 14:31:30 +0900 | [diff] [blame] | 227 |  | 
| Jiyong Park | bb26c6f | 2020-05-26 03:18:36 +0900 | [diff] [blame] | 228 | # BUILD_ID: detail info; has the same info as the build fingerprint | 
|  | 229 | BUILD_DESC := $(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT) $(PLATFORM_VERSION) $(BUILD_ID) $(BUILD_NUMBER_FROM_FILE) $(BUILD_VERSION_TAGS) | 
|  | 230 |  | 
|  | 231 | # BUILD_DISPLAY_ID is shown under Settings -> About Phone | 
| Jiyong Park | e134686 | 2020-05-18 14:31:30 +0900 | [diff] [blame] | 232 | ifeq ($(TARGET_BUILD_VARIANT),user) | 
|  | 233 | # User builds should show: | 
|  | 234 | # release build number or branch.buld_number non-release builds | 
|  | 235 |  | 
|  | 236 | # Dev. branches should have DISPLAY_BUILD_NUMBER set | 
|  | 237 | ifeq (true,$(DISPLAY_BUILD_NUMBER)) | 
|  | 238 | BUILD_DISPLAY_ID := $(BUILD_ID).$(BUILD_NUMBER_FROM_FILE) $(BUILD_KEYS) | 
|  | 239 | else | 
|  | 240 | BUILD_DISPLAY_ID := $(BUILD_ID) $(BUILD_KEYS) | 
|  | 241 | endif | 
|  | 242 | else | 
|  | 243 | # Non-user builds should show detailed build information | 
| Jiyong Park | bb26c6f | 2020-05-26 03:18:36 +0900 | [diff] [blame] | 244 | BUILD_DISPLAY_ID := $(BUILD_DESC) | 
| Jiyong Park | e134686 | 2020-05-18 14:31:30 +0900 | [diff] [blame] | 245 | endif | 
|  | 246 |  | 
| Jiyong Park | e134686 | 2020-05-18 14:31:30 +0900 | [diff] [blame] | 247 | # TARGET_BUILD_FLAVOR and ro.build.flavor are used only by the test | 
|  | 248 | # harness to distinguish builds. Only add _asan for a sanitized build | 
|  | 249 | # if it isn't already a part of the flavor (via a dedicated lunch | 
|  | 250 | # config for example). | 
|  | 251 | TARGET_BUILD_FLAVOR := $(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT) | 
|  | 252 | ifneq (, $(filter address, $(SANITIZE_TARGET))) | 
|  | 253 | ifeq (,$(findstring _asan,$(TARGET_BUILD_FLAVOR))) | 
|  | 254 | TARGET_BUILD_FLAVOR := $(TARGET_BUILD_FLAVOR)_asan | 
|  | 255 | endif | 
|  | 256 | endif | 
|  | 257 |  | 
| Jiyong Park | bb26c6f | 2020-05-26 03:18:36 +0900 | [diff] [blame] | 258 | KNOWN_OEM_THUMBPRINT_PROPERTIES := \ | 
|  | 259 | ro.product.brand \ | 
|  | 260 | ro.product.name \ | 
|  | 261 | ro.product.device | 
|  | 262 | OEM_THUMBPRINT_PROPERTIES := $(filter $(KNOWN_OEM_THUMBPRINT_PROPERTIES),\ | 
|  | 263 | $(PRODUCT_OEM_PROPERTIES)) | 
|  | 264 | KNOWN_OEM_THUMBPRINT_PROPERTIES:= | 
|  | 265 |  | 
|  | 266 | # ----------------------------------------------------------------- | 
|  | 267 | # system/build.prop | 
|  | 268 | # | 
|  | 269 | # Note: parts of this file that can't be generated by the build-properties | 
|  | 270 | # macro are manually created as separate files and then fed into the macro | 
|  | 271 |  | 
|  | 272 | # Accepts a whitespace separated list of product locales such as | 
|  | 273 | # (en_US en_AU en_GB...) and returns the first locale in the list with | 
|  | 274 | # underscores replaced with hyphens. In the example above, this will | 
|  | 275 | # return "en-US". | 
|  | 276 | define get-default-product-locale | 
|  | 277 | $(strip $(subst _,-, $(firstword $(1)))) | 
|  | 278 | endef | 
|  | 279 |  | 
| Jiyong Park | c60c514 | 2020-07-14 15:15:50 +0900 | [diff] [blame] | 280 | gen_from_buildinfo_sh := $(call intermediates-dir-for,PACKAGING,system_build_prop)/buildinfo.prop | 
| Jeongik Cha | 05210f9 | 2023-04-27 11:05:22 +0900 | [diff] [blame] | 281 |  | 
|  | 282 | ifeq ($(strip $(HAS_BUILD_NUMBER)),true) | 
|  | 283 | $(gen_from_buildinfo_sh): $(BUILD_NUMBER_FILE) | 
|  | 284 | endif | 
|  | 285 | $(gen_from_buildinfo_sh): $(INTERNAL_BUILD_ID_MAKEFILE) $(API_FINGERPRINT) $(BUILD_HOSTNAME_FILE) | $(BUILD_DATETIME_FILE) | 
| Jiyong Park | e134686 | 2020-05-18 14:31:30 +0900 | [diff] [blame] | 286 | $(hide) TARGET_BUILD_TYPE="$(TARGET_BUILD_VARIANT)" \ | 
|  | 287 | TARGET_BUILD_FLAVOR="$(TARGET_BUILD_FLAVOR)" \ | 
|  | 288 | TARGET_DEVICE="$(TARGET_DEVICE)" \ | 
|  | 289 | PRODUCT_DEFAULT_LOCALE="$(call get-default-product-locale,$(PRODUCT_LOCALES))" \ | 
|  | 290 | PRODUCT_DEFAULT_WIFI_CHANNELS="$(PRODUCT_DEFAULT_WIFI_CHANNELS)" \ | 
| Jiyong Park | bb26c6f | 2020-05-26 03:18:36 +0900 | [diff] [blame] | 291 | PRIVATE_BUILD_DESC="$(BUILD_DESC)" \ | 
| Jiyong Park | e134686 | 2020-05-18 14:31:30 +0900 | [diff] [blame] | 292 | BUILD_ID="$(BUILD_ID)" \ | 
|  | 293 | BUILD_DISPLAY_ID="$(BUILD_DISPLAY_ID)" \ | 
|  | 294 | DATE="$(DATE_FROM_FILE)" \ | 
|  | 295 | BUILD_USERNAME="$(BUILD_USERNAME)" \ | 
| Jeongik Cha | 05210f9 | 2023-04-27 11:05:22 +0900 | [diff] [blame] | 296 | BUILD_HOSTNAME="$(BUILD_HOSTNAME_FROM_FILE)" \ | 
| Jiyong Park | e134686 | 2020-05-18 14:31:30 +0900 | [diff] [blame] | 297 | BUILD_NUMBER="$(BUILD_NUMBER_FROM_FILE)" \ | 
| Tianjie | 9797623 | 2021-05-05 12:07:33 -0700 | [diff] [blame] | 298 | BOARD_USE_VBMETA_DIGTEST_IN_FINGERPRINT="$(BOARD_USE_VBMETA_DIGTEST_IN_FINGERPRINT)" \ | 
| Jiyong Park | e134686 | 2020-05-18 14:31:30 +0900 | [diff] [blame] | 299 | PLATFORM_VERSION="$(PLATFORM_VERSION)" \ | 
| Colin Cross | a492544 | 2022-02-28 18:01:35 -0800 | [diff] [blame] | 300 | PLATFORM_DISPLAY_VERSION="$(PLATFORM_DISPLAY_VERSION)" \ | 
| Jiyong Park | e134686 | 2020-05-18 14:31:30 +0900 | [diff] [blame] | 301 | PLATFORM_VERSION_LAST_STABLE="$(PLATFORM_VERSION_LAST_STABLE)" \ | 
|  | 302 | PLATFORM_SECURITY_PATCH="$(PLATFORM_SECURITY_PATCH)" \ | 
|  | 303 | PLATFORM_BASE_OS="$(PLATFORM_BASE_OS)" \ | 
|  | 304 | PLATFORM_SDK_VERSION="$(PLATFORM_SDK_VERSION)" \ | 
|  | 305 | PLATFORM_PREVIEW_SDK_VERSION="$(PLATFORM_PREVIEW_SDK_VERSION)" \ | 
|  | 306 | PLATFORM_PREVIEW_SDK_FINGERPRINT="$$(cat $(API_FINGERPRINT))" \ | 
|  | 307 | PLATFORM_VERSION_CODENAME="$(PLATFORM_VERSION_CODENAME)" \ | 
|  | 308 | PLATFORM_VERSION_ALL_CODENAMES="$(PLATFORM_VERSION_ALL_CODENAMES)" \ | 
| satayev | 2d94586 | 2022-02-09 21:59:28 +0000 | [diff] [blame] | 309 | PLATFORM_VERSION_KNOWN_CODENAMES="$(PLATFORM_VERSION_KNOWN_CODENAMES)" \ | 
| Jiyong Park | e134686 | 2020-05-18 14:31:30 +0900 | [diff] [blame] | 310 | PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION="$(PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION)" \ | 
|  | 311 | BUILD_VERSION_TAGS="$(BUILD_VERSION_TAGS)" \ | 
|  | 312 | $(if $(OEM_THUMBPRINT_PROPERTIES),BUILD_THUMBPRINT="$(BUILD_THUMBPRINT_FROM_FILE)") \ | 
|  | 313 | TARGET_CPU_ABI_LIST="$(TARGET_CPU_ABI_LIST)" \ | 
|  | 314 | TARGET_CPU_ABI_LIST_32_BIT="$(TARGET_CPU_ABI_LIST_32_BIT)" \ | 
|  | 315 | TARGET_CPU_ABI_LIST_64_BIT="$(TARGET_CPU_ABI_LIST_64_BIT)" \ | 
|  | 316 | TARGET_CPU_ABI="$(TARGET_CPU_ABI)" \ | 
|  | 317 | TARGET_CPU_ABI2="$(TARGET_CPU_ABI2)" \ | 
| Christopher Ferris | 66b6fd6 | 2022-04-08 15:20:23 -0700 | [diff] [blame] | 318 | ZYGOTE_FORCE_64_BIT="$(ZYGOTE_FORCE_64_BIT)" \ | 
| Jiyong Park | bb26c6f | 2020-05-26 03:18:36 +0900 | [diff] [blame] | 319 | bash $(BUILDINFO_SH) > $@ | 
| Jiyong Park | e134686 | 2020-05-18 14:31:30 +0900 | [diff] [blame] | 320 |  | 
| Jiyong Park | bb26c6f | 2020-05-26 03:18:36 +0900 | [diff] [blame] | 321 | ifdef TARGET_SYSTEM_PROP | 
|  | 322 | system_prop_file := $(TARGET_SYSTEM_PROP) | 
|  | 323 | else | 
|  | 324 | system_prop_file := $(wildcard $(TARGET_DEVICE_DIR)/system.prop) | 
|  | 325 | endif | 
|  | 326 |  | 
|  | 327 | _prop_files_ := \ | 
| Jiyong Park | bb26c6f | 2020-05-26 03:18:36 +0900 | [diff] [blame] | 328 | $(gen_from_buildinfo_sh) \ | 
|  | 329 | $(system_prop_file) | 
|  | 330 |  | 
|  | 331 | # Order matters here. When there are duplicates, the last one wins. | 
|  | 332 | # TODO(b/117892318): don't allow duplicates so that the ordering doesn't matter | 
|  | 333 | _prop_vars_ := \ | 
|  | 334 | ADDITIONAL_SYSTEM_PROPERTIES \ | 
| Jiyong Park | eb49b34 | 2020-05-29 17:50:03 +0900 | [diff] [blame] | 335 | PRODUCT_SYSTEM_PROPERTIES | 
|  | 336 |  | 
|  | 337 | # TODO(b/117892318): deprecate this | 
|  | 338 | _prop_vars_ += \ | 
| Jiyong Park | bb26c6f | 2020-05-26 03:18:36 +0900 | [diff] [blame] | 339 | PRODUCT_SYSTEM_DEFAULT_PROPERTIES | 
|  | 340 |  | 
|  | 341 | ifndef property_overrides_split_enabled | 
|  | 342 | _prop_vars_ += \ | 
| Garfield Tan | 04714da | 2020-08-13 15:21:32 -0700 | [diff] [blame] | 343 | ADDITIONAL_VENDOR_PROPERTIES \ | 
|  | 344 | PRODUCT_VENDOR_PROPERTIES | 
| Jiyong Park | bb26c6f | 2020-05-26 03:18:36 +0900 | [diff] [blame] | 345 | endif | 
|  | 346 |  | 
| Jiyong Park | bb26c6f | 2020-05-26 03:18:36 +0900 | [diff] [blame] | 347 | INSTALLED_BUILD_PROP_TARGET := $(TARGET_OUT)/build.prop | 
|  | 348 |  | 
| Alexander Mishkovets | 5a6bc22 | 2020-11-11 15:25:37 +0100 | [diff] [blame] | 349 | $(eval $(call build-properties,\ | 
|  | 350 | system,\ | 
|  | 351 | $(INSTALLED_BUILD_PROP_TARGET),\ | 
|  | 352 | $(_prop_files_),\ | 
|  | 353 | $(_prop_vars_),\ | 
| Peter Collingbourne | 0e3b095 | 2022-02-18 19:17:04 -0800 | [diff] [blame] | 354 | $(PRODUCT_SYSTEM_PROPERTY_BLACKLIST),\ | 
| Oleksiy Avramchenko | d3d0f7d | 2020-12-15 14:38:32 +0100 | [diff] [blame] | 355 | $(empty),\ | 
| Alexander Mishkovets | 5a6bc22 | 2020-11-11 15:25:37 +0100 | [diff] [blame] | 356 | $(empty))) | 
| Jiyong Park | bb26c6f | 2020-05-26 03:18:36 +0900 | [diff] [blame] | 357 |  | 
| Bob Badour | 70c07dd | 2022-02-12 15:39:22 -0800 | [diff] [blame] | 358 | $(eval $(call declare-1p-target,$(INSTALLED_BUILD_PROP_TARGET))) | 
|  | 359 |  | 
| Jiyong Park | e134686 | 2020-05-18 14:31:30 +0900 | [diff] [blame] | 360 | # ----------------------------------------------------------------- | 
| Jiyong Park | e28fa80 | 2020-05-26 00:21:20 +0900 | [diff] [blame] | 361 | # vendor/build.prop | 
| Jiyong Park | e134686 | 2020-05-18 14:31:30 +0900 | [diff] [blame] | 362 | # | 
| Jiyong Park | e28fa80 | 2020-05-26 00:21:20 +0900 | [diff] [blame] | 363 | _prop_files_ := $(if $(TARGET_VENDOR_PROP),\ | 
|  | 364 | $(TARGET_VENDOR_PROP),\ | 
|  | 365 | $(wildcard $(TARGET_DEVICE_DIR)/vendor.prop)) | 
| Jiyong Park | e134686 | 2020-05-18 14:31:30 +0900 | [diff] [blame] | 366 |  | 
| Jiyong Park | 3a2e95a | 2020-05-25 17:56:09 +0900 | [diff] [blame] | 367 | android_info_prop := $(call intermediates-dir-for,ETC,android_info_prop)/android_info.prop | 
|  | 368 | $(android_info_prop): $(INSTALLED_ANDROID_INFO_TXT_TARGET) | 
|  | 369 | cat $< | grep 'require version-' | sed -e 's/require version-/ro.build.expect./g' > $@ | 
|  | 370 |  | 
| Donghyun Jo | 8c65ef6 | 2021-03-02 08:51:03 +0900 | [diff] [blame] | 371 | _prop_files_ += $(android_info_prop) | 
| Jiyong Park | 3a2e95a | 2020-05-25 17:56:09 +0900 | [diff] [blame] | 372 |  | 
| Jiyong Park | e134686 | 2020-05-18 14:31:30 +0900 | [diff] [blame] | 373 | ifdef property_overrides_split_enabled | 
| Jiyong Park | e28fa80 | 2020-05-26 00:21:20 +0900 | [diff] [blame] | 374 | # Order matters here. When there are duplicates, the last one wins. | 
|  | 375 | # TODO(b/117892318): don't allow duplicates so that the ordering doesn't matter | 
|  | 376 | _prop_vars_ := \ | 
|  | 377 | ADDITIONAL_VENDOR_PROPERTIES \ | 
| Jiyong Park | eb49b34 | 2020-05-29 17:50:03 +0900 | [diff] [blame] | 378 | PRODUCT_VENDOR_PROPERTIES | 
|  | 379 |  | 
|  | 380 | # TODO(b/117892318): deprecate this | 
|  | 381 | _prop_vars_ += \ | 
|  | 382 | PRODUCT_DEFAULT_PROPERTY_OVERRIDES \ | 
| Jiyong Park | e28fa80 | 2020-05-26 00:21:20 +0900 | [diff] [blame] | 383 | PRODUCT_PROPERTY_OVERRIDES | 
| Jiyong Park | e134686 | 2020-05-18 14:31:30 +0900 | [diff] [blame] | 384 | else | 
| Jiyong Park | e28fa80 | 2020-05-26 00:21:20 +0900 | [diff] [blame] | 385 | _prop_vars_ := | 
| Jiyong Park | e134686 | 2020-05-18 14:31:30 +0900 | [diff] [blame] | 386 | endif | 
|  | 387 |  | 
| Jiyong Park | e28fa80 | 2020-05-26 00:21:20 +0900 | [diff] [blame] | 388 | INSTALLED_VENDOR_BUILD_PROP_TARGET := $(TARGET_OUT_VENDOR)/build.prop | 
|  | 389 | $(eval $(call build-properties,\ | 
|  | 390 | vendor,\ | 
|  | 391 | $(INSTALLED_VENDOR_BUILD_PROP_TARGET),\ | 
|  | 392 | $(_prop_files_),\ | 
|  | 393 | $(_prop_vars_),\ | 
| Alexander Mishkovets | 5a6bc22 | 2020-11-11 15:25:37 +0100 | [diff] [blame] | 394 | $(PRODUCT_VENDOR_PROPERTY_BLACKLIST),\ | 
| Oleksiy Avramchenko | d3d0f7d | 2020-12-15 14:38:32 +0100 | [diff] [blame] | 395 | $(empty),\ | 
| Alexander Mishkovets | 5a6bc22 | 2020-11-11 15:25:37 +0100 | [diff] [blame] | 396 | $(empty))) | 
| Jiyong Park | e134686 | 2020-05-18 14:31:30 +0900 | [diff] [blame] | 397 |  | 
| Bob Badour | 70c07dd | 2022-02-12 15:39:22 -0800 | [diff] [blame] | 398 | $(eval $(call declare-1p-target,$(INSTALLED_VENDOR_BUILD_PROP_TARGET))) | 
|  | 399 |  | 
| Jiyong Park | e28fa80 | 2020-05-26 00:21:20 +0900 | [diff] [blame] | 400 | # ----------------------------------------------------------------- | 
| Jiyong Park | c0bd8c7 | 2020-06-29 10:46:22 +0900 | [diff] [blame] | 401 | # product/etc/build.prop | 
| Jiyong Park | e28fa80 | 2020-05-26 00:21:20 +0900 | [diff] [blame] | 402 | # | 
|  | 403 |  | 
|  | 404 | _prop_files_ := $(if $(TARGET_PRODUCT_PROP),\ | 
|  | 405 | $(TARGET_PRODUCT_PROP),\ | 
|  | 406 | $(wildcard $(TARGET_DEVICE_DIR)/product.prop)) | 
|  | 407 |  | 
|  | 408 | # Order matters here. When there are duplicates, the last one wins. | 
|  | 409 | # TODO(b/117892318): don't allow duplicates so that the ordering doesn't matter | 
|  | 410 | _prop_vars_ := \ | 
|  | 411 | ADDITIONAL_PRODUCT_PROPERTIES \ | 
|  | 412 | PRODUCT_PRODUCT_PROPERTIES | 
|  | 413 |  | 
| Jiyong Park | c0bd8c7 | 2020-06-29 10:46:22 +0900 | [diff] [blame] | 414 | INSTALLED_PRODUCT_BUILD_PROP_TARGET := $(TARGET_OUT_PRODUCT)/etc/build.prop | 
| Alexander Mishkovets | 5a6bc22 | 2020-11-11 15:25:37 +0100 | [diff] [blame] | 415 |  | 
|  | 416 | ifdef PRODUCT_OEM_PROPERTIES | 
|  | 417 | import_oem_prop := $(call intermediates-dir-for,ETC,import_oem_prop)/oem.prop | 
|  | 418 |  | 
|  | 419 | $(import_oem_prop): | 
|  | 420 | $(hide) echo "####################################" >> $@; \ | 
|  | 421 | echo "# PRODUCT_OEM_PROPERTIES" >> $@; \ | 
|  | 422 | echo "####################################" >> $@; | 
|  | 423 | $(hide) $(foreach prop,$(PRODUCT_OEM_PROPERTIES), \ | 
|  | 424 | echo "import /oem/oem.prop $(prop)" >> $@;) | 
|  | 425 |  | 
|  | 426 | _footers_ := $(import_oem_prop) | 
|  | 427 | else | 
|  | 428 | _footers_ := | 
|  | 429 | endif | 
|  | 430 |  | 
| Oleksiy Avramchenko | d3d0f7d | 2020-12-15 14:38:32 +0100 | [diff] [blame] | 431 | # Skip common /product properties generation if device released before R and | 
|  | 432 | # has no product partition. This is the first part of the check. | 
|  | 433 | ifeq ($(call math_lt,$(if $(PRODUCT_SHIPPING_API_LEVEL),$(PRODUCT_SHIPPING_API_LEVEL),30),30), true) | 
|  | 434 | _skip_common_properties := true | 
|  | 435 | endif | 
|  | 436 |  | 
|  | 437 | # The second part of the check - always generate common properties for the | 
|  | 438 | # devices with product partition regardless of shipping level. | 
|  | 439 | ifneq ($(BOARD_USES_PRODUCTIMAGE),) | 
|  | 440 | _skip_common_properties := | 
|  | 441 | endif | 
|  | 442 |  | 
| Jiyong Park | e28fa80 | 2020-05-26 00:21:20 +0900 | [diff] [blame] | 443 | $(eval $(call build-properties,\ | 
|  | 444 | product,\ | 
|  | 445 | $(INSTALLED_PRODUCT_BUILD_PROP_TARGET),\ | 
|  | 446 | $(_prop_files_),\ | 
|  | 447 | $(_prop_vars_),\ | 
| Alexander Mishkovets | 5a6bc22 | 2020-11-11 15:25:37 +0100 | [diff] [blame] | 448 | $(empty),\ | 
| Oleksiy Avramchenko | d3d0f7d | 2020-12-15 14:38:32 +0100 | [diff] [blame] | 449 | $(_footers_),\ | 
|  | 450 | $(_skip_common_properties))) | 
|  | 451 |  | 
| Bob Badour | 70c07dd | 2022-02-12 15:39:22 -0800 | [diff] [blame] | 452 | $(eval $(call declare-1p-target,$(INSTALLED_PRODUCT_BUILD_PROP_TARGET))) | 
|  | 453 |  | 
| Oleksiy Avramchenko | d3d0f7d | 2020-12-15 14:38:32 +0100 | [diff] [blame] | 454 | _skip_common_properties := | 
| Jiyong Park | e134686 | 2020-05-18 14:31:30 +0900 | [diff] [blame] | 455 |  | 
|  | 456 | # ---------------------------------------------------------------- | 
| Jiyong Park | 62117c8 | 2020-06-26 09:56:31 +0900 | [diff] [blame] | 457 | # odm/etc/build.prop | 
| Jiyong Park | e28fa80 | 2020-05-26 00:21:20 +0900 | [diff] [blame] | 458 | # | 
|  | 459 | _prop_files_ := $(if $(TARGET_ODM_PROP),\ | 
|  | 460 | $(TARGET_ODM_PROP),\ | 
|  | 461 | $(wildcard $(TARGET_DEVICE_DIR)/odm.prop)) | 
| Jiyong Park | e134686 | 2020-05-18 14:31:30 +0900 | [diff] [blame] | 462 |  | 
| Jiyong Park | e28fa80 | 2020-05-26 00:21:20 +0900 | [diff] [blame] | 463 | # Order matters here. When there are duplicates, the last one wins. | 
|  | 464 | # TODO(b/117892318): don't allow duplicates so that the ordering doesn't matter | 
|  | 465 | _prop_vars_ := \ | 
|  | 466 | ADDITIONAL_ODM_PROPERTIES \ | 
|  | 467 | PRODUCT_ODM_PROPERTIES | 
| Jiyong Park | e134686 | 2020-05-18 14:31:30 +0900 | [diff] [blame] | 468 |  | 
| Jiyong Park | 62117c8 | 2020-06-26 09:56:31 +0900 | [diff] [blame] | 469 | INSTALLED_ODM_BUILD_PROP_TARGET := $(TARGET_OUT_ODM)/etc/build.prop | 
| Jiyong Park | e28fa80 | 2020-05-26 00:21:20 +0900 | [diff] [blame] | 470 | $(eval $(call build-properties,\ | 
|  | 471 | odm,\ | 
|  | 472 | $(INSTALLED_ODM_BUILD_PROP_TARGET),\ | 
| Hidefumi Kaneko | b09a36c | 2021-07-30 17:38:36 +0900 | [diff] [blame] | 473 | $(_prop_files_),\ | 
| Jiyong Park | e28fa80 | 2020-05-26 00:21:20 +0900 | [diff] [blame] | 474 | $(_prop_vars_),\ | 
| Alexander Mishkovets | 5a6bc22 | 2020-11-11 15:25:37 +0100 | [diff] [blame] | 475 | $(empty),\ | 
| Oleksiy Avramchenko | d3d0f7d | 2020-12-15 14:38:32 +0100 | [diff] [blame] | 476 | $(empty),\ | 
| Jiyong Park | e28fa80 | 2020-05-26 00:21:20 +0900 | [diff] [blame] | 477 | $(empty))) | 
| Jiyong Park | e134686 | 2020-05-18 14:31:30 +0900 | [diff] [blame] | 478 |  | 
| Bob Badour | 70c07dd | 2022-02-12 15:39:22 -0800 | [diff] [blame] | 479 | $(eval $(call declare-1p-target,$(INSTALLED_ODM_BUILD_PROP_TARGET))) | 
|  | 480 |  | 
| Yifan Hong | 51a971b | 2020-06-25 17:00:27 -0700 | [diff] [blame] | 481 | # ---------------------------------------------------------------- | 
|  | 482 | # vendor_dlkm/etc/build.prop | 
|  | 483 | # | 
|  | 484 |  | 
|  | 485 | INSTALLED_VENDOR_DLKM_BUILD_PROP_TARGET := $(TARGET_OUT_VENDOR_DLKM)/etc/build.prop | 
|  | 486 | $(eval $(call build-properties,\ | 
|  | 487 | vendor_dlkm,\ | 
| Alexander Mishkovets | 5a6bc22 | 2020-11-11 15:25:37 +0100 | [diff] [blame] | 488 | $(INSTALLED_VENDOR_DLKM_BUILD_PROP_TARGET),\ | 
|  | 489 | $(empty),\ | 
|  | 490 | $(empty),\ | 
|  | 491 | $(empty),\ | 
| Oleksiy Avramchenko | d3d0f7d | 2020-12-15 14:38:32 +0100 | [diff] [blame] | 492 | $(empty),\ | 
| Alexander Mishkovets | 5a6bc22 | 2020-11-11 15:25:37 +0100 | [diff] [blame] | 493 | $(empty))) | 
| Yifan Hong | 51a971b | 2020-06-25 17:00:27 -0700 | [diff] [blame] | 494 |  | 
| Bob Badour | 70c07dd | 2022-02-12 15:39:22 -0800 | [diff] [blame] | 495 | $(eval $(call declare-1p-target,$(INSTALLED_VENDOR_DLKM_BUILD_PROP_TARGET))) | 
|  | 496 |  | 
| Yifan Hong | 81a092f | 2020-07-15 17:02:07 -0700 | [diff] [blame] | 497 | # ---------------------------------------------------------------- | 
|  | 498 | # odm_dlkm/etc/build.prop | 
|  | 499 | # | 
|  | 500 |  | 
|  | 501 | INSTALLED_ODM_DLKM_BUILD_PROP_TARGET := $(TARGET_OUT_ODM_DLKM)/etc/build.prop | 
|  | 502 | $(eval $(call build-properties,\ | 
|  | 503 | odm_dlkm,\ | 
| Alexander Mishkovets | 5a6bc22 | 2020-11-11 15:25:37 +0100 | [diff] [blame] | 504 | $(INSTALLED_ODM_DLKM_BUILD_PROP_TARGET),\ | 
|  | 505 | $(empty),\ | 
|  | 506 | $(empty),\ | 
|  | 507 | $(empty),\ | 
| Oleksiy Avramchenko | d3d0f7d | 2020-12-15 14:38:32 +0100 | [diff] [blame] | 508 | $(empty),\ | 
| Alexander Mishkovets | 5a6bc22 | 2020-11-11 15:25:37 +0100 | [diff] [blame] | 509 | $(empty))) | 
| Yifan Hong | 81a092f | 2020-07-15 17:02:07 -0700 | [diff] [blame] | 510 |  | 
| Bob Badour | 70c07dd | 2022-02-12 15:39:22 -0800 | [diff] [blame] | 511 | $(eval $(call declare-1p-target,$(INSTALLED_ODM_DLKM_BUILD_PROP_TARGET))) | 
|  | 512 |  | 
| Ramji Jiyani | 13a4137 | 2022-01-27 07:05:08 +0000 | [diff] [blame] | 513 | # ---------------------------------------------------------------- | 
|  | 514 | # system_dlkm/build.prop | 
|  | 515 | # | 
|  | 516 |  | 
|  | 517 | INSTALLED_SYSTEM_DLKM_BUILD_PROP_TARGET := $(TARGET_OUT_SYSTEM_DLKM)/etc/build.prop | 
|  | 518 | $(eval $(call build-properties,\ | 
|  | 519 | system_dlkm,\ | 
|  | 520 | $(INSTALLED_SYSTEM_DLKM_BUILD_PROP_TARGET),\ | 
|  | 521 | $(empty),\ | 
|  | 522 | $(empty),\ | 
|  | 523 | $(empty),\ | 
|  | 524 | $(empty),\ | 
|  | 525 | $(empty))) | 
|  | 526 |  | 
| Bob Badour | 70c07dd | 2022-02-12 15:39:22 -0800 | [diff] [blame] | 527 | $(eval $(call declare-1p-target,$(INSTALLED_SYSTEM_DLKM_BUILD_PROP_TARGET))) | 
|  | 528 |  | 
| Jiyong Park | e134686 | 2020-05-18 14:31:30 +0900 | [diff] [blame] | 529 | # ----------------------------------------------------------------- | 
| Jiyong Park | c0bd8c7 | 2020-06-29 10:46:22 +0900 | [diff] [blame] | 530 | # system_ext/etc/build.prop | 
| Jiyong Park | e28fa80 | 2020-05-26 00:21:20 +0900 | [diff] [blame] | 531 | # | 
|  | 532 | _prop_files_ := $(if $(TARGET_SYSTEM_EXT_PROP),\ | 
|  | 533 | $(TARGET_SYSTEM_EXT_PROP),\ | 
|  | 534 | $(wildcard $(TARGET_DEVICE_DIR)/system_ext.prop)) | 
|  | 535 |  | 
|  | 536 | # Order matters here. When there are duplicates, the last one wins. | 
|  | 537 | # TODO(b/117892318): don't allow duplicates so that the ordering doesn't matter | 
|  | 538 | _prop_vars_ := PRODUCT_SYSTEM_EXT_PROPERTIES | 
|  | 539 |  | 
| Jiyong Park | c0bd8c7 | 2020-06-29 10:46:22 +0900 | [diff] [blame] | 540 | INSTALLED_SYSTEM_EXT_BUILD_PROP_TARGET := $(TARGET_OUT_SYSTEM_EXT)/etc/build.prop | 
| Jiyong Park | e28fa80 | 2020-05-26 00:21:20 +0900 | [diff] [blame] | 541 | $(eval $(call build-properties,\ | 
|  | 542 | system_ext,\ | 
|  | 543 | $(INSTALLED_SYSTEM_EXT_BUILD_PROP_TARGET),\ | 
|  | 544 | $(_prop_files_),\ | 
|  | 545 | $(_prop_vars_),\ | 
| Alexander Mishkovets | 5a6bc22 | 2020-11-11 15:25:37 +0100 | [diff] [blame] | 546 | $(empty),\ | 
| Oleksiy Avramchenko | d3d0f7d | 2020-12-15 14:38:32 +0100 | [diff] [blame] | 547 | $(empty),\ | 
| Jiyong Park | e28fa80 | 2020-05-26 00:21:20 +0900 | [diff] [blame] | 548 | $(empty))) | 
| Yifan Hong | 33fd5d4 | 2020-09-24 18:18:26 -0700 | [diff] [blame] | 549 |  | 
| Bob Badour | 70c07dd | 2022-02-12 15:39:22 -0800 | [diff] [blame] | 550 | $(eval $(call declare-1p-target,$(INSTALLED_SYSTEM_EXT_BUILD_PROP_TARGET))) | 
|  | 551 |  | 
| Yifan Hong | 33fd5d4 | 2020-09-24 18:18:26 -0700 | [diff] [blame] | 552 | # ---------------------------------------------------------------- | 
|  | 553 | # ramdisk/boot/etc/build.prop | 
|  | 554 | # | 
|  | 555 |  | 
|  | 556 | RAMDISK_BUILD_PROP_REL_PATH := system/etc/ramdisk/build.prop | 
|  | 557 | INSTALLED_RAMDISK_BUILD_PROP_TARGET := $(TARGET_RAMDISK_OUT)/$(RAMDISK_BUILD_PROP_REL_PATH) | 
|  | 558 | $(eval $(call build-properties,\ | 
| Kelvin Zhang | 8250d2c | 2022-03-23 19:46:09 +0000 | [diff] [blame] | 559 | bootimage,\ | 
| Alexander Mishkovets | 5a6bc22 | 2020-11-11 15:25:37 +0100 | [diff] [blame] | 560 | $(INSTALLED_RAMDISK_BUILD_PROP_TARGET),\ | 
|  | 561 | $(empty),\ | 
|  | 562 | $(empty),\ | 
|  | 563 | $(empty),\ | 
| Oleksiy Avramchenko | d3d0f7d | 2020-12-15 14:38:32 +0100 | [diff] [blame] | 564 | $(empty),\ | 
| Alexander Mishkovets | 5a6bc22 | 2020-11-11 15:25:37 +0100 | [diff] [blame] | 565 | $(empty))) | 
| Bob Badour | 70c07dd | 2022-02-12 15:39:22 -0800 | [diff] [blame] | 566 |  | 
|  | 567 | $(eval $(call declare-1p-target,$(INSTALLED_RAMDISK_BUILD_PROP_TARGET))) | 
| Wei Li | 4993336 | 2023-01-04 17:13:47 -0800 | [diff] [blame] | 568 |  | 
|  | 569 | ALL_INSTALLED_BUILD_PROP_FILES := \ | 
|  | 570 | $(INSTALLED_BUILD_PROP_TARGET) \ | 
|  | 571 | $(INSTALLED_VENDOR_BUILD_PROP_TARGET) \ | 
|  | 572 | $(INSTALLED_PRODUCT_BUILD_PROP_TARGET) \ | 
|  | 573 | $(INSTALLED_ODM_BUILD_PROP_TARGET) \ | 
|  | 574 | $(INSTALLED_VENDOR_DLKM_BUILD_PROP_TARGET) \ | 
|  | 575 | $(INSTALLED_ODM_DLKM_BUILD_PROP_TARGET) \ | 
|  | 576 | $(INSTALLED_SYSTEM_DLKM_BUILD_PROP_TARGET) \ | 
|  | 577 | $(INSTALLED_SYSTEM_EXT_BUILD_PROP_TARGET) \ | 
|  | 578 | $(INSTALLED_RAMDISK_BUILD_PROP_TARGET) | 
|  | 579 |  | 
|  | 580 | # $1 installed file path, e.g. out/target/product/vsoc_x86_64/system/build.prop | 
|  | 581 | define is-build-prop | 
|  | 582 | $(if $(findstring $1,$(ALL_INSTALLED_BUILD_PROP_FILES)),Y) | 
| Tiffany Yang | 19450e3 | 2023-05-23 17:36:54 -0700 | [diff] [blame] | 583 | endef |