<?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>5092</bug_id>
          
          <creation_ts>2013-08-31 16:15:55 +0000</creation_ts>
          <short_desc>non-standard hardware.cfg content is undocumented</short_desc>
          <delta_ts>2016-05-11 07:57:03 +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.5</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>04 April 2016: IN PROGRESS REVIEW (docs)</status_whiteboard>
          <keywords></keywords>
          <priority>Low</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Peter A. Bigot">pab</reporter>
          <assigned_to name="Bruce Ashfield">bruce.ashfield</assigned_to>
          <cc>bogdanx.a.voiculescu</cc>
    
    <cc>bruce.ashfield</cc>
    
    <cc>dvhart</cc>
    
    <cc>mhalstead</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>sgw</cc>
    
    <cc>srifenbark</cc>
    
    <cc>yp.kernel.watcher</cc>
    
    <cc>yp.watcher</cc>
          
          <qa_contact name="Bogdan Alexandru Voiculescu">bogdanx.a.voiculescu</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Done (doc changes complete)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>36127</commentid>
    <comment_count>0</comment_count>
    <who name="Peter A. Bigot">pab</who>
    <bug_when>2013-08-31 16:15:55 +0000</bug_when>
    <thetext>The YPLKDM specifies that .cfg files contain config file fragments, of the standard syntax:

CONFIG_SMP=y
# CONFIG_SMP is not set

(though I don&apos;t think it notes that the latter is a directive to disable the feature, while absence of any directive is a directive to accept the default.)

The meta directory contains BSP-specific files named hardware.cfg that are simply lists of kernel configuration variables exclusive of value.  It lacks documentation on why this file is different, what it&apos;s used for, and why a BSP should or should not provide it.

