blob: 015b366e09dd3c957adca1d180e8d11d468942a8 [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
Jiyong Parkc0bd8c72020-06-29 10:46:22 +090017# sysprop.mk defines rules for generating <partition>/[etc/]build.prop files
Jiyong Parke1346862020-05-18 14:31:30 +090018
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 Parkae556382020-05-20 18:33:43 +090026POST_PROCESS_PROPS := $(HOST_OUT_EXECUTABLES)/post_process_props$(HOST_EXECUTABLE_SUFFIX)
Jiyong Parke1346862020-05-18 14:31:30 +090027
Jiyong Park35a83d12020-05-26 02:01:05 +090028# Emits a set of sysprops common to all partitions to a file.
Jiyong Parke1346862020-05-18 14:31:30 +090029# $(1): Partition name
30# $(2): Output file name
31define generate-common-build-props
LuK13377526a352021-11-23 16:14:57 +020032 bash -c '\
33 $(or $(PRODUCT_BUILD_PROP_OVERRIDES),:);\
Jiyong Park35a83d12020-05-26 02:01:05 +090034 echo "####################################" >> $(2);\
35 echo "# from generate-common-build-props" >> $(2);\
36 echo "# These properties identify this partition image." >> $(2);\
37 echo "####################################" >> $(2);\
Inseob Kimecc27eb2024-07-31 02:00:41 +000038 echo "ro.product.$(1).brand=$(PRODUCT_BRAND)" >> $(2);\
LuK13377526a352021-11-23 16:14:57 +020039 echo "ro.product.$(1).device=$${DeviceName:-$(TARGET_DEVICE)}" >> $(2);\
Inseob Kimecc27eb2024-07-31 02:00:41 +000040 echo "ro.product.$(1).manufacturer=$(PRODUCT_MANUFACTURER)" >> $(2);\
LuK13377526a352021-11-23 16:14:57 +020041 echo "ro.product.$(1).model=$${ProductModel:-$(PRODUCT_MODEL)}" >> $(2);\
42 echo "ro.product.$(1).name=$${DeviceProduct:-$(TARGET_PRODUCT)}" >> $(2);\
Inseob Kimecc27eb2024-07-31 02:00:41 +000043 if [ -n "$(strip $(PRODUCT_MODEL_FOR_ATTESTATION))" ]; then \
44 echo "ro.product.model_for_attestation=$(PRODUCT_MODEL_FOR_ATTESTATION)" >> $(2);\
45 fi; \
46 if [ -n "$(strip $(PRODUCT_BRAND_FOR_ATTESTATION))" ]; then \
47 echo "ro.product.brand_for_attestation=$(PRODUCT_BRAND_FOR_ATTESTATION)" >> $(2);\
48 fi; \
49 if [ -n "$(strip $(PRODUCT_NAME_FOR_ATTESTATION))" ]; then \
50 echo "ro.product.name_for_attestation=$(PRODUCT_NAME_FOR_ATTESTATION)" >> $(2);\
51 fi; \
52 if [ -n "$(strip $(PRODUCT_DEVICE_FOR_ATTESTATION))" ]; then \
53 echo "ro.product.device_for_attestation=$(PRODUCT_DEVICE_FOR_ATTESTATION)" >> $(2);\
54 fi; \
55 if [ -n "$(strip $(PRODUCT_MANUFACTURER_FOR_ATTESTATION))" ]; then \
56 echo "ro.product.manufacturer_for_attestation=$(PRODUCT_MANUFACTURER_FOR_ATTESTATION)" >> $(2);\
57 fi; \
Christopher Ferris66b6fd62022-04-08 15:20:23 -070058 $(if $(filter true,$(ZYGOTE_FORCE_64)),\
59 $(if $(filter vendor,$(1)),\
60 echo "ro.$(1).product.cpu.abilist=$(TARGET_CPU_ABI_LIST_64_BIT)" >> $(2);\
61 echo "ro.$(1).product.cpu.abilist32=" >> $(2);\
62 echo "ro.$(1).product.cpu.abilist64=$(TARGET_CPU_ABI_LIST_64_BIT)" >> $(2);\
63 )\
64 ,\
65 $(if $(filter system vendor odm,$(1)),\
66 echo "ro.$(1).product.cpu.abilist=$(TARGET_CPU_ABI_LIST)" >> $(2);\
67 echo "ro.$(1).product.cpu.abilist32=$(TARGET_CPU_ABI_LIST_32_BIT)" >> $(2);\
68 echo "ro.$(1).product.cpu.abilist64=$(TARGET_CPU_ABI_LIST_64_BIT)" >> $(2);\
69 )\
SzuWei Linbaf5c812020-12-31 16:59:27 +080070 )\
Jiyong Park35a83d12020-05-26 02:01:05 +090071 echo "ro.$(1).build.date=`$(DATE_FROM_FILE)`" >> $(2);\
72 echo "ro.$(1).build.date.utc=`$(DATE_FROM_FILE) +%s`" >> $(2);\
LuK13377526a352021-11-23 16:14:57 +020073 echo "ro.$(1).build.fingerprint?=$${BuildFingerprint:-$(BUILD_FINGERPRINT_FROM_FILE)}" >> $(2);\
Tiffany Yang19450e32023-05-23 17:36:54 -070074 echo "ro.$(1).build.id?=$(BUILD_ID)" >> $(2);\
75 echo "ro.$(1).build.tags?=$(BUILD_VERSION_TAGS)" >> $(2);\
Jiyong Park35a83d12020-05-26 02:01:05 +090076 echo "ro.$(1).build.type=$(TARGET_BUILD_VARIANT)" >> $(2);\
77 echo "ro.$(1).build.version.incremental=$(BUILD_NUMBER_FROM_FILE)" >> $(2);\
Tianjiee88ac672020-10-15 17:22:48 -070078 echo "ro.$(1).build.version.release=$(PLATFORM_VERSION_LAST_STABLE)" >> $(2);\
79 echo "ro.$(1).build.version.release_or_codename=$(PLATFORM_VERSION)" >> $(2);\
Jiyong Park35a83d12020-05-26 02:01:05 +090080 echo "ro.$(1).build.version.sdk=$(PLATFORM_SDK_VERSION)" >> $(2);\
MÃ¥rten Kongstad73d5bfc2024-06-25 13:48:40 +020081 echo "ro.$(1).build.version.sdk_minor=$(PLATFORM_SDK_MINOR_VERSION)" >> $(2);\
LuK13377526a352021-11-23 16:14:57 +020082 ';\
Jiyong Parke1346862020-05-18 14:31:30 +090083
Jiyong Parke1346862020-05-18 14:31:30 +090084endef
85
Jiyong Parkc0bd8c72020-06-29 10:46:22 +090086# Rule for generating <partition>/[etc/]build.prop file
Jiyong Parke28fa802020-05-26 00:21:20 +090087#
88# $(1): partition name
89# $(2): path to the output
90# $(3): path to the input *.prop files. The contents of the files are directly
91# emitted to the output
92# $(4): list of variable names each of which contains name=value pairs
93# $(5): optional list of prop names to force remove from the output. Properties from both
Alexander Mishkovets5a6bc222020-11-11 15:25:37 +010094# $(3) and (4) are affected
95# $(6): optional list of files to append at the end. The content of each file is emitted
96# to the output
Oleksiy Avramchenkod3d0f7d2020-12-15 14:38:32 +010097# $(7): optional flag to skip common properties generation
Jiyong Parke28fa802020-05-26 00:21:20 +090098define build-properties
99ALL_DEFAULT_INSTALLED_MODULES += $(2)
100
Jiyong Parkd721e872020-06-22 17:30:57 +0900101$(eval # Properties can be assigned using `prop ?= value` or `prop = value` syntax.)
102$(eval # Eliminate spaces around the ?= and = separators.)
Jiyong Parke28fa802020-05-26 00:21:20 +0900103$(foreach name,$(strip $(4)),\
Jiyong Parkd721e872020-06-22 17:30:57 +0900104 $(eval _temp := $$(call collapse-pairs,$$($(name)),?=))\
105 $(eval _resolved_$(name) := $$(call collapse-pairs,$$(_temp),=))\
Jiyong Parke28fa802020-05-26 00:21:20 +0900106)
107
Jiyong Park0b4fccb2020-06-26 17:38:00 +0900108$(eval # Implement the legacy behavior when BUILD_BROKEN_DUP_SYSPROP is on.)
109$(eval # Optional assignments are all converted to normal assignments and)
110$(eval # when their duplicates the first one wins)
111$(if $(filter true,$(BUILD_BROKEN_DUP_SYSPROP)),\
112 $(foreach name,$(strip $(4)),\
113 $(eval _temp := $$(subst ?=,=,$$(_resolved_$(name))))\
114 $(eval _resolved_$(name) := $$(call uniq-pairs-by-first-component,$$(_resolved_$(name)),=))\
115 )\
116 $(eval _option := --allow-dup)\
Jiyong Parke28fa802020-05-26 00:21:20 +0900117)
118
Jiakai Zhang53dd8952024-01-18 17:22:13 +0000119$(2): $(POST_PROCESS_PROPS) $(INTERNAL_BUILD_ID_MAKEFILE) $(3) $(6) $(BUILT_KERNEL_VERSION_FILE_FOR_UFFD_GC)
Jiyong Parke28fa802020-05-26 00:21:20 +0900120 $(hide) echo Building $$@
121 $(hide) mkdir -p $$(dir $$@)
122 $(hide) rm -f $$@ && touch $$@
Oleksiy Avramchenkod3d0f7d2020-12-15 14:38:32 +0100123ifneq ($(strip $(7)), true)
Jiyong Parke28fa802020-05-26 00:21:20 +0900124 $(hide) $$(call generate-common-build-props,$(call to-lower,$(strip $(1))),$$@)
Oleksiy Avramchenkod3d0f7d2020-12-15 14:38:32 +0100125endif
Jiyong Parke28fa802020-05-26 00:21:20 +0900126 $(hide) $(foreach file,$(strip $(3)),\
127 if [ -f "$(file)" ]; then\
128 echo "" >> $$@;\
129 echo "####################################" >> $$@;\
130 echo "# from $(file)" >> $$@;\
131 echo "####################################" >> $$@;\
132 cat $(file) >> $$@;\
133 fi;)
134 $(hide) $(foreach name,$(strip $(4)),\
135 echo "" >> $$@;\
136 echo "####################################" >> $$@;\
137 echo "# from variable $(name)" >> $$@;\
138 echo "####################################" >> $$@;\
139 $$(foreach line,$$(_resolved_$(name)),\
140 echo "$$(line)" >> $$@;\
141 )\
142 )
Jiakai Zhang53dd8952024-01-18 17:22:13 +0000143 $(hide) $(POST_PROCESS_PROPS) $$(_option) \
144 --sdk-version $(PLATFORM_SDK_VERSION) \
145 --kernel-version-file-for-uffd-gc "$(BUILT_KERNEL_VERSION_FILE_FOR_UFFD_GC)" \
146 $$@ $(5)
Alexander Mishkovets5a6bc222020-11-11 15:25:37 +0100147 $(hide) $(foreach file,$(strip $(6)),\
148 if [ -f "$(file)" ]; then\
149 cat $(file) >> $$@;\
150 fi;)
Jiyong Parke28fa802020-05-26 00:21:20 +0900151 $(hide) echo "# end of file" >> $$@
Bob Badoure9bdbc52022-03-10 11:31:07 -0800152
Bob Badour1d31e2d2023-03-01 10:31:25 -0800153$(call declare-1p-target,$(2))
Jiyong Parke28fa802020-05-26 00:21:20 +0900154endef
155
Jiyong Parke1346862020-05-18 14:31:30 +0900156# -----------------------------------------------------------------
Jiyong Parkbb26c6f2020-05-26 03:18:36 +0900157# Define fingerprint, thumbprint, and version tags for the current build
Jiyong Parke28fa802020-05-26 00:21:20 +0900158#
Jiyong Parkbb26c6f2020-05-26 03:18:36 +0900159# BUILD_VERSION_TAGS is a comma-separated list of tags chosen by the device
160# implementer that further distinguishes the build. It's basically defined
161# by the device implementer. Here, we are adding a mandatory tag that
162# identifies the signing config of the build.
Jiyong Parke1346862020-05-18 14:31:30 +0900163BUILD_VERSION_TAGS := $(BUILD_VERSION_TAGS)
164ifeq ($(TARGET_BUILD_TYPE),debug)
165 BUILD_VERSION_TAGS += debug
166endif
167# The "test-keys" tag marks builds signed with the old test keys,
168# which are available in the SDK. "dev-keys" marks builds signed with
169# non-default dev keys (usually private keys from a vendor directory).
170# Both of these tags will be removed and replaced with "release-keys"
171# when the target-files is signed in a post-build step.
Marko Mana4762e62020-01-17 01:35:17 +0100172ifneq ($(filter $(ROM_BUILDTYPE), WEEKLY GAPPS MICROG),)
173BUILD_KEYS := release-keys
174else
Jiyong Parke1346862020-05-18 14:31:30 +0900175ifeq ($(DEFAULT_SYSTEM_DEV_CERTIFICATE),build/make/target/product/security/testkey)
176BUILD_KEYS := test-keys
177else
178BUILD_KEYS := dev-keys
179endif
Marko Mana4762e62020-01-17 01:35:17 +0100180endif
Jiyong Parke1346862020-05-18 14:31:30 +0900181BUILD_VERSION_TAGS += $(BUILD_KEYS)
182BUILD_VERSION_TAGS := $(subst $(space),$(comma),$(sort $(BUILD_VERSION_TAGS)))
183
Jiyong Parkbb26c6f2020-05-26 03:18:36 +0900184# BUILD_FINGERPRINT is used used to uniquely identify the combined build and
185# product; used by the OTA server.
Jiyong Parke1346862020-05-18 14:31:30 +0900186ifeq (,$(strip $(BUILD_FINGERPRINT)))
Cole Faustc874c702023-09-27 13:44:56 -0700187 BUILD_FINGERPRINT := $(PRODUCT_BRAND)/$(TARGET_PRODUCT)/$(TARGET_DEVICE):$(PLATFORM_VERSION)/$(BUILD_ID)/$(BUILD_NUMBER_FROM_FILE):$(TARGET_BUILD_VARIANT)/$(BUILD_VERSION_TAGS)
Jiyong Parke1346862020-05-18 14:31:30 +0900188endif
Jiyong Parke1346862020-05-18 14:31:30 +0900189
190BUILD_FINGERPRINT_FILE := $(PRODUCT_OUT)/build_fingerprint.txt
Cole Faustaed81502024-12-03 17:28:44 -0800191ifneq (,$(shell mkdir -p $(PRODUCT_OUT) && echo $(BUILD_FINGERPRINT) >$(BUILD_FINGERPRINT_FILE).tmp && (if ! cmp -s $(BUILD_FINGERPRINT_FILE).tmp $(BUILD_FINGERPRINT_FILE); then mv $(BUILD_FINGERPRINT_FILE).tmp $(BUILD_FINGERPRINT_FILE); else rm $(BUILD_FINGERPRINT_FILE).tmp; fi) && grep " " $(BUILD_FINGERPRINT_FILE)))
Jiyong Parke1346862020-05-18 14:31:30 +0900192 $(error BUILD_FINGERPRINT cannot contain spaces: "$(file <$(BUILD_FINGERPRINT_FILE))")
193endif
194BUILD_FINGERPRINT_FROM_FILE := $$(cat $(BUILD_FINGERPRINT_FILE))
195# unset it for safety.
196BUILD_FINGERPRINT :=
197
Jiyong Parkbb26c6f2020-05-26 03:18:36 +0900198# BUILD_THUMBPRINT is used to uniquely identify the system build; used by the
199# OTA server. This purposefully excludes any product-specific variables.
Jiyong Parke1346862020-05-18 14:31:30 +0900200ifeq (,$(strip $(BUILD_THUMBPRINT)))
201 BUILD_THUMBPRINT := $(PLATFORM_VERSION)/$(BUILD_ID)/$(BUILD_NUMBER_FROM_FILE):$(TARGET_BUILD_VARIANT)/$(BUILD_VERSION_TAGS)
202endif
203
204BUILD_THUMBPRINT_FILE := $(PRODUCT_OUT)/build_thumbprint.txt
Jeongik Cha05210f92023-04-27 11:05:22 +0900205ifeq ($(strip $(HAS_BUILD_NUMBER)),true)
206$(BUILD_THUMBPRINT_FILE): $(BUILD_NUMBER_FILE)
207endif
Jiyong Parke1346862020-05-18 14:31:30 +0900208ifneq (,$(shell mkdir -p $(PRODUCT_OUT) && echo $(BUILD_THUMBPRINT) >$(BUILD_THUMBPRINT_FILE) && grep " " $(BUILD_THUMBPRINT_FILE)))
209 $(error BUILD_THUMBPRINT cannot contain spaces: "$(file <$(BUILD_THUMBPRINT_FILE))")
210endif
Jiyong Parke1346862020-05-18 14:31:30 +0900211# unset it for safety.
Inseob Kim06d22312024-03-27 05:19:56 +0000212BUILD_THUMBPRINT_FILE :=
Jiyong Parke1346862020-05-18 14:31:30 +0900213BUILD_THUMBPRINT :=
214
Jiyong Parkbb26c6f2020-05-26 03:18:36 +0900215KNOWN_OEM_THUMBPRINT_PROPERTIES := \
216 ro.product.brand \
217 ro.product.name \
218 ro.product.device
219OEM_THUMBPRINT_PROPERTIES := $(filter $(KNOWN_OEM_THUMBPRINT_PROPERTIES),\
220 $(PRODUCT_OEM_PROPERTIES))
221KNOWN_OEM_THUMBPRINT_PROPERTIES:=
222
223# -----------------------------------------------------------------
224# system/build.prop
225#
Inseob Kimecc27eb2024-07-31 02:00:41 +0000226# system/build.prop is built by Soong. See system-build.prop module in
227# build/soong/Android.bp.
Jiyong Parkbb26c6f2020-05-26 03:18:36 +0900228
Jiyong Parkbb26c6f2020-05-26 03:18:36 +0900229INSTALLED_BUILD_PROP_TARGET := $(TARGET_OUT)/build.prop
230
Jiyong Parke1346862020-05-18 14:31:30 +0900231# -----------------------------------------------------------------
Jiyong Parke28fa802020-05-26 00:21:20 +0900232# vendor/build.prop
Jiyong Parke1346862020-05-18 14:31:30 +0900233#
Jiyong Parke28fa802020-05-26 00:21:20 +0900234_prop_files_ := $(if $(TARGET_VENDOR_PROP),\
235 $(TARGET_VENDOR_PROP),\
236 $(wildcard $(TARGET_DEVICE_DIR)/vendor.prop))
Jiyong Parke1346862020-05-18 14:31:30 +0900237
Jiyong Park3a2e95a2020-05-25 17:56:09 +0900238android_info_prop := $(call intermediates-dir-for,ETC,android_info_prop)/android_info.prop
239$(android_info_prop): $(INSTALLED_ANDROID_INFO_TXT_TARGET)
240 cat $< | grep 'require version-' | sed -e 's/require version-/ro.build.expect./g' > $@
241
Donghyun Jo8c65ef62021-03-02 08:51:03 +0900242_prop_files_ += $(android_info_prop)
Jiyong Park3a2e95a2020-05-25 17:56:09 +0900243
Jiyong Parke1346862020-05-18 14:31:30 +0900244ifdef property_overrides_split_enabled
Jiyong Parke28fa802020-05-26 00:21:20 +0900245# Order matters here. When there are duplicates, the last one wins.
246# TODO(b/117892318): don't allow duplicates so that the ordering doesn't matter
247_prop_vars_ := \
248 ADDITIONAL_VENDOR_PROPERTIES \
Jiyong Parkeb49b342020-05-29 17:50:03 +0900249 PRODUCT_VENDOR_PROPERTIES
250
251# TODO(b/117892318): deprecate this
252_prop_vars_ += \
253 PRODUCT_DEFAULT_PROPERTY_OVERRIDES \
Jiyong Parke28fa802020-05-26 00:21:20 +0900254 PRODUCT_PROPERTY_OVERRIDES
Jiyong Parke1346862020-05-18 14:31:30 +0900255else
Jiyong Parke28fa802020-05-26 00:21:20 +0900256_prop_vars_ :=
Jiyong Parke1346862020-05-18 14:31:30 +0900257endif
258
Jiyong Parke28fa802020-05-26 00:21:20 +0900259INSTALLED_VENDOR_BUILD_PROP_TARGET := $(TARGET_OUT_VENDOR)/build.prop
260$(eval $(call build-properties,\
261 vendor,\
262 $(INSTALLED_VENDOR_BUILD_PROP_TARGET),\
263 $(_prop_files_),\
264 $(_prop_vars_),\
Alexander Mishkovets5a6bc222020-11-11 15:25:37 +0100265 $(PRODUCT_VENDOR_PROPERTY_BLACKLIST),\
Oleksiy Avramchenkod3d0f7d2020-12-15 14:38:32 +0100266 $(empty),\
Alexander Mishkovets5a6bc222020-11-11 15:25:37 +0100267 $(empty)))
Jiyong Parke1346862020-05-18 14:31:30 +0900268
Bob Badour70c07dd2022-02-12 15:39:22 -0800269$(eval $(call declare-1p-target,$(INSTALLED_VENDOR_BUILD_PROP_TARGET)))
270
Jiyong Parke28fa802020-05-26 00:21:20 +0900271# -----------------------------------------------------------------
Jiyong Parkc0bd8c72020-06-29 10:46:22 +0900272# product/etc/build.prop
Jiyong Parke28fa802020-05-26 00:21:20 +0900273#
Inseob Kim697ac732024-08-08 17:48:43 +0900274# product/etc/build.prop is built by Soong. See product-build.prop module in
275# build/soong/Android.bp.
Jiyong Parke28fa802020-05-26 00:21:20 +0900276
Jiyong Parkc0bd8c72020-06-29 10:46:22 +0900277INSTALLED_PRODUCT_BUILD_PROP_TARGET := $(TARGET_OUT_PRODUCT)/etc/build.prop
Alexander Mishkovets5a6bc222020-11-11 15:25:37 +0100278
Jiyong Parke1346862020-05-18 14:31:30 +0900279# ----------------------------------------------------------------
Jiyong Park62117c82020-06-26 09:56:31 +0900280# odm/etc/build.prop
Jiyong Parke28fa802020-05-26 00:21:20 +0900281#
Inseob Kim697ac732024-08-08 17:48:43 +0900282# odm/etc/build.prop is built by Soong. See odm-build.prop module in
283# build/soong/Android.bp.
Jiyong Parke1346862020-05-18 14:31:30 +0900284
Jiyong Park62117c82020-06-26 09:56:31 +0900285INSTALLED_ODM_BUILD_PROP_TARGET := $(TARGET_OUT_ODM)/etc/build.prop
Bob Badour70c07dd2022-02-12 15:39:22 -0800286
Yifan Hong51a971b2020-06-25 17:00:27 -0700287# ----------------------------------------------------------------
288# vendor_dlkm/etc/build.prop
Spandan Das27443562024-11-06 22:12:11 +0000289# odm_dlkm/etc/build.prop
290# system_dlkm/build.prop
291# These are built by Soong. See build/soong/Android.bp
Yifan Hong51a971b2020-06-25 17:00:27 -0700292
293INSTALLED_VENDOR_DLKM_BUILD_PROP_TARGET := $(TARGET_OUT_VENDOR_DLKM)/etc/build.prop
Yifan Hong81a092f2020-07-15 17:02:07 -0700294INSTALLED_ODM_DLKM_BUILD_PROP_TARGET := $(TARGET_OUT_ODM_DLKM)/etc/build.prop
Ramji Jiyani13a41372022-01-27 07:05:08 +0000295INSTALLED_SYSTEM_DLKM_BUILD_PROP_TARGET := $(TARGET_OUT_SYSTEM_DLKM)/etc/build.prop
Spandan Das27443562024-11-06 22:12:11 +0000296ALL_DEFAULT_INSTALLED_MODULES += \
297 $(INSTALLED_VENDOR_DLKM_BUILD_PROP_TARGET) \
298 $(INSTALLED_ODM_DLKM_BUILD_PROP_TARGET) \
299 $(INSTALLED_SYSTEM_DLKM_BUILD_PROP_TARGET) \
Bob Badour70c07dd2022-02-12 15:39:22 -0800300
Jiyong Parke1346862020-05-18 14:31:30 +0900301# -----------------------------------------------------------------
Jiyong Parkc0bd8c72020-06-29 10:46:22 +0900302# system_ext/etc/build.prop
Jiyong Parke28fa802020-05-26 00:21:20 +0900303#
Inseob Kim697ac732024-08-08 17:48:43 +0900304# system_ext/etc/build.prop is built by Soong. See system-build.prop module in
Inseob Kim2e9d9082024-08-05 12:50:01 +0900305# build/soong/Android.bp.
Jiyong Parke28fa802020-05-26 00:21:20 +0900306
Jiyong Parkc0bd8c72020-06-29 10:46:22 +0900307INSTALLED_SYSTEM_EXT_BUILD_PROP_TARGET := $(TARGET_OUT_SYSTEM_EXT)/etc/build.prop
Bob Badour70c07dd2022-02-12 15:39:22 -0800308
Yifan Hong33fd5d42020-09-24 18:18:26 -0700309RAMDISK_BUILD_PROP_REL_PATH := system/etc/ramdisk/build.prop
Cole Faust5f84cf72024-11-12 15:15:30 -0800310ifeq (true,$(BOARD_USES_RECOVERY_AS_BOOT))
311INSTALLED_RAMDISK_BUILD_PROP_TARGET := $(TARGET_RECOVERY_ROOT_OUT)/first_stage_ramdisk/$(RAMDISK_BUILD_PROP_REL_PATH)
312else
Yifan Hong33fd5d42020-09-24 18:18:26 -0700313INSTALLED_RAMDISK_BUILD_PROP_TARGET := $(TARGET_RAMDISK_OUT)/$(RAMDISK_BUILD_PROP_REL_PATH)
Cole Faust5f84cf72024-11-12 15:15:30 -0800314endif
Wei Li49933362023-01-04 17:13:47 -0800315
316ALL_INSTALLED_BUILD_PROP_FILES := \
317 $(INSTALLED_BUILD_PROP_TARGET) \
318 $(INSTALLED_VENDOR_BUILD_PROP_TARGET) \
319 $(INSTALLED_PRODUCT_BUILD_PROP_TARGET) \
320 $(INSTALLED_ODM_BUILD_PROP_TARGET) \
321 $(INSTALLED_VENDOR_DLKM_BUILD_PROP_TARGET) \
322 $(INSTALLED_ODM_DLKM_BUILD_PROP_TARGET) \
323 $(INSTALLED_SYSTEM_DLKM_BUILD_PROP_TARGET) \
324 $(INSTALLED_SYSTEM_EXT_BUILD_PROP_TARGET) \
325 $(INSTALLED_RAMDISK_BUILD_PROP_TARGET)
326
327# $1 installed file path, e.g. out/target/product/vsoc_x86_64/system/build.prop
328define is-build-prop
329$(if $(findstring $1,$(ALL_INSTALLED_BUILD_PROP_FILES)),Y)
Tiffany Yang19450e32023-05-23 17:36:54 -0700330endef