<?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>10946</bug_id>
          
          <creation_ts>2017-01-20 18:05:57 +0000</creation_ts>
          <short_desc>Document correct use of BSP directory in layer</short_desc>
          <delta_ts>2017-03-27 20:09:05 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>9</classification_id>
          <classification>Documentation</classification>
          <product>BSP Guide</product>
          <component>bsp-docs</component>
          <version>2.2.2</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>27 Mar 2017: RESOLVED</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.3 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="George McCollister">george.mccollister</reporter>
          <assigned_to name="Scott Rifenbark">srifenbark</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>bruce.ashfield</cc>
    
    <cc>srifenbark</cc>
          
          
          <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>69971</commentid>
    <comment_count>0</comment_count>
    <who name="George McCollister">george.mccollister</who>
    <bug_when>2017-01-20 18:05:57 +0000</bug_when>
    <thetext>Documentation should be changed to show the correct way to use a BSP directory located within a layer.

From a linux-yocto* bbappend you should do something like this:

SRC_URI_append_myplatform = &quot; \
        file://myplatform;type=kmeta;destsuffix=myplatform \
&quot;

Including the BSP .scc file directly in SRC_URI doesn&apos;t work.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70061</commentid>
    <comment_count>1</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2017-01-23 22:47:49 +0000</bug_when>
    <thetext>Hi George, 

In the BSP manual in section &quot;Linux Kernel Configuration&quot; (http://www.yoctoproject.org/docs/2.3/bsp-guide/bsp-guide.html#bsp-filelayout-kernel) I have the following couple of paragraphs and examples:

   For example, suppose you had some configuration options in a 
   file called network_configs.cfg. You can place that file inside a 
   directory named linux-yocto and then add a SRC_URI statement such as 
   the following to the append file. When the OpenEmbedded build system 
   builds the kernel, the configuration options are picked up and applied.

     SRC_URI += &quot;file://network_configs.cfg&quot;
                

   To group related configurations into multiple files, you perform a 
   similar procedure. Here is an example that groups separate configurations 
   specifically for Ethernet and graphics into their own files and adds the 
   configurations by using a SRC_URI statement like the following in your 
   append file:

     SRC_URI += &quot;file://myconfig.cfg \
                 file://eth.cfg \
                 file://gfx.cfg&quot;

Is this the area in question in the manual?  The bug is filed against the BSP Guide and this is the only area that looks relevant.  I am not an expert on this stuff but the first example above adds a .cfg file directly and not a .scc file as you noted in the comment.  Are the code snippets I currently have in the manual here totally wrong?  I need some help with this.

Thanks,
Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71258</commentid>
    <comment_count>2</comment_count>
    <who name="George McCollister">george.mccollister</who>
    <bug_when>2017-03-14 16:27:22 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; Hi George, 
&gt; 
&gt; In the BSP manual in section &quot;Linux Kernel Configuration&quot;
&gt; (http://www.yoctoproject.org/docs/2.3/bsp-guide/bsp-guide.html#bsp-
&gt; filelayout-kernel) I have the following couple of paragraphs and examples:
&gt; 

The BSP guide seems to completely skip over the topic of kernel meta data (which seems wrong)

&gt;    For example, suppose you had some configuration options in a 
&gt;    file called network_configs.cfg. You can place that file inside a 
&gt;    directory named linux-yocto and then add a SRC_URI statement such as 
&gt;    the following to the append file. When the OpenEmbedded build system 
&gt;    builds the kernel, the configuration options are picked up and applied.
&gt; 
&gt;      SRC_URI += &quot;file://network_configs.cfg&quot;
&gt;                 
&gt; 
&gt;    To group related configurations into multiple files, you perform a 
&gt;    similar procedure. Here is an example that groups separate configurations 
&gt;    specifically for Ethernet and graphics into their own files and adds the 
&gt;    configurations by using a SRC_URI statement like the following in your 
&gt;    append file:
&gt; 
&gt;      SRC_URI += &quot;file://myconfig.cfg \
&gt;                  file://eth.cfg \
&gt;                  file://gfx.cfg&quot;
&gt; 
&gt; Is this the area in question in the manual?  The bug is filed against the
&gt; BSP Guide and this is the only area that looks relevant.  I am not an expert
&gt; on this stuff but the first example above adds a .cfg file directly and not
&gt; a .scc file as you noted in the comment.  Are the code snippets I currently
&gt; have in the manual here totally wrong?  I need some help with this.

Looks like this section is what you want:
http://www.yoctoproject.org/docs/2.2.1/mega-manual/mega-manual.html#recipe-space-metadata

It describes how to add fragments but if you want to add an entire directory you need to do it differently.

I&apos;m not really sure how all of this is supposed to be organized but seems like this chapter should be in the BSP guide.

For more information read this:
https://lists.yoctoproject.org/pipermail/yocto/2017-January/034091.html

&gt; 
&gt; Thanks,
&gt; Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71262</commentid>
    <comment_count>3</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2017-03-14 17:27:34 +0000</bug_when>
    <thetext>George (and others that know about this stuff - particularly Bruce Ashfield), 

Thanks for the additional pointers.  I think you are right about the section called &quot;Kernel Metadata Location&quot; (http://www.yoctoproject.org/docs/2.3/kernel-dev/kernel-dev.html#kernel-metadata-location), which happens to be in the Linux Kernel Development Manual.  That would be where we want to actually describe how you discovered what you need to do for using a BSP directory located within the layer.  This section currently talks about in-recipe and out-of-recipe metadata for a kernel.  So I think that is the ultimate area to document this.  

Now there are related areas that need to point into this new description that I will create with your help :)  Regarding the BSP Guide... that section I pointed out does indeed try to address &quot;Linux Kernel Configuration&quot; (http://www.yoctoproject.org/docs/2.3/bsp-guide/bsp-guide.html#bsp-filelayout-kernel).  I am wondering a couple things about that particular section:

 1. Is the information still true and up-to-date in this section?  Historically
    not much has been done to the BSP Guide as YP releases have been cranked
    out. The guide is pretty much supposed to be stand-alone item for 
    structuring BSPs.  Hence, the detail on the directory structures and all 
    that stuff.  If the information in this section is not up-to-date, I would
    like to get it there.  I don&apos;t know if it is.  If you can tell or know, 
    please let me know.  If not, I will try to dig that up elsewhere.

 2. The other thing I am wondering about that section is if it would be a good
    place to make a reference into the section of the kernel dev manual that 
    we would use to describe inclusion of a BSP directory located within the 
    layer.  In other words, is the content related enough to point to the 
    reader off to where the new documentation will be?  

It seems that the section I am talking about in the BSP manual is just concerned with kernel configuration and not an entire layer.  I am not an expert but is that right?  Could we add references that lead the reader to more than just the addition of the .cfg files for the kernel?

This is a complicated bug for me and I appreciate your help.

Thanks,
Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71281</commentid>
    <comment_count>4</comment_count>
    <who name="George McCollister">george.mccollister</who>
    <bug_when>2017-03-14 19:15:40 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; George (and others that know about this stuff - particularly Bruce
&gt; Ashfield), 
&gt; 
&gt; Thanks for the additional pointers.  I think you are right about the section
&gt; called &quot;Kernel Metadata Location&quot;
&gt; (http://www.yoctoproject.org/docs/2.3/kernel-dev/kernel-dev.html#kernel-
&gt; metadata-location), which happens to be in the Linux Kernel Development
&gt; Manual.  That would be where we want to actually describe how you discovered
&gt; what you need to do for using a BSP directory located within the layer. 
&gt; This section currently talks about in-recipe and out-of-recipe metadata for
&gt; a kernel.  So I think that is the ultimate area to document this.  
&gt; 
&gt; Now there are related areas that need to point into this new description
&gt; that I will create with your help :)  Regarding the BSP Guide... that
&gt; section I pointed out does indeed try to address &quot;Linux Kernel
&gt; Configuration&quot;
&gt; (http://www.yoctoproject.org/docs/2.3/bsp-guide/bsp-guide.html#bsp-
&gt; filelayout-kernel).  I am wondering a couple things about that particular
&gt; section:
&gt; 
&gt;  1. Is the information still true and up-to-date in this section? 
&gt; Historically
&gt;     not much has been done to the BSP Guide as YP releases have been cranked
&gt;     out. The guide is pretty much supposed to be stand-alone item for 
&gt;     structuring BSPs.  Hence, the detail on the directory structures and all 
&gt;     that stuff.  If the information in this section is not up-to-date, I
&gt; would
&gt;     like to get it there.  I don&apos;t know if it is.  If you can tell or know, 
&gt;     please let me know.  If not, I will try to dig that up elsewhere.

I don&apos;t notice anything out of date in this section.


&gt; 
&gt;  2. The other thing I am wondering about that section is if it would be a
&gt; good
&gt;     place to make a reference into the section of the kernel dev manual that 
&gt;     we would use to describe inclusion of a BSP directory located within the 
&gt;     layer.  In other words, is the content related enough to point to the 
&gt;     reader off to where the new documentation will be?  

Yes it would probably be a good place to make a reference.

&gt; 
&gt; It seems that the section I am talking about in the BSP manual is just
&gt; concerned with kernel configuration and not an entire layer.  I am not an

Correct. It&apos;s somewhat redundant with information in the Kernel Development Manual.
 
&gt; expert but is that right?  Could we add references that lead the reader to
&gt; more than just the addition of the .cfg files for the kernel?

That might be a good idea. There is a lot of overlap between &quot;1.2.9. Linux Kernel Configuration&quot; in the BSP manual and topics covered in the kernel manual. At some point you may just need to go through both closely, taking notes on which information is redundant.

&gt; 
&gt; This is a complicated bug for me and I appreciate your help.

Understood

&gt; 
&gt; Thanks,
&gt; Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71401</commentid>
    <comment_count>5</comment_count>
    <who name="Stephen K Jolley">sjolley.yp.pm</who>
    <bug_when>2017-03-17 17:24:57 +0000</bug_when>
    <thetext>Scott,  If this is still NEEDINFO, please restate the question, since the original question appears to have been answered.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71429</commentid>
    <comment_count>6</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2017-03-18 19:39:56 +0000</bug_when>
    <thetext>Changing to IN PROGRESS DESIGN.  I can proceed on this now with the information I have.

Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71748</commentid>
    <comment_count>7</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2017-03-27 16:21:18 +0000</bug_when>
    <thetext>Hi George, 

I have a new draft of several sections that you can review and comment on.  See the following:

 * In the BSP Guide, I removed what I thought to be some kernel-specific 
   append file information and moved it to the kernel manual.  See http://www.yoctoproject.org/docs/2.3/bsp-guide/bsp-guide.html#bsp-filelayout-kernel.  You will notice that at the bottom of the section, I now just
   link to the section in the kernel manual rather than have a long-winded
   example here in the BSP guide.  This should be better. 

 * See the http://www.yoctoproject.org/docs/2.3/kernel-dev/kernel-dev.html#creating-the-append-file section in the kernel-dev manual.  This is
   the section that I reference to from the BSP manual.  It provides that 
   example that was in the BSP manual.

 * See http://www.yoctoproject.org/docs/2.3/kernel-dev/kernel-dev.html#kernel-metadata-syntax.  In this section I did a bit of rewriting to clear up 
   terminology.  

 * See &quot;BSP Descriptions&quot; (http://www.yoctoproject.org/docs/2.3/kernel-dev/kernel-dev.html#bsp-descriptions), which is part of &quot;Kernel Metadata
   Syntax&quot; from the previous bullet.  I did some terminology cleanup in 
   this section as well. 

 * Finally, see the &quot;Recipe-Space Metadata&quot; section (http://www.yoctoproject.org/docs/2.3/kernel-dev/kernel-dev.html#recipe-space-metadata).  This is where I
   added the nugget of information that is the root of your bug.

I have made quite a few changes for this bug.  If you could read all the related stuff and let me know if it is technically correct, makes sense, and has better organization I would appreciate it.

Thanks, 
Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71774</commentid>
    <comment_count>8</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2017-03-27 20:09:05 +0000</bug_when>
    <thetext>Chatted with George and the changes are good.  I am marking the bug RESOLVED and setting the doc flag to &quot;Done.&quot;

Scott</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>