summaryrefslogtreecommitdiffstats
path: root/meta
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
parent22cf272eb67e7a5596c157aeed9df64bc7b414c5 (diff)
downloadpoky-54d4b8e861d161fa050d918d70572c744c4a0289.tar.gz
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')
-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 () {
29 # The branch for a build is: 29 # The branch for a build is:
30 # yocto/<kernel type>/${KMACHINE} or 30 # yocto/<kernel type>/${KMACHINE} or
31 # yocto/<kernel type>/${KMACHINE}/base 31 # yocto/<kernel type>/${KMACHINE}/base
32 bb.data.setVar("KBRANCH", bb.data.expand("${KMACHINE}",d), d) 32 mach = bb.data.getVar("KMACHINE_" + bb.data.expand("${MACHINE}",d), d, 1)
33 if mach == None:
34 mach = bb.data.getVar("KMACHINE", d, 1)
35
36 bb.data.setVar("KBRANCH", mach, d)
33 bb.data.setVar("KMETA", "meta", d) 37 bb.data.setVar("KMETA", "meta", d)
34 38
35 mach = bb.data.getVar("KMACHINE", d, 1)
36 # drop the "/base" if it was on the KMACHINE 39 # drop the "/base" if it was on the KMACHINE
37 kmachine = mach.replace('/base','') 40 kmachine = mach.replace('/base','')
38 # drop everything but the last segment 41 # drop everything but the last segment