(If these files do what I think they do, it&apos;d be worth having a way to compose them; e.g. all systems based on OMAP2/3/4 processors could share a hardware-omap2.cfg file; at this time I don&apos;t think that&apos;s worth a separate ticket.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36129</commentid>
    <comment_count>1</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2013-09-01 05:27:51 +0000</bug_when>
    <thetext>This should be in the kernel architecture manual, I&apos;ll double check. If not, we&apos;ll get it into the main docs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36273</commentid>
    <comment_count>2</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2013-09-04 16:53:35 +0000</bug_when>
    <thetext>We need to cautious regarding what we put in the architecture manual. If the information is needed to make use of the linux-yocto tooling for BSPs or recipes, it belongs in the development manual. This particular bit strikes me as borderline. You can certainly make use of the tooling without knowing about this file. In regards to Peter&apos;s complaint, I think perhaps just renaming hardware.cfg that doesn&apos;t make it look like a config fragment would be a reasonable thing to do.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36275</commentid>
    <comment_count>3</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2013-09-04 17:00:49 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; We need to cautious regarding what we put in the architecture manual. If the
&gt; information is needed to make use of the linux-yocto tooling for BSPs or
&gt; recipes, it belongs in the development manual. This particular bit strikes
&gt; me as borderline. You can certainly make use of the tooling without knowing
&gt; about this file. In regards to Peter&apos;s complaint, I think perhaps just
&gt; renaming hardware.cfg that doesn&apos;t make it look like a config fragment would
&gt; be a reasonable thing to do.

Long term .. sure, but there are a lot of layers and directories with hardware.cfg files
around, so the tools will need to keep compatibility with the old name.

I&apos;ve considered renaming it in the past, and never got around to it before. 

Something to look into for 1.6 indeed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36277</commentid>
    <comment_count>4</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2013-09-04 17:03:31 +0000</bug_when>
    <thetext>For the manual updates on this, we can say:

hardware.cfg is a special file that contains kernel configuration audit information, 
that when found in the directory of a kernel feature description (.scc file) indicates
the kernel options listed in that file should be considered hardware. Hardware 
options are valid for BSPs, and hence, no warning will be issued if they are set.

They are an unordered, list of options without assigned values (CONFIG_FOO
versus CONFIG_FOO=y)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36281</commentid>
    <comment_count>5</comment_count>
    <who name="Peter A. Bigot">pab</who>
    <bug_when>2013-09-04 18:08:29 +0000</bug_when>
    <thetext>The suggested manual addition tells me what it is, but not how to use it.

I definitely think it needs to be in whatever manual you expect to be consulted by people who are developing a new BSP.  For example, my target is a gumstix OMAP DM3730 board much like but not the same as the beagleboard.  The beagleboard hardware.cfg I used as a model has stuff in it that&apos;s not right (e.g. wifi hardware that doesn&apos;t exist on the gumstix or even on a stock beagleboard AFAIK).

If the tooling is going to try to help me by validating my configuration, I need to feed it the right information so its information is useful.  Which means I need a correct hardware.cfg file, which means I need to know what goes into it, what doesn&apos;t, and why.  More, how the thing is found and processed should be documented, since it&apos;s not explicitly referenced in the root BSP scc file, and it&apos;s not at all clear that a recipe-space version can be provided, or that one can split it into different chunks (e.g. share a DM3730 hardware.cfg but augment it with hardware specific to a particular board).  Without that information, the distinction between hardware and non-hardware configuration items has no significance.

The file absolutely should have a different extension since .cfg is clearly documented to use a format this does not match.  It seems reasonable to do that early in 1.6.  Whether the tools will accept &quot;hardware.cfg&quot; instead of &quot;hardware.kvars&quot; or whatever is a design decision but any examples that are publicly found should be renamed, otherwise we carry brokenness and confusion with us forever.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36284</commentid>
    <comment_count>6</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2013-09-04 19:15:44 +0000</bug_when>
    <thetext>(In reply to comment #5)
&gt; The suggested manual addition tells me what it is, but not how to use it.
&gt; 
&gt; I definitely think it needs to be in whatever manual you expect to be
&gt; consulted by people who are developing a new BSP.  For example, my target is
&gt; a gumstix OMAP DM3730 board much like but not the same as the beagleboard. 
&gt; The beagleboard hardware.cfg I used as a model has stuff in it that&apos;s not
&gt; right (e.g. wifi hardware that doesn&apos;t exist on the gumstix or even on a
&gt; stock beagleboard AFAIK).
&gt; 
&gt; If the tooling is going to try to help me by validating my configuration, I
&gt; need to feed it the right information so its information is useful.  Which

To be honest, most users have indicated they aren&apos;t interested in the audit
output, so we are a small few that really care :)

But yes, I completely agree.

&gt; means I need a correct hardware.cfg file, which means I need to know what
&gt; goes into it, what doesn&apos;t, and why.  More, how the thing is found and
&gt; processed should be documented, since it&apos;s not explicitly referenced in the
&gt; root BSP scc file, and it&apos;s not at all clear that a recipe-space version can
&gt; be provided, or that one can split it into different chunks (e.g. share a
&gt; DM3730 hardware.cfg but augment it with hardware specific to a particular
&gt; board).  Without that information, the distinction between hardware and
&gt; non-hardware configuration items has no significance.

To be clear, this is an internal file for the most part, and it already has some
pending replacements that are in 1.6, see the &quot;required&quot; and &quot;optional&quot; keywords
that have been pre-positioned in the tools and will start replacing the hadware
and non-hardware designations in 16. At that time, the plan is to have a full
doc update, so as it stands, we want to keep hardware.cfg and non-hardware.cfg
under the covers as much as possible. No sense increasing migration pain right
before the change over.

We are talking about a much more in depth use case than 95% of the existing
users are interested in, and it can&apos;t be presented first in the manuals, since it
is exactly the barrier to entry that we&apos;ve been removing. 

This is what I hoped would happen, someone with a deeper use case would
ask, and we can generate the right updates as a result, and put it somewhere
that more can find.

So my suggestion is that this goes into an appendix/extra use case doc for 
1.5,and then migrated in 1.6.

I can provide the updates, but I don&apos;t want this overly visible for 1.5.

&gt; 
&gt; The file absolutely should have a different extension since .cfg is clearly
&gt; documented to use a format this does not match.  It seems reasonable to do
&gt; that early in 1.6.  Whether the tools will accept &quot;hardware.cfg&quot; instead of
&gt; &quot;hardware.kvars&quot; or whatever is a design decision but any examples that are
&gt; publicly found should be renamed, otherwise we carry brokenness and

For 1.5, no such renaming will happen, public of not. For 1.6, optional/required
will come into play and the move will happen then.

&gt; confusion with us forever.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>43450</commentid>
    <comment_count>7</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2014-05-21 14:58:14 +0000</bug_when>
    <thetext>Moving this to 1.7, since we&apos;ll be doing this as part of &quot;developer experience&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>49128</commentid>
    <comment_count>8</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2015-02-27 14:49:53 +0000</bug_when>
    <thetext>I spoke with Bruce yesterday about this bug.
It might still get addressed for 1.8-M4 but it&apos;s a low priority so 1.9, which is what Saul set this to yesterday is fine.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56634</commentid>
    <comment_count>9</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2015-11-19 15:46:45 +0000</bug_when>
    <thetext>I&apos;ll keep this. no need to re-assign it. There are some larger meta data changes in 2.1, so I&apos;ll take care of all the doc updates then.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60368</commentid>
    <comment_count>10</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2016-03-23 21:35:09 +0000</bug_when>
    <thetext>Doc update send to ScottR</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60637</commentid>
    <comment_count>11</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-03-31 23:13:41 +0000</bug_when>
    <thetext>I looked at the stuff Bruce gave me in an email for this bug.  It basically describes part of the kernel configuration audit phase.  Bruce describes how hardware and non-hardware features are figured out and the use of .cfg and .kcf files are used.

I am not sure where to provide this low-level conceptual information.  There is a section in the dev-manual (http://www.yoctoproject.org/docs/2.1/dev-manual/dev-manual.html#configuring-the-kernel) where we could create a new subsection to describe this audit stuff.  There is also this section in the kernel-dev manual (http://www.yoctoproject.org/docs/2.1/kernel-dev/kernel-dev.html#configuration) where configuration is described a bit and mentions the audit part near the end.  

I need some help on where we want to put this information.

Thanks, 
Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60708</commentid>
    <comment_count>12</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2016-04-01 20:32:02 +0000</bug_when>
    <thetext>(In reply to comment #11)
&gt; I looked at the stuff Bruce gave me in an email for this bug.  It basically
&gt; describes part of the kernel configuration audit phase.  Bruce describes how
&gt; hardware and non-hardware features are figured out and the use of .cfg and
&gt; .kcf files are used.
&gt; 
&gt; I am not sure where to provide this low-level conceptual information.  There
&gt; is a section in the dev-manual
&gt; (http://www.yoctoproject.org/docs/2.1/dev-manual/dev-manual.html#configuring-
&gt; the-kernel) where we could create a new subsection to describe this audit
&gt; stuff.  There is also this section in the kernel-dev manual
&gt; (http://www.yoctoproject.org/docs/2.1/kernel-dev/kernel-dev.
&gt; html#configuration) where configuration is described a bit and mentions the
&gt; audit part near the end.  
&gt; 
&gt; I need some help on where we want to put this information.
&gt; 
&gt; Thanks, 
&gt; Scott

A new subsection in: http://www.yoctoproject.org/docs/2.1/dev-manual/dev-manual.html#configuring-the-kernel, seems like the best place .. not perfect, but best.

This is fairly low level info, and isn&apos;t normally something to worry about, so we should put a disclaimer to that effect in the section.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60752</commentid>
    <comment_count>13</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-04-04 20:10:14 +0000</bug_when>
    <thetext>Hi, 

Here is the new subsection in the dev-manual - http://www.yoctoproject.org/docs/2.1/dev-manual/dev-manual.html#determining-hardware-and-non-hardware-features-for-the-kernel-configuration-audit-phase.  I am not happy with the title as it seems very long.  However, I did not really know what to put there as a title.  To me, this is what the section is about.  If anyone can better describe what we are really talking about it would be better.

Please look the text over as I adapted it from what Bruce sent me.  There might be issues with it that need correction.  Sometimes rewriting stuff changes the meaning unintentionally.  

Note that I am not messing with the status of this bug (IN PROGRESS DESIGN) since I am not the owner of the bug at the moment.

Thanks, 
Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61016</commentid>
    <comment_count>14</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2016-04-11 15:38:26 +0000</bug_when>
    <thetext>(In reply to comment #13)
&gt; Hi, 
&gt; 
&gt; Here is the new subsection in the dev-manual -
&gt; http://www.yoctoproject.org/docs/2.1/dev-manual/dev-manual.html#determining-
&gt; hardware-and-non-hardware-features-for-the-kernel-configuration-audit-phase.
&gt; I am not happy with the title as it seems very long.  However, I did not
&gt; really know what to put there as a title.  To me, this is what the section
&gt; is about.  If anyone can better describe what we are really talking about it
&gt; would be better.
&gt; 
&gt; Please look the text over as I adapted it from what Bruce sent me.  There
&gt; might be issues with it that need correction.  Sometimes rewriting stuff
&gt; changes the meaning unintentionally.  
&gt; 
&gt; Note that I am not messing with the status of this bug (IN PROGRESS DESIGN)
&gt; since I am not the owner of the bug at the moment.
&gt; 
&gt; Thanks, 
&gt; Scott

I read the section, and this captures it quite well. Actually, I have no suggestions for changes :)

I&apos;m marking this as &apos;resolved&apos;, since I assume that after this review the doc change will make it into public versions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61108</commentid>
    <comment_count>15</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-04-12 18:21:52 +0000</bug_when>
    <thetext>Thanks... setting the doc flag to &quot;done.&quot;

Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62085</commentid>
    <comment_count>16</comment_count>
    <who name="Bogdan Alexandru Voiculescu">bogdanx.a.voiculescu</who>
    <bug_when>2016-05-11 07:57:03 +0000</bug_when>
    <thetext>Documentation is done.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>