Skip to contentSkip to conversation

fastboot: reinit partition after storing GPT or MBR

PATCH New Roman Stratiienko 1 participant 1 message Jan 27, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fastboot: reinit partition after storing GPT or MBR

In case MMC has MBR system and fastboot writes GPT, MMC is still recognized as MBR.
Invoke part_init() to purge cached data and update information about partition table type.

---
CC: Lukasz Majewski <[email protected]>,
CC: Patrick Delaunay <[email protected]>,
CC: Fabien Parent <[email protected]>,
CC: Filip Brozovic <[email protected]>,
CC: Lokesh Vutla <[email protected]>,
CC: Marek Szyprowski <[email protected]>,
CC: Mingming lee <[email protected]>,
CC: Roman Kovalivskyi <[email protected]>,
CC: Sam Protsenko <[email protected]>,
CC: Simon Glass <[email protected]>,

---
 drivers/fastboot/fb_mmc.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/fastboot/fb_mmc.c +2 -0
index 4e26cef9417..0ad11600ef6 100644
@@ -493,6 +493,7 @@ void fastboot_mmc_flash_write(const char *cmd, void *download_buffer,
 				      response);
 			return;
 		}
+		part_init(dev_desc);
 		printf("........ success\n");
 		fastboot_okay(NULL, response);
 		return;
@@ -514,6 +515,7 @@ void fastboot_mmc_flash_write(const char *cmd, void *download_buffer,
 				      response);
 			return;
 		}
+		part_init(dev_desc);
 		printf("........ success\n");
 		fastboot_okay(NULL, response);
 		return;
Signature · 1 line
2.27.0