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: support multiconfig dependencies for slots #207

Closed a3f closed 10 months ago

a3f commented 3 years ago

Users may want to populate a slot with an image resulting from a multiconfig build. This can be especially useful with RAUC variants:

For this to work out of the box, bundle.bbclass will need some multiconfig awareness to emit mcdepends instead of depends when depending on a multiconfig recipe.

With this addressed, following slots definition is now possible:

  RAUC_SLOT_bootloader-othermachine = "mc::othermachine:bootloader"
  RAUC_SLOT_bootloader-othermachine[name] = "bootloader.othermachine"
  RAUC_SLOT_bootloader-othermachine[type] = "boot"
  RAUC_SLOT_bootloader-othermachine[file] = "../othermachine/bootloader.img"

No functional change intended for non-multiconfig users.

a3f commented 3 years ago

I have the equivalent on zeus and it works well. I left this as a draft until I can test this against a more up to date Yocto release. Comments welcome in the meantime though!

a3f commented 2 years ago

I left this as a draft until I can test this against a more up to date Yocto release.

I have now tested this with hardknott and it works fine.

a3f commented 1 year ago

In the meantime, I have added an intermediary recipe that does basically:

OTHERMACHINE_DEPLOYDIR= "../../../../tmp_mc-othermachine/deploy/images/othermachine"
do_deploy[mcdepends] += "mc::othermachine:originalrecipe:do_deploy
do_deploy () {
  cd ${DEPLOY_DIR_IMAGE}
  ln -sf ${OTHERMACHINE_DEPLOYDIR}/artifact-othermachine $ ${DEPLOYDIR}/
}

So I am no longer using the changes I originally submitted here. I will try to find some time in a few weeks to incorporate your feedback and retest.

ejoerns commented 10 months ago

@a3f Any update on this or interest in the topic? Or should we close this until someone needs mc deps again?

a3f commented 10 months ago

Sorry, didn't find the time to address the feedback. As I don't currently use it, I'll close till there's renewed interest.