aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com>2023-10-03 03:44:40 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-10-03 03:44:40 +0000
commitb93e3b021ec87cbfd1924f3b5ca1ed02360df07c (patch)
tree04c63e68be73547abdda46c595d05c829d89b486
parentff198d278765bf7aacc88676afd0ca3f390df5a8 (diff)
parent551570a073c305101ed42df61d6773d7f79cf0e9 (diff)
downloadbuild-b93e3b021ec87cbfd1924f3b5ca1ed02360df07c.tar.gz
Merge "Convert gsi_skip_mount.cfg to soong" into main am: 551570a073
Original change: https://android-review.googlesource.com/c/platform/build/+/2768739 Change-Id: I306f5cc077588f0036726a3c5da9ce5acaeffacd Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--target/product/gsi/Android.bp23
-rw-r--r--target/product/gsi/Android.mk26
-rw-r--r--target/product/gsi_release.mk3
3 files changed, 24 insertions, 28 deletions
diff --git a/target/product/gsi/Android.bp b/target/product/gsi/Android.bp
index a8af9c4eca..45ba14331b 100644
--- a/target/product/gsi/Android.bp
+++ b/target/product/gsi/Android.bp
@@ -23,3 +23,26 @@ filegroup {
"*.txt",
],
}
+
+prebuilt_etc {
+ name: "gsi_skip_mount.cfg",
+ filename: "skip_mount.cfg",
+ src: "gsi_skip_mount.cfg",
+
+ system_ext_specific: true,
+ relative_install_path: "init/config",
+
+ required: ["gsi_skip_mount_compat_symlink"],
+}
+
+// Adds a symlink under /system/etc/init/config pointing to /system/system_ext/etc/init/config
+// because first-stage init in Android 10.0 will read the skip_mount.cfg from /system/etc/* after
+// chroot /system.
+// TODO: remove this symlink when no need to support new GSI on Android 10.
+// The actual file needs to be under /system/system_ext because it's GSI-specific and does not
+// belong to core CSI.
+install_symlink {
+ name: "gsi_skip_mount_compat_symlink",
+ installed_location: "etc/init/config",
+ symlink_target: "/system/system_ext/etc/init/config",
+}
diff --git a/target/product/gsi/Android.mk b/target/product/gsi/Android.mk
index 563712a669..70ee78db75 100644
--- a/target/product/gsi/Android.mk
+++ b/target/product/gsi/Android.mk
@@ -240,32 +240,6 @@ LOCAL_REQUIRED_MODULES := \
include $(BUILD_PHONY_PACKAGE)
#####################################################################
-# skip_mount.cfg, read by init to skip mounting some partitions when GSI is used.
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := gsi_skip_mount.cfg
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
-LOCAL_NOTICE_FILE := build/soong/licenses/LICENSE
-LOCAL_MODULE_STEM := skip_mount.cfg
-LOCAL_SRC_FILES := $(LOCAL_MODULE)
-LOCAL_MODULE_CLASS := ETC
-LOCAL_SYSTEM_EXT_MODULE := true
-LOCAL_MODULE_RELATIVE_PATH := init/config
-
-# Adds a symlink under /system/etc/init/config pointing to /system/system_ext/etc/init/config
-# because first-stage init in Android 10.0 will read the skip_mount.cfg from /system/etc/* after
-# chroot /system.
-# TODO: remove this symlink when no need to support new GSI on Android 10.
-# The actual file needs to be under /system/system_ext because it's GSI-specific and does not
-# belong to core CSI.
-LOCAL_POST_INSTALL_CMD := \
- mkdir -p $(TARGET_OUT)/etc/init; \
- ln -sf /system/system_ext/etc/init/config $(TARGET_OUT)/etc/init/config
-
-include $(BUILD_PREBUILT)
-
-#####################################################################
# init.gsi.rc, GSI-specific init script.
include $(CLEAR_VARS)
diff --git a/target/product/gsi_release.mk b/target/product/gsi_release.mk
index bd85b9f51e..23eb534f45 100644
--- a/target/product/gsi_release.mk
+++ b/target/product/gsi_release.mk
@@ -28,9 +28,8 @@
BUILDING_GSI := true
-# Exclude all files under system/product and system/system_ext,
-# and the vndk apex's compat symlinks
PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += \
+ system/etc/init/config \
system/product/% \
system/system_ext/% \
system/lib/vndk-29 \