summaryrefslogtreecommitdiff
path: root/meta/classes/kernel-yocto.bbclass
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@windriver.com>2010-12-15 16:19:25 -0500
committerRichard Purdie <rpurdie@linux.intel.com>2010-12-21 09:29:12 +0000
commiteb74a0506a2f17170254e62513db3451e0587d11 (patch)
tree58afa77c24cd376e744afefa1569b4bee4dbdde6 /meta/classes/kernel-yocto.bbclass
parent703148fde646ed8c207880a47be09b683b6f6303 (diff)
downloadopenembedded-core-eb74a0506a2f17170254e62513db3451e0587d11.tar.gz
openembedded-core-eb74a0506a2f17170254e62513db3451e0587d11.tar.bz2
openembedded-core-eb74a0506a2f17170254e62513db3451e0587d11.zip
linux-yocto: remove or adjust to _ in branch names
The existing 2.6.34 kernel tree uses _ where poky typically uses -. This is a historical artifact, since working with gnu Make and shells means avoiding - is wise. The opposite is true in Yocto. To avoid using the _ reserved character wherever possible we can simply remove it from the branch names in the new 2.6.37 kernel, but to keep the content stable in the 0.9 2.6.34 kernel, we map _ to - for the purposes of packaging. To further faciliate this switch, the branch names no longer need to be shortened in the KMACHINE mappings, but can be fully specified and the tools/processing adapt as required. This gives us the flexibility to map multiple boards to a single branch for building. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
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"
# and is used in the SRC_URI. The machine is then set back to ${MACHINE},
# since futher processing will use that to create local branches
python __anonymous () {
- import bb, re
+ import bb, re, string
version = bb.data.getVar("LINUX_VERSION", d, 1)
# 2.6.34 signifies the old-style tree, so we need some temporary
@@ -29,12 +29,14 @@ 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("yocto/${LINUX_KERNEL_TYPE}/${KMACHINE}",d), d)
+ bb.data.setVar("KBRANCH", bb.data.expand("${KMACHINE}",d), 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
+ kmachine = os.path.basename( kmachine )
# and then write KMACHINE back
bb.data.setVar('KMACHINE_' + bb.data.expand("${MACHINE}",d), kmachine, d)
@@ -51,11 +53,7 @@ do_patch() {
defconfig=${WORKDIR}/defconfig
fi
- if [ -n "${BOOTSTRAP}" ]; then
- kbranch="yocto/${LINUX_KERNEL_TYPE}/${KMACHINE}"
- else
- kbranch=${KBRANCH}
- fi
+ kbranch=${KBRANCH}
# simply ensures that a branch of the right name has been created
createme ${ARCH} ${kbranch} ${defconfig}