mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Marco Felsch <m.felsch@pengutronix.de>
Cc: BAREBOX <barebox@lists.infradead.org>
Subject: Re: [PATCH 2/5] partitions: Start partitions at 8MiB offset
Date: Tue, 3 Jun 2025 09:46:45 +0200	[thread overview]
Message-ID: <aD6oZccyFXZWX2q1@pengutronix.de> (raw)
In-Reply-To: <20250602221633.i7xvmam4jwb22vwz@pengutronix.de>

On Tue, Jun 03, 2025 at 12:16:33AM +0200, Marco Felsch wrote:
> Hi Sascha,
> 
> On 25-06-02, Sascha Hauer wrote:
> > There are many SoCs that store the bootloader on the raw eMMC/SD device
> > outside of partitions. Examples are all i.MX SoCs and Rockchip SoCs.
> > Until now the first partition starts at offset 1MiB and with this we
> > risk conflicting with the bootloader.
> > 
> > It's cumbersome to sort out all SoCs that have this problem. With
> > nowadays eMMC/SD card sizes it doesn't really matter anymore, so change
> > the 1MiB offset to 8MiB which is still only a small fraction of the
> > card size, but leaves enough space for putting the bootloader into.
> > 
> > Note the change in the GPT partition handling introduced with this
> > change. The layout previously was:
> > 
> > LBA0: MBR
> > LBA1: GPT header
> > LBA2-33: GPT partition entries
> > 
> > which now becomes:
> > 
> > LBA0: MBR
> > LBA1: GPT header
> > LBA16352-16383: GPT partition entries
> > 
> > This means the GPT partition entries moved from LBA2 to just below the
> > 8MiB boundary and LBA2-16351 are now free for the bootloader. This helps
> > with with older SoCs on which the bootloader overlaps with the normal
> > location of the GPT partition entries, like i.MX7 and earlier.
> 
> I know that eMMC became quite large these days but always 'wasting' 8MiB
> on systems which utilize the eMMC-boot partitions is not very user
> friendly.

That's 0.78% of 1GiB SD card, it's really not much. Anyway, I can add a
command line option for parted.

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



  reply	other threads:[~2025-06-03  7:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-02 13:28 [PATCH 0/5] add createnv command to create environment partition Sascha Hauer
2025-06-02 13:28 ` [PATCH 1/5] partitions: efi: calculate instead of hardcode gpt header fields Sascha Hauer
2025-06-02 13:28 ` [PATCH 2/5] partitions: Start partitions at 8MiB offset Sascha Hauer
2025-06-02 22:16   ` Marco Felsch
2025-06-03  7:46     ` Sascha Hauer [this message]
2025-06-02 13:28 ` [PATCH 3/5] cdev: fix cdev_open_by_name() misuse Sascha Hauer
2025-06-02 13:28 ` [PATCH 4/5] commands: create createnv command Sascha Hauer
2025-06-02 13:48   ` Ahmad Fatoum
2025-06-02 14:50     ` Sascha Hauer
2025-06-02 13:28 ` [PATCH 5/5] mci: add option to detect non-removable cards during startup Sascha Hauer
2025-06-02 13:42   ` Ahmad Fatoum

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=aD6oZccyFXZWX2q1@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=m.felsch@pengutronix.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