[PATCH] fastboot: reinit partition after storing GPT or MBR

Roman Stratiienko r.stratiienko at gmail.com
Wed Jan 27 16:40:16 CET 2021


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.

Signed-off-by: Roman Stratiienko <r.stratiienko at gmail.com>
---
CC: Lukasz Majewski <lukma at denx.de>,
CC: Patrick Delaunay <patrick.delaunay at foss.st.com>,
CC: Fabien Parent <fparent at baylibre.com>,
CC: Filip Brozovic <fbrozovic at gmail.com>,
CC: Lokesh Vutla <lokeshvutla at ti.com>,
CC: Marek Szyprowski <m.szyprowski at samsung.com>,
CC: Mingming lee <mingming.lee at mediatek.com>,
CC: Roman Kovalivskyi <roman.kovalivskyi at globallogic.com>,
CC: Sam Protsenko <joe.skb7 at gmail.com>,
CC: Simon Glass <sjg at chromium.org>,
---
 drivers/fastboot/fb_mmc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/fastboot/fb_mmc.c b/drivers/fastboot/fb_mmc.c
index 4e26cef9417..0ad11600ef6 100644
--- a/drivers/fastboot/fb_mmc.c
+++ b/drivers/fastboot/fb_mmc.c
@@ -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;
-- 
2.27.0



More information about the U-Boot mailing list