* [PATCH] ARM: riotboard: drop static barebox-environment handling
@ 2025-04-16 10:31 Marco Felsch
2025-04-16 12:15 ` Ahmad Fatoum
0 siblings, 1 reply; 2+ messages in thread
From: Marco Felsch @ 2025-04-16 10:31 UTC (permalink / raw)
To: barebox
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 for
the eMMC device and let the user-space provide the correct
barebox-environment location if any.
This also fixes environment handling if booted from a SD card since SD
card boots make use of eMMC barebox environment at the moment.
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
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 {
--
2.39.5
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ARM: riotboard: drop static barebox-environment handling
2025-04-16 10:31 [PATCH] ARM: riotboard: drop static barebox-environment handling Marco Felsch
@ 2025-04-16 12:15 ` Ahmad Fatoum
0 siblings, 0 replies; 2+ messages in thread
From: Ahmad Fatoum @ 2025-04-16 12:15 UTC (permalink / raw)
To: barebox
Hello Marco,
On 4/16/25 12:31, 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 for
> the eMMC device and let the user-space provide the correct
> barebox-environment location if any.
>
> This also fixes environment handling if booted from a SD card since SD
> card boots make use of eMMC barebox environment at the moment.
I agree that we want to nudge users towards making use of a GPT
partition with the correct type GUID, but breaking them and expecting
them to repartition leaves a sour taste.
How about we change barebox,environment to barebox,environment-fallback
as compatible and then make use of it only if no other environment has
been found (including any on a GPT-partitioned bootsource).
If a barebox,environment-fallback is used, a NOTICE level message should
alert the user to this fact. They can then either:
- Repartition to avoid the message
- Switch to barebox,environment if they explicitly want to hardcode
the location (e.g. in deployed systems or when it's on raw flash)
I think with these semantics, we could switch over EVKs in-tree
to the new compatible.
Cheers,
Ahmad
>
> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> ---
> 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 |
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-04-16 12:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-16 10:31 [PATCH] ARM: riotboard: drop static barebox-environment handling Marco Felsch
2025-04-16 12:15 ` Ahmad Fatoum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox