rauc / meta-rauc

Yocto/Open Embedded meta layer for RAUC, the embedded Linux update framework
MIT License
165 stars 91 forks source link

classes: bundle: use getVarFlag instead of .get #343

Closed js731ca closed 1 month ago

js731ca commented 2 months ago

Make use of .getVarFlag instead of the simple .get to allow bitbake level variable expansion.

This is useful especially when using https://rauc.readthedocs.io/en/latest/advanced.html#sec-variants with the device-tree compatible constructed from another variable in e.g. the machine config

for consistencies sake the other/close slotfllag.get calls where also replaced


Example, from a bundle recipe:

RAUC_SLOT_bootloader = "barebox-foo"
RAUC_SLOT_bootloader[name] = "bootloader.foo,product-Rev${MACHINE_REVISION}"                                      
RAUC_SLOT_bootloader[type] = "boot"
...

Sidenote: i currently don't have a full build+config setup for something newer than kirkstone... but the changes should port easily?

jluebbe commented 2 months ago

This part has been changed significantly by #289 and #336 since kirkstone. Variable expansion should work there.

@ejoerns Should those changes be backported to kirkstone or would you take this change?

ejoerns commented 1 month ago

@js731ca Thank your for your fix. As @jluebbe already mentioned, we have existing fixes for this in master/scarthgap.

I just checked that they are backportable with manageable effort and seem to work well under kirkstone, too.

I prefer the backport way since it ensures that master and kirkstone version of bundle.bbclass stay more similar which should ease further backports.