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