On Thu, Sep 12, 2024 at 7:00 AM Martin Jansa via lists.yoctoproject.org
<[email protected]> wrote:

> I see, the .inc file adds the +git suffix to LINUX_VERSION.
>
>
> https://git.yoctoproject.org/meta-intel/tree/recipes-kernel/linux/linux-intel.inc#n15
> PV = "${LINUX_VERSION}+git${SRCPV}"
>
> Not sure what's the best solution here, all are a bit fragile.
>
> Using LINUX_VERSION for both might be safest (as it will add the
> include only for "sane" combinations and then add "sane" version to
> yocto-cfg-fragments dependency.
>
> Using PV + LINUX_VERSION now or PREFERRED_VERSION + LINUX_VERSION
> before leads to these mismatches.
>
> Lets see what Bruce thinks.


Thanks to you both for the options and discussion!

I'm absolutely willing to change the implementation on this, as
what we currently have was my attempt to solve warnings that
popped up between 6.6 and 6.10 (and that was a first for
the fragments).

I tried to make it dynamic/automatic, but perhaps that was just
too much hassle for what it is supposed to do.

Let me re-state the goals:

- The fragments are no longer split between the kernel-cache
and meta-virtualization. We get that by only using the yocto-cfg-fragments
provider.
- Work with more than linux-yocto, since even if you don't use kernel-yocto
having agreed upon fragments has value. We also get that with the
yocto-cfg-fragments provider. (this is arguably the more important of
my goals).

.. and then, when the warnings started to pop up with 6.10 and
options being removed/renamed in the kernel, I could no longer get
away with a single version of the fragments (this would have also
been a problem with the fragments directly in meta-virtualization).

Which is why I introduced the versioned recipes for the config
provider, and tried to make the dependency dynamic / flexible.

I could just make a preferred version for the recipe and have bitbake
select it. Then switching could be something that is done in the
configuration space for a given configuration and whoever is building
that configuration could explicitly make the choice.

But I'm ok with trying a bit more flexible, and possibly some more
corner cases to look into. At a minimum, I'm finding out more
about some configurations and mix and match that I didn't know
was happening, and these are all configurations that I'd like to
support.

All that being said, I probably just over thought this when doing
the implementation.

I already rely on LINUX_MAJOR and LINUX_MINOR to match
supported / tested versions to the kernel virtualization include, so
maybe I toss it all in the bin and just do:

KERNEL_CFG_DEPENDS ?=
"yocto-cfg-fragments-${LINUX_MAJOR}.${LINUX_MINOR}-native:do_populate_sysroot
do_kernel_metadata[depends] += "${KERNEL_CFG_DEPENDS}"

And call it done. Since there's still a way to easily override the variable
and control it by the two variables already in use, which is fundamentally
what Martin was getting down to with the PV direction.

... or am I missing something obvious (like variable expansion or
other issues) ?

Bruce



> On Thu, Sep 12, 2024 at 12:42 PM Markus Volk <[email protected]> wrote:
> >
> > I see, thanks for the clarification. After looking into this I can say
> that in fact
> > the issue was caused by this commit:
> >
> https://git.yoctoproject.org/meta-virtualization/commit/?id=c02af94731631b3432b8ddee2b89761ab32530ee
> >
> >
> > It fails because meta-intel missed to set the patch version in
> LINUX_VERSION in linux-intel_6.10.bb
> >
> https://git.yoctoproject.org/meta-intel/tree/recipes-kernel/linux/linux-intel_6.10.bb#n16
> >
> > changing to LINUX_VERSION ?= "6.10.0" fixes the issue
> >
> > On Thu, Sep 12 2024 at 11:32:52 AM +02:00:00, Martin Jansa <
> [email protected]> wrote:
> >
> > That's weird, these LINUX_MAJOR/LINUX_MINOR are used only to include the
> .inc file in: recipes-kernel/linux/linux-%.bbappend:include
> ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization',
> 'linux-${KERNEL_META_TYPE}_${LINUX_MAJOR}.${LINUX_MINOR}_virtualization.inc',
> '', d)} while yocto-cfg-fragments dependency you've mentioned in the error
> is added based on PV now in this .inc file:
> recipes-kernel/linux/linux-yocto_virtualization.inc: return
> "yocto-cfg-fragments-%s-native:do_populate_sysroot" % pv So I think your
> fix only prevents either of these to be included:
> ./recipes-kernel/linux/linux-yocto_virtualization.inc
> ./recipes-kernel/linux/linux-yocto_6.6_virtualization.inc
> ./recipes-kernel/linux/linux-yocto_6.10_virtualization.inc and not only for
> people using meta-intel, but for everybody, because there is no
> linux-yocto_x.y_virtualization.inc at all. That doesn't look right. I think
> "oe.utils.trim_version(d.getVar('PV'), 2)" should be improved to strip
> trailing +git as well or maybe to use LINUX_MAJOR/LINUX_MINOR instead of PV
> inside the .inc file. Regards, On Thu, Sep 12, 2024 at 10:48 AM Markus Volk
> <[email protected]> wrote:
> >
> > On Thu, Sep 12 2024 at 10:36:04 AM +02:00:00, Martin Jansa <
> [email protected]> wrote: Wasn't this fixed by
> https://git.yoctoproject.org/meta-virtualization/commit/?id=c02af94731631b3432b8ddee2b89761ab32530ee
> ? I have meta-virtualization layer up to date, so it includes this commit,
> but was still hit by this problem.
>
> 
>
>

-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end
- "Use the force Harry" - Gandalf, Star Trek II
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#8893): 
https://lists.yoctoproject.org/g/meta-virtualization/message/8893
Mute This Topic: https://lists.yoctoproject.org/mt/108409634/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to