summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-kernel/linux/linux-wrs_git.bb40
1 files changed, 32 insertions, 8 deletions
diff --git a/meta/recipes-kernel/linux/linux-wrs_git.bb b/meta/recipes-kernel/linux/linux-wrs_git.bb
index 1f2b11e975..209648b8e7 100644
--- a/meta/recipes-kernel/linux/linux-wrs_git.bb
+++ b/meta/recipes-kernel/linux/linux-wrs_git.bb
@@ -10,10 +10,10 @@ PV = "2.6.34+git${SRCPV}"
10# To use a staged, on-disk bare clone of a Wind River Kernel, use a 10# To use a staged, on-disk bare clone of a Wind River Kernel, use a
11# variant of the below 11# variant of the below
12# SRC_URI = "git://///path/to/kernel/default_kernel.git;fullclone=1" 12# SRC_URI = "git://///path/to/kernel/default_kernel.git;fullclone=1"
13SRC_URI = "git://git.pokylinux.org/linux-2.6-windriver.git;protocol=git;fullclone=1;branch=${WRMACHINE}-${LINUX_KERNEL_TYPE};name=machine \ 13SRC_URI = "git://git.pokylinux.org/linux-2.6-windriver.git;protocol=git;fullclone=1;branch=${KBRANCH};name=machine \
14 git://git.pokylinux.org/linux-2.6-windriver.git;protocol=git;noclone=1;branch=wrs_meta;name=meta" 14 git://git.pokylinux.org/linux-2.6-windriver.git;protocol=git;noclone=1;branch=wrs_meta;name=meta"
15 15
16WRMACHINE = "${MACHINE}" 16WRMACHINE = "UNDEFINED"
17WRMACHINE_qemux86 = "common_pc" 17WRMACHINE_qemux86 = "common_pc"
18WRMACHINE_qemux86-64 = "common_pc_64" 18WRMACHINE_qemux86-64 = "common_pc_64"
19WRMACHINE_qemuppc = "qemu_ppc32" 19WRMACHINE_qemuppc = "qemu_ppc32"
@@ -24,11 +24,33 @@ WRMACHINE_routerstationpro = "routerstationpro"
24WRMACHINE_mpc8315e-rdb = "fsl-mpc8315e-rdb" 24WRMACHINE_mpc8315e-rdb = "fsl-mpc8315e-rdb"
25WRMACHINE_beagleboard = "beagleboard" 25WRMACHINE_beagleboard = "beagleboard"
26 26
27# Determine which branch to fetch and build. Not all branches are in the
28# upstream repo (but will be locally created after the fetchers run) so
29# a fallback branch needs to be chosen.
30#
31# The default machine 'UNDEFINED'. If the machine is not set to a specific
32# branch in this recipe or in a recipe extension, then we fallback to a
33# branch that is always present 'standard'. This sets the KBRANCH variable
34# and is used in the SRC_URI. The machine is then set back to ${MACHINE},
35# since futher processing will use that to create local branches
36python __anonymous () {
37 import bb, re
38
39 bb.data.setVar("KBRANCH", "${WRMACHINE}-${LINUX_KERNEL_TYPE}", d)
40 mach = bb.data.getVar("WRMACHINE", d, 1)
41 if mach == "UNDEFINED":
42 bb.data.setVar("KBRANCH", "standard", d)
43 bb.data.setVar("WRMACHINE", "${MACHINE}", d)
44 # track the global configuration on a bootstrapped BSP
45 bb.data.setVar("SRCREV_machine", "${SRCREV_meta}", d)
46 bb.data.setVar("BOOTSTRAP", "t", d)
47}
48
27COMPATIBLE_MACHINE = "(qemuarm|qemux86|qemuppc|qemumips|qemux86-64|atom-pc|routerstationpro|mpc8315e-rdb|beagleboard)" 49COMPATIBLE_MACHINE = "(qemuarm|qemux86|qemuppc|qemumips|qemux86-64|atom-pc|routerstationpro|mpc8315e-rdb|beagleboard)"
28 50
29LINUX_VERSION = "v2.6.34" 51LINUX_VERSION = "v2.6.34"
30LINUX_VERSION_EXTENSION = "-wr-${LINUX_KERNEL_TYPE}" 52LINUX_VERSION_EXTENSION = "-wr-${LINUX_KERNEL_TYPE}"
31PR = "r12" 53PR = "r13"
32 54
33S = "${WORKDIR}/linux" 55S = "${WORKDIR}/linux"
34B = "${WORKDIR}/linux-${WRMACHINE}-${LINUX_KERNEL_TYPE}-build" 56B = "${WORKDIR}/linux-${WRMACHINE}-${LINUX_KERNEL_TYPE}-build"
@@ -69,7 +91,7 @@ do_patch() {
69} 91}
70 92
71validate_branches() { 93validate_branches() {
72 branch_head=`git show-ref -s --heads ${WRMACHINE}-${LINUX_KERNEL_TYPE}` 94 branch_head=`git show-ref -s --heads ${KBRANCH}`
73 meta_head=`git show-ref -s --heads wrs_meta` 95 meta_head=`git show-ref -s --heads wrs_meta`
74 target_branch_head="${SRCREV_machine}" 96 target_branch_head="${SRCREV_machine}"
75 target_meta_head="${SRCREV_meta}" 97 target_meta_head="${SRCREV_meta}"
@@ -132,14 +154,16 @@ IFS='
132 cd ${S} 154 cd ${S}
133 155
134 # checkout and clobber and unimportant files 156 # checkout and clobber and unimportant files
135 git checkout -f ${WRMACHINE}-${LINUX_KERNEL_TYPE} 157 git checkout -f ${KBRANCH}
136 158
137 validate_branches 159 if [ -z "${BOOTSTRAP}" ]; then
160 validate_branches
161 fi
138 162
139 # this second checkout is intentional, we want to leave ourselves 163 # this second checkout is intentional, we want to leave ourselves
140 # on the branch to be built, but validate_branches could have changed 164 # on the branch to be built, but validate_branches could have changed
141 # our initial checkout. So we do it a second time to be sure 165 # our initial checkout. So we do it a second time to be sure
142 git checkout -f ${WRMACHINE}-${LINUX_KERNEL_TYPE} 166 git checkout -f ${KBRANCH}
143} 167}
144do_wrlinux_checkout[dirs] = "${S}" 168do_wrlinux_checkout[dirs] = "${S}"
145 169