This does not invalidate this statement. It just means there could be
even more differences. Anyways, just a cover letter ;)
>
> > +this was not previously enforced. As a result, builds for multiple architectures
> > +could publish different source packages with the same name and version.
> > +
> > +Generic kernel recipes can append `${DISTRO_ARCH}` to `PN`, to provide the
> > +kernel for all architectures.
> > +
> > +```
> > +PN .= "-${DISTRO_ARCH}"
> > +```
> > +
> > +For a kernel built for only one target, the name may remain unchanged. When
> > +building multiple instances of a kernel selected by the same `KERNEL_NAME`, use
> > +`${DISTRO_ARCH}` in the name for architecture-specific kernels, or `${MACHINE}`
> > +for machine-specific kernels.
> > +
>
> This is not written like a recipe API change. This way, it looks like
> something that belongs into the user manual, kernel section, as it
> provides guidance on how to model that special case. You need to
> explain, when this is now required while it was not before.
>
> But I would rather suggest modelling that more transparently, via
> PROVIDES: The KERNEL_NAME should remain "mainline", e.g., and the
> recipes should PROVIDE that generic name while actually building
> "mainline-$DISTRO_ARCH".
And this is exactly what "option 2" from [1] proposes, which I tried
and which does not work for two reasons:
1. on bitbake side, the provides and depends need to be fiddled through
the multiarch classes (-native), which I did not manage to implement.
For the kernel it worked, but not for the module recipes. It also gets
super messy on multiconfig builds with two different kernels (e.g. a
hardened one for the image and a "open" one for the installer).
2. We need provides on the debian package names as well, but resolving
multiple provides in the dependency install stages (sbuild and rootfs
install) is tricky, as we already know from other tries in this
direction.
Felix
Having it arch specific is required anyways as we have the arch-
specific build dependency to linux-image-
${KERNEL_NAME_PROVIDED}:${DISTRO_ARCH} for the kbuild target.
But AFAIK it does not necessarily be machine specific, if all needed
defconfigs are present in the image. However, currently we modify the
debian/isar/configure isar part to in inject the KERNEL_DEFCONFIG (in
dpkg_configure_kernel), which again binds the source package to a
DEFCONFIG.
To split this, we would have to move this sed-replace to the dpkg-
buildpackage / sbuild part and switch defconfigs based on pre-set build
profiles. That's tricky and even further diverges from how debian is
doing it.
I prefer a slight API break over over-complicated magics. Let's just
follow how Debian is doing it: encode your specifics into the package
name (source package, binary packages), controlled by the KERNEL_NAME.
If you know your kernel is only architecture specific, name it -
${DISTRO_ARCH}. If it is machine specific, name it -${MACHINE}.
Keep in mind, that just renaming the source package just shifts the
issue. Then we likely get conflicts on the binary packages.
Felix