U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Gary Bisson <gary.bisson@boundarydevices.com>
To: u-boot@lists.denx.de
Subject: [PATCH] disk: part_dos: update partition table entries after write
Date: Thu, 28 Jan 2021 09:01:06 +0100	[thread overview]
Message-ID: <YBJvQi34w5T4dMlk@p1g2> (raw)
In-Reply-To: <699df049-d34e-f1be-a573-c41fa87a8ef7@gmx.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

  reply	other threads:[~2021-01-28  8:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-27 20:19 [PATCH] disk: part_dos: update partition table entries after write Gary Bisson
2021-01-27 20:56 ` Heinrich Schuchardt
2021-01-28  8:01   ` Gary Bisson [this message]
2021-01-28  8:10 ` [PATCH v2] " Gary Bisson
2021-01-28  8:18   ` Marek Szyprowski
2021-02-02 14:31   ` Tom Rini
2021-06-22  2:48     ` Da Xue
2021-06-22 14:10       ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YBJvQi34w5T4dMlk@p1g2 \
    --to=gary.bisson@boundarydevices.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox