<?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>2256</bug_id>
          
          <creation_ts>2012-04-06 17:40:08 +0000</creation_ts>
          <short_desc>kernel menuconfig confusion with sstate</short_desc>
          <delta_ts>2015-03-26 12:36:43 +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>BitBake</product>
          <component>bitbake</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>(P1) (fixed) - 25 June 2012</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.3 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Richard Purdie">richard.purdie</reporter>
          <assigned_to name="Paul Eggleton">bluelightning</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>bruce.ashfield</cc>
    
    <cc>dvhart</cc>
    
    <cc>fransmeulenbroeks</cc>
    
    <cc>jason.wessel</cc>
    
    <cc>jessica.zhang</cc>
    
    <cc>laurentiu.serban</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>sgw</cc>
    
    <cc>song.liu</cc>
    
    <cc>srifenbark</cc>
    
    <cc>tom.zanussi</cc>
    
    <cc>ysoubeyrand</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>20016</commentid>
    <comment_count>0</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2012-04-06 17:40:08 +0000</bug_when>
    <thetext>In the following sequence:

bitbake virtual/kernel
bitbake virtual/kernel -c clean
bitbake virtual/kernel
bitbake virtual/kernel -c menuconfig
bitbake virtual/kernel

The user would expect their newly configured kernel to be built. In reality, the last step just installs from sstate and therefore does nothing with the new configuration.

Somehow, we need to prevent sstate from taking effect in the last step.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20020</commentid>
    <comment_count>1</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-04-06 18:40:57 +0000</bug_when>
    <thetext>So many other steps seem to invalidate the later steps so bitbake knows to rerun them. Is this just a matter of killing the stamp files for the do_compile during the do_menuconfig task?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20030</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2012-04-07 20:26:22 +0000</bug_when>
    <thetext>Sadly not. The issue is that bitbake has no knowledge that -c menuconfig invalidates the configuration. It sees the same sstate hash for populate_sysroot so &quot;accelerates&quot; the build.

I suspect we&apos;re going to have to set some kind of new &quot;no sstate&quot; flag against the recipe so it doesn&apos;t touch sstate even if the checksum would apparently match.

Of course the next issue is you could &quot;corrupt&quot; a sstate cache this way if generated sstate code was then shared.

I guess the above &quot;no sstate&quot; flag would need to disable sstate generation too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20071</commentid>
    <comment_count>3</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-04-09 16:20:19 +0000</bug_when>
    <thetext>RP, I&apos;m not sure I fully follow what you&apos;re suggesting. You aren&apos;t suggesting we disable all sstate usage by linux kernel recipes are you?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20148</commentid>
    <comment_count>4</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2012-04-10 19:59:45 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; RP, I&apos;m not sure I fully follow what you&apos;re suggesting. You aren&apos;t suggesting
&gt; we disable all sstate usage by linux kernel recipes are you?

Once menuconfig was used.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20743</commentid>
    <comment_count>5</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-04-19 23:23:49 +0000</bug_when>
    <thetext>Release Note:

If you change the config during a build, bitbake may not detect the change and will not rebuild the kernel. After changing the config, be sure to force a kernel recompile:

$ bitbake virtual/kernel -c menuconfig
$ bitbake virtual/kernel -c compile -f; bitbake virtual/kernel</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20801</commentid>
    <comment_count>6</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2012-04-22 14:36:01 +0000</bug_when>
    <thetext>*** Bug 2350 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21107</commentid>
    <comment_count>7</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2012-05-04 15:22:01 +0000</bug_when>
    <thetext>Note that the workaround in Comment 5 is insufficient and should read:

Due to an issue with sstate and the menuconfig task for recipes such as
Linux kernels and busybox, it is necessary to clean sstate prior to
re-configuring and rebuilding the recipe. For example:

$ bitbake virtual/kernel -c cleansstate
$ bitbake virtual/kernel -c menuconfig
$ bitbake virtual/kernel -c compile -f; bitbake virtual/kernel</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21310</commentid>
    <comment_count>8</comment_count>
    <who name="Frans Meulenbroeks">fransmeulenbroeks</who>
    <bug_when>2012-05-11 13:07:47 +0000</bug_when>
    <thetext>Unfortunately this does not only apply to menuconfig.

The following scenario also does not work
bitbake virtual/kernel
modify a kernel source file
bitbake -ccompile -f virtual/kernel
bitbake virtual/kernel
The latter does not run do_install

This is on ppc 

I tried the cleansstate solution, as suggested by Darren in comment 7 but unfortunately cleansstate implies clean so it removes the whole tree (including the modified file).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21311</commentid>
    <comment_count>9</comment_count>
    <who name="Frans Meulenbroeks">fransmeulenbroeks</who>
    <bug_when>2012-05-11 13:08:41 +0000</bug_when>
    <thetext>Unfortunately this does not only apply to menuconfig.

The following scenario also does not work
bitbake virtual/kernel
modify a kernel source file
bitbake -ccompile -f virtual/kernel
bitbake virtual/kernel
The latter does not run do_install

This is on ppc 

I tried the cleansstate solution, as suggested by Darren in comment 7 but unfortunately cleansstate implies clean so it removes the whole tree (including the modified file).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22288</commentid>
    <comment_count>10</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2012-06-18 16:34:09 +0000</bug_when>
    <thetext>I&apos;ve sent out some patches to fix this - one as part of a series to bitbake-devel and another to the oe-core list.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22428</commentid>
    <comment_count>11</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2012-06-20 16:07:37 +0000</bug_when>
    <thetext>While running the examples in the YP Development Manual I hit this bug against the YP 1.1.2 version.  This is surprising as it was not there for 1.1.1 and had originally surfaced during YP 1.2.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22544</commentid>
    <comment_count>12</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2012-06-25 16:29:40 +0000</bug_when>
    <thetext>Fix merged to master in revisions 5bd11a9bf329217f312076f347b045b5c09f19b2 and 66123b92557a7c1d63c29e90d9a8ba4ef146fc8a. Note that to work this does require that you use fully signature based stamps (i.e. BB_SIGNATURE_HANDLER = &quot;OEBasicHash&quot;), which is the default in poky.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>23663</commentid>
    <comment_count>13</comment_count>
    <who name="Laurentiu Serban">laurentiu.serban</who>
    <bug_when>2012-07-31 15:30:36 +0000</bug_when>
    <thetext>Verified that the sequence in the bug description is working as expected

Commit: 3309cf42d314f0a26079a11836c6b9b9bb5f253e</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>49802</commentid>
    <comment_count>14</comment_count>
    <who name="Yann Soubeyrand">ysoubeyrand</who>
    <bug_when>2015-03-26 12:36:43 +0000</bug_when>
    <thetext>Hi,

Unless I am doing something wrong, this bug is still present in Yocto 1.7. The described sequence in the bug report still produces a kernel with the old configuration and the workarround in comment 5 doesn&apos;t work. A workarround that seems to work is the following:

bitbake -c menuconfig linux-yocto
bitbake -C compile linux-yocto (notice the upper case C option)

Feel free to ask me if you need more informations.

Regards</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>