Allow multi kernel image builds#3893
Conversation
Different kernel recipes might declare different deploy directories not to clash between them. Change-type: patch Signed-off-by: Alex Gonzalez <alexg@balena.io>
Auto-merge kconfig fragments found in FILESEXTRAPATHS.
Yocto's stock kernel-yocto.bbclass already merges *.cfg fragments listed in
SRC_URI through do_kernel_configme. This step complements discovering
every *.cfg file reachable via FILESEXTRAPATHS and merging them into
${B}/.config, then runs olddefconfig to resolve dependencies.
- It lets recipes ship fragments by dropping them in ${THISDIR}/files/ (or any
FILESEXTRAPATHS-reachable dir) without touching SRC_URI.
- Allows sharing of kernel fragments across kernel siblings
- Allow fragments to override BALENA_CONFIGS-injected values when needed.
Change-type: patch
Signed-off-by: Alex Gonzalez <alexg@balena.io>
The upstream RRECOMMENDS that drags in via kernel-base overwrites /boot/<type> with the no-initramfs binary. Change-type: patch Signed-off-by: Alex Gonzalez <alexg@balena.io>
Generalize the recipe so it can be re-used on different kernel builds. Change-type: patch Signed-off-by: Alex Gonzalez <alexg@balena.io>
|
Website deployed to CF Pages, 👀 preview link https://35dc041f.balena-os.pages.dev |
| do_kernel_resin_checkconfig[deptask] += "do_kernel_resin_reconfigure" | ||
| do_kernel_resin_checkconfig[dirs] += "${WORKDIR} ${B}" | ||
|
|
||
| python do_kernel_balena_merge_fragments() { |
There was a problem hiding this comment.
Hey @alexgg,
As you said this is only a part of the overall kernel and kernel module hostapp extension.
I see that there's a telling comment in meta-balena-raspberrypi that explain why we do this.
At first I thought that this was a re-edit of the config fragment mechanism of poky, so perhaps we should precise that poky's mechanism uses on SRC_URI and yours uses in FILESEXTRAPATHS. We could also explain why we do that. I suppose that it is so that we can have a kernel vendor not base on kernel-yocto and still have our own fragment added?
Also I'm wondering if we should merge this mechanism on its own or if we should wait for the rest of the feature? Is this whole change useful on its own?
There was a problem hiding this comment.
I see that there's a telling comment in meta-balena-raspberrypi that explain why we do this.
It's also explained in the commit log.
At first I thought that this was a re-edit of the config fragment mechanism of poky, so perhaps we should precise that poky's mechanism uses on SRC_URI and yours uses in FILESEXTRAPATHS.
It is explained in the commit log.
We could also explain why we do that. I suppose that it is so that we can have a kernel vendor not base on kernel-yocto and still have our own fragment added?
The reasoning for the change is also in the commit log:
- It lets recipes ship fragments by dropping them in ${THISDIR}/files/ (or any
FILESEXTRAPATHS-reachable dir) without touching SRC_URI. - Allows sharing of kernel fragments across kernel siblings
- Allow fragments to override BALENA_CONFIGS-injected values when needed.
Basically, it adds a mechanism that extensions can use to customize a kernel. Neither Yocto's default or the balenaOS kernel class allow this.
And indeed it's generic so it works independently of the kernel-yocto class.
Also I'm wondering if we should merge this mechanism on its own or if we should wait for the rest of the feature? Is this whole change useful on its own?
It's an independent mechanism to add kernel configuration so it stands on its own. There is no roadmap for extensions yet so there is no rest of the feature to wait for. Without it, extensions would just work, but they will have no clean interface to overriding kernel and modules. But extensions that won't need this would just work fine.
Contributor checklist
Change-typepresent on at least one commitSigned-off-byis presentReviewer Guidelines