Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 1 commit into from

Conversation

js731ca
Copy link
Contributor

@js731ca js731ca commented Aug 22, 2024

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?

@js731ca js731ca changed the title classes: bundle: use getVarFlags instead .get classes: bundle: use getVarFlag instead .get Aug 22, 2024
@js731ca js731ca changed the title classes: bundle: use getVarFlag instead .get classes: bundle: use getVarFlag instead of .get Aug 22, 2024
Make use of .getVarFlags instead of the simple .get to allow bitbake
level variable expansion.

This is useful especially when using bundle variants [1], on a
devicetree based board, where the compatible string - the slot
'name' -  would be constructed from another variable found e.g. in the
machine.conf

Link: https://rauc.readthedocs.io/en/latest/advanced.html#sec-variants
Signed-off-by: Johannes Schneider <[email protected]>
@jluebbe
Copy link
Member

jluebbe commented Aug 23, 2024

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
Copy link
Member

ejoerns commented Sep 9, 2024

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

@ejoerns ejoerns closed this Sep 9, 2024
@js731ca js731ca deleted the slotflags-getVarFlag branch September 27, 2024 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants