summaryrefslogtreecommitdiffstats
path: root/meta/classes/kernel-yocto.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/kernel-yocto.bbclass')
-rw-r--r--meta/classes/kernel-yocto.bbclass12
1 files changed, 5 insertions, 7 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index 8e820122ec..f5418782b0 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -10,7 +10,7 @@ S = "${WORKDIR}/linux"
10# and is used in the SRC_URI. The machine is then set back to ${MACHINE}, 10# and is used in the SRC_URI. The machine is then set back to ${MACHINE},
11# since futher processing will use that to create local branches 11# since futher processing will use that to create local branches
12python __anonymous () { 12python __anonymous () {
13 import bb, re 13 import bb, re, string
14 14
15 version = bb.data.getVar("LINUX_VERSION", d, 1) 15 version = bb.data.getVar("LINUX_VERSION", d, 1)
16 # 2.6.34 signifies the old-style tree, so we need some temporary 16 # 2.6.34 signifies the old-style tree, so we need some temporary
@@ -29,12 +29,14 @@ 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("yocto/${LINUX_KERNEL_TYPE}/${KMACHINE}",d), d) 32 bb.data.setVar("KBRANCH", bb.data.expand("${KMACHINE}",d), d)
33 bb.data.setVar("KMETA", "meta", d) 33 bb.data.setVar("KMETA", "meta", d)
34 34
35 mach = bb.data.getVar("KMACHINE", d, 1) 35 mach = bb.data.getVar("KMACHINE", d, 1)
36 # drop the "/base" if it was on the KMACHINE 36 # drop the "/base" if it was on the KMACHINE
37 kmachine = mach.replace('/base','') 37 kmachine = mach.replace('/base','')
38 # drop everything but the last segment
39 kmachine = os.path.basename( kmachine )
38 # and then write KMACHINE back 40 # and then write KMACHINE back
39 bb.data.setVar('KMACHINE_' + bb.data.expand("${MACHINE}",d), kmachine, d) 41 bb.data.setVar('KMACHINE_' + bb.data.expand("${MACHINE}",d), kmachine, d)
40 42
@@ -51,11 +53,7 @@ do_patch() {
51 defconfig=${WORKDIR}/defconfig 53 defconfig=${WORKDIR}/defconfig
52 fi 54 fi
53 55
54 if [ -n "${BOOTSTRAP}" ]; then 56 kbranch=${KBRANCH}
55 kbranch="yocto/${LINUX_KERNEL_TYPE}/${KMACHINE}"
56 else
57 kbranch=${KBRANCH}
58 fi
59 57
60 # simply ensures that a branch of the right name has been created 58 # simply ensures that a branch of the right name has been created
61 createme ${ARCH} ${kbranch} ${defconfig} 59 createme ${ARCH} ${kbranch} ${defconfig}