In message: Re: [meta-virtualization] [PATCH] linux: add bbappend for generic cases on 25/02/2020 Bruce Ashfield wrote: > On Tue, Feb 25, 2020 at 1:47 AM Lee Chee Yang wrote: > > > > From: Chee Yang Lee > > > > add generic .bbappend for linux kernel recipe to allow > > all linux kernel recipe with name "linux-%" to enjoy the > > kernel config from virtualization layer. > > The generic bbappend makes sense, but having them completely > unversioned is an issue. Having them completely generic gives us no > way to adjust the names as they change over time (and they do) and can > give the false impression that they've been tested or are valid for > any version. > > Last I checked, the % wildcard means "until the end", so we can't do > linux-%_.bbappend > > I've always had the LINUX_VERSION variable in linux-yocto for cases > like this, so I'm wondering if not only can we check the distro > feature, but can we also check the version before doing the kernel > feature addition ? > > I've cc'd Richard, in case he sees this and can offer a suggestion. > > I'll think on this more, since I'd rather collapse all the > linux-yocto* bbappends, into a single bbappend that works like this, > so not only can it be used by other kernels, I can actually test it :D I've come up with the following patch. It works for linux-yocto*, and is setup to work for any fragment enabled kernel. I'm sure someone will point out a parse ordering, or some other corner case, but this is the direction I'd like to go with this. Cheers, Bruce > > Bruce > > > > > > [YOCTO #13727] > > > > Signed-off-by: Chee Yang Lee > > --- > > recipes-kernel/linux/linux-%.bbappend | 1 + > > 1 file changed, 1 insertion(+) > > create mode 100644 recipes-kernel/linux/linux-%.bbappend > > > > diff --git a/recipes-kernel/linux/linux-%.bbappend b/recipes-kernel/linux/linux-%.bbappend > > new file mode 100644 > > index 0000000..20eeba9 > > --- /dev/null > > +++ b/recipes-kernel/linux/linux-%.bbappend > > @@ -0,0 +1 @@ > > +require ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', 'linux-yocto_virtualization.inc', '', d)} > > -- > > 2.7.4 > > > > > > > > -- > - Thou shalt not follow the NULL pointer, for chaos and madness await > thee at its end > - "Use the force Harry" - Gandalf, Star Trek II