Add zygote init script to mainline_system.mk
We may add all possible scripts to "root" to clean up the whitelists
of mainline devices.
One of the zygote init scripts is selected by "ro.zygote" property.
Bug: 143121605
Test: build test for all device targets
Change-Id: I4435f1c48a306c3a8d42522ed780d405a32780b4
diff --git a/target/product/aosp_arm64.mk b/target/product/aosp_arm64.mk
index cc4785a..dda805f 100644
--- a/target/product/aosp_arm64.mk
+++ b/target/product/aosp_arm64.mk
@@ -39,9 +39,6 @@
PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := relaxed
endif
-PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST += \
- root/init.zygote64_32.rc \
-
#
# All components inherited here go to product image
#
diff --git a/target/product/aosp_x86_64.mk b/target/product/aosp_x86_64.mk
index a471702..153f499 100644
--- a/target/product/aosp_x86_64.mk
+++ b/target/product/aosp_x86_64.mk
@@ -39,9 +39,6 @@
PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := relaxed
endif
-PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST += \
- root/init.zygote64_32.rc \
-
#
# All components inherited here go to product image
#
diff --git a/target/product/gsi_arm64.mk b/target/product/gsi_arm64.mk
index 09fb633..645bc3a 100644
--- a/target/product/gsi_arm64.mk
+++ b/target/product/gsi_arm64.mk
@@ -23,9 +23,6 @@
# Enable mainline checking
PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := relaxed
-PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST += \
- root/init.zygote64_32.rc \
-
#
# All components inherited here go to product image
#
diff --git a/target/product/gsi_release.mk b/target/product/gsi_release.mk
index cab3916..faaa935 100644
--- a/target/product/gsi_release.mk
+++ b/target/product/gsi_release.mk
@@ -51,19 +51,3 @@
# Support addtional P and Q VNDK packages
PRODUCT_EXTRA_VNDK_VERSIONS := 28 29
-
-# The 64 bits GSI build targets inhiert core_64_bit.mk to enable 64 bits and
-# include the init.zygote64_32.rc.
-# 64 bits GSI for releasing need to includes different zygote settings for
-# vendor.img to select by setting property ro.zygote=zygote64_32 or
-# ro.zygote=zygote32_64:
-# 1. 64-bit primary, 32-bit secondary, or
-# 2. 32-bit primary, 64-bit secondary
-# Here includes the init.zygote32_64.rc if it had inhierted core_64_bit.mk.
-ifeq (true|true,$(TARGET_SUPPORTS_32_BIT_APPS)|$(TARGET_SUPPORTS_64_BIT_APPS))
-PRODUCT_COPY_FILES += \
- system/core/rootdir/init.zygote32_64.rc:root/init.zygote32_64.rc
-
-PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST += \
- root/init.zygote32_64.rc
-endif
diff --git a/target/product/mainline_arm64.mk b/target/product/mainline_arm64.mk
index 6d998d6..666ce41 100644
--- a/target/product/mainline_arm64.mk
+++ b/target/product/mainline_arm64.mk
@@ -26,8 +26,6 @@
PRODUCT_RESTRICT_VENDOR_FILES := all
PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := relaxed
-PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST += \
- root/init.zygote64_32.rc \
# Modules that should probably be moved to /product
PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST += \
diff --git a/target/product/mainline_system.mk b/target/product/mainline_system.mk
index cd6a0f7..f7eb8ad 100644
--- a/target/product/mainline_system.mk
+++ b/target/product/mainline_system.mk
@@ -110,6 +110,13 @@
PRODUCT_HOST_PACKAGES += \
tinyplay
+# Include all zygote init scripts. "ro.zygote" will select one of them.
+PRODUCT_COPY_FILES += \
+ system/core/rootdir/init.zygote32.rc:root/init.zygote32.rc \
+ system/core/rootdir/init.zygote64.rc:root/init.zygote64.rc \
+ system/core/rootdir/init.zygote32_64.rc:root/init.zygote32_64.rc \
+ system/core/rootdir/init.zygote64_32.rc:root/init.zygote64_32.rc
+
# Enable dynamic partition size
PRODUCT_USE_DYNAMIC_PARTITION_SIZE := true
diff --git a/target/product/mainline_system_arm64.mk b/target/product/mainline_system_arm64.mk
index 4031371..6249068 100644
--- a/target/product/mainline_system_arm64.mk
+++ b/target/product/mainline_system_arm64.mk
@@ -23,8 +23,6 @@
# Enable mainline checking
PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := true
-PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST += \
- root/init.zygote64_32.rc \
PRODUCT_BUILD_CACHE_IMAGE := false
PRODUCT_BUILD_ODM_IMAGE := false
diff --git a/target/product/sdk_phone_x86_64.mk b/target/product/sdk_phone_x86_64.mk
index 267796f..2d0d6e1 100644
--- a/target/product/sdk_phone_x86_64.mk
+++ b/target/product/sdk_phone_x86_64.mk
@@ -27,9 +27,6 @@
PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := relaxed
endif
-PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST += \
- root/init.zygote64_32.rc \
-
#
# All components inherited here go to product image
#