-
Notifications
You must be signed in to change notification settings - Fork 96
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
bundle.bbclass: split for a generic bundle-base.bbclass #367
base: master
Are you sure you want to change the base?
Conversation
Split bundle.bbclass to have essential functionalities in a bundle-base.bbclass to keep them unrelated to packaging concerns. Change how dependencies are handled by default. So far, do_bundle is set after do_configure which is not in the default schedule. Instead, schedule it after prepare_recipe_sysroot and schedule the do_configure before it. Keep do_configure in the bundle.bbclass as the recipe using it may already have a do_configure. Signed-off-by: Louis Rannou <louis.rannou@non.se.com>
Rename BUNDLE_BUILD to RAUC_BUNDLE_BUILD to avoid conflicts and factorize calls to getVar('BUNDLE_BUILD'). Signed-off-by: Louis Rannou <louis.rannou@non.se.com>
Move stuff from do_configure to a generic function for copying hooks and extra files. Signed-off-by: Louis Rannou <louis.rannou@non.se.com>
This would only work for the simple case where the bundle contains just the rootfs (no bootloader, no FIT image, no artifacts). With CRA, I suspect that most real-world systems will use secure/verified boot in some way and accordingly need multiple images in the bundle. While it simplifies the simple case, supporting both approaches (bundle recipe and image type) would mean documenting them and explaining which to use in which case. Especially for new users, selecting the appropriate approach would a hard.
You mean for an installer image, which then runs 'rauc install'? I think this can already be done via a rootfs postinstall function, which avoids the build-time overhead of creating/installing a huge package. |
I agree with the CRA and my option is actually to get closer to the construction of the wic. They are quite similar and it would make sense to build them together from the image recipe. As for the wic, there no reason to restrict to the rootfs.
I can understand that. Meanwhile, people also do not understand they have to build the bundle separately while it is actually the same image. The wic is not perfect but it's quite simple isn't it ?
That's correct except the size of the rootfs won't be calculated automatically, would it ? That's not a serious issue though. |
I can understand that having a way to generate bundles from the rootfs might feel some kind of 'natural' for those familiar with the current image creation/wic workflow OE has. However, I share the same concerns as @jluebbe. The key advantage is of course to have fewer recipe files since otherwise you would need a corresponding bundle recipe for each rootfs recipe. On the other hand, having a separate recipe for each and every package and all the options for defining dependencies between them makes it quite hard for me to understand why for disk image (or bundle) creation the best solution should be to 'just do it all between the So in the end as @jluebbe said, we optimize for a very simplified case. It's clear to me that simple problems my deserve simple solutions but I am quite unsure how much impact this should have on the common case and if that's worth doing such an invasive change that will surely make it much harder to backport future fixes, etc.
If you refer to Just a side-note while looking at the patches: From your first commit:
That's clearly wrong since |
I'm fine with your answers, it's probably better to keep it simple as long as there is no issue. Thanks for your time :)
I'm not sure why I've written that. I think during my tests I met some case where |
Hello,
This is a suggestion for having a generic bundle-base.bbclass to keep essential functionalities unrelated to packaging concerns. So far the class inherits from nopackages and leaves no possibility for packaging or imaging.
This suggestion aims to not modify the usage of the bundle.bbclass but gives the ability to inherits only bundle-base.bbclass.
The goal for us next to this is to enable a raucb extension for images which would simplify the creation of images and associated bundles into a single recipe.
This could also allow having a packaged bundle which can be useful in case you want to embed the bundle into a live image.
Thanks