From 993583cd794919995c0c99817c292d0fd5faac14 Mon Sep 17 00:00:00 2001 From: Bowgo Tsai Date: Mon, 26 Mar 2018 22:10:57 +0800 Subject: [PATCH] Products launching with API 28 needs system-as-root With project Treble, it's possible to only update system.img across Android major releases without changing other partitions. However, for non-A/B devices, ramdisk cannot be updated via a system-only OTA because it resides in /boot partition. This leads to two major incompatibility issues: - The older /init in ramdisk might not be able to parse the *.rc files on /system. - The ramdisk contains /init.rc, which also may be out of date compared to what is required for the new /system. Therefore, for new devices launched in P with full Treble support, ramdisk should be merged into system.img by setting BOARD_BUILD_SYSTEM_ROOT_IMAGE := True. Upgrading devices can keep using non-system-as-root configuration. Bug: 64194858 Test: manual makefile prodding Change-Id: Ic04c63bd2aac3afa686a6f5cb124beebbcd6a5ee Merged-In: Ic04c63bd2aac3afa686a6f5cb124beebbcd6a5ee (cherry picked from commit ed3b1ca12caf596e879feb4bc71568d482c64649) --- core/config.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/config.mk b/core/config.mk index e4ed10746e..800a7fc855 100644 --- a/core/config.mk +++ b/core/config.mk @@ -852,6 +852,11 @@ ifdef PRODUCT_SHIPPING_API_LEVEL $(error When PRODUCT_SHIPPING_API_LEVEL >= 28, TARGET_USES_64_BIT_BINDER must be true) endif endif + ifeq ($(PRODUCT_FULL_TREBLE),true) + ifneq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE), true) + $(error When PRODUCT_SHIPPING_API_LEVEL >= 28, BOARD_BUILD_SYSTEM_ROOT_IMAGE must be true) + endif + endif endif endif