* [DistroKit] [PATCH 0/2] fixed after bootchooser switch
@ 2023-12-05 9:59 Ahmad Fatoum
2023-12-05 9:59 ` [DistroKit] [PATCH 1/2] v7a: barebox: define state for all supported board variants Ahmad Fatoum
2023-12-05 9:59 ` [DistroKit] [PATCH 2/2] v8a: barebox: env: fix boot for i.MX8M EVKs Ahmad Fatoum
0 siblings, 2 replies; 6+ messages in thread
From: Ahmad Fatoum @ 2023-12-05 9:59 UTC (permalink / raw)
To: distrokit
Some boards use a common barebox environment, which was changed to use
bootchooser as part of the RAUC addition, but no state storage was
defined for them, leading to boot failure.
Fix this for some v7a boards, and revert it for the i.MX8M boards.
The i.MX8M boards still fail the test suite, because the systemd-repart
takes 4 minutes, which is longer than the test suite is willing to wait.
Ahmad Fatoum (2):
v7a: barebox: define state for all supported board variants
v8a: barebox: env: fix boot for i.MX8M EVKs
configs/platform-v7a/dts/bootstate.dtsi | 13 +++++++++----
.../barebox-common-defaultenv/init/bootsource | 5 +++--
2 files changed, 12 insertions(+), 6 deletions(-)
--
2.39.2
^ permalink raw reply [flat|nested] 6+ messages in thread
* [DistroKit] [PATCH 1/2] v7a: barebox: define state for all supported board variants
2023-12-05 9:59 [DistroKit] [PATCH 0/2] fixed after bootchooser switch Ahmad Fatoum
@ 2023-12-05 9:59 ` Ahmad Fatoum
2023-12-11 10:33 ` Roland Hieber
2023-12-12 18:04 ` Robert Schwebel
2023-12-05 9:59 ` [DistroKit] [PATCH 2/2] v8a: barebox: env: fix boot for i.MX8M EVKs Ahmad Fatoum
1 sibling, 2 replies; 6+ messages in thread
From: Ahmad Fatoum @ 2023-12-05 9:59 UTC (permalink / raw)
To: distrokit; +Cc: Ahmad Fatoum
Boot up is broken on some of the Raspberry Pi and STM32MP1 board we
support, because boot method is changed to bootchooser, but state isn't
defined. Fix this by extending state definition to the missed boards.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
configs/platform-v7a/dts/bootstate.dtsi | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/configs/platform-v7a/dts/bootstate.dtsi b/configs/platform-v7a/dts/bootstate.dtsi
index c77df2e19d65..cd24d74d4aea 100644
--- a/configs/platform-v7a/dts/bootstate.dtsi
+++ b/configs/platform-v7a/dts/bootstate.dtsi
@@ -39,8 +39,11 @@
};
#endif
-/** Raspberry Pi 3 Model B ****************************************************/
-#ifdef bcm2837_rpi_3_dts
+/** Raspberry Pi **************************************************************/
+#if defined(bcm2836_rpi_2_dts) || \
+ defined(bcm2837_rpi_3_dts) || \
+ defined(bcm2837_rpi_cm3_dts) || \
+ defined(bcm2711_rpi_4_dts)
/ {
aliases {
state = &state;
@@ -101,8 +104,10 @@
};
#endif
-/** LXA MC1 *******************************************************************/
-#ifdef stm32mp157c_lxa_mc1_dts
+/** STM32MP1 ******************************************************************/
+#if defined(stm32mp157c_lxa_mc1_dts) || \
+ defined(stm32mp157c_dk2_dts) || \
+ defined(stm32mp157c_ev1_dts)
/ {
aliases {
state = &state_mmc0;
--
2.39.2
^ permalink raw reply [flat|nested] 6+ messages in thread
* [DistroKit] [PATCH 2/2] v8a: barebox: env: fix boot for i.MX8M EVKs
2023-12-05 9:59 [DistroKit] [PATCH 0/2] fixed after bootchooser switch Ahmad Fatoum
2023-12-05 9:59 ` [DistroKit] [PATCH 1/2] v7a: barebox: define state for all supported board variants Ahmad Fatoum
@ 2023-12-05 9:59 ` Ahmad Fatoum
2023-12-11 10:35 ` Roland Hieber
1 sibling, 1 reply; 6+ messages in thread
From: Ahmad Fatoum @ 2023-12-05 9:59 UTC (permalink / raw)
To: distrokit; +Cc: Ahmad Fatoum
Rockchip RK35* and i.MX8M* share the same barebox environment, but RAUC
and bootchooser were only configured for the Rockchip boards, rendering
the i.MX boards unbootable. Fix this by adding bootchooser as boot
target only for the radxa,rock3a.
While at it, we switch to using the new of_compatible command. This is
likey more stable than the Model string and allows easy extension in
future by additional compatibles.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
.../platform-v8a/barebox-common-defaultenv/init/bootsource | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/configs/platform-v8a/barebox-common-defaultenv/init/bootsource b/configs/platform-v8a/barebox-common-defaultenv/init/bootsource
index fe63bbbe099b..af47c82c1001 100644
--- a/configs/platform-v8a/barebox-common-defaultenv/init/bootsource
+++ b/configs/platform-v8a/barebox-common-defaultenv/init/bootsource
@@ -7,10 +7,11 @@ fi
if [ "$bootsource" = mmc ]; then
detect mmc$bootsource_instance
- global.boot.default="bootchooser net"
+ global.boot.default="mmc$bootsource_instance net"
fi
-if [ "${global.model}" = "Radxa ROCK3 Model A" ]; then
+if of_compatible -k radxa,rock3a; then
+ global.boot.default="bootchooser net"
global bootchooser.state_prefix="state.bootstate"
global bootchooser.targets="system0 system1"
global bootchooser.system0.boot="mmc1.root-A"
--
2.39.2
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [DistroKit] [PATCH 1/2] v7a: barebox: define state for all supported board variants
2023-12-05 9:59 ` [DistroKit] [PATCH 1/2] v7a: barebox: define state for all supported board variants Ahmad Fatoum
@ 2023-12-11 10:33 ` Roland Hieber
2023-12-12 18:04 ` Robert Schwebel
1 sibling, 0 replies; 6+ messages in thread
From: Roland Hieber @ 2023-12-11 10:33 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: distrokit
On Tue, Dec 05, 2023 at 10:59:29AM +0100, Ahmad Fatoum wrote:
> Boot up is broken on some of the Raspberry Pi and STM32MP1 board we
> support, because boot method is changed to bootchooser, but state isn't
> defined. Fix this by extending state definition to the missed boards.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Ah, I replied to the first version of this patch… here too:
Reviewed-by: Roland Hieber <rhi@pengutronix.de>
> ---
> configs/platform-v7a/dts/bootstate.dtsi | 13 +++++++++----
> 1 file changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/configs/platform-v7a/dts/bootstate.dtsi b/configs/platform-v7a/dts/bootstate.dtsi
> index c77df2e19d65..cd24d74d4aea 100644
> --- a/configs/platform-v7a/dts/bootstate.dtsi
> +++ b/configs/platform-v7a/dts/bootstate.dtsi
> @@ -39,8 +39,11 @@
> };
> #endif
>
> -/** Raspberry Pi 3 Model B ****************************************************/
> -#ifdef bcm2837_rpi_3_dts
> +/** Raspberry Pi **************************************************************/
> +#if defined(bcm2836_rpi_2_dts) || \
> + defined(bcm2837_rpi_3_dts) || \
> + defined(bcm2837_rpi_cm3_dts) || \
> + defined(bcm2711_rpi_4_dts)
> / {
> aliases {
> state = &state;
> @@ -101,8 +104,10 @@
> };
> #endif
>
> -/** LXA MC1 *******************************************************************/
> -#ifdef stm32mp157c_lxa_mc1_dts
> +/** STM32MP1 ******************************************************************/
> +#if defined(stm32mp157c_lxa_mc1_dts) || \
> + defined(stm32mp157c_dk2_dts) || \
> + defined(stm32mp157c_ev1_dts)
> / {
> aliases {
> state = &state_mmc0;
> --
> 2.39.2
>
>
>
--
Roland Hieber, Pengutronix e.K. | r.hieber@pengutronix.de |
Steuerwalder Str. 21 | https://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] 6+ messages in thread
* Re: [DistroKit] [PATCH 2/2] v8a: barebox: env: fix boot for i.MX8M EVKs
2023-12-05 9:59 ` [DistroKit] [PATCH 2/2] v8a: barebox: env: fix boot for i.MX8M EVKs Ahmad Fatoum
@ 2023-12-11 10:35 ` Roland Hieber
0 siblings, 0 replies; 6+ messages in thread
From: Roland Hieber @ 2023-12-11 10:35 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: distrokit
On Tue, Dec 05, 2023 at 10:59:30AM +0100, Ahmad Fatoum wrote:
> Rockchip RK35* and i.MX8M* share the same barebox environment, but RAUC
> and bootchooser were only configured for the Rockchip boards, rendering
> the i.MX boards unbootable. Fix this by adding bootchooser as boot
> target only for the radxa,rock3a.
>
> While at it, we switch to using the new of_compatible command. This is
> likey more stable than the Model string and allows easy extension in
> future by additional compatibles.
Seems very reasonable to me.
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Reviewed-by: Roland Hieber <rhi@pengutronix.de>
> ---
> .../platform-v8a/barebox-common-defaultenv/init/bootsource | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/configs/platform-v8a/barebox-common-defaultenv/init/bootsource b/configs/platform-v8a/barebox-common-defaultenv/init/bootsource
> index fe63bbbe099b..af47c82c1001 100644
> --- a/configs/platform-v8a/barebox-common-defaultenv/init/bootsource
> +++ b/configs/platform-v8a/barebox-common-defaultenv/init/bootsource
> @@ -7,10 +7,11 @@ fi
>
> if [ "$bootsource" = mmc ]; then
> detect mmc$bootsource_instance
> - global.boot.default="bootchooser net"
> + global.boot.default="mmc$bootsource_instance net"
> fi
>
> -if [ "${global.model}" = "Radxa ROCK3 Model A" ]; then
> +if of_compatible -k radxa,rock3a; then
> + global.boot.default="bootchooser net"
> global bootchooser.state_prefix="state.bootstate"
> global bootchooser.targets="system0 system1"
> global bootchooser.system0.boot="mmc1.root-A"
> --
> 2.39.2
>
>
>
--
Roland Hieber, Pengutronix e.K. | r.hieber@pengutronix.de |
Steuerwalder Str. 21 | https://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] 6+ messages in thread
* Re: [DistroKit] [PATCH 1/2] v7a: barebox: define state for all supported board variants
2023-12-05 9:59 ` [DistroKit] [PATCH 1/2] v7a: barebox: define state for all supported board variants Ahmad Fatoum
2023-12-11 10:33 ` Roland Hieber
@ 2023-12-12 18:04 ` Robert Schwebel
1 sibling, 0 replies; 6+ messages in thread
From: Robert Schwebel @ 2023-12-12 18:04 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: distrokit
Applied to next (replaced the older version).
On Tue, Dec 05, 2023 at 10:59:29AM +0100, Ahmad Fatoum wrote:
> Boot up is broken on some of the Raspberry Pi and STM32MP1 board we
> support, because boot method is changed to bootchooser, but state isn't
> defined. Fix this by extending state definition to the missed boards.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> configs/platform-v7a/dts/bootstate.dtsi | 13 +++++++++----
> 1 file changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/configs/platform-v7a/dts/bootstate.dtsi b/configs/platform-v7a/dts/bootstate.dtsi
> index c77df2e19d65..cd24d74d4aea 100644
> --- a/configs/platform-v7a/dts/bootstate.dtsi
> +++ b/configs/platform-v7a/dts/bootstate.dtsi
> @@ -39,8 +39,11 @@
> };
> #endif
>
> -/** Raspberry Pi 3 Model B ****************************************************/
> -#ifdef bcm2837_rpi_3_dts
> +/** Raspberry Pi **************************************************************/
> +#if defined(bcm2836_rpi_2_dts) || \
> + defined(bcm2837_rpi_3_dts) || \
> + defined(bcm2837_rpi_cm3_dts) || \
> + defined(bcm2711_rpi_4_dts)
> / {
> aliases {
> state = &state;
> @@ -101,8 +104,10 @@
> };
> #endif
>
> -/** LXA MC1 *******************************************************************/
> -#ifdef stm32mp157c_lxa_mc1_dts
> +/** STM32MP1 ******************************************************************/
> +#if defined(stm32mp157c_lxa_mc1_dts) || \
> + defined(stm32mp157c_dk2_dts) || \
> + defined(stm32mp157c_ev1_dts)
> / {
> aliases {
> state = &state_mmc0;
> --
> 2.39.2
>
>
>
--
Pengutronix e.K. | Dipl.-Ing. Robert Schwebel |
Steuerwalder Str. 21 | https://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-12-12 18:04 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-05 9:59 [DistroKit] [PATCH 0/2] fixed after bootchooser switch Ahmad Fatoum
2023-12-05 9:59 ` [DistroKit] [PATCH 1/2] v7a: barebox: define state for all supported board variants Ahmad Fatoum
2023-12-11 10:33 ` Roland Hieber
2023-12-12 18:04 ` Robert Schwebel
2023-12-05 9:59 ` [DistroKit] [PATCH 2/2] v8a: barebox: env: fix boot for i.MX8M EVKs Ahmad Fatoum
2023-12-11 10:35 ` Roland Hieber
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox