From 881f5a44e3eb80ac2b3c1ba08c7bf544330c0039 Mon Sep 17 00:00:00 2001 From: "faqiang.zhu" Date: Wed, 15 Jul 2020 12:57:50 +0800 Subject: [PATCH] MA-17142-2 set metadata partition type as ext4 metadata partition is used in some functions like apex, userdata checkpoint to store files, mark it as ext4 partition so it can be formated with "fastboot format metadata" command and be mounted when executing first stage init. Change-Id: Id22b39d71e6823d3a284f3df00959a6d748ab9c7 Signed-off-by: faqiang.zhu (cherry picked from commit 4f42888967a0354a0dd222ad7b01761450a1713b) (cherry picked from commit a69157bee180974eb4ee89b0847473bd6538d2a0) --- drivers/fastboot/fb_fsl/fb_fsl_partitions.c | 5 +++-- include/fb_fsl.h | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/fastboot/fb_fsl/fb_fsl_partitions.c b/drivers/fastboot/fb_fsl/fb_fsl_partitions.c index d0392000ac..9d48eeb530 100644 --- a/drivers/fastboot/fb_fsl/fb_fsl_partitions.c +++ b/drivers/fastboot/fb_fsl/fb_fsl_partitions.c @@ -119,13 +119,14 @@ static int _fastboot_parts_add_ptable_entry(int ptable_index, !strcmp((const char *)info.name, FASTBOOT_PARTITION_VENDOR_A) || !strcmp((const char *)info.name, FASTBOOT_PARTITION_OEM_B) || !strcmp((const char *)info.name, FASTBOOT_PARTITION_VENDOR_B) || - !strcmp((const char *)info.name, FASTBOOT_PARTITION_DATA)) + !strcmp((const char *)info.name, FASTBOOT_PARTITION_DATA) || #else if (!strcmp((const char *)info.name, FASTBOOT_PARTITION_SYSTEM) || !strcmp((const char *)info.name, FASTBOOT_PARTITION_DATA) || !strcmp((const char *)info.name, FASTBOOT_PARTITION_DEVICE) || - !strcmp((const char *)info.name, FASTBOOT_PARTITION_CACHE)) + !strcmp((const char *)info.name, FASTBOOT_PARTITION_CACHE) || #endif + !strcmp((const char *)info.name, FASTBOOT_PARTITION_METADATA)) strcpy(ptable[ptable_index].fstype, "ext4"); else strcpy(ptable[ptable_index].fstype, "raw"); diff --git a/include/fb_fsl.h b/include/fb_fsl.h index b0dc3c01e7..b6308b88d5 100644 --- a/include/fb_fsl.h +++ b/include/fb_fsl.h @@ -50,6 +50,8 @@ #define FASTBOOT_MCU_FIRMWARE_PARTITION "mcu_os" #endif +#define FASTBOOT_PARTITION_METADATA "metadata" + #ifdef CONFIG_ANDROID_AB_SUPPORT #define FASTBOOT_PARTITION_BOOT_A "boot_a" #define FASTBOOT_PARTITION_RECOVERY "recovery" -- 2.17.1