From 53acaeab0a73b034cb7ddf3c101f85b5a7f22144 Mon Sep 17 00:00:00 2001 From: Jiyong Park Date: Tue, 29 May 2018 16:29:24 +0900 Subject: [PATCH] Support shared library in recovery mode The dyanmic linker and the linker config script for the recovery mode (*.recovery variants) are added to PRODUCT_PACKAGES. Also this removes the mountpoint /system_root from the recovery image as the recovery image is self-contained and the real system image is mounted at /mnt/system which is created automatically at runtime. Bug: 63673171 Test: `adb reboot recovery; adb devices` shows the device ID Test: Select 'mount /system' in the recovery mode, then `adb shell`. $ lsof -p `pidof adbd` shows that libm.so, libc.so, etc. are loaded from the /lib directory. Change-Id: Ice6c75b0b81bb9be696aaff3e095d87f19278995 --- core/Makefile | 4 ---- target/product/base.mk | 1 + target/product/embedded.mk | 1 + 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/core/Makefile b/core/Makefile index a7fd73c16e..7635e194fc 100644 --- a/core/Makefile +++ b/core/Makefile @@ -1396,10 +1396,6 @@ define build-recoveryimage-target >> $(TARGET_RECOVERY_ROOT_OUT)/prop.default $(hide) ln -sf prop.default $(TARGET_RECOVERY_ROOT_OUT)/default.prop $(BOARD_RECOVERY_IMAGE_PREPARE) - $(if $(filter true,$(BOARD_BUILD_SYSTEM_ROOT_IMAGE)), \ - $(hide) mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/system_root; \ - rm -rf $(TARGET_RECOVERY_ROOT_OUT)/system; \ - ln -sf /system_root/system $(TARGET_RECOVERY_ROOT_OUT)/system) # Mount the system_root_image to /system_root and symlink /system. $(hide) $(MKBOOTFS) -d $(TARGET_OUT) $(TARGET_RECOVERY_ROOT_OUT) | $(MINIGZIP) > $(recovery_ramdisk) $(if $(filter true,$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SUPPORTS_VBOOT)), \ $(hide) $(MKBOOTIMG) $(INTERNAL_RECOVERYIMAGE_ARGS) $(INTERNAL_MKBOOTIMG_VERSION_ARGS) $(BOARD_MKBOOTIMG_ARGS) --output $(1).unsigned, \ diff --git a/target/product/base.mk b/target/product/base.mk index ed95f30808..778cabc29a 100644 --- a/target/product/base.mk +++ b/target/product/base.mk @@ -71,6 +71,7 @@ PRODUCT_PACKAGES += \ javax.obex \ keystore \ ld.config.txt \ + ld.config.recovery.txt \ ld.mc \ libaaudio \ libandroid \ diff --git a/target/product/embedded.mk b/target/product/embedded.mk index bae5486fbb..2a34639c67 100644 --- a/target/product/embedded.mk +++ b/target/product/embedded.mk @@ -71,6 +71,7 @@ PRODUCT_PACKAGES += \ libui \ libutils \ linker \ + linker.recovery \ lmkd \ logcat \ lshal \