summaryrefslogtreecommitdiffstats
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
parent703148fde646ed8c207880a47be09b683b6f6303 (diff)
downloadpoky-eb74a0506a2f17170254e62513db3451e0587d11.tar.gz
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>
-rw-r--r--meta/classes/kernel-yocto.bbclass12
-rw-r--r--meta/conf/distro/include/poky-default-revisions.inc2
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-stable_git.bb10
-rw-r--r--meta/recipes-kernel/linux/linux-yocto_git.bb18
4 files changed, 22 insertions, 20 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}
diff --git a/meta/conf/distro/include/poky-default-revisions.inc b/meta/conf/distro/include/poky-default-revisions.inc
index 957f873718..be4dfb5d62 100644
--- a/meta/conf/distro/include/poky-default-revisions.inc
+++ b/meta/conf/distro/include/poky-default-revisions.inc
@@ -57,7 +57,7 @@ SRCREV_pn-gypsy ??= "147"
57SRCREV_pn-inputproto ??= "7203036522ba9d4b224d282d6afc2d0b947711ee" 57SRCREV_pn-inputproto ??= "7203036522ba9d4b224d282d6afc2d0b947711ee"
58SRCREV_pn-inputproto-native ??= "7203036522ba9d4b224d282d6afc2d0b947711ee" 58SRCREV_pn-inputproto-native ??= "7203036522ba9d4b224d282d6afc2d0b947711ee"
59SRCREV_pn-inputproto-nativesdk ??= "7203036522ba9d4b224d282d6afc2d0b947711ee" 59SRCREV_pn-inputproto-nativesdk ??= "7203036522ba9d4b224d282d6afc2d0b947711ee"
60SRCREV_pn-kern-tools-native ??= "c85dcdd2dc50d71476a11c2960bf14c2b144b3c7" 60SRCREV_pn-kern-tools-native ??= "796d7fef92b2eed449c17c14441587ff0c465368"
61SRCREV_pn-libdrm ??= "3f3c5be6f908272199ccf53f108b1124bfe0a00e" 61SRCREV_pn-libdrm ??= "3f3c5be6f908272199ccf53f108b1124bfe0a00e"
62SRCREV_pn-libfakekey ??= "2031" 62SRCREV_pn-libfakekey ??= "2031"
63SRCREV_pn-libgdbus ??= "aeab6e3c0185b271ca343b439470491b99cc587f" 63SRCREV_pn-libgdbus ??= "aeab6e3c0185b271ca343b439470491b99cc587f"
diff --git a/meta/recipes-kernel/linux/linux-yocto-stable_git.bb b/meta/recipes-kernel/linux/linux-yocto-stable_git.bb
index dd4d176ac5..85b67f4ddc 100644
--- a/meta/recipes-kernel/linux/linux-yocto-stable_git.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-stable_git.bb
@@ -12,8 +12,9 @@ KMACHINE_mpc8315e-rdb = "fsl-mpc8315e-rdb"
12KMACHINE_beagleboard = "beagleboard" 12KMACHINE_beagleboard = "beagleboard"
13 13
14LINUX_VERSION ?= "2.6.34" 14LINUX_VERSION ?= "2.6.34"
15LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}" 15LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE_EXTENSION}"
16PR = "r0" 16
17PR = "r1"
17PV = "${LINUX_VERSION}+git${SRCPV}" 18PV = "${LINUX_VERSION}+git${SRCPV}"
18SRCREV_FORMAT = "meta_machine" 19SRCREV_FORMAT = "meta_machine"
19 20
@@ -21,11 +22,14 @@ COMPATIBLE_MACHINE = "(qemuarm|qemux86|qemuppc|qemumips|qemux86-64|atom-pc|route
21 22
22# this performs a fixup on the SRCREV for new/undefined BSPs 23# this performs a fixup on the SRCREV for new/undefined BSPs
23python __anonymous () { 24python __anonymous () {
24 import bb, re 25 import bb, re, string
25 26
26 rev = bb.data.getVar("SRCREV_machine", d, 1) 27 rev = bb.data.getVar("SRCREV_machine", d, 1)
27 if rev == "standard": 28 if rev == "standard":
28 bb.data.setVar("SRCREV_machine", "${SRCREV_meta}", d) 29 bb.data.setVar("SRCREV_machine", "${SRCREV_meta}", d)
30
31 kerntype = string.replace(bb.data.expand("${LINUX_KERNEL_TYPE}", d), "_", "-")
32 bb.data.setVar("LINUX_KERNEL_TYPE_EXTENSION", kerntype, d)
29} 33}
30 34
31SRC_URI = "git://git.pokylinux.org/linux-2.6-windriver.git;protocol=git;fullclone=1;branch=${KBRANCH};name=machine \ 35SRC_URI = "git://git.pokylinux.org/linux-2.6-windriver.git;protocol=git;fullclone=1;branch=${KBRANCH};name=machine \
diff --git a/meta/recipes-kernel/linux/linux-yocto_git.bb b/meta/recipes-kernel/linux/linux-yocto_git.bb
index f40fe38fcd..6677f99abb 100644
--- a/meta/recipes-kernel/linux/linux-yocto_git.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_git.bb
@@ -1,15 +1,15 @@
1inherit kernel 1inherit kernel
2require linux-yocto.inc 2require linux-yocto.inc
3 3
4KMACHINE_qemux86 = "common_pc/base" 4KMACHINE_qemux86 = "yocto/standard/common_pc/base"
5KMACHINE_qemux86-64 = "common_pc_64" 5KMACHINE_qemux86-64 = "yocto/standard/common-pc-64"
6KMACHINE_qemuppc = "qemu_ppc32" 6KMACHINE_qemuppc = "yocto/standard/qemu-ppc32"
7KMACHINE_qemumips = "mti_malta32_be" 7KMACHINE_qemumips = "yocto/standard/mti-malta32-be"
8KMACHINE_qemuarm = "arm_versatile_926ejs" 8KMACHINE_qemuarm = "yocto/standard/arm-versatile-926ejs"
9KMACHINE_atom-pc = "atom-pc" 9KMACHINE_atom-pc = "yocto/standard/common-pc/atom-pc"
10KMACHINE_routerstationpro = "routerstationpro" 10KMACHINE_routerstationpro = "yocto/standard/routerstationpro"
11KMACHINE_mpc8315e-rdb = "fsl-mpc8315e-rdb" 11KMACHINE_mpc8315e-rdb = "yocto/standard/fsl-mpc8315e-rdb"
12KMACHINE_beagleboard = "beagleboard" 12KMACHINE_beagleboard = "yocto/standard/beagleboard"
13 13
14LINUX_VERSION ?= "2.6.37" 14LINUX_VERSION ?= "2.6.37"
15LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}" 15LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}"