summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@windriver.com>2011-02-08 21:46:45 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-09 11:11:07 +0000
commit9ce72c28bb1e85062cde227bc0c71962286a4d44 (patch)
tree13a8e83e8c0a012e5c43f9bde3be44b57f0c1636 /meta/recipes-kernel
parent3150c5a0c210da6bce9ccd3d1a110a4d7058166d (diff)
downloadpoky-9ce72c28bb1e85062cde227bc0c71962286a4d44.tar.gz
linux-yocto: streamline BSP bootstrapping
In order to build BSPs that were not already integrated into the upstream linux yocto kernel AND keep the git fetcher happy, some fairly complex anonymous python sections were required. These sections cause problems with variable expansion and SRCREV processing. With the updated git fetcher code, we can streamline the BSP boostrapping process and drop 99% of the anonymous python code. This commit has the following changes to support BSP boot strapping and simplication for existing BSPs. - KMETA is set per-recipe rather than in python code - undefined machines are no longer used, but instead common branch names are set per-recipe - fallback machine SRCREVs are present in the default revisions file - A new variable YOCTO_KERNEL_EXTERNAL_BRANCH should be set in the local.conf for new BSPs instead of being programatically determined in the anonymous python. - No more explicity KMACHINE variable expansion and manipulation, since the tools and build phases no longer require it due to the per-recipe fallbacks. Integrated/merged BSPs are unaffected by the changes and have been regression tested. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> foo Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta/recipes-kernel')
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-stable_git.bb10
-rw-r--r--meta/recipes-kernel/linux/linux-yocto.inc4
-rw-r--r--meta/recipes-kernel/linux/linux-yocto_git.bb4
3 files changed, 11 insertions, 7 deletions
diff --git a/meta/recipes-kernel/linux/linux-yocto-stable_git.bb b/meta/recipes-kernel/linux/linux-yocto-stable_git.bb
index d4bee77c21..3c1e669733 100644
--- a/meta/recipes-kernel/linux/linux-yocto-stable_git.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-stable_git.bb
@@ -1,6 +1,7 @@
1inherit kernel 1inherit kernel
2require linux-yocto.inc 2require linux-yocto.inc
3 3
4KMACHINE = "common_pc"
4KMACHINE_qemux86 = "common_pc" 5KMACHINE_qemux86 = "common_pc"
5KMACHINE_qemux86-64 = "common_pc_64" 6KMACHINE_qemux86-64 = "common_pc_64"
6KMACHINE_qemuppc = "qemu_ppc32" 7KMACHINE_qemuppc = "qemu_ppc32"
@@ -14,20 +15,19 @@ KMACHINE_beagleboard = "beagleboard"
14LINUX_VERSION ?= "2.6.34" 15LINUX_VERSION ?= "2.6.34"
15LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE_EXTENSION}" 16LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE_EXTENSION}"
16 17
18KMETA = wrs_meta
19KBRANCH = ${KMACHINE}-${LINUX_KERNEL_TYPE_EXTENSION}
20
17PR = "r1" 21PR = "r1"
18PV = "${LINUX_VERSION}+git${SRCPV}" 22PV = "${LINUX_VERSION}+git${SRCPV}"
19SRCREV_FORMAT = "meta_machine" 23SRCREV_FORMAT = "meta_machine"
20 24
21COMPATIBLE_MACHINE = "(qemuarm|qemux86|qemuppc|qemumips|qemux86-64|atom-pc|routerstationpro|mpc8315e-rdb|beagleboard)" 25COMPATIBLE_MACHINE = "(qemuarm|qemux86|qemuppc|qemumips|qemux86-64|atom-pc|routerstationpro|mpc8315e-rdb|beagleboard)"
22 26
23# this performs a fixup on the SRCREV for new/undefined BSPs 27# this performs a fixup on historical kernel types with embedded _'s
24python __anonymous () { 28python __anonymous () {
25 import bb, re, string 29 import bb, re, string
26 30
27 rev = bb.data.getVar("SRCREV_machine", d, 1)
28 if rev == "standard":
29 bb.data.setVar("SRCREV_machine", "${SRCREV_meta}", d)
30
31 kerntype = string.replace(bb.data.expand("${LINUX_KERNEL_TYPE}", d), "_", "-") 31 kerntype = string.replace(bb.data.expand("${LINUX_KERNEL_TYPE}", d), "_", "-")
32 bb.data.setVar("LINUX_KERNEL_TYPE_EXTENSION", kerntype, d) 32 bb.data.setVar("LINUX_KERNEL_TYPE_EXTENSION", kerntype, d)
33} 33}
diff --git a/meta/recipes-kernel/linux/linux-yocto.inc b/meta/recipes-kernel/linux/linux-yocto.inc
index 3ad849e46e..03935fa702 100644
--- a/meta/recipes-kernel/linux/linux-yocto.inc
+++ b/meta/recipes-kernel/linux/linux-yocto.inc
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
7# A KMACHINE is the mapping of a yocto $MACHINE to what is built 7# A KMACHINE is the mapping of a yocto $MACHINE to what is built
8# by the kernel. This is typically the branch that should be built, 8# by the kernel. This is typically the branch that should be built,
9# and it can be specific to the machine or shared 9# and it can be specific to the machine or shared
10KMACHINE = "UNDEFINED" 10# KMACHINE = "UNDEFINED"
11 11
12# Set this to 'preempt_rt' in the local.conf if you want a real time kernel 12# Set this to 'preempt_rt' in the local.conf if you want a real time kernel
13LINUX_KERNEL_TYPE ?= standard 13LINUX_KERNEL_TYPE ?= standard
@@ -19,4 +19,4 @@ addtask kernel_configme before do_configure after do_patch
19# Pick up shared functions 19# Pick up shared functions
20inherit kernel-yocto 20inherit kernel-yocto
21 21
22B = "${WORKDIR}/linux-${KMACHINE}-${LINUX_KERNEL_TYPE}-build" 22B = "${WORKDIR}/linux-${MACHINE}-${LINUX_KERNEL_TYPE}-build"
diff --git a/meta/recipes-kernel/linux/linux-yocto_git.bb b/meta/recipes-kernel/linux/linux-yocto_git.bb
index cc52397006..75c6fb1653 100644
--- a/meta/recipes-kernel/linux/linux-yocto_git.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_git.bb
@@ -1,6 +1,7 @@
1inherit kernel 1inherit kernel
2require linux-yocto.inc 2require linux-yocto.inc
3 3
4KMACHINE = "yocto/standard/base"
4KMACHINE_qemux86 = "yocto/standard/common-pc/base" 5KMACHINE_qemux86 = "yocto/standard/common-pc/base"
5KMACHINE_qemux86-64 = "yocto/standard/common-pc-64/base" 6KMACHINE_qemux86-64 = "yocto/standard/common-pc-64/base"
6KMACHINE_qemuppc = "yocto/standard/qemu-ppc32" 7KMACHINE_qemuppc = "yocto/standard/qemu-ppc32"
@@ -11,6 +12,9 @@ KMACHINE_routerstationpro = "yocto/standard/routerstationpro"
11KMACHINE_mpc8315e-rdb = "yocto/standard/fsl-mpc8315e-rdb" 12KMACHINE_mpc8315e-rdb = "yocto/standard/fsl-mpc8315e-rdb"
12KMACHINE_beagleboard = "yocto/standard/beagleboard" 13KMACHINE_beagleboard = "yocto/standard/beagleboard"
13 14
15KBRANCH = ${KMACHINE}
16KMETA = meta
17
14LINUX_VERSION ?= "2.6.37" 18LINUX_VERSION ?= "2.6.37"
15LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}" 19LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}"
16PR = "r15" 20PR = "r15"