Bug 1962

Summary: Ensure BSP developer guide recommends appropriate techniques to ensure MACHINE specific changes are packages thus
Product: [Documentation] Quick Start Reporter: Joshua Lock - Disabled <josh>
Component: quick-startAssignee: Scott Rifenbark <srifenbark>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: jessica.zhang, msm-oss, poky.doc.watcher, poky.watcher, tom.zanussi
Version: unspecified   
Target Milestone: 1.2   
Hardware: x86   
OS: Multiple   
URL: http://git.yoctoproject.org/cgit.cgi/yocto-docs/commit/?id=f5e51d60312d9335a790023f193cae1ba76277ae
Whiteboard: 17-april-2012: verified/fixed
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Joshua Lock - Disabled 2012-02-06 11:59:03 UTC
Whilst reviewing a recent BSP submission I noticed that the netbase customisation was making a MACHINE specific change but wasn't marked as thus.

Therefore, should a user have the layer enabled but build for a different BSP of the same architecture they could still end up with the netbase changes.

The base.bbclass includes a mechanism to try and ensure that MACHINE specific changes generate MACHINE specific packages.

If a file is fetched from a directory named for the MACHINE[1] i.e.:
meta-mymachine/recipes-core/netbase/files/mymachine/interfaces

See [2] for a real world example.

We need to ensure that these subtleties are documented in the BSP manual, and also be aware of them when reviewing BSP's for inclusion.

1. http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/classes/base.bbclass#n459
2. http://git.angstrom-distribution.org/cgi-bin/cgit.cgi/meta-texasinstruments/tree/recipes-core/netbase/netbase-4.47/beagleboard
Comment 1 Darren Hart 2012-04-03 17:38:56 UTC
Do, the BSP developer guide should have a blurb as follows:

When customizing a recipe for a particular BSP, such as adding a BSP specific configuration file, a bbappend for the recipe should be included in the BSP layer and the BSP specific file should be placed in a directory of the same name as the MACHINE defined by the BSP layer. For example, to change the interfaces file for the netbase recipe for machine "xyz" the new interfaces file should be placed as follows:

  meta-xyz/recipes-core/netbase/files/xyz/interfaces

  And the bbappend should contain:

  $ cat meta-xyz/recipes-core/netbase/netbase_4.47.bbappend 
  FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
  PRINC := "${@int(PRINC) + 2}"


Correct Joshua?
Comment 2 Joshua Lock - Disabled 2012-04-04 17:48:51 UTC
Looks OK to me.
Comment 3 Darren Hart 2012-04-04 17:53:11 UTC
Great, assigning to Scott to integrate the changes.

Scott, can you accept this bug and pull in the changes from comment 1.
Comment 4 Scott Rifenbark 2012-04-04 18:55:22 UTC
Darren, 

I will implement this fix.

Scott
Comment 5 Matthew McClintock 2012-04-04 19:08:09 UTC
It would be nice to have a net-tools_*bbappend example which shows static configuring a network interface.
Comment 6 Scott Rifenbark 2012-04-04 21:04:02 UTC
New section added called "Customizing a Recipe for a BSP".  The section is based on Darren's Comment #1.  

Can be seen at http://www.yoctoproject.org/docs/latest/bsp-guide/bsp-guide.html#customizing-a-recipe-for-a-bsp
Comment 7 Scott Rifenbark 2012-04-04 21:07:11 UTC
If we want something on net-tools_*bbappend example which shows static
configuring a network interface, then I will need more information.  Also, would this fit just as a second example in the new section I created?  I marked this bug resolved.  If we do want to add another example based on Matthew's suggestion the bug can be re-opened.

Scott
Comment 8 Matthew McClintock 2012-04-04 21:27:44 UTC
(In reply to comment #7)
> If we want something on net-tools_*bbappend example which shows static
> configuring a network interface, then I will need more information.  Also,
> would this fit just as a second example in the new section I created?  I marked
> this bug resolved.  If we do want to add another example based on Matthew's
> suggestion the bug can be re-opened.
> 
> Scott

I'll look at writing a patch to add a net-tools example at some point.

-M
Comment 9 Scott Rifenbark 2012-04-04 21:29:36 UTC
This sounds like a plan Matt... thanks.

Scott
Comment 10 Joshua Lock - Disabled 2012-04-18 00:43:16 UTC
Verify manual section added
Comment 11 Scott Rifenbark 2012-04-18 12:07:28 UTC
I changed the whiteboard comment to reflect the bug as verified/fixed.