<?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>7646</bug_id>
          
          <creation_ts>2015-04-22 14:39:37 +0000</creation_ts>
          <short_desc>KBUILD_DEFCONFIG does not work if config file is created as a result of patch to be applied</short_desc>
          <delta_ts>2020-08-28 20:09:07 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>Kernel</product>
          <component>kernel-configuration</component>
          <version>1.8</version>
          <rep_platform>Galileo</rep_platform>
          <op_sys>x86</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>4.99</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Imran Zaman">imran.zaman</reporter>
          <assigned_to name="Bruce Ashfield">bruce.ashfield</assigned_to>
          <cc>randy.macleod</cc>
    
    <cc>sgw</cc>
    
    <cc>stephano</cc>
    
    <cc>yp.kernel.watcher</cc>
    
    <cc>yp.watcher</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>50474</commentid>
    <comment_count>0</comment_count>
    <who name="Imran Zaman">imran.zaman</who>
    <bug_when>2015-04-22 14:39:37 +0000</bug_when>
    <thetext>1- In kernel bbappend file, set
KBUILD_DEFCONFIG=&quot;${S}/arch/x86/configs/quark_defconfig&quot;

A patch creates quark_defconfig file..
2- SRC_URI += &quot;file://patch-config-which-creates-quark-defconfig&quot;


Since the kernel_metadata runs before kernel_patch, then it fails with following error..

Log data follows:
| DEBUG: Executing shell function do_kernel_metadata
| ERROR: A KBUILD_DECONFIG &apos;/tmp-glibc/work-shared/quark/kernel-source/arch/x86/configs/quark_defconfig&apos; was specified, but not present in the source tree
| WARNING: exit code 1 from a shell command.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50475</commentid>
    <comment_count>1</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2015-04-22 14:49:17 +0000</bug_when>
    <thetext>I didn&apos;t even really want to add KBUILD_DEFCONFIG in the first place, it
is for fully integrated defconfig and non-yocto style builds.

In this case, if you are modifying a base configuration like this, 
use fragments.

The meta data generation must run before patching, so there&apos;s no
way that you can have both supported. 

We can perhaps trap this at build time and report the issue, and get
it into the documentation. But this isn&apos;t something that really can
be supported .. we have to draw the line somewhere.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50476</commentid>
    <comment_count>2</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2015-04-22 14:53:09 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; I didn&apos;t even really want to add KBUILD_DEFCONFIG in the first place, it
&gt; is for fully integrated defconfig and non-yocto style builds.
&gt; 
&gt; In this case, if you are modifying a base configuration like this, 
&gt; use fragments.
&gt; 
&gt; The meta data generation must run before patching, so there&apos;s no
&gt; way that you can have both supported. 
&gt; 
&gt; We can perhaps trap this at build time and report the issue, and get
&gt; it into the documentation. But this isn&apos;t something that really can
&gt; be supported .. we have to draw the line somewhere.

I should say, that in this case, you can arrange for the defconfig
to be copied into WORKDIR and used, by adding your own tasks before
do_configure runs. Or simply carrying the defconfig as a complete
file and having the fetcher copy it, versus a patch into the kernel.

As long as it ends up called &apos;defconfig&apos; in WORKDIR, it will be 
mixed into the configuration process.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50751</commentid>
    <comment_count>3</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2015-05-04 15:13:48 +0000</bug_when>
    <thetext>FYI: This is something we can address with streamlined kernel
configuration tasks, which will be part of 1.9.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60243</commentid>
    <comment_count>4</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2016-03-21 23:25:54 +0000</bug_when>
    <thetext>Moving to 2.2. No one is asking about this explicitly, so I&apos;m de-cluttering M4 to work on critical issues. If there&apos;s a call for this, we can back port the change.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66504</commentid>
    <comment_count>5</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2016-09-22 16:13:09 +0000</bug_when>
    <thetext>I have this prototyped. I&apos;ll see if it can squeeze into m4. Otherwise, I&apos;ll bump it to the next release.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69676</commentid>
    <comment_count>6</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2017-01-10 20:38:47 +0000</bug_when>
    <thetext>Moving to M3.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86760</commentid>
    <comment_count>7</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2020-03-19 15:05:09 +0000</bug_when>
    <thetext>Bruce, Is this still needed?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88061</commentid>
    <comment_count>8</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2020-08-28 20:09:07 +0000</bug_when>
    <thetext>The meta-data phase has been split in two.

Configuration gathering runs after patching, so what this bug is looking for .. is now possible.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>