mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: BAREBOX <barebox@lists.infradead.org>
Subject: [PATCH 0/5] add createnv command to create environment partition
Date: Mon, 02 Jun 2025 15:28:34 +0200	[thread overview]
Message-ID: <20250602-createnv-v1-0-c3239ff875d5@pengutronix.de> (raw)

We want to move away from describing the barebox environment explicitly
in the device tree and instead motivate usage of GPT partitions for the
envrionment. This series creates a createnv command to facilitate this.
It creates an environment partition on the specified device and if
necessary also a GPT partition table. In the simplest case a "createnv"
without arguments will create a partition on the device barebox itself
booted from. Both the device and the size of the partition can be
specified on the command line.

As the first GPT partition as well as the GPT partition entries might
conflict with a barebox written on the device on certain SoCs this
series also includes patches to move the first partition up to the 8MiB
boundary leaving space for a barebox binary written onto the raw device.
On Some SoCs (i.MX7 and earlier) the GPT partition entries also collide
with the barebox binary, so these are moved up to just below the 8MiB
boundary.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
Sascha Hauer (5):
      partitions: efi: calculate instead of hardcode gpt header fields
      partitions: Start partitions at 8MiB offset
      cdev: fix cdev_open_by_name() misuse
      commands: create createnv command
      mci: add option to detect non-removable cards during startup

 commands/Kconfig        |  18 +++++
 commands/Makefile       |   1 +
 commands/createnv.c     | 179 ++++++++++++++++++++++++++++++++++++++++++++++++
 commands/devlookup.c    |   4 +-
 commands/findmnt.c      |   2 +-
 commands/parted.c       |   2 +-
 common/partitions.c     |   9 +++
 common/partitions/efi.c |  21 ++++--
 drivers/mci/Kconfig     |  21 +++++-
 drivers/mci/mci-core.c  |   6 +-
 fs/devfs-core.c         |  17 ++++-
 fs/fs.c                 |   6 +-
 include/driver.h        |   5 ++
 include/mci.h           |   1 +
 include/partitions.h    |   6 ++
 15 files changed, 279 insertions(+), 19 deletions(-)
---
base-commit: c31204804b17f2c07608329a8df6d88e4196cb73
change-id: 20250602-createnv-11c4279116d4

Best regards,
-- 
Sascha Hauer <s.hauer@pengutronix.de>




             reply	other threads:[~2025-06-02 13:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-02 13:28 Sascha Hauer [this message]
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
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=20250602-createnv-v1-0-c3239ff875d5@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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