mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: BAREBOX <barebox@lists.infradead.org>
Subject: Re: [PATCH 4/5] commands: create createnv command
Date: Mon, 2 Jun 2025 16:50:21 +0200	[thread overview]
Message-ID: <aD26LTpV_irbVcGw@pengutronix.de> (raw)
In-Reply-To: <264954b4-d6d3-4ea1-a962-b2bc8a298bb9@pengutronix.de>

On Mon, Jun 02, 2025 at 03:48:26PM +0200, Ahmad Fatoum wrote:
> Hi,
> 
> On 02.06.25 15:28, Sascha Hauer wrote:
> > 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 patch 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.
> > 
> > We can't create environment partitions on a device containing a MBR
> > partition table, so a MBR partitioned device won't be touched.
> > 
> > As an additional safety net the command will ask the user if altering
> > the partition table is really desired. This behaviour can be overwritten
> > by specifying -f on the command line.
> 
> Could we have saveenv/loadenv nudge the user towards createnv if CMD_CREATENV
> is enabled?
> 
> Something along the lines of:
> 
>   saveenv: no environment was registered
>   saveenv: run createnv to create an ad-hoc environment

I was more thinking towards issuing a message like that during startup,
because by then we know already that we don't have an environment
partition. The corresponding patch is not yet ready though, so I sent
without it.

Do you see any advantages putting the message into the saveenv command?

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-02 14:51 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
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 [this message]
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=aD26LTpV_irbVcGw@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=a.fatoum@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