Convert gsi_skip_mount.cfg to soong
The LOCAL_POST_INSTALL_CMD is problematic for m installclean-less builds. Bug: 205632228 Test: presubmits Change-Id: Id4eb2fd5fbd4f080aec89fa90583ac2ec97c5e1c
This commit is contained in:
@@ -23,3 +23,26 @@ filegroup {
|
|||||||
"*.txt",
|
"*.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",
|
||||||
|
}
|
||||||
|
@@ -239,32 +239,6 @@ LOCAL_REQUIRED_MODULES := \
|
|||||||
|
|
||||||
include $(BUILD_PHONY_PACKAGE)
|
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.
|
# init.gsi.rc, GSI-specific init script.
|
||||||
|
|
||||||
|
@@ -28,9 +28,8 @@
|
|||||||
|
|
||||||
BUILDING_GSI := true
|
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 += \
|
PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += \
|
||||||
|
system/etc/init/config \
|
||||||
system/product/% \
|
system/product/% \
|
||||||
system/system_ext/% \
|
system/system_ext/% \
|
||||||
system/lib/vndk-29 \
|
system/lib/vndk-29 \
|
||||||
|
Reference in New Issue
Block a user