tidy up building of recovery ramdisk image

Copy init.recovery.*.rc files (if any) from the main system ramdisk,
and hide all the commands.

Change-Id: I4d4fcf25b66ddea70e43282d466983e9643c9bea
This commit is contained in:
Doug Zongker 2012-08-08 16:26:17 -07:00
parent e98b836f26
commit 72f0b67673

View file

@ -644,29 +644,28 @@ $(INSTALLED_RECOVERYIMAGE_TARGET): $(MKBOOTFS) $(MKBOOTIMG) $(MINIGZIP) \
$(recovery_fstab) \ $(recovery_fstab) \
$(RECOVERY_INSTALL_OTA_KEYS) $(RECOVERY_INSTALL_OTA_KEYS)
@echo ----- Making recovery image ------ @echo ----- Making recovery image ------
rm -rf $(TARGET_RECOVERY_OUT) $(hide) rm -rf $(TARGET_RECOVERY_OUT)
mkdir -p $(TARGET_RECOVERY_OUT) $(hide) mkdir -p $(TARGET_RECOVERY_OUT)
mkdir -p $(TARGET_RECOVERY_ROOT_OUT) $(hide) mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/etc $(TARGET_RECOVERY_ROOT_OUT)/tmp
mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/etc @echo Copying baseline ramdisk...
mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/tmp $(hide) cp -R $(TARGET_ROOT_OUT) $(TARGET_RECOVERY_OUT)
echo Copying baseline ramdisk... @echo Modifying ramdisk contents...
cp -R $(TARGET_ROOT_OUT) $(TARGET_RECOVERY_OUT) $(hide) rm -f $(TARGET_RECOVERY_ROOT_OUT)/init*.rc
rm $(TARGET_RECOVERY_ROOT_OUT)/init.rc $(hide) cp -f $(recovery_initrc) $(TARGET_RECOVERY_ROOT_OUT)/
echo Modifying ramdisk contents... $(hide) -cp $(TARGET_ROOT_OUT)/init.recovery.*.rc $(TARGET_RECOVERY_ROOT_OUT)/
cp -f $(recovery_initrc) $(TARGET_RECOVERY_ROOT_OUT)/ $(hide) cp -f $(recovery_binary) $(TARGET_RECOVERY_ROOT_OUT)/sbin/
cp -f $(recovery_binary) $(TARGET_RECOVERY_ROOT_OUT)/sbin/ $(hide) cp -rf $(recovery_resources_common) $(TARGET_RECOVERY_ROOT_OUT)/
cp -rf $(recovery_resources_common) $(TARGET_RECOVERY_ROOT_OUT)/ $(hide) $(foreach item,$(recovery_resources_private), \
$(foreach item,$(recovery_resources_private), \
cp -rf $(item) $(TARGET_RECOVERY_ROOT_OUT)/) cp -rf $(item) $(TARGET_RECOVERY_ROOT_OUT)/)
$(foreach item,$(recovery_fstab), \ $(hide) $(foreach item,$(recovery_fstab), \
cp -f $(item) $(TARGET_RECOVERY_ROOT_OUT)/etc/recovery.fstab) cp -f $(item) $(TARGET_RECOVERY_ROOT_OUT)/etc/recovery.fstab)
cp $(RECOVERY_INSTALL_OTA_KEYS) $(TARGET_RECOVERY_ROOT_OUT)/res/keys $(hide) cp $(RECOVERY_INSTALL_OTA_KEYS) $(TARGET_RECOVERY_ROOT_OUT)/res/keys
cat $(INSTALLED_DEFAULT_PROP_TARGET) $(recovery_build_prop) \ $(hide) cat $(INSTALLED_DEFAULT_PROP_TARGET) $(recovery_build_prop) \
> $(TARGET_RECOVERY_ROOT_OUT)/default.prop > $(TARGET_RECOVERY_ROOT_OUT)/default.prop
$(MKBOOTFS) $(TARGET_RECOVERY_ROOT_OUT) | $(MINIGZIP) > $(recovery_ramdisk) $(hide) $(MKBOOTFS) $(TARGET_RECOVERY_ROOT_OUT) | $(MINIGZIP) > $(recovery_ramdisk)
$(MKBOOTIMG) $(INTERNAL_RECOVERYIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --output $@ $(hide) $(MKBOOTIMG) $(INTERNAL_RECOVERYIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --output $@
@echo ----- Made recovery image -------- $@
$(hide) $(call assert-max-image-size,$@,$(BOARD_RECOVERYIMAGE_PARTITION_SIZE),raw) $(hide) $(call assert-max-image-size,$@,$(BOARD_RECOVERYIMAGE_PARTITION_SIZE),raw)
@echo ----- Made recovery image: $@ --------
else else
INSTALLED_RECOVERYIMAGE_TARGET := INSTALLED_RECOVERYIMAGE_TARGET :=