On 12/17/21 10:42 AM, Angus Ainslie wrote:
NXP mfgtool uses all to specify the entire partition

Signed-off-by: Angus Ainslie <an...@akkea.ca>
---
  drivers/fastboot/fb_mmc.c | 7 +++++++
  1 file changed, 7 insertions(+)

diff --git a/drivers/fastboot/fb_mmc.c b/drivers/fastboot/fb_mmc.c
index 2738dc836e..9ebf392252 100644
--- a/drivers/fastboot/fb_mmc.c
+++ b/drivers/fastboot/fb_mmc.c
@@ -84,6 +84,13 @@ static int do_get_part_info(struct blk_desc **dev_desc, 
const char *name,
        /* First try partition names on the default device */
        *dev_desc = blk_get_dev("mmc", CONFIG_FASTBOOT_FLASH_MMC_DEV);
        if (*dev_desc) {
+               if (!strncmp(name, "all", strlen("all"))) {
+                       info->blksz = (*dev_desc)->blksz;
+                       info->size = (*dev_desc)->lba;
+                       info->start = 0;
+                       return 0;
+               }
+
                ret = part_get_info_by_name(*dev_desc, name, info);
                if (ret >= 0)
                        return ret;


This can be done with "partition" 0. If you need compatibility, use an alias.

--Sean

Reply via email to