<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>11333</bug_id>
          
          <creation_ts>2017-04-11 17:03:17 +0000</creation_ts>
          <short_desc>kernel config checks even with defconfig</short_desc>
          <delta_ts>2017-08-16 00:51:04 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>kernel</component>
          <version>2.3</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>11878</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.4 M4</target_milestone>
          <dependson>11878</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Juro Bystricky">juro.bystricky</reporter>
          <assigned_to name="Bruce Ashfield">bruce.ashfield</assigned_to>
          <cc>bruce.ashfield</cc>
    
    <cc>tom.zanussi</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>72308</commentid>
    <comment_count>0</comment_count>
    <who name="Juro Bystricky">juro.bystricky</who>
    <bug_when>2017-04-11 17:03:17 +0000</bug_when>
    <thetext>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

--&gt; 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 &quot;clean&quot; build.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75512</commentid>
    <comment_count>1</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2017-07-31 21:48:54 +0000</bug_when>
    <thetext>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 &quot;spp&quot; command, which searches for a suitable BSP starting point.  It&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75530</commentid>
    <comment_count>2</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2017-08-01 02:09:43 +0000</bug_when>
    <thetext>This is an old behviour that previously had an override and warning. If the MACHINE doesn&apos;t match, it should warn/not proceed.

I&apos;m on vacation, but can take care of this when I return if you want to assign the bug to me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75872</commentid>
    <comment_count>3</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2017-08-16 00:26:02 +0000</bug_when>
    <thetext>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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75873</commentid>
    <comment_count>4</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2017-08-16 00:26:32 +0000</bug_when>
    <thetext>I&apos;ll post how to quickly define a recipe-space BSP here as well, to avoid that error.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75874</commentid>
    <comment_count>5</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2017-08-16 00:51:04 +0000</bug_when>
    <thetext>I can confirm that with this change, when I build there no longer configuration warnings to the screen.

I&apos;m going to mark this as fixed, since the actual code is in 11878 to fix the issue.

commit 3ec33f49064fd15c07b744d2296be0fac3f67851
Author: Bruce Ashfield &lt;bruce.ashfield@windriver.com&gt;
Date:   Tue Aug 15 20:49:19 2017 -0400

    nios2: bsp definition
    
    Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@windriver.com&gt;

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 = &quot;qemunios2&quot;
 # __mulsi3, __lshrdi3, ...
 # So we exclude these modules via using a modified defconfig.
 
+SRC_URI_append_qemunios2 = &quot; file://qemunios2-standard.scc&quot;
 SRC_URI_append_qemunios2 = &quot; file://defconfig&quot;
 #KBUILD_DEFCONFIG_qemunios2 = &quot;10m50_defconfig&quot;

*** This bug has been marked as a duplicate of bug 11878 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>