summaryrefslogtreecommitdiff
path: root/meta/classes/kernel-yocto.bbclass
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@windriver.com>2010-12-22 16:29:28 -0500
committerSaul Wold <sgw@linux.intel.com>2010-12-28 22:47:52 -0800
commit54d4b8e861d161fa050d918d70572c744c4a0289 (patch)
treeb3c842f1c6b8eb6448a581d928a774684c8a004d /meta/classes/kernel-yocto.bbclass
parent22cf272eb67e7a5596c157aeed9df64bc7b414c5 (diff)
downloadopenembedded-core-54d4b8e861d161fa050d918d70572c744c4a0289.tar.gz
openembedded-core-54d4b8e861d161fa050d918d70572c744c4a0289.tar.bz2
openembedded-core-54d4b8e861d161fa050d918d70572c744c4a0289.zip
yocto-kernel: fix kmachine to deal with overrides
BSPs are built from a particular branch of the kernel repository which is specfied via the mapping of MACHINE to KMACHINE. Unless a global branch is being forced (like libc headers), KMACHINE is an override on a per machine basis. Because KMACHINE is typically override we must first try the most specific variant KMACHINE_<machine> and if that is undefined look for a fallack default. This allows any combination of variables to work (and at the time the anonymous python executes) safely and get us a properly defined branch for the fetcher and build. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta/classes/kernel-yocto.bbclass')
-rw-r--r--meta/classes/kernel-yocto.bbclass7
1 files changed, 5 insertions, 2 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index f5418782b0..7ebe5d69aa 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -29,10 +29,13 @@ python __anonymous () {
# The branch for a build is:
# yocto/<kernel type>/${KMACHINE} or
# yocto/<kernel type>/${KMACHINE}/base
- bb.data.setVar("KBRANCH", bb.data.expand("${KMACHINE}",d), d)
+ mach = bb.data.getVar("KMACHINE_" + bb.data.expand("${MACHINE}",d), d, 1)
+ if mach == None:
+ mach = bb.data.getVar("KMACHINE", d, 1)
+
+ bb.data.setVar("KBRANCH", mach, d)
bb.data.setVar("KMETA", "meta", d)
- mach = bb.data.getVar("KMACHINE", d, 1)
# drop the "/base" if it was on the KMACHINE
kmachine = mach.replace('/base','')
# drop everything but the last segment