On Thu, Jan 20, 2022 at 6:20 AM Matthias Klein <[email protected]> wrote: > > Hello, > > > > I would like to create a linux-%.bbappend file and add the following to it, > for example: > > > > KERNEL_FEATURES:append = " features/overlayfs/overlayfs.scc". > > > > Works also for all kernels which use the advanced metadata. Unfortunately it > leads to an error with a kernel which uses a defconfig. > > I would only enable the above line if the kernel uses the advanced metadata. > Is this possible? >
Presumably, the kernel recipe you are using inherits kernel-yocto, and that whatever recipe is using a defconfig isn't also putting the kernel-cache into the SRC_URI ? (or that kernel_features append wouldn't be an actual error). So we can run with that assumption. One option is to allow dangling kernel features, and you'll get a warning from a the missing feature (KERNEL_DANGLING_FEATURES_WARN_ONLY). But of course, you'll get a warning .. which may or may not be a bad thing :) Another is to make that append conditional based on something you can test. i.e. test for kernel-cache in the SRC_URI, and if present, do the append. Or you could test for the defconfig in the SRC_URI and don't do the append. There may be other options for this, but without all the details of the recipes, I can't say for sure. I have a few variations of that theme in meta-virtualization, since there's a broad range of kernel types supported (https://git.yoctoproject.org/meta-virtualization/tree/recipes-kernel/linux/linux-yocto_virtualization.inc). Cheers, Bruce > > > Many greetings, > > Matthias > > > > -- - 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 (#55933): https://lists.yoctoproject.org/g/yocto/message/55933 Mute This Topic: https://lists.yoctoproject.org/mt/88556517/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
