Bug 3731

Summary: yocto-bsp creates kernel bbappend files that override settings even when other machines are active
Product: [Build System, Metadata & Runtime] Meta-yocto Reporter: Blloyd <blloyd>
Component: meta-yoctoAssignee: Tom Zanussi <tom.zanussi>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: jessica.zhang, poky.bs.watcher, poky.watcher
Version: unspecified   
Target Milestone: 1.4 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---
Attachments:
Description Flags
Patch implementing suggested separation. none

Description Blloyd 2013-01-16 22:12:50 UTC
Created attachment 1013 [details]
Patch implementing suggested separation.

The bblayer abstraction makes it where multiple layers can be configured and used at the same time.  Some layers make changes to support a specific machine, and should not have any affect when other machines are in use.

For linux-yocto, all bsps are created with a user-config.cfg and user-config.cfg and user-patches.scc.  This means that those files will be pulled from the first location found, which might correspond to files customized for a different machine.

Instead of using the names user-config.cfg and user-patches.scc, I propose a machine specific name be used such as {{=machine}}user-patches.scc and {{=machine}}user-config.cfg.  This would necessitate that all references changed to these new names, which would affect the yocto-bsp and yocto-kernel scripts.

With this change, it would be possible to have multiple machine BSPs searched at the same time and to select which to build against by using a command like
MACHINE=qmeux86 bitbake core-image-sato
to override the default.

Note many of the standard BSPs do not seem to suffer this problem as they do not use the common files user-config.cfg and user-patches.scc that the yocto-* scripts depend upon.


The patch should apply to both danny and denzil repositories, and was made against the danny branch.
Comment 1 Tom Zanussi 2013-01-17 14:32:50 UTC
This looks good, thanks for the patch - I'll try it out here as soon as I can..
Comment 2 Tom Zanussi 2013-01-21 23:09:32 UTC
Hi Brian,

I applied your patch but had to add {{=machine}} to the user filenames themselves.

The combined commit is here:

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=tzanussi/yocto-bsp-qualify-user-with-machine

Can you please take a look and verify that it looks ok to you?  Once you do that I'll post it to the poky list (with you as author).  Please note that minimally I need your Signed-off-by: before posting i.e.:

 Signed-off-by: Brian LLoyd <blloyd@familyhonor.net>

Which I've already added to the commit, but need you to OK it.

Actually, I need to also apply the above patch to master before posting, which I still need to do...
Comment 3 Tom Zanussi 2013-01-22 00:15:56 UTC
OK, I've created a branch for master as well, with some more changes related to custom kernels:

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=tzanussi/yocto-bsp-qualify-user-with-machine-master

And here's the danny branch (same as before but just renamed):

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=tzanussi/yocto-bsp-qualify-user-with-machine-danny

Brian, please let me know if these look good to you, explicitly send or acknowledge your Signed-off-by and then I can post these to the list.

Thanks,

Tom
Comment 4 Blloyd 2013-01-24 17:59:33 UTC
Here is my signed off message for the attached patch:
Signed-off-by: Brian A. Lloyd <brian.lloyd@familyhonor.net>
Comment 5 Tom Zanussi 2013-01-24 20:58:23 UTC
OK, thanks, Brian.  I've just submitted patch, and one for master to the poky list, and cc'ed you.
Comment 6 Tom Zanussi 2013-01-31 23:17:19 UTC
The 'master' version of this patch was pulled into poky/master:

commit ffff37f8f911af44eb18dabb053605fb6badcd1f

Still waiting for the danny version to be pulled in, so can't close this yet.
Comment 7 Tom Zanussi 2013-02-06 16:39:55 UTC
now in poky/danny too, commit: a7ce81df2f6e513a7e364c443759733c778b5c1f