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:
parent
e98b836f26
commit
72f0b67673
1 changed files with 18 additions and 19 deletions
|
@ -644,29 +644,28 @@ $(INSTALLED_RECOVERYIMAGE_TARGET): $(MKBOOTFS) $(MKBOOTIMG) $(MINIGZIP) \
|
|||
$(recovery_fstab) \
|
||||
$(RECOVERY_INSTALL_OTA_KEYS)
|
||||
@echo ----- Making recovery image ------
|
||||
rm -rf $(TARGET_RECOVERY_OUT)
|
||||
mkdir -p $(TARGET_RECOVERY_OUT)
|
||||
mkdir -p $(TARGET_RECOVERY_ROOT_OUT)
|
||||
mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/etc
|
||||
mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/tmp
|
||||
echo Copying baseline ramdisk...
|
||||
cp -R $(TARGET_ROOT_OUT) $(TARGET_RECOVERY_OUT)
|
||||
rm $(TARGET_RECOVERY_ROOT_OUT)/init.rc
|
||||
echo Modifying ramdisk contents...
|
||||
cp -f $(recovery_initrc) $(TARGET_RECOVERY_ROOT_OUT)/
|
||||
cp -f $(recovery_binary) $(TARGET_RECOVERY_ROOT_OUT)/sbin/
|
||||
cp -rf $(recovery_resources_common) $(TARGET_RECOVERY_ROOT_OUT)/
|
||||
$(foreach item,$(recovery_resources_private), \
|
||||
$(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...
|
||||
$(hide) cp -R $(TARGET_ROOT_OUT) $(TARGET_RECOVERY_OUT)
|
||||
@echo Modifying ramdisk contents...
|
||||
$(hide) rm -f $(TARGET_RECOVERY_ROOT_OUT)/init*.rc
|
||||
$(hide) cp -f $(recovery_initrc) $(TARGET_RECOVERY_ROOT_OUT)/
|
||||
$(hide) -cp $(TARGET_ROOT_OUT)/init.recovery.*.rc $(TARGET_RECOVERY_ROOT_OUT)/
|
||||
$(hide) cp -f $(recovery_binary) $(TARGET_RECOVERY_ROOT_OUT)/sbin/
|
||||
$(hide) cp -rf $(recovery_resources_common) $(TARGET_RECOVERY_ROOT_OUT)/
|
||||
$(hide) $(foreach item,$(recovery_resources_private), \
|
||||
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 $(RECOVERY_INSTALL_OTA_KEYS) $(TARGET_RECOVERY_ROOT_OUT)/res/keys
|
||||
cat $(INSTALLED_DEFAULT_PROP_TARGET) $(recovery_build_prop) \
|
||||
$(hide) cp $(RECOVERY_INSTALL_OTA_KEYS) $(TARGET_RECOVERY_ROOT_OUT)/res/keys
|
||||
$(hide) cat $(INSTALLED_DEFAULT_PROP_TARGET) $(recovery_build_prop) \
|
||||
> $(TARGET_RECOVERY_ROOT_OUT)/default.prop
|
||||
$(MKBOOTFS) $(TARGET_RECOVERY_ROOT_OUT) | $(MINIGZIP) > $(recovery_ramdisk)
|
||||
$(MKBOOTIMG) $(INTERNAL_RECOVERYIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --output $@
|
||||
@echo ----- Made recovery image -------- $@
|
||||
$(hide) $(MKBOOTFS) $(TARGET_RECOVERY_ROOT_OUT) | $(MINIGZIP) > $(recovery_ramdisk)
|
||||
$(hide) $(MKBOOTIMG) $(INTERNAL_RECOVERYIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --output $@
|
||||
$(hide) $(call assert-max-image-size,$@,$(BOARD_RECOVERYIMAGE_PARTITION_SIZE),raw)
|
||||
@echo ----- Made recovery image: $@ --------
|
||||
|
||||
else
|
||||
INSTALLED_RECOVERYIMAGE_TARGET :=
|
||||
|
|
Loading…
Reference in a new issue