Howto implement bootchooser <-> rauc interaction

Konstantin Kletschke konstantin.kletschke at inside-m2m.de
Thu Dec 16 11:35:22 PST 2021


On 2021-12-15 11:56, Ahmad Fatoum wrote:

> I think Roland meant that you shouldn't rely on the _mutable_ 
> environment
> for production. It's nice to test out stuff, but once you have figured
> out what you need, add it to the built-in environment (e.g.
> arch/arm/<board/myenv or CONFIG_DEFAULT_ENVIRONMENT_PATH).

Okay, then I got it - the intention of Roland. Compiled default 
environment
is no problem.

But regarding required bootchooser variables: what of those are 
required?
I said I utilised
https://bootlin.com/blog/another-system-update-adventure-with-rauc-barebox-yocto-project/
there is the barebox-state DT tree setup explained (a bit) and then it 
points out
[...]Now we have to add bootchooser variables associated to both targets 
in arch/arm/<board>/env/nv[...]
Which is rather abstract on how to do this, especially, if I have

bootstate.system0.remaining_attempts

in the DT, why should I replicate this in arch/arm/<board>/env/nv?

Or is there a connection needed to be created? Which variables need to 
be specified?
Isn't it already there?

> > barebox at TI AM335x BeagleBone black:/ devinfo state
> > Parameters:
> > bootstate.last_chosen: 0 (type: uint32)
> > bootstate.system0.ok: 0 (type: uint32)
> > bootstate.system0.priority: 21 (type: uint32)
> > bootstate.system0.remaining_attempts: 3 (type: uint32)
> > bootstate.system1.ok: 0 (type: uint32)
> > bootstate.system1.priority: 20 (type: uint32)
> > bootstate.system1.remaining_attempts: 3 (type: uint32)
> > dirty: 0 (type: bool)
> > init_from_defaults: 0 (type: bool)
> > save_on_shutdown: 1 (type: bool)

> > Is bootchooser smart enough to gather system0 and system1 as bootable entries/possibilities?

> > barebox at TI AM335x BeagleBone black:/ bootchooser
> > ERROR: bootchooser: Target list $global.bootchooser.targets is empty
> > No bootchooser found

May be this is my problem:

> hand is manageable, because you restrict what variables are available
> and how they interact with the rest of the system.

?


What I mixed into my not so elaborated mail is a SIDE QUEST:

I can boot a bootloader spec equipped partitio like this:

barebox at TI AM335x BeagleBone black:/ boot mmc1.2


How do I make a boot entry "system0" a boot.default variable can point 
to and also a member
of bootchooser.targets?

I tried mmc1.2 or "boot mmc1.2" as system0 content but that did not 
work...




Kind Regards
Konsti




More information about the barebox mailing list