Bug 10946 - Document correct use of BSP directory in layer
Summary: Document correct use of BSP directory in layer
Status: RESOLVED FIXED
Alias: None
Product: BSP Guide
Classification: Documentation
Component: bsp-docs (show other bugs)
Version: 2.2.2
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.3 M4
Assignee: Scott Rifenbark
QA Contact:
URL:
Whiteboard: 27 Mar 2017: RESOLVED
Depends on:
Blocks:
 
Reported: 2017-01-20 18:05 UTC by George McCollister
Modified: 2017-03-27 20:09 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Done (doc changes complete)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description George McCollister 2017-01-20 18:05:57 UTC
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 = " \
        file://myplatform;type=kmeta;destsuffix=myplatform \
"

Including the BSP .scc file directly in SRC_URI doesn't work.
Comment 1 Scott Rifenbark 2017-01-23 22:47:49 UTC
Hi George, 

In the BSP manual in section "Linux Kernel Configuration" (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 += "file://network_configs.cfg"
                

   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 += "file://myconfig.cfg \
                 file://eth.cfg \
                 file://gfx.cfg"

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
Comment 2 George McCollister 2017-03-14 16:27:22 UTC
(In reply to comment #1)
> Hi George, 
> 
> In the BSP manual in section "Linux Kernel Configuration"
> (http://www.yoctoproject.org/docs/2.3/bsp-guide/bsp-guide.html#bsp-
> filelayout-kernel) I have the following couple of paragraphs and examples:
> 

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

>    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 += "file://network_configs.cfg"
>                 
> 
>    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 += "file://myconfig.cfg \
>                  file://eth.cfg \
>                  file://gfx.cfg"
> 
> 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.

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'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

> 
> Thanks,
> Scott
Comment 3 Scott Rifenbark 2017-03-14 17:27:34 UTC
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 "Kernel Metadata Location" (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 "Linux Kernel Configuration" (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'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
Comment 4 George McCollister 2017-03-14 19:15:40 UTC
(In reply to comment #3)
> 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 "Kernel Metadata Location"
> (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 "Linux Kernel
> Configuration"
> (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'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.

I don't notice anything out of date in this section.


> 
>  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?  

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

> 
> 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

Correct. It's somewhat redundant with information in the Kernel Development Manual.
 
> 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?

That might be a good idea. There is a lot of overlap between "1.2.9. Linux Kernel Configuration" 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.

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

Understood

> 
> Thanks,
> Scott
Comment 5 Stephen K Jolley 2017-03-17 17:24:57 UTC
Scott,  If this is still NEEDINFO, please restate the question, since the original question appears to have been answered.
Comment 6 Scott Rifenbark 2017-03-18 19:39:56 UTC
Changing to IN PROGRESS DESIGN.  I can proceed on this now with the information I have.

Scott
Comment 7 Scott Rifenbark 2017-03-27 16:21:18 UTC
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 "BSP Descriptions" (http://www.yoctoproject.org/docs/2.3/kernel-dev/kernel-dev.html#bsp-descriptions), which is part of "Kernel Metadata
   Syntax" from the previous bullet.  I did some terminology cleanup in 
   this section as well. 

 * Finally, see the "Recipe-Space Metadata" 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
Comment 8 Scott Rifenbark 2017-03-27 20:09:05 UTC
Chatted with George and the changes are good.  I am marking the bug RESOLVED and setting the doc flag to "Done."

Scott