mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* A/B boot on PhyCORE iMX6 with U-Boot env
@ 2021-03-05 17:30 Sébastien Merle
  2021-03-05 20:23 ` Ahmad Fatoum
  0 siblings, 1 reply; 2+ messages in thread
From: Sébastien Merle @ 2021-03-05 17:30 UTC (permalink / raw)
  To: barebox

Hi,

First, I am a newbie to this and if I should use another channel to ask these questions, please forgive me and redirect me to the proper place.

I am trying to setup A/B boot on a a phyCORE imx6 board with barebox from EMMC. To test the state framework I added Barebox’s imx6ul-phytec-state.dtsi to my device tree. 
 
I am confused about the &eeprom node in imx6ul-phytec-state.dtsi used for the state backend, what is this defining ? Is this really storing the state in the EMMC ?

We would rather use U-Boot env, as our firmware creation tools only support that for now. To setup my firmware update I need to define the offset of barebox, barebox environment and U-Boot environment but I can’t find what offsets I should use so nothing clash. How could I figure out these offsets ?

The idea was to add a U-Boot environment and use a script to boot A or B in function of the U-Boot variables. Is it even possible ?

If it is possible, do I need to add a partition of the EMMC in my device tree as shown in https://www.barebox.org/doc/latest/devicetree/bindings/barebox/barebox,uboot-environment.html ?

I would be grateful for any pointers to documentation or examples to setup A/B boot on similar platform (without yocto).

Thank you very much for your time.

Best regards,
Sebastien Merle,
Peer Stritzinger GmbH.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: A/B boot on PhyCORE iMX6 with U-Boot env
  2021-03-05 17:30 A/B boot on PhyCORE iMX6 with U-Boot env Sébastien Merle
@ 2021-03-05 20:23 ` Ahmad Fatoum
  0 siblings, 0 replies; 2+ messages in thread
From: Ahmad Fatoum @ 2021-03-05 20:23 UTC (permalink / raw)
  To: Sébastien Merle, barebox

Hello Sébastien,

On 05.03.21 18:30, Sébastien Merle wrote:
> First, I am a newbie to this and if I should use another channel to ask these questions, please forgive me and redirect me to the proper place.

Here is ok.

> I am trying to setup A/B boot on a a phyCORE imx6 board with barebox from EMMC. To test the state framework I added Barebox’s imx6ul-phytec-state.dtsi to my device tree. 
>  
> I am confused about the &eeprom node in imx6ul-phytec-state.dtsi used for the state backend, what is this defining ? Is this really storing the state in the EMMC ?

The state node has a backend property, which points at a partition within EEPROM.
You can have state in eMMC as well if your prefer, but EEPROM works well too.

(Note that older Linux versions might not like partitions within eMMC devices.
 If you have problems, you can cherry-pick 0445efacec7 ("nvmem: core: skip child
 nodes not matching binding"))
 
> We would rather use U-Boot env, as our firmware creation tools only support that for now.

As mentioned on IRC, this is a bad idea. Better have your image updater
use dt-utils' barebox-state utility. See how RAUC does it for an example.

> To setup my firmware update I need to define the offset of barebox, barebox environment and U-Boot environment but I can’t find what offsets I should use so nothing clash. How could I figure out these offsets ?

They are all fixed-partitions, so you specify them in the device tree.

> The idea was to add a U-Boot environment and use a script to boot A or B in function of the U-Boot variables. Is it even possible ?

Possible, yes. Good idea? probably not.

> If it is possible, do I need to add a partition of the EMMC in my device tree as shown in https://www.barebox.org/doc/latest/devicetree/bindings/barebox/barebox,uboot-environment.html ?

arch/arm/dts has one example of using it. It was used for migrating from U-Boot to barebox.

> I would be grateful for any pointers to documentation or examples to setup A/B boot on similar platform (without yocto).
> 
> Thank you very much for your time.

Cheers,
Ahmad

> 
> Best regards,
> Sebastien Merle,
> Peer Stritzinger GmbH.
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
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 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-05 20:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-05 17:30 A/B boot on PhyCORE iMX6 with U-Boot env Sébastien Merle
2021-03-05 20:23 ` Ahmad Fatoum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox