mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: BAREBOX <barebox@lists.infradead.org>
Subject: Re: [PATCH 4/5] commands: create createnv command
Date: Tue, 10 Jun 2025 13:56:53 +0200	[thread overview]
Message-ID: <a5da1e7a-aef3-4d1e-99bb-43ed617409a0@pengutronix.de> (raw)
In-Reply-To: <aD26LTpV_irbVcGw@pengutronix.de>



On 6/2/25 16:50, Sascha Hauer wrote:
> 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?

Both sound good to me.

Thanks,
Ahmad

> 
> 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-10 12:34 UTC|newest]

Thread overview: 12+ 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
2025-06-10 11:56       ` Ahmad Fatoum [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=a5da1e7a-aef3-4d1e-99bb-43ed617409a0@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@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