blob: 0cee81c6c1034cd9579c9e03160b827aec0475de [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
74# TODO(b/117892318): eliminate the call to uniq-pairs-by-first-component when
75# it is guaranteed that there is no dup.
76$(foreach name,$(strip $(4)),\
77 $(eval _resolved_$(name) := $$(call collapse-pairs, $$(call uniq-pairs-by-first-component,$$($(name)),=)))\
78)
79
Jiyong Park35a83d12020-05-26 02:01:05 +090080$(2): $(POST_PROCESS_PROPS) $(INTERNAL_BUILD_ID_MAKEFILE) $(API_FINGERPRINT) $(3)
Jiyong Parke28fa802020-05-26 00:21:20 +090081 $(hide) echo Building $$@
82 $(hide) mkdir -p $$(dir $$@)
83 $(hide) rm -f $$@ && touch $$@
84 $(hide) $$(call generate-common-build-props,$(call to-lower,$(strip $(1))),$$@)
85 $(hide) $(foreach file,$(strip $(3)),\
86 if [ -f "$(file)" ]; then\
87 echo "" >> $$@;\
88 echo "####################################" >> $$@;\
89 echo "# from $(file)" >> $$@;\
90 echo "####################################" >> $$@;\
91 cat $(file) >> $$@;\
92 fi;)
93 $(hide) $(foreach name,$(strip $(4)),\
94 echo "" >> $$@;\
95 echo "####################################" >> $$@;\
96 echo "# from variable $(name)" >> $$@;\
97 echo "####################################" >> $$@;\
98 $$(foreach line,$$(_resolved_$(name)),\
99 echo "$$(line)" >> $$@;\
100 )\
101 )
102 $(hide) $(POST_PROCESS_PROPS) $$@ $(5)
103 $(hide) echo "# end of file" >> $$@
104endef
105
Jiyong Parke1346862020-05-18 14:31:30 +0900106# -----------------------------------------------------------------
Jiyong Parkbb26c6f2020-05-26 03:18:36 +0900107# Define fingerprint, thumbprint, and version tags for the current build
Jiyong Parke28fa802020-05-26 00:21:20 +0900108#
Jiyong Parkbb26c6f2020-05-26 03:18:36 +0900109# BUILD_VERSION_TAGS is a comma-separated list of tags chosen by the device
110# implementer that further distinguishes the build. It's basically defined
111# by the device implementer. Here, we are adding a mandatory tag that
112# identifies the signing config of the build.
Jiyong Parke1346862020-05-18 14:31:30 +0900113BUILD_VERSION_TAGS := $(BUILD_VERSION_TAGS)
114ifeq ($(TARGET_BUILD_TYPE),debug)
115 BUILD_VERSION_TAGS += debug
116endif
117# The "test-keys" tag marks builds signed with the old test keys,
118# which are available in the SDK. "dev-keys" marks builds signed with
119# non-default dev keys (usually private keys from a vendor directory).
120# Both of these tags will be removed and replaced with "release-keys"
121# when the target-files is signed in a post-build step.
122ifeq ($(DEFAULT_SYSTEM_DEV_CERTIFICATE),build/make/target/product/security/testkey)
123BUILD_KEYS := test-keys
124else
125BUILD_KEYS := dev-keys
126endif
127BUILD_VERSION_TAGS += $(BUILD_KEYS)
128BUILD_VERSION_TAGS := $(subst $(space),$(comma),$(sort $(BUILD_VERSION_TAGS)))
129
Jiyong Parkbb26c6f2020-05-26 03:18:36 +0900130# BUILD_FINGERPRINT is used used to uniquely identify the combined build and
131# product; used by the OTA server.
Jiyong Parke1346862020-05-18 14:31:30 +0900132ifeq (,$(strip $(BUILD_FINGERPRINT)))
133 ifeq ($(strip $(HAS_BUILD_NUMBER)),false)
134 BF_BUILD_NUMBER := $(BUILD_USERNAME)$$($(DATE_FROM_FILE) +%m%d%H%M)
135 else
136 BF_BUILD_NUMBER := $(file <$(BUILD_NUMBER_FILE))
137 endif
138 BUILD_FINGERPRINT := $(PRODUCT_BRAND)/$(TARGET_PRODUCT)/$(TARGET_DEVICE):$(PLATFORM_VERSION)/$(BUILD_ID)/$(BF_BUILD_NUMBER):$(TARGET_BUILD_VARIANT)/$(BUILD_VERSION_TAGS)
139endif
140# unset it for safety.
141BF_BUILD_NUMBER :=
142
143BUILD_FINGERPRINT_FILE := $(PRODUCT_OUT)/build_fingerprint.txt
144ifneq (,$(shell mkdir -p $(PRODUCT_OUT) && echo $(BUILD_FINGERPRINT) >$(BUILD_FINGERPRINT_FILE) && grep " " $(BUILD_FINGERPRINT_FILE)))
145 $(error BUILD_FINGERPRINT cannot contain spaces: "$(file <$(BUILD_FINGERPRINT_FILE))")
146endif
147BUILD_FINGERPRINT_FROM_FILE := $$(cat $(BUILD_FINGERPRINT_FILE))
148# unset it for safety.
149BUILD_FINGERPRINT :=
150
Jiyong Parkbb26c6f2020-05-26 03:18:36 +0900151# BUILD_THUMBPRINT is used to uniquely identify the system build; used by the
152# OTA server. This purposefully excludes any product-specific variables.
Jiyong Parke1346862020-05-18 14:31:30 +0900153ifeq (,$(strip $(BUILD_THUMBPRINT)))
154 BUILD_THUMBPRINT := $(PLATFORM_VERSION)/$(BUILD_ID)/$(BUILD_NUMBER_FROM_FILE):$(TARGET_BUILD_VARIANT)/$(BUILD_VERSION_TAGS)
155endif
156
157BUILD_THUMBPRINT_FILE := $(PRODUCT_OUT)/build_thumbprint.txt
158ifneq (,$(shell mkdir -p $(PRODUCT_OUT) && echo $(BUILD_THUMBPRINT) >$(BUILD_THUMBPRINT_FILE) && grep " " $(BUILD_THUMBPRINT_FILE)))
159 $(error BUILD_THUMBPRINT cannot contain spaces: "$(file <$(BUILD_THUMBPRINT_FILE))")
160endif
161BUILD_THUMBPRINT_FROM_FILE := $$(cat $(BUILD_THUMBPRINT_FILE))
162# unset it for safety.
163BUILD_THUMBPRINT :=
164
Jiyong Parkbb26c6f2020-05-26 03:18:36 +0900165# -----------------------------------------------------------------
166# Define human readable strings that describe this build
167#
Jiyong Parke1346862020-05-18 14:31:30 +0900168
Jiyong Parkbb26c6f2020-05-26 03:18:36 +0900169# BUILD_ID: detail info; has the same info as the build fingerprint
170BUILD_DESC := $(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT) $(PLATFORM_VERSION) $(BUILD_ID) $(BUILD_NUMBER_FROM_FILE) $(BUILD_VERSION_TAGS)
171
172# BUILD_DISPLAY_ID is shown under Settings -> About Phone
Jiyong Parke1346862020-05-18 14:31:30 +0900173ifeq ($(TARGET_BUILD_VARIANT),user)
174 # User builds should show:
175 # release build number or branch.buld_number non-release builds
176
177 # Dev. branches should have DISPLAY_BUILD_NUMBER set
178 ifeq (true,$(DISPLAY_BUILD_NUMBER))
179 BUILD_DISPLAY_ID := $(BUILD_ID).$(BUILD_NUMBER_FROM_FILE) $(BUILD_KEYS)
180 else
181 BUILD_DISPLAY_ID := $(BUILD_ID) $(BUILD_KEYS)
182 endif
183else
184 # Non-user builds should show detailed build information
Jiyong Parkbb26c6f2020-05-26 03:18:36 +0900185 BUILD_DISPLAY_ID := $(BUILD_DESC)
Jiyong Parke1346862020-05-18 14:31:30 +0900186endif
187
Jiyong Parke1346862020-05-18 14:31:30 +0900188# TARGET_BUILD_FLAVOR and ro.build.flavor are used only by the test
189# harness to distinguish builds. Only add _asan for a sanitized build
190# if it isn't already a part of the flavor (via a dedicated lunch
191# config for example).
192TARGET_BUILD_FLAVOR := $(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT)
193ifneq (, $(filter address, $(SANITIZE_TARGET)))
194ifeq (,$(findstring _asan,$(TARGET_BUILD_FLAVOR)))
195TARGET_BUILD_FLAVOR := $(TARGET_BUILD_FLAVOR)_asan
196endif
197endif
198
Jiyong Parkbb26c6f2020-05-26 03:18:36 +0900199KNOWN_OEM_THUMBPRINT_PROPERTIES := \
200 ro.product.brand \
201 ro.product.name \
202 ro.product.device
203OEM_THUMBPRINT_PROPERTIES := $(filter $(KNOWN_OEM_THUMBPRINT_PROPERTIES),\
204 $(PRODUCT_OEM_PROPERTIES))
205KNOWN_OEM_THUMBPRINT_PROPERTIES:=
206
207# -----------------------------------------------------------------
208# system/build.prop
209#
210# Note: parts of this file that can't be generated by the build-properties
211# macro are manually created as separate files and then fed into the macro
212
213# Accepts a whitespace separated list of product locales such as
214# (en_US en_AU en_GB...) and returns the first locale in the list with
215# underscores replaced with hyphens. In the example above, this will
216# return "en-US".
217define get-default-product-locale
218$(strip $(subst _,-, $(firstword $(1))))
219endef
220
221gen_from_buildinfo_sh := $(call intermediates-dir-for,ETC,system_build_prop)/buildinfo.prop
222$(gen_from_buildinfo_sh): $(INTERNAL_BUILD_ID_MAKEFILE) $(API_FINGERPRINT)
Jiyong Parke1346862020-05-18 14:31:30 +0900223 $(hide) TARGET_BUILD_TYPE="$(TARGET_BUILD_VARIANT)" \
224 TARGET_BUILD_FLAVOR="$(TARGET_BUILD_FLAVOR)" \
225 TARGET_DEVICE="$(TARGET_DEVICE)" \
226 PRODUCT_DEFAULT_LOCALE="$(call get-default-product-locale,$(PRODUCT_LOCALES))" \
227 PRODUCT_DEFAULT_WIFI_CHANNELS="$(PRODUCT_DEFAULT_WIFI_CHANNELS)" \
Jiyong Parkbb26c6f2020-05-26 03:18:36 +0900228 PRIVATE_BUILD_DESC="$(BUILD_DESC)" \
Jiyong Parke1346862020-05-18 14:31:30 +0900229 BUILD_ID="$(BUILD_ID)" \
230 BUILD_DISPLAY_ID="$(BUILD_DISPLAY_ID)" \
231 DATE="$(DATE_FROM_FILE)" \
232 BUILD_USERNAME="$(BUILD_USERNAME)" \
233 BUILD_HOSTNAME="$(BUILD_HOSTNAME)" \
234 BUILD_NUMBER="$(BUILD_NUMBER_FROM_FILE)" \
235 BOARD_BUILD_SYSTEM_ROOT_IMAGE="$(BOARD_BUILD_SYSTEM_ROOT_IMAGE)" \
236 PLATFORM_VERSION="$(PLATFORM_VERSION)" \
237 PLATFORM_VERSION_LAST_STABLE="$(PLATFORM_VERSION_LAST_STABLE)" \
238 PLATFORM_SECURITY_PATCH="$(PLATFORM_SECURITY_PATCH)" \
239 PLATFORM_BASE_OS="$(PLATFORM_BASE_OS)" \
240 PLATFORM_SDK_VERSION="$(PLATFORM_SDK_VERSION)" \
241 PLATFORM_PREVIEW_SDK_VERSION="$(PLATFORM_PREVIEW_SDK_VERSION)" \
242 PLATFORM_PREVIEW_SDK_FINGERPRINT="$$(cat $(API_FINGERPRINT))" \
243 PLATFORM_VERSION_CODENAME="$(PLATFORM_VERSION_CODENAME)" \
244 PLATFORM_VERSION_ALL_CODENAMES="$(PLATFORM_VERSION_ALL_CODENAMES)" \
245 PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION="$(PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION)" \
246 BUILD_VERSION_TAGS="$(BUILD_VERSION_TAGS)" \
247 $(if $(OEM_THUMBPRINT_PROPERTIES),BUILD_THUMBPRINT="$(BUILD_THUMBPRINT_FROM_FILE)") \
248 TARGET_CPU_ABI_LIST="$(TARGET_CPU_ABI_LIST)" \
249 TARGET_CPU_ABI_LIST_32_BIT="$(TARGET_CPU_ABI_LIST_32_BIT)" \
250 TARGET_CPU_ABI_LIST_64_BIT="$(TARGET_CPU_ABI_LIST_64_BIT)" \
251 TARGET_CPU_ABI="$(TARGET_CPU_ABI)" \
252 TARGET_CPU_ABI2="$(TARGET_CPU_ABI2)" \
Jiyong Parkbb26c6f2020-05-26 03:18:36 +0900253 bash $(BUILDINFO_SH) > $@
Jiyong Parke1346862020-05-18 14:31:30 +0900254
Jiyong Parkbb26c6f2020-05-26 03:18:36 +0900255ifneq ($(PRODUCT_OEM_PROPERTIES),)
256import_oem_prop := $(call intermediates-dir-for,ETC,system_build_prop)/oem.prop
Jiyong Parke1346862020-05-18 14:31:30 +0900257
Jiyong Parkbb26c6f2020-05-26 03:18:36 +0900258$(import_oem_prop):
259 $(hide) echo "#" >> $@; \
260 echo "# PRODUCT_OEM_PROPERTIES" >> $@; \
261 echo "#" >> $@;
262 $(hide) $(foreach prop,$(PRODUCT_OEM_PROPERTIES), \
263 echo "import /oem/oem.prop $(prop)" >> $@;)
264else
265import_oem_prop :=
266endif
267
268ifdef TARGET_SYSTEM_PROP
269system_prop_file := $(TARGET_SYSTEM_PROP)
270else
271system_prop_file := $(wildcard $(TARGET_DEVICE_DIR)/system.prop)
272endif
273
274_prop_files_ := \
275 $(import_oem_prop) \
276 $(gen_from_buildinfo_sh) \
277 $(system_prop_file)
278
279# Order matters here. When there are duplicates, the last one wins.
280# TODO(b/117892318): don't allow duplicates so that the ordering doesn't matter
281_prop_vars_ := \
282 ADDITIONAL_SYSTEM_PROPERTIES \
Jiyong Parkeb49b342020-05-29 17:50:03 +0900283 PRODUCT_SYSTEM_PROPERTIES
284
285# TODO(b/117892318): deprecate this
286_prop_vars_ += \
Jiyong Parkbb26c6f2020-05-26 03:18:36 +0900287 PRODUCT_SYSTEM_DEFAULT_PROPERTIES
288
289ifndef property_overrides_split_enabled
290_prop_vars_ += \
291 ADDITIONAL_VENDOR_PROPERTIES
292endif
293
294_blacklist_names_ := \
295 $(PRODUCT_SYSTEM_PROPERTY_BLACKLIST) \
296 ro.product.first_api_level
297
298INSTALLED_BUILD_PROP_TARGET := $(TARGET_OUT)/build.prop
299
300$(eval $(call build-properties,system,$(INSTALLED_BUILD_PROP_TARGET),\
301$(_prop_files_),$(_prop_vars_),\
302$(_blacklist_names_)))
303
Jiyong Parke1346862020-05-18 14:31:30 +0900304
305# -----------------------------------------------------------------
Jiyong Parke28fa802020-05-26 00:21:20 +0900306# vendor/build.prop
Jiyong Parke1346862020-05-18 14:31:30 +0900307#
Jiyong Parke28fa802020-05-26 00:21:20 +0900308_prop_files_ := $(if $(TARGET_VENDOR_PROP),\
309 $(TARGET_VENDOR_PROP),\
310 $(wildcard $(TARGET_DEVICE_DIR)/vendor.prop))
Jiyong Parke1346862020-05-18 14:31:30 +0900311
Jiyong Park3a2e95a2020-05-25 17:56:09 +0900312android_info_prop := $(call intermediates-dir-for,ETC,android_info_prop)/android_info.prop
313$(android_info_prop): $(INSTALLED_ANDROID_INFO_TXT_TARGET)
314 cat $< | grep 'require version-' | sed -e 's/require version-/ro.build.expect./g' > $@
315
Jiyong Parke28fa802020-05-26 00:21:20 +0900316_prop_files_ += $(android_info_pro)
Jiyong Park3a2e95a2020-05-25 17:56:09 +0900317
Jiyong Parke1346862020-05-18 14:31:30 +0900318ifdef property_overrides_split_enabled
Jiyong Parke28fa802020-05-26 00:21:20 +0900319# Order matters here. When there are duplicates, the last one wins.
320# TODO(b/117892318): don't allow duplicates so that the ordering doesn't matter
321_prop_vars_ := \
322 ADDITIONAL_VENDOR_PROPERTIES \
Jiyong Parkeb49b342020-05-29 17:50:03 +0900323 PRODUCT_VENDOR_PROPERTIES
324
325# TODO(b/117892318): deprecate this
326_prop_vars_ += \
327 PRODUCT_DEFAULT_PROPERTY_OVERRIDES \
Jiyong Parke28fa802020-05-26 00:21:20 +0900328 PRODUCT_PROPERTY_OVERRIDES
Jiyong Parke1346862020-05-18 14:31:30 +0900329else
Jiyong Parke28fa802020-05-26 00:21:20 +0900330_prop_vars_ :=
Jiyong Parke1346862020-05-18 14:31:30 +0900331endif
332
Jiyong Parke28fa802020-05-26 00:21:20 +0900333INSTALLED_VENDOR_BUILD_PROP_TARGET := $(TARGET_OUT_VENDOR)/build.prop
334$(eval $(call build-properties,\
335 vendor,\
336 $(INSTALLED_VENDOR_BUILD_PROP_TARGET),\
337 $(_prop_files_),\
338 $(_prop_vars_),\
339 $(PRODUCT_VENDOR_PROPERTY_BLACKLIST)))
Jiyong Parke1346862020-05-18 14:31:30 +0900340
Jiyong Parke28fa802020-05-26 00:21:20 +0900341# -----------------------------------------------------------------
342# product/build.prop
343#
344
345_prop_files_ := $(if $(TARGET_PRODUCT_PROP),\
346 $(TARGET_PRODUCT_PROP),\
347 $(wildcard $(TARGET_DEVICE_DIR)/product.prop))
348
349# Order matters here. When there are duplicates, the last one wins.
350# TODO(b/117892318): don't allow duplicates so that the ordering doesn't matter
351_prop_vars_ := \
352 ADDITIONAL_PRODUCT_PROPERTIES \
353 PRODUCT_PRODUCT_PROPERTIES
354
355INSTALLED_PRODUCT_BUILD_PROP_TARGET := $(TARGET_OUT_PRODUCT)/build.prop
356$(eval $(call build-properties,\
357 product,\
358 $(INSTALLED_PRODUCT_BUILD_PROP_TARGET),\
359 $(_prop_files_),\
360 $(_prop_vars_),\
361 $(empty)))
Jiyong Parke1346862020-05-18 14:31:30 +0900362
363# ----------------------------------------------------------------
Jiyong Parke28fa802020-05-26 00:21:20 +0900364# odm/build.prop
365#
366_prop_files_ := $(if $(TARGET_ODM_PROP),\
367 $(TARGET_ODM_PROP),\
368 $(wildcard $(TARGET_DEVICE_DIR)/odm.prop))
Jiyong Parke1346862020-05-18 14:31:30 +0900369
Jiyong Parke28fa802020-05-26 00:21:20 +0900370# Order matters here. When there are duplicates, the last one wins.
371# TODO(b/117892318): don't allow duplicates so that the ordering doesn't matter
372_prop_vars_ := \
373 ADDITIONAL_ODM_PROPERTIES \
374 PRODUCT_ODM_PROPERTIES
Jiyong Parke1346862020-05-18 14:31:30 +0900375
Jiyong Parke28fa802020-05-26 00:21:20 +0900376INSTALLED_ODM_BUILD_PROP_TARGET := $(TARGET_OUT_ODM)/build.prop
377$(eval $(call build-properties,\
378 odm,\
379 $(INSTALLED_ODM_BUILD_PROP_TARGET),\
380 $(_prop_files),\
381 $(_prop_vars_),\
382 $(empty)))
Jiyong Parke1346862020-05-18 14:31:30 +0900383
384# -----------------------------------------------------------------
Jiyong Parke28fa802020-05-26 00:21:20 +0900385# system_ext/build.prop
386#
387_prop_files_ := $(if $(TARGET_SYSTEM_EXT_PROP),\
388 $(TARGET_SYSTEM_EXT_PROP),\
389 $(wildcard $(TARGET_DEVICE_DIR)/system_ext.prop))
390
391# Order matters here. When there are duplicates, the last one wins.
392# TODO(b/117892318): don't allow duplicates so that the ordering doesn't matter
393_prop_vars_ := PRODUCT_SYSTEM_EXT_PROPERTIES
394
Jiyong Parke1346862020-05-18 14:31:30 +0900395INSTALLED_SYSTEM_EXT_BUILD_PROP_TARGET := $(TARGET_OUT_SYSTEM_EXT)/build.prop
Jiyong Parke28fa802020-05-26 00:21:20 +0900396$(eval $(call build-properties,\
397 system_ext,\
398 $(INSTALLED_SYSTEM_EXT_BUILD_PROP_TARGET),\
399 $(_prop_files_),\
400 $(_prop_vars_),\
401 $(empty)))