From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gary Bisson Date: Thu, 28 Jan 2021 09:01:06 +0100 Subject: [PATCH] disk: part_dos: update partition table entries after write In-Reply-To: <699df049-d34e-f1be-a573-c41fa87a8ef7@gmx.de> References: <20210127201944.9098-1-gary.bisson@boundarydevices.com> <699df049-d34e-f1be-a573-c41fa87a8ef7@gmx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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