mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Alexander Shiyan <eagle.alexander923@gmail.com>
Cc: Marco Felsch <m.felsch@pengutronix.de>, barebox@lists.infradead.org
Subject: Re: [PATCH v2 4/4] ARM: riotboard: drop static barebox-environment handling
Date: Mon, 27 Oct 2025 16:33:20 +0100	[thread overview]
Message-ID: <149450ee-37b2-4f1e-b9c5-5720f702896e@pengutronix.de> (raw)
In-Reply-To: <CAP1tNvR=GaOfm8c5xteys=UKFxZuFDrAic=JB4uXpyi8bEa3uw@mail.gmail.com>

Hi,

On 4/24/25 7:49 PM, Alexander Shiyan wrote:
> Hello All!
> 
> What happens if the required GUID identifier is both in the SD card
> and in the MMC?

The order of preference is:

  - barebox,environment node in the device tree
  - a suitable partition on the boot medium
  - a suitable partition on a non-boot medium

The latter two only if $global.env.autoprobe is 1.

Cheers,
Ahmad

> 
> Thanks!
> 
> чт, 24 апр. 2025 г. в 11:02, Ahmad Fatoum <a.fatoum@pengutronix.de>:
>>
>> Hi Marco,
>>
>> On 23.04.25 16:09, Marco Felsch wrote:
>>> Since commit 9f868f78bc54 ("environment: use barebox environment from
>>> GPT partitions") barebox can try to find the barebox-environment based
>>> on a GPT partition GUID.
>>>
>>> Make use of this mechanism and drop the barebox local of-partition. This
>>> allows the BSP integrators to provide a proper GPT or if no GPT was
>>> provided we fallback to the autom. minimal GPT mechanism added recently.
>>>
>>> This also fixes environment handling if booted from a SD card since SD
>>> card boots make use of eMMC barebox environment at the moment.
>>
>> You didn't fully address my suggestion[1] on v1. Why not keep around the existing
>> environment as a fallback?
>>
>> https://lore.barebox.org/barebox/1ff0f545-effa-4b87-81b7-524919333777@pengutronix.de/
>>
>> Thanks,
>> Ahmad
>>
>>>
>>> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
>>> ---
>>> v2:
>>> - Adapt commit message
>>>
>>>  arch/arm/dts/imx6s-riotboard.dts | 10 ----------
>>>  1 file changed, 10 deletions(-)
>>>
>>> diff --git a/arch/arm/dts/imx6s-riotboard.dts b/arch/arm/dts/imx6s-riotboard.dts
>>> index 57817c1197a7..cca34d6dba95 100644
>>> --- a/arch/arm/dts/imx6s-riotboard.dts
>>> +++ b/arch/arm/dts/imx6s-riotboard.dts
>>> @@ -11,11 +11,6 @@
>>>  / {
>>>       chosen {
>>>               stdout-path = &uart2;
>>> -
>>> -             environment {
>>> -                     compatible = "barebox,environment";
>>> -                     device-path = &environment_usdhc4;
>>> -             };
>>>       };
>>>  };
>>>
>>> @@ -31,11 +26,6 @@ partition@0 {
>>>               label = "barebox";
>>>               reg = <0x0 0xe0000>;
>>>       };
>>> -
>>> -     environment_usdhc4: partition@e0000 {
>>> -             label = "barebox-environment";
>>> -             reg = <0xe0000 0x20000>;
>>> -     };
>>>  };
>>>
>>>  &clks {
>>
>>
>> --
>> 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 |
>>
> 

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

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-23 14:09 [PATCH v2 1/4] partitions: efi: add support to specify gpt-location Marco Felsch
2025-04-23 14:09 ` [PATCH v2 2/4] parted: add support for gpt-location Marco Felsch
2025-04-24 12:00   ` Sascha Hauer
2025-04-24 20:34     ` Marco Felsch
2025-04-23 14:09 ` [PATCH v2 3/4] defaultenv-2: add support to automatically create an initial GPT table Marco Felsch
2025-04-24 11:51   ` Sascha Hauer
2025-04-23 14:09 ` [PATCH v2 4/4] ARM: riotboard: drop static barebox-environment handling Marco Felsch
2025-04-24  8:02   ` Ahmad Fatoum
2025-04-24  8:45     ` Marco Felsch
2025-04-24 17:49     ` Alexander Shiyan
2025-10-27 15:33       ` Ahmad Fatoum [this message]
2025-04-24 12:08 ` [PATCH v2 1/4] partitions: efi: add support to specify gpt-location Sascha Hauer

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=149450ee-37b2-4f1e-b9c5-5720f702896e@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=eagle.alexander923@gmail.com \
    --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