Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2fc007eb authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Reland: Moving GSI-specific files to system_ext"

parents 414108c6 ac3c65b7
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -655,6 +655,10 @@ $(call add-clean-step, rm -rf $(OUT_DIR)/target/product/generic*/*system_ext*)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/product/generic*/*/product)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/product/generic*/*/product)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/product/generic*/*/system_ext)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/product/generic*/*/system_ext)


# Move GSI-specific files from /system to /system/system_ext
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/init/init.gsi.rc)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/init/config/)

# ************************************************
# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# ************************************************
# ************************************************
+35 −0
Original line number Original line Diff line number Diff line
@@ -169,3 +169,38 @@ _binder32 :=
include $(BUILD_PHONY_PACKAGE)
include $(BUILD_PHONY_PACKAGE)


endif # BOARD_VNDK_VERSION is set
endif # BOARD_VNDK_VERSION is set

#####################################################################
# 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_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)
LOCAL_MODULE := init.gsi.rc
LOCAL_SRC_FILES := $(LOCAL_MODULE)
LOCAL_MODULE_CLASS := ETC
LOCAL_SYSTEM_EXT_MODULE := true
LOCAL_MODULE_RELATIVE_PATH := init

include $(BUILD_PREBUILT)
+3 −8
Original line number Original line Diff line number Diff line
@@ -50,11 +50,6 @@ PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST += \
# Some GSI builds enable dexpreopt, whitelist these preopt files
# Some GSI builds enable dexpreopt, whitelist these preopt files
PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST += %.odex %.vdex %.art
PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST += %.odex %.vdex %.art


# Exclude GSI specific files
PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST += \
    system/etc/init/config/skip_mount.cfg \
    system/etc/init/init.gsi.rc \

# Exclude all files under system/product and system/system_ext
# Exclude all files under system/product and system/system_ext
PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST += \
PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST += \
    system/product/% \
    system/product/% \
@@ -71,9 +66,9 @@ PRODUCT_USE_DYNAMIC_PARTITION_SIZE := true
PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE := true
PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE := true


# GSI specific tasks on boot
# GSI specific tasks on boot
PRODUCT_COPY_FILES += \
PRODUCT_PACKAGES += \
    build/make/target/product/gsi/skip_mount.cfg:system/etc/init/config/skip_mount.cfg \
    gsi_skip_mount.cfg \
    build/make/target/product/gsi/init.gsi.rc:system/etc/init/init.gsi.rc \
    init.gsi.rc


# Support addtional P vendor interface
# Support addtional P vendor interface
PRODUCT_EXTRA_VNDK_VERSIONS := 28
PRODUCT_EXTRA_VNDK_VERSIONS := 28
+3 −8
Original line number Original line Diff line number Diff line
@@ -24,11 +24,6 @@
# - etc.
# - etc.
#
#


# Exclude GSI specific files
PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST += \
    system/etc/init/config/skip_mount.cfg \
    system/etc/init/init.gsi.rc \

# Exclude all files under system/product and system/system_ext
# Exclude all files under system/product and system/system_ext
PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST += \
PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST += \
    system/product/% \
    system/product/% \
@@ -50,9 +45,9 @@ PRODUCT_USE_DYNAMIC_PARTITION_SIZE := true
PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE := true
PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE := true


# GSI specific tasks on boot
# GSI specific tasks on boot
PRODUCT_COPY_FILES += \
PRODUCT_PACKAGES += \
    build/make/target/product/gsi/skip_mount.cfg:system/etc/init/config/skip_mount.cfg \
    gsi_skip_mount.cfg \
    build/make/target/product/gsi/init.gsi.rc:system/etc/init/init.gsi.rc \
    init.gsi.rc


# Support addtional P VNDK packages
# Support addtional P VNDK packages
PRODUCT_EXTRA_VNDK_VERSIONS := 28
PRODUCT_EXTRA_VNDK_VERSIONS := 28