[PATCH] Fix flash and erase of EMMC_BOOT2 with fastboot

Sean Anderson sean.anderson at seco.com
Thu May 13 17:16:40 CEST 2021



On 5/13/21 11:07 AM, Oleh Kravchenko wrote:
 > Hello Sean,
 > I've used these commands:
 >> fastboot flash mmc0boot0 u-boot-o4-imx6ull-nano.bin
 >> fastboot flash mmc0boot1 u-boot-o4-imx6ull-nano.bin
 >
 >
 > But these ones, doesn't work:
 >> fastboot flash 0.0 u-boot-o4-imx6ull-nano.bin
 >> Couldn't find partition mmc 0.0
 >
 >> fastboot flash 0.1 u-boot-o4-imx6ull-nano.bin
 >> Couldn't find partition mmc 0.1

Hm, can you send me the U-Boot output?

Can you also try adding :0? I noticed it in my partition aliases:

	"fastboot_aliases=setenv fastboot_partition_alias_user ${mmcdev}.0:0; " \
		"setenv fastboot_partition_alias_boot0 ${mmcdev}.1:0; " \
		"setenv fastboot_partition_alias_boot1 ${mmcdev}.2:0;\0" \

--Sean

 >
 >
 > 13.05.21 18:01, Sean Anderson пише:
 >> Hi,
 >>
 >> Have you considered trying to flash using e.g.
 >>
 >> flashboot flash 0.1 foo.img
 >>
 >> instead of
 >>
 >> fastboot flash boot0
 >>
 >> ? I would like to remove these MMC_BOOT2 options but I haven't gotten around to it.
 >>
 >> On 5/12/21 6:43 PM, Oleh Kravchenko wrote:
 >>> The current U-Boot version has the next matches for boot partitions:
 >>>> mmc0boot0 to EMMC_BOOT1
 >>>> mmc0boot1 to EMMC_BOOT1 (should be EMMC_BOOT2)
 >>> This patch fixes a typo for the boot partition number.
 >>>
 >>> Signed-off-by: Oleh Kravchenko <oleg at kaa.org.ua>
 >>> Cc: Pantelis Antoniou <panto at antoniou-consulting.com>
 >>> Cc: Marek Vasut <marex at denx.de>
 >>> ---
 >>>
 >>>    drivers/fastboot/fb_mmc.c | 4 ++--
 >>>    1 file changed, 2 insertions(+), 2 deletions(-)
 >>>
 >>> diff --git a/drivers/fastboot/fb_mmc.c b/drivers/fastboot/fb_mmc.c
 >>> index 8e74e50e91..1827ce5d12 100644
 >>> --- a/drivers/fastboot/fb_mmc.c
 >>> +++ b/drivers/fastboot/fb_mmc.c
 >>> @@ -525,7 +525,7 @@ void fastboot_mmc_flash_write(const char *cmd, void *download_buffer,
 >>>        if (strcmp(cmd, CONFIG_FASTBOOT_MMC_BOOT2_NAME) == 0) {
 >>>            dev_desc = fastboot_mmc_get_dev(response);
 >>>            if (dev_desc)
 >>> -            fb_mmc_boot_ops(dev_desc, download_buffer, 1,
 >>> +            fb_mmc_boot_ops(dev_desc, download_buffer, 2,
 >>>                        download_bytes, response);
 >>>            return;
 >>>        }
 >>> @@ -655,7 +655,7 @@ void fastboot_mmc_erase(const char *cmd, char *response)
 >>>            /* erase EMMC boot2 */
 >>>            dev_desc = fastboot_mmc_get_dev(response);
 >>>            if (dev_desc)
 >>> -            fb_mmc_boot_ops(dev_desc, NULL, 1, 0, response);
 >>> +            fb_mmc_boot_ops(dev_desc, NULL, 2, 0, response);
 >>>            return;
 >>>        }
 >>>    #endif
 >>>
 >>
 >> In any case,
 >>
 >> Reviewed-by: Sean Anderson <sean.anderson at seco.com>
 >


More information about the U-Boot mailing list