diff options
author | Ying Wang <wangying@google.com> | 2015-03-10 12:02:57 -0700 |
---|---|---|
committer | Ying Wang <wangying@google.com> | 2015-03-11 10:38:13 -0700 |
commit | f25838a7ea81f64d14cc1e7a612a35b9a8c8c6a6 (patch) | |
tree | fdcadedaa8eadd088ee22b5961189e2f69832db8 | |
parent | fafe5ac81940caaa6b222433a2fd9ef5e1239686 (diff) | |
download | build-f25838a7ea81f64d14cc1e7a612a35b9a8c8c6a6.zip build-f25838a7ea81f64d14cc1e7a612a35b9a8c8c6a6.tar.gz build-f25838a7ea81f64d14cc1e7a612a35b9a8c8c6a6.tar.bz2 |
Support modules to be installed directly to recovery.img
Previously the recovery binary was configured to be installed to the
system.img and then got copied to recovery.img in the recovery.img's
build rule.
With this change, a module, such as the recovery binary, can configure
itself to be installed directly to the recovery.img, just like how other
modules get installed to system.img.
Bug: 19667686
Change-Id: I46b0b4a95cf078a68999db9c0f6635d6a3f5cd86
-rw-r--r-- | core/Makefile | 8 | ||||
-rw-r--r-- | target/product/embedded.mk | 1 |
2 files changed, 5 insertions, 4 deletions
diff --git a/core/Makefile b/core/Makefile index 5fb366a..4f213a5 100644 --- a/core/Makefile +++ b/core/Makefile @@ -728,12 +728,14 @@ ifeq (,$(filter true, $(TARGET_NO_KERNEL) $(TARGET_NO_RECOVERY))) INSTALLED_RECOVERYIMAGE_TARGET := $(PRODUCT_OUT)/recovery.img +INTERNAL_RECOVERYIMAGE_FILES := $(filter $(TARGET_RECOVERY_OUT)/%, \ + $(ALL_DEFAULT_INSTALLED_MODULES)) + recovery_initrc := $(call include-path-for, recovery)/etc/init.rc recovery_sepolicy := $(call intermediates-dir-for,ETC,sepolicy.recovery)/sepolicy.recovery recovery_kernel := $(INSTALLED_KERNEL_TARGET) # same as a non-recovery system recovery_ramdisk := $(PRODUCT_OUT)/ramdisk-recovery.img recovery_build_prop := $(INSTALLED_BUILD_PROP_TARGET) -recovery_binary := $(call intermediates-dir-for,EXECUTABLES,recovery,,,$(TARGET_PREFER_32_BIT))/recovery recovery_resources_common := $(call include-path-for, recovery)/res # Set recovery_density to the density bucket of the device. @@ -820,7 +822,6 @@ $(RECOVERY_INSTALL_OTA_KEYS): $(OTA_PUBLIC_KEYS) $(DUMPKEY_JAR) $(extra_keys) # $(1): output file define build-recoveryimage-target @echo ----- Making recovery image ------ - $(hide) rm -rf $(TARGET_RECOVERY_OUT) $(hide) mkdir -p $(TARGET_RECOVERY_OUT) $(hide) mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/etc $(TARGET_RECOVERY_ROOT_OUT)/tmp @echo Copying baseline ramdisk... @@ -831,7 +832,6 @@ define build-recoveryimage-target $(hide) rm -f $(TARGET_RECOVERY_ROOT_OUT)/sepolicy $(hide) cp -f $(recovery_sepolicy) $(TARGET_RECOVERY_ROOT_OUT)/sepolicy $(hide) -cp $(TARGET_ROOT_OUT)/init.recovery.*.rc $(TARGET_RECOVERY_ROOT_OUT)/ - $(hide) cp -f $(recovery_binary) $(TARGET_RECOVERY_ROOT_OUT)/sbin/ $(hide) mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/res $(hide) rm -rf $(TARGET_RECOVERY_ROOT_OUT)/res/* $(hide) cp -rf $(recovery_resources_common)/* $(TARGET_RECOVERY_ROOT_OUT)/res @@ -854,7 +854,7 @@ endef $(INSTALLED_RECOVERYIMAGE_TARGET): $(MKBOOTFS) $(MKBOOTIMG) $(MINIGZIP) \ $(INSTALLED_RAMDISK_TARGET) \ $(INSTALLED_BOOTIMAGE_TARGET) \ - $(recovery_binary) \ + $(INTERNAL_RECOVERYIMAGE_FILES) \ $(recovery_initrc) $(recovery_sepolicy) $(recovery_kernel) \ $(INSTALLED_2NDBOOTLOADER_TARGET) \ $(recovery_build_prop) $(recovery_resource_deps) \ diff --git a/target/product/embedded.mk b/target/product/embedded.mk index 56a5f97..96c0b77 100644 --- a/target/product/embedded.mk +++ b/target/product/embedded.mk @@ -63,6 +63,7 @@ PRODUCT_PACKAGES += \ logwrapper \ mkshrc \ reboot \ + recovery \ service \ servicemanager \ sh \ |