<?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>8179</bug_id>
          
          <creation_ts>2015-08-18 08:18:02 +0000</creation_ts>
          <short_desc>It should be possible to disable kernel features using config fragments</short_desc>
          <delta_ts>2016-09-16 19:51:55 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>9</classification_id>
          <classification>Documentation</classification>
          <product>Kernel Development</product>
          <component>kernel-development</component>
          <version>1.9</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</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>2.2 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jussi Laako">jussi.laako</reporter>
          <assigned_to name="Bruce Ashfield">bruce.ashfield</assigned_to>
          <cc>alexandru.c.georgescu</cc>
    
    <cc>bruce.ashfield</cc>
    
    <cc>dvhart</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>sgw</cc>
          
          <qa_contact name="Costin">costin.c.constantin</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Yes (doc changes required)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>53177</commentid>
    <comment_count>0</comment_count>
    <who name="Jussi Laako">jussi.laako</who>
    <bug_when>2015-08-18 08:18:02 +0000</bug_when>
    <thetext>It should be possible to disable kernel features originating for example from the default BSP config using config fragments. Also when asking to disable for example CONFIG_DEBUG_KERNEL the build system should traverse config option dependency tree and disable also all options that depend on the specified config option. Otherwise it becomes a daunting task to hunt down and maintain also disabling of all the options unrelated to the original goal but which happen to depend on the given option for some reason.

Same dependency traversal should also work when asking for some option to be enabled. Now it doesn&apos;t always work. For example asking to enable a certain USB serial driver in a config fragment doesn&apos;t work if the BSP doesn&apos;t happen to have generic CONFIG_USB_SERIAL option enabled. Some BSPs do have it, some don&apos;t.

There is a library available for dealing with Kconfig options which can be used to implement this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>53190</commentid>
    <comment_count>1</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2015-08-18 14:43:21 +0000</bug_when>
    <thetext>I have some old designs (and code for this already) .. it is not 
a trivial feature to implement.

The first pass is really to simply indicate not only that an option
didn&apos;t make it into the final .config (which we currently do), but
to indicate why it didn&apos;t make it into the config (i.e. something
else selected it).

Having the build system do too much and disabling more than it has
been explicitly asked to do .. puts too much faith in the system
to work. Having complete fragments is still the best approach, 
since that is what you have to do when disabling things in a 
hand edited .config.

That same logic to detect why an option didn&apos;t make it into the 
final .config can then be extended to optionally do the automatic
disabling.

Saul: I don&apos;t see how this blocks 8177. For now you can just maintain
fragments that have all the required options disabled (those that 
select the one you want off). 

This is a stretch to get into the fall release (the automatic disabling
of dependent options), so I wouldn&apos;t count on it being done to free
up blockers.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>53206</commentid>
    <comment_count>2</comment_count>
    <who name="Jussi Laako">jussi.laako</who>
    <bug_when>2015-08-19 08:00:44 +0000</bug_when>
    <thetext>At minimum it would be nice to have a build failure if config fragment doesn&apos;t have effect on the final configuration.

Now if I set CONFIG_SOMETHING=n in config fragment it goes silently through but doesn&apos;t have effect. If dependencies are not automatically turned off, it would be nice to get list of options that force the option to be enabled. This is one of the things very cumbersome to go through manually due to dependency trees.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60244</commentid>
    <comment_count>3</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2016-03-21 23:27:52 +0000</bug_when>
    <thetext>Moving this to 2.2, so it can be fully addressed with the kernel symbol / debug enhancements that will happen there. Reducing the time to 10 days as well, since this is partially done and some work is done in other bugs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66267</commentid>
    <comment_count>4</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2016-09-16 19:51:55 +0000</bug_when>
    <thetext>The current solution for this, is that if a symbol doesn&apos;t appear in the final .config, the constraints on the variable are output.

i.e. if something selects and option in its Kconfig, you cannot turn it off in the fragment, unless you also disable the option that selected it.

We output that information to allow the user to make their own decision on what additional options to disable (or enable). Automatically chasing the dependency tree and changing options that haven&apos;t been explicitly set would cause more issues than it solved (i.e. unbootable boards).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>