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
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?
Looks OK to me.
Great, assigning to Scott to integrate the changes. Scott, can you accept this bug and pull in the changes from comment 1.
Darren, I will implement this fix. Scott
It would be nice to have a net-tools_*bbappend example which shows static configuring a network interface.
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
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
(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
This sounds like a plan Matt... thanks. Scott
Verify manual section added
I changed the whiteboard comment to reflect the bug as verified/fixed.