[PATCH] disk: part_dos: update partition table entries after write
Gary Bisson
gary.bisson at boundarydevices.com
Thu Jan 28 09:01:06 CET 2021
Hi Heinrich,
On Wed, Jan 27, 2021 at 09:56:13PM +0100, Heinrich Schuchardt wrote:
> On 1/27/21 9:19 PM, Gary Bisson wrote:
> > Fixes issues when switching from GPT to MBR partition tables.
>
> This does not catch all cases of changing the MBR. See function
> write_mbr_partitions() with writes both the MBR and EBRs (if applicable).
Good catch! That's correct, I missed it for 2 reasons:
1- I focused on the fastboot code which indeed only calls
write_mbr_sector()
2- I did that work on 2020.10 U-Boot which didn't include
write_mbr_partitions().
> Android devices typically have more than 4 partitions. Why does fastboot
> not update the extended boot records?
Fastboot is not only used for Android, we generally use it to flash our
Linux images as well. I guess the code just hasn't been updated to
handle EBR although I'd say that most people use GPT, especially Android
users.
Anyway, I'll submit a v2 that take care of write_mbr_partitions().
Regards,
Gary
More information about the U-Boot
mailing list