From 65b9ee20401f7a64de94b9d6527a7628f45b9500 Mon Sep 17 00:00:00 2001 From: Inseob Kim Date: Mon, 5 Aug 2024 12:50:01 +0900 Subject: [PATCH] Build system_ext build.prop with Soong Bug: 322090587 Test: build and compare system_ext/etc/build.prop Change-Id: I7b1af2e2b1fe7f107e1540d7b797c7bf489b8a0d --- core/config.mk | 6 +++++- core/soong_config.mk | 1 + core/sysprop.mk | 19 ++----------------- target/product/base_system_ext.mk | 1 + 4 files changed, 9 insertions(+), 18 deletions(-) diff --git a/core/config.mk b/core/config.mk index c1d832d379..6edb5b2f52 100644 --- a/core/config.mk +++ b/core/config.mk @@ -1264,7 +1264,11 @@ ifeq ($(TARGET_SYSTEM_PROP),) TARGET_SYSTEM_PROP := $(wildcard $(TARGET_DEVICE_DIR)/system.prop) endif -.KATI_READONLY += TARGET_SYSTEM_PROP +ifeq ($(TARGET_SYSTEM_EXT_PROP),) +TARGET_SYSTEM_EXT_PROP := $(wildcard $(TARGET_DEVICE_DIR)/system_ext.prop) +endif + +.KATI_READONLY += TARGET_SYSTEM_PROP TARGET_SYSTEM_EXT_PROP include $(BUILD_SYSTEM)/sysprop_config.mk diff --git a/core/soong_config.mk b/core/soong_config.mk index a4f013b067..070344e7ee 100644 --- a/core/soong_config.mk +++ b/core/soong_config.mk @@ -364,6 +364,7 @@ $(call add_json_bool, BoardUseVbmetaDigestInFingerprint, $(filter true,$(BOARD_U $(call add_json_list, OemProperties, $(PRODUCT_OEM_PROPERTIES)) $(call add_json_list, SystemPropFiles, $(TARGET_SYSTEM_PROP)) +$(call add_json_list, SystemExtPropFiles, $(TARGET_SYSTEM_EXT_PROP)) # Do not set ArtTargetIncludeDebugBuild into any value if PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD is not set, # to have the same behavior from runtime_libart.mk. diff --git a/core/sysprop.mk b/core/sysprop.mk index 7dd756a158..6d65e19efa 100644 --- a/core/sysprop.mk +++ b/core/sysprop.mk @@ -395,25 +395,10 @@ $(eval $(call declare-1p-target,$(INSTALLED_SYSTEM_DLKM_BUILD_PROP_TARGET))) # ----------------------------------------------------------------- # system_ext/etc/build.prop # -_prop_files_ := $(if $(TARGET_SYSTEM_EXT_PROP),\ - $(TARGET_SYSTEM_EXT_PROP),\ - $(wildcard $(TARGET_DEVICE_DIR)/system_ext.prop)) - -# Order matters here. When there are duplicates, the last one wins. -# TODO(b/117892318): don't allow duplicates so that the ordering doesn't matter -_prop_vars_ := PRODUCT_SYSTEM_EXT_PROPERTIES +# system_ext/build.prop is built by Soong. See system-build.prop module in +# build/soong/Android.bp. INSTALLED_SYSTEM_EXT_BUILD_PROP_TARGET := $(TARGET_OUT_SYSTEM_EXT)/etc/build.prop -$(eval $(call build-properties,\ - system_ext,\ - $(INSTALLED_SYSTEM_EXT_BUILD_PROP_TARGET),\ - $(_prop_files_),\ - $(_prop_vars_),\ - $(empty),\ - $(empty),\ - $(empty))) - -$(eval $(call declare-1p-target,$(INSTALLED_SYSTEM_EXT_BUILD_PROP_TARGET))) # ---------------------------------------------------------------- # ramdisk/boot/etc/build.prop diff --git a/target/product/base_system_ext.mk b/target/product/base_system_ext.mk index 92ca227a01..febe5378b5 100644 --- a/target/product/base_system_ext.mk +++ b/target/product/base_system_ext.mk @@ -24,6 +24,7 @@ PRODUCT_PACKAGES += \ SatelliteClient \ selinux_policy_system_ext \ system_ext_manifest.xml \ + system_ext-build.prop \ # Base modules when shipping api level is less than or equal to 34 PRODUCT_PACKAGES_SHIPPING_API_LEVEL_34 += \