support for per-partition fs_type
Include the recovery.fstab file in the recovery image. Remove the
global fs_type and partition_type values from the target-files
key/value dict, and parse the recovery.fstab file instead to find
types for each partition.
(Cherrypicked from gingerbread w/some edits to resolve conflicts.)
Change-Id: Ic3ed85ac5672d8fe20280dacf43d5b82053311bb
diff --git a/core/Makefile b/core/Makefile
index 1bfa055..36477d7 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -610,11 +610,16 @@
recovery_resources_private := $(strip $(wildcard $(TARGET_DEVICE_DIR)/recovery/res))
recovery_resource_deps := $(shell find $(recovery_resources_common) \
$(recovery_resources_private) -type f)
+recovery_fstab := $(strip $(wildcard $(TARGET_DEVICE_DIR)/recovery.fstab))
ifeq ($(recovery_resources_private),)
$(info No private recovery resources for TARGET_DEVICE $(TARGET_DEVICE))
endif
+ifeq ($(recovery_fstab),)
+ $(info No recovery.fstab for TARGET_DEVICE $(TARGET_DEVICE))
+endif
+
INTERNAL_RECOVERYIMAGE_ARGS := \
$(addprefix --second ,$(INSTALLED_2NDBOOTLOADER_TARGET)) \
--kernel $(recovery_kernel) \
@@ -656,6 +661,7 @@
$(recovery_initrc) $(recovery_kernel) \
$(INSTALLED_2NDBOOTLOADER_TARGET) \
$(recovery_build_prop) $(recovery_resource_deps) \
+ $(recovery_fstab) \
$(RECOVERY_INSTALL_OTA_KEYS)
@echo ----- Making recovery image ------
rm -rf $(TARGET_RECOVERY_OUT)
@@ -672,6 +678,8 @@
cp -rf $(recovery_resources_common) $(TARGET_RECOVERY_ROOT_OUT)/
$(foreach item,$(recovery_resources_private), \
cp -rf $(item) $(TARGET_RECOVERY_ROOT_OUT)/)
+ $(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) \
> $(TARGET_RECOVERY_ROOT_OUT)/default.prop
@@ -1058,15 +1066,6 @@
ifdef BOARD_USERDATAIMAGE_PARTITION_SIZE
$(hide) echo "userdata_size=$(call image-size-from-data-size,$(BOARD_USERDATAIMAGE_PARTITION_SIZE))" >> $(zip_root)/META/misc_info.txt
endif
-ifneq (,$(INTERNAL_USERIMAGES_EXT_VARIANT))
- $(hide) echo "fs_type=$(INTERNAL_USERIMAGES_EXT_VARIANT)" >> $(zip_root)/META/misc_info.txt
- $(hide) echo "partition_type=EMMC" >> $(zip_root)/META/misc_info.txt
- @# TODO: where is the right place to get this path from? BoardConfig.mk?
- $(hide) echo "partition_path=/dev/block/platform/sdhci-tegra.3/by-name/" >> $(zip_root)/META/misc_info.txt
-else
- $(hide) echo "fs_type=yaffs2" >> $(zip_root)/META/misc_info.txt
- $(hide) echo "partition_type=MTD" >> $(zip_root)/META/misc_info.txt
-endif
$(hide) echo "tool_extensions=$(tool_extensions)" >> $(zip_root)/META/misc_info.txt
ifdef mkyaffs2_extra_flags
$(hide) echo "mkyaffs2_extra_flags=$(mkyaffs2_extra_flags)" >> $(zip_root)/META/misc_info.txt