Skip to contentSkip to conversation

Fix flash and erase of eMMC Boot2 with Fastboot

PATCH Superseded Oleh Kravchenko 3 participants 5 messages May 14, 2021 – Aug 22, 2021

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Fix flash and erase of eMMC Boot2 with Fastboot

The current U-Boot version has the next matches for boot partitions:

Quoted 2 lines

mmc0boot0 to EMMC_BOOT1
mmc0boot1 to EMMC_BOOT1 (should be EMMC_BOOT2)

This patch fixes a typo for the boot partition number.

Cc Pantelis Antoniou <[email protected]>
Cc Marek Vasut <[email protected]>

---
Changes for v2:
- updated commit message
- CI https://github.com/u-boot/u-boot/pull/76

 drivers/fastboot/fb_mmc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/fastboot/fb_mmc.c +2 -2
index 2f3837e559..2326067882 100644
@@ -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
Signature · 1 line
2.26.3
#1 lore raw

PATCH v2 1/1 Fix flash and erase of eMMC Boot2 with Fastboot

Hello guys,
Could you please review and merge this patch?

PR successfully passed CI:
https://github.com/u-boot/u-boot/pull/76

15.05.21 00:06, Oleh Kravchenko ????:

Quoted 39 lines

The current U-Boot version has the next matches for boot partitions:

Quoted 2 lines

mmc0boot0 to EMMC_BOOT1
mmc0boot1 to EMMC_BOOT1 (should be EMMC_BOOT2)

This patch fixes a typo for the boot partition number.

Cc Pantelis Antoniou <[email protected]>
Cc Marek Vasut <[email protected]>

---
Changes for v2:
- updated commit message
- CI https://github.com/u-boot/u-boot/pull/76

 drivers/fastboot/fb_mmc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/fastboot/fb_mmc.c +2 -2
index 2f3837e559..2326067882 100644
@@ -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
Signature · 2 lines
Best regards,
Oleh Kravchenko
#2 lore raw

PATCH v2 1/1 Fix flash and erase of eMMC Boot2 with Fastboot

In reply to Oleh Kravchenko
Quoted 31 lines · Oleh Kravchenko

The current U-Boot version has the next matches for boot partitions:

Quoted 2 lines

mmc0boot0 to EMMC_BOOT1
mmc0boot1 to EMMC_BOOT1 (should be EMMC_BOOT2)

This patch fixes a typo for the boot partition number.

Cc Pantelis Antoniou <[email protected]>
Cc Marek Vasut <[email protected]>

---
Changes for v2:
- updated commit message
- CI https://github.com/u-boot/u-boot/pull/76

  drivers/fastboot/fb_mmc.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/fastboot/fb_mmc.c +1 -1
index 2f3837e559..2326067882 100644
@@ -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;
  	}

drivers/fastboot/fb_mmc.c void fastboot_mmc_erase(const char *cmd, char *response) · line 661

Quoted 8 lines
drivers/fastboot/fb_mmc.c +1 -1
@@ -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
#3 lore raw

PATCH v2 1/1 Fix flash and erase of eMMC Boot2 with Fastboot

Hello Lukasz,
Could you please review this patch?

This patch fixes small typos for Fastboot mmc boot2 partition.

20.05.21 17:59, Sean Anderson ????:

Quoted 44 lines · Oleh Kravchenko
Quoted 30 lines

The current U-Boot version has the next matches for boot partitions:

Quoted 2 lines

mmc0boot0 to EMMC_BOOT1
mmc0boot1 to EMMC_BOOT1 (should be EMMC_BOOT2)

This patch fixes a typo for the boot partition number.

Cc Pantelis Antoniou <[email protected]>
Cc Marek Vasut <[email protected]>

---
Changes for v2:
??? - updated commit message
??? - CI https://github.com/u-boot/u-boot/pull/76

? drivers/fastboot/fb_mmc.c | 4 ++--
? 1 file changed, 2 insertions(+), 2 deletions(-)

drivers/fastboot/fb_mmc.c +1 -1
index 2f3837e559..2326067882 100644
@@ -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)
Quoted 9 lines

????????? /* 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

Signature · 2 lines
Best regards,
Oleh Kravchenko
#4 lore raw
In reply to Oleh Kravchenko
Quoted 9 lines · Oleh Kravchenko

The current U-Boot version has the next matches for boot partitions:

Quoted 2 lines

mmc0boot0 to EMMC_BOOT1
mmc0boot1 to EMMC_BOOT1 (should be EMMC_BOOT2)

This patch fixes a typo for the boot partition number.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom