blob: 3806a9691a238c745f71bf49c7275ad477bd5303 [file] [log] [blame]
Jiyong Parke1346862020-05-18 14:31:30 +09001#
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
17# sysprop.mk defines rules for generating <partition>/build.prop files
18
19# -----------------------------------------------------------------
20# property_overrides_split_enabled
21property_overrides_split_enabled :=
22ifeq ($(BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED), true)
23 property_overrides_split_enabled := true
24endif
25
Jiyong Parke1346862020-05-18 14:31:30 +090026BUILDINFO_SH := build/make/tools/buildinfo.sh
Jiyong Parkae556382020-05-20 18:33:43 +090027POST_PROCESS_PROPS := $(HOST_OUT_EXECUTABLES)/post_process_props$(HOST_EXECUTABLE_SUFFIX)
Jiyong Parke1346862020-05-18 14:31:30 +090028
Jiyong Park35a83d12020-05-26 02:01:05 +090029# Emits a set of sysprops common to all partitions to a file.
Jiyong Parke1346862020-05-18 14:31:30 +090030# $(1): Partition name
31# $(2): Output file name
32define generate-common-build-props
Jiyong Park35a83d12020-05-26 02:01:05 +090033 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);\
49 )\
50 echo "ro.$(1).build.date=`$(DATE_FROM_FILE)`" >> $(2);\
51 echo "ro.$(1).build.date.utc=`$(DATE_FROM_FILE) +%s`" >> $(2);\
52 echo "ro.$(1).build.fingerprint=$(BUILD_FINGERPRINT_FROM_FILE)" >> $(2);\
53 echo "ro.$(1).build.id=$(BUILD_ID)" >> $(2);\
54 echo "ro.$(1).build.tags=$(BUILD_VERSION_TAGS)" >> $(2);\
55 echo "ro.$(1).build.type=$(TARGET_BUILD_VARIANT)" >> $(2);\
56 echo "ro.$(1).build.version.incremental=$(BUILD_NUMBER_FROM_FILE)" >> $(2);\
57 echo "ro.$(1).build.version.release=$(PLATFORM_VERSION)" >> $(2);\
58 echo "ro.$(1).build.version.sdk=$(PLATFORM_SDK_VERSION)" >> $(2);\
Jiyong Parke1346862020-05-18 14:31:30 +090059
Jiyong Parke1346862020-05-18 14:31:30 +090060endef
61
Jiyong Parke28fa802020-05-26 00:21:20 +090062# Rule for generating <partition>/build.prop file
63#
64# $(1): partition name
65# $(2): path to the output
66# $(3): path to the input *.prop files. The contents of the files are directly
67# emitted to the output
68# $(4): list of variable names each of which contains name=value pairs
69# $(5): optional list of prop names to force remove from the output. Properties from both
70# $(3) and (4) are affected.
71define build-properties
72ALL_DEFAULT_INSTALLED_MODULES += $(2)
73
Jiyong Parkd721e872020-06-22 17:30:57 +090074$(eval # Properties can be assigned using `prop ?= value` or `prop = value` syntax.)
75$(eval # Eliminate spaces around the ?= and = separators.)
Jiyong Parke28fa802020-05-26 00:21:20 +090076$(foreach name,$(strip $(4)),\
Jiyong Parkd721e872020-06-22 17:30:57 +090077 $(eval _temp := $$(call collapse-pairs,$$($(name)),?=))\
78 $(eval _resolved_$(name) := $$(call collapse-pairs,$$(_temp),=))\
Jiyong Parke28fa802020-05-26 00:21:20 +090079)
80
Jiyong Park35a83d12020-05-26 02:01:05 +090081$(2): $(POST_PROCESS_PROPS) $(INTERNAL_BUILD_ID_MAKEFILE) $(API_FINGERPRINT) $(3)
Jiyong Parke28fa802020-05-26 00:21:20 +090082 $(hide) echo Building $$@
83 $(hide) mkdir -p $$(dir $$@)
84 $(hide) rm -f $$@ && touch $$@
85 $(hide) $$(call generate-common-build-props,$(call to-lower,$(strip $(1))),$$@)
86 $(hide) $(foreach file,$(strip $(3)),\
87 if [ -f "$(file)" ]; then\
88 echo "" >> $$@;\
89 echo "####################################" >> $$@;\
90 echo "# from $(file)" >> $$@;\
91 echo "####################################" >> $$@;\
92 cat $(file) >> $$@;\
93 fi;)
94 $(hide) $(foreach name,$(strip $(4)),\
95 echo "" >> $$@;\
96 echo "####################################" >> $$@;\
97 echo "# from variable $(name)" >> $$@;\
98 echo "####################################" >> $$@;\
99 $$(foreach line,$$(_resolved_$(name)),\
100 echo "$$(line)" >> $$@;\
101 )\
102 )
103 $(hide) $(POST_PROCESS_PROPS) $$@ $(5)
104 $(hide) echo "# end of file" >> $$@
105endef
106
Jiyong Parke1346862020-05-18 14:31:30 +0900107# -----------------------------------------------------------------
Jiyong Parkbb26c6f2020-05-26 03:18:36 +0900108# Define fingerprint, thumbprint, and version tags for the current build
Jiyong Parke28fa802020-05-26 00:21:20 +0900109#
Jiyong Parkbb26c6f2020-05-26 03:18:36 +0900110# BUILD_VERSION_TAGS is a comma-separated list of tags chosen by the device
111# implementer that further distinguishes the build. It's basically defined
112# by the device implementer. Here, we are adding a mandatory tag that
113# identifies the signing config of the build.
Jiyong Parke1346862020-05-18 14:31:30 +0900114BUILD_VERSION_TAGS := $(BUILD_VERSION_TAGS)
115ifeq ($(TARGET_BUILD_TYPE),debug)
116 BUILD_VERSION_TAGS += debug
117endif
118# The "test-keys" tag marks builds signed with the old test keys,
119# which are available in the SDK. "dev-keys" marks builds signed with
120# non-default dev keys (usually private keys from a vendor directory).
121# Both of these tags will be removed and replaced with "release-keys"
122# when the target-files is signed in a post-build step.
123ifeq ($(DEFAULT_SYSTEM_DEV_CERTIFICATE),build/make/target/product/security/testkey)
124BUILD_KEYS := test-keys
125else
126BUILD_KEYS := dev-keys
127endif
128BUILD_VERSION_TAGS += $(BUILD_KEYS)
129BUILD_VERSION_TAGS := $(subst $(space),$(comma),$(sort $(BUILD_VERSION_TAGS)))
130
Jiyong Parkbb26c6f2020-05-26 03:18:36 +0900131# BUILD_FINGERPRINT is used used to uniquely identify the combined build and
132# product; used by the OTA server.
Jiyong Parke1346862020-05-18 14:31:30 +0900133ifeq (,$(strip $(BUILD_FINGERPRINT)))
134 ifeq ($(strip $(HAS_BUILD_NUMBER)),false)
135 BF_BUILD_NUMBER := $(BUILD_USERNAME)$$($(DATE_FROM_FILE) +%m%d%H%M)
136 else
137 BF_BUILD_NUMBER := $(file <$(BUILD_NUMBER_FILE))
138 endif
139 BUILD_FINGERPRINT := $(PRODUCT_BRAND)/$(TARGET_PRODUCT)/$(TARGET_DEVICE):$(PLATFORM_VERSION)/$(BUILD_ID)/$(BF_BUILD_NUMBER):$(TARGET_BUILD_VARIANT)/$(BUILD_VERSION_TAGS)
140endif
141# unset it for safety.
142BF_BUILD_NUMBER :=
143
144BUILD_FINGERPRINT_FILE := $(PRODUCT_OUT)/build_fingerprint.txt
145ifneq (,$(shell mkdir -p $(PRODUCT_OUT) && echo $(BUILD_FINGERPRINT) >$(BUILD_FINGERPRINT_FILE) && grep " " $(BUILD_FINGERPRINT_FILE)))
146 $(error BUILD_FINGERPRINT cannot contain spaces: "$(file <$(BUILD_FINGERPRINT_FILE))")
147endif
148BUILD_FINGERPRINT_FROM_FILE := $$(cat $(BUILD_FINGERPRINT_FILE))
149# unset it for safety.
150BUILD_FINGERPRINT :=
151
Jiyong Parkbb26c6f2020-05-26 03:18:36 +0900152# BUILD_THUMBPRINT is used to uniquely identify the system build; used by the
153# OTA server. This purposefully excludes any product-specific variables.
Jiyong Parke1346862020-05-18 14:31:30 +0900154ifeq (,$(strip $(BUILD_THUMBPRINT)))
155 BUILD_THUMBPRINT := $(PLATFORM_VERSION)/$(BUILD_ID)/$(BUILD_NUMBER_FROM_FILE):$(TARGET_BUILD_VARIANT)/$(BUILD_VERSION_TAGS)
156endif
157
158BUILD_THUMBPRINT_FILE := $(PRODUCT_OUT)/build_thumbprint.txt
159ifneq (,$(shell mkdir -p $(PRODUCT_OUT) && echo $(BUILD_THUMBPRINT) >$(BUILD_THUMBPRINT_FILE) && grep " " $(BUILD_THUMBPRINT_FILE)))
160 $(error BUILD_THUMBPRINT cannot contain spaces: "$(file <$(BUILD_THUMBPRINT_FILE))")
161endif
162BUILD_THUMBPRINT_FROM_FILE := $$(cat $(BUILD_THUMBPRINT_FILE))
163# unset it for safety.
164BUILD_THUMBPRINT :=
165
Jiyong Parkbb26c6f2020-05-26 03:18:36 +0900166# -----------------------------------------------------------------
167# Define human readable strings that describe this build
168#
Jiyong Parke1346862020-05-18 14:31:30 +0900169
Jiyong Parkbb26c6f2020-05-26 03:18:36 +0900170# BUILD_ID: detail info; has the same info as the build fingerprint
171BUILD_DESC := $(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT) $(PLATFORM_VERSION) $(BUILD_ID) $(BUILD_NUMBER_FROM_FILE) $(BUILD_VERSION_TAGS)
172
173# BUILD_DISPLAY_ID is shown under Settings -> About Phone
Jiyong Parke1346862020-05-18 14:31:30 +0900174ifeq ($(TARGET_BUILD_VARIANT),user)
175 # User builds should show:
176 # release build number or branch.buld_number non-release builds
177
178 # Dev. branches should have DISPLAY_BUILD_NUMBER set
179 ifeq (true,$(DISPLAY_BUILD_NUMBER))
180 BUILD_DISPLAY_ID := $(BUILD_ID).$(BUILD_NUMBER_FROM_FILE) $(BUILD_KEYS)
181 else
182 BUILD_DISPLAY_ID := $(BUILD_ID) $(BUILD_KEYS)
183 endif
184else
185 # Non-user builds should show detailed build information
Jiyong Parkbb26c6f2020-05-26 03:18:36 +0900186 BUILD_DISPLAY_ID := $(BUILD_DESC)
Jiyong Parke1346862020-05-18 14:31:30 +0900187endif
188
Jiyong Parke1346862020-05-18 14:31:30 +0900189# TARGET_BUILD_FLAVOR and ro.build.flavor are used only by the test
190# harness to distinguish builds. Only add _asan for a sanitized build
191# if it isn't already a part of the flavor (via a dedicated lunch
192# config for example).
193TARGET_BUILD_FLAVOR := $(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT)
194ifneq (, $(filter address, $(SANITIZE_TARGET)))
195ifeq (,$(findstring _asan,$(TARGET_BUILD_FLAVOR)))
196TARGET_BUILD_FLAVOR := $(TARGET_BUILD_FLAVOR)_asan
197endif
198endif
199
Jiyong Parkbb26c6f2020-05-26 03:18:36 +0900200KNOWN_OEM_THUMBPRINT_PROPERTIES := \
201 ro.product.brand \
202 ro.product.name \
203 ro.product.device
204OEM_THUMBPRINT_PROPERTIES := $(filter $(KNOWN_OEM_THUMBPRINT_PROPERTIES),\
205 $(PRODUCT_OEM_PROPERTIES))
206KNOWN_OEM_THUMBPRINT_PROPERTIES:=
207
208# -----------------------------------------------------------------
209# system/build.prop
210#
211# Note: parts of this file that can't be generated by the build-properties
212# macro are manually created as separate files and then fed into the macro
213
214# Accepts a whitespace separated list of product locales such as
215# (en_US en_AU en_GB...) and returns the first locale in the list with
216# underscores replaced with hyphens. In the example above, this will
217# return "en-US".
218define get-default-product-locale
219$(strip $(subst _,-, $(firstword $(1))))
220endef
221
222gen_from_buildinfo_sh := $(call intermediates-dir-for,ETC,system_build_prop)/buildinfo.prop
223$(gen_from_buildinfo_sh): $(INTERNAL_BUILD_ID_MAKEFILE) $(API_FINGERPRINT)
Jiyong Parke1346862020-05-18 14:31:30 +0900224 $(hide) TARGET_BUILD_TYPE="$(TARGET_BUILD_VARIANT)" \
225 TARGET_BUILD_FLAVOR="$(TARGET_BUILD_FLAVOR)" \
226 TARGET_DEVICE="$(TARGET_DEVICE)" \
227 PRODUCT_DEFAULT_LOCALE="$(call get-default-product-locale,$(PRODUCT_LOCALES))" \
228 PRODUCT_DEFAULT_WIFI_CHANNELS="$(PRODUCT_DEFAULT_WIFI_CHANNELS)" \
Jiyong Parkbb26c6f2020-05-26 03:18:36 +0900229 PRIVATE_BUILD_DESC="$(BUILD_DESC)" \
Jiyong Parke1346862020-05-18 14:31:30 +0900230 BUILD_ID="$(BUILD_ID)" \
231 BUILD_DISPLAY_ID="$(BUILD_DISPLAY_ID)" \
232 DATE="$(DATE_FROM_FILE)" \
233 BUILD_USERNAME="$(BUILD_USERNAME)" \
234 BUILD_HOSTNAME="$(BUILD_HOSTNAME)" \
235 BUILD_NUMBER="$(BUILD_NUMBER_FROM_FILE)" \
236 BOARD_BUILD_SYSTEM_ROOT_IMAGE="$(BOARD_BUILD_SYSTEM_ROOT_IMAGE)" \
237 PLATFORM_VERSION="$(PLATFORM_VERSION)" \
238 PLATFORM_VERSION_LAST_STABLE="$(PLATFORM_VERSION_LAST_STABLE)" \
239 PLATFORM_SECURITY_PATCH="$(PLATFORM_SECURITY_PATCH)" \
240 PLATFORM_BASE_OS="$(PLATFORM_BASE_OS)" \
241 PLATFORM_SDK_VERSION="$(PLATFORM_SDK_VERSION)" \
242 PLATFORM_PREVIEW_SDK_VERSION="$(PLATFORM_PREVIEW_SDK_VERSION)" \
243 PLATFORM_PREVIEW_SDK_FINGERPRINT="$$(cat $(API_FINGERPRINT))" \
244 PLATFORM_VERSION_CODENAME="$(PLATFORM_VERSION_CODENAME)" \
245 PLATFORM_VERSION_ALL_CODENAMES="$(PLATFORM_VERSION_ALL_CODENAMES)" \
246 PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION="$(PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION)" \
247 BUILD_VERSION_TAGS="$(BUILD_VERSION_TAGS)" \
248 $(if $(OEM_THUMBPRINT_PROPERTIES),BUILD_THUMBPRINT="$(BUILD_THUMBPRINT_FROM_FILE)") \
249 TARGET_CPU_ABI_LIST="$(TARGET_CPU_ABI_LIST)" \
250 TARGET_CPU_ABI_LIST_32_BIT="$(TARGET_CPU_ABI_LIST_32_BIT)" \
251 TARGET_CPU_ABI_LIST_64_BIT="$(TARGET_CPU_ABI_LIST_64_BIT)" \
252 TARGET_CPU_ABI="$(TARGET_CPU_ABI)" \
253 TARGET_CPU_ABI2="$(TARGET_CPU_ABI2)" \
Jiyong Parkbb26c6f2020-05-26 03:18:36 +0900254 bash $(BUILDINFO_SH) > $@
Jiyong Parke1346862020-05-18 14:31:30 +0900255
Jiyong Parkbb26c6f2020-05-26 03:18:36 +0900256ifneq ($(PRODUCT_OEM_PROPERTIES),)
257import_oem_prop := $(call intermediates-dir-for,ETC,system_build_prop)/oem.prop
Jiyong Parke1346862020-05-18 14:31:30 +0900258
Jiyong Parkbb26c6f2020-05-26 03:18:36 +0900259$(import_oem_prop):
260 $(hide) echo "#" >> $@; \
261 echo "# PRODUCT_OEM_PROPERTIES" >> $@; \
262 echo "#" >> $@;
263 $(hide) $(foreach prop,$(PRODUCT_OEM_PROPERTIES), \
264 echo "import /oem/oem.prop $(prop)" >> $@;)
265else
266import_oem_prop :=
267endif
268
269ifdef TARGET_SYSTEM_PROP
270system_prop_file := $(TARGET_SYSTEM_PROP)
271else
272system_prop_file := $(wildcard $(TARGET_DEVICE_DIR)/system.prop)
273endif
274
275_prop_files_ := \
276 $(import_oem_prop) \
277 $(gen_from_buildinfo_sh) \
278 $(system_prop_file)
279
280# Order matters here. When there are duplicates, the last one wins.
281# TODO(b/117892318): don't allow duplicates so that the ordering doesn't matter
282_prop_vars_ := \
283 ADDITIONAL_SYSTEM_PROPERTIES \
Jiyong Parkeb49b342020-05-29 17:50:03 +0900284 PRODUCT_SYSTEM_PROPERTIES
285
286# TODO(b/117892318): deprecate this
287_prop_vars_ += \
Jiyong Parkbb26c6f2020-05-26 03:18:36 +0900288 PRODUCT_SYSTEM_DEFAULT_PROPERTIES
289
290ifndef property_overrides_split_enabled
291_prop_vars_ += \
292 ADDITIONAL_VENDOR_PROPERTIES
293endif
294
295_blacklist_names_ := \
296 $(PRODUCT_SYSTEM_PROPERTY_BLACKLIST) \
297 ro.product.first_api_level
298
299INSTALLED_BUILD_PROP_TARGET := $(TARGET_OUT)/build.prop
300
301$(eval $(call build-properties,system,$(INSTALLED_BUILD_PROP_TARGET),\
302$(_prop_files_),$(_prop_vars_),\
303$(_blacklist_names_)))
304
Jiyong Parke1346862020-05-18 14:31:30 +0900305
306# -----------------------------------------------------------------
Jiyong Parke28fa802020-05-26 00:21:20 +0900307# vendor/build.prop
Jiyong Parke1346862020-05-18 14:31:30 +0900308#
Jiyong Parke28fa802020-05-26 00:21:20 +0900309_prop_files_ := $(if $(TARGET_VENDOR_PROP),\
310 $(TARGET_VENDOR_PROP),\
311 $(wildcard $(TARGET_DEVICE_DIR)/vendor.prop))
Jiyong Parke1346862020-05-18 14:31:30 +0900312
Jiyong Park3a2e95a2020-05-25 17:56:09 +0900313android_info_prop := $(call intermediates-dir-for,ETC,android_info_prop)/android_info.prop
314$(android_info_prop): $(INSTALLED_ANDROID_INFO_TXT_TARGET)
315 cat $< | grep 'require version-' | sed -e 's/require version-/ro.build.expect./g' > $@
316
Jiyong Parke28fa802020-05-26 00:21:20 +0900317_prop_files_ += $(android_info_pro)
Jiyong Park3a2e95a2020-05-25 17:56:09 +0900318
Jiyong Parke1346862020-05-18 14:31:30 +0900319ifdef property_overrides_split_enabled
Jiyong Parke28fa802020-05-26 00:21:20 +0900320# Order matters here. When there are duplicates, the last one wins.
321# TODO(b/117892318): don't allow duplicates so that the ordering doesn't matter
322_prop_vars_ := \
323 ADDITIONAL_VENDOR_PROPERTIES \
Jiyong Parkeb49b342020-05-29 17:50:03 +0900324 PRODUCT_VENDOR_PROPERTIES
325
326# TODO(b/117892318): deprecate this
327_prop_vars_ += \
328 PRODUCT_DEFAULT_PROPERTY_OVERRIDES \
Jiyong Parke28fa802020-05-26 00:21:20 +0900329 PRODUCT_PROPERTY_OVERRIDES
Jiyong Parke1346862020-05-18 14:31:30 +0900330else
Jiyong Parke28fa802020-05-26 00:21:20 +0900331_prop_vars_ :=
Jiyong Parke1346862020-05-18 14:31:30 +0900332endif
333
Jiyong Parke28fa802020-05-26 00:21:20 +0900334INSTALLED_VENDOR_BUILD_PROP_TARGET := $(TARGET_OUT_VENDOR)/build.prop
335$(eval $(call build-properties,\
336 vendor,\
337 $(INSTALLED_VENDOR_BUILD_PROP_TARGET),\
338 $(_prop_files_),\
339 $(_prop_vars_),\
340 $(PRODUCT_VENDOR_PROPERTY_BLACKLIST)))
Jiyong Parke1346862020-05-18 14:31:30 +0900341
Jiyong Parke28fa802020-05-26 00:21:20 +0900342# -----------------------------------------------------------------
343# product/build.prop
344#
345
346_prop_files_ := $(if $(TARGET_PRODUCT_PROP),\
347 $(TARGET_PRODUCT_PROP),\
348 $(wildcard $(TARGET_DEVICE_DIR)/product.prop))
349
350# Order matters here. When there are duplicates, the last one wins.
351# TODO(b/117892318): don't allow duplicates so that the ordering doesn't matter
352_prop_vars_ := \
353 ADDITIONAL_PRODUCT_PROPERTIES \
354 PRODUCT_PRODUCT_PROPERTIES
355
356INSTALLED_PRODUCT_BUILD_PROP_TARGET := $(TARGET_OUT_PRODUCT)/build.prop
357$(eval $(call build-properties,\
358 product,\
359 $(INSTALLED_PRODUCT_BUILD_PROP_TARGET),\
360 $(_prop_files_),\
361 $(_prop_vars_),\
362 $(empty)))
Jiyong Parke1346862020-05-18 14:31:30 +0900363
364# ----------------------------------------------------------------
Jiyong Parke28fa802020-05-26 00:21:20 +0900365# odm/build.prop
366#
367_prop_files_ := $(if $(TARGET_ODM_PROP),\
368 $(TARGET_ODM_PROP),\
369 $(wildcard $(TARGET_DEVICE_DIR)/odm.prop))
Jiyong Parke1346862020-05-18 14:31:30 +0900370
Jiyong Parke28fa802020-05-26 00:21:20 +0900371# Order matters here. When there are duplicates, the last one wins.
372# TODO(b/117892318): don't allow duplicates so that the ordering doesn't matter
373_prop_vars_ := \
374 ADDITIONAL_ODM_PROPERTIES \
375 PRODUCT_ODM_PROPERTIES
Jiyong Parke1346862020-05-18 14:31:30 +0900376
Jiyong Parke28fa802020-05-26 00:21:20 +0900377INSTALLED_ODM_BUILD_PROP_TARGET := $(TARGET_OUT_ODM)/build.prop
378$(eval $(call build-properties,\
379 odm,\
380 $(INSTALLED_ODM_BUILD_PROP_TARGET),\
381 $(_prop_files),\
382 $(_prop_vars_),\
383 $(empty)))
Jiyong Parke1346862020-05-18 14:31:30 +0900384
385# -----------------------------------------------------------------
Jiyong Parke28fa802020-05-26 00:21:20 +0900386# system_ext/build.prop
387#
388_prop_files_ := $(if $(TARGET_SYSTEM_EXT_PROP),\
389 $(TARGET_SYSTEM_EXT_PROP),\
390 $(wildcard $(TARGET_DEVICE_DIR)/system_ext.prop))
391
392# Order matters here. When there are duplicates, the last one wins.
393# TODO(b/117892318): don't allow duplicates so that the ordering doesn't matter
394_prop_vars_ := PRODUCT_SYSTEM_EXT_PROPERTIES
395
Jiyong Parke1346862020-05-18 14:31:30 +0900396INSTALLED_SYSTEM_EXT_BUILD_PROP_TARGET := $(TARGET_OUT_SYSTEM_EXT)/build.prop
Jiyong Parke28fa802020-05-26 00:21:20 +0900397$(eval $(call build-properties,\
398 system_ext,\
399 $(INSTALLED_SYSTEM_EXT_BUILD_PROP_TARGET),\
400 $(_prop_files_),\
401 $(_prop_vars_),\
402 $(empty)))