When building a kernel image (the first time), I ran into weird warnings regarding kernel configuration items that are completely unrelated. Steps to reproduce: $ mkdir mystuff $ cd mystuff $ git clone https://git.yoctoproject.org/git/poky-contrib $ cd poky-contrib $ git checkout jurob/qemunios2 $ source oe-init-build-env $ MACHINE=qemunios2 bitbake core-image-minimal --> Observe the warnings. A lot of them. Some are explicitly ARM specific, although the kernel is being built for Nios2 CPU. The warnings are benign, as everything builds OK. Also, I believe the warnings are only present in the very first "clean" build.
This is a good one! The issue appears because we are using the kernel-yocto.bbclass and the associated kern tools. Nios2 is using a defconfig and does not want or need the yocto kernel cache. The linux-yocto setup still uses the kern tools, specifically the "spp" command, which searches for a suitable BSP starting point. It's only matching KTYPE of standard and finding the first arm-versatile as a match. This should really fail to find any appropriate BSP, that might have other bad side-effects. One possible fix is to provide that defconfig as part of the yocto-kernel-cache. Not sure if there is a way to disable the kernel metadata (cache) if there is a single defconfig.
This is an old behviour that previously had an override and warning. If the MACHINE doesn't match, it should warn/not proceed. I'm on vacation, but can take care of this when I return if you want to assign the bug to me.
Confirmed that with my fix for 11878, we get the right error: ERROR: linux-yocto-4.9.9+gitAUTOINC+7e8ec462b6_d0c402280c-r0 do_kernel_metadata: Could not locate BSP definiton for qemunios2/standard. ERROR: linux-yocto-4.9.9+gitAUTOINC+7e8ec462b6_d0c402280c-r0 do_kernel_metadata: Function failed: do_kernel_metadata (log file is located at /home/bruce/poky-contrib/build/tmp/work/qemunios2-poky-linux/linux-yocto/4.9.9+gitAUTOINC+7e8ec462b6_d0c402280c-r0/temp/log.do_kernel_metadata.16596) ERROR: Logfile of failure stored in: /home/bruce/poky-contrib/build/tmp/work/qemunios2-poky-linux/linux-yocto/4.9.9+gitAUTOINC+7e8ec462b6_d0c402280c-r0/temp/log.do_kernel_metadata.16596
I'll post how to quickly define a recipe-space BSP here as well, to avoid that error.
I can confirm that with this change, when I build there no longer configuration warnings to the screen. I'm going to mark this as fixed, since the actual code is in 11878 to fix the issue. commit 3ec33f49064fd15c07b744d2296be0fac3f67851 Author: Bruce Ashfield <bruce.ashfield@windriver.com> Date: Tue Aug 15 20:49:19 2017 -0400 nios2: bsp definition Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> diff --git a/meta-yocto-bsp/recipes-kernel/linux/files/qemunios2-standard.scc b/meta-yocto-bsp/recipes-kernel/linux/files/qemunios2-standard.scc new file mode 100644 index 000000000000..4103d4c7e9a7 --- /dev/null +++ b/meta-yocto-bsp/recipes-kernel/linux/files/qemunios2-standard.scc @@ -0,0 +1,3 @@ +define KTYPE standard +define KMACHINE qemunios2 + diff --git a/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.9.bbappend b/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.9.bbappend index 973c0407a841..a162b7a86c86 100644 --- a/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.9.bbappend +++ b/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.9.bbappend @@ -32,5 +32,6 @@ COMPATIBLE_MACHINE_qemunios2 = "qemunios2" # __mulsi3, __lshrdi3, ... # So we exclude these modules via using a modified defconfig. +SRC_URI_append_qemunios2 = " file://qemunios2-standard.scc" SRC_URI_append_qemunios2 = " file://defconfig" #KBUILD_DEFCONFIG_qemunios2 = "10m50_defconfig" *** This bug has been marked as a duplicate of bug 11878 ***