summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@windriver.com>2015-07-21 11:21:04 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-25 14:41:44 +0100
commitc29aac6a8b5b417ad46f3cdf9c1a2d61c4f6cdd5 (patch)
tree58976b68efd8acddecc7fc7b8975ed25f3294fd3 /meta
parent741a44c06b1e53b641f2a5c48985a81e3c1e27cf (diff)
downloadpoky-c29aac6a8b5b417ad46f3cdf9c1a2d61c4f6cdd5.tar.gz
linux-yocto: split meta data from kernel repository
The linux-yocto tree has always been a combined set of kernel changes and configuration (meta) data carried in a single tree. While this format is effective at keeping kernel configuration and source modifications synchronized, it isn't always obvious to developers on how to manipulate the meta data versus the source. With this change, we remove the meta data processing from the kernel-yocto class and use the external meta-data repository that has always been used to seed the linux-yocto meta branch. After this change, linux-yocto can no longer process combined trees, and is simplified as a result. (From OE-Core rev: 523e4f6a6913b64453579d27a02467e14f7df42e) Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/kernel-yocto.bbclass76
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-dev.bb5
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-rt_3.14.bb7
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-tiny_3.14.bb7
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-tiny_3.19.bb7
-rw-r--r--meta/recipes-kernel/linux/linux-yocto_3.14.bb7
-rw-r--r--meta/recipes-kernel/linux/linux-yocto_3.19.bb7
7 files changed, 28 insertions, 88 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index 2f9a41f34d..231e08deba 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -33,6 +33,7 @@ def find_kernel_feature_dirs(d):
33 for url in fetch.urls: 33 for url in fetch.urls:
34 urldata = fetch.ud[url] 34 urldata = fetch.ud[url]
35 parm = urldata.parm 35 parm = urldata.parm
36 type=""
36 if "type" in parm: 37 if "type" in parm:
37 type = parm["type"] 38 type = parm["type"]
38 if "destsuffix" in parm: 39 if "destsuffix" in parm:
@@ -112,17 +113,6 @@ do_kernel_metadata() {
112 fi 113 fi
113 fi 114 fi
114 115
115 # if we have a defined/set meta branch we should not be generating
116 # any meta data. The passed branch has what we need.
117 if [ -n "${KMETA}" ]; then
118 createme_flags="--disable-meta-gen --meta ${KMETA}"
119 fi
120
121 createme -v -v ${createme_flags} ${ARCH} ${machine_branch}
122 if [ $? -ne 0 ]; then
123 bbfatal_log "Could not create ${machine_branch}"
124 fi
125
126 sccs="$sccs ${@" ".join(find_sccs(d))}" 116 sccs="$sccs ${@" ".join(find_sccs(d))}"
127 patches="${@" ".join(find_patches(d))}" 117 patches="${@" ".join(find_patches(d))}"
128 feat_dirs="${@" ".join(find_kernel_feature_dirs(d))}" 118 feat_dirs="${@" ".join(find_kernel_feature_dirs(d))}"
@@ -189,34 +179,18 @@ do_patch() {
189do_kernel_checkout() { 179do_kernel_checkout() {
190 set +e 180 set +e
191 181
192 # A linux yocto SRC_URI should use the bareclone option. That
193 # ensures that all the branches are available in the WORKDIR version
194 # of the repository.
195 source_dir=`echo ${S} | sed 's%/$%%'` 182 source_dir=`echo ${S} | sed 's%/$%%'`
196 source_workdir="${WORKDIR}/git" 183 source_workdir="${WORKDIR}/git"
197 if [ -d "${WORKDIR}/git/" ] && [ -d "${WORKDIR}/git/.git" ]; then 184 if [ -d "${WORKDIR}/git/" ]; then
198 # case2: the repository is a non-bare clone 185 # case: git repository (bare or non-bare)
199
200 # if S is WORKDIR/git, then we shouldn't be moving or deleting the tree. 186 # if S is WORKDIR/git, then we shouldn't be moving or deleting the tree.
201 if [ "${source_dir}" != "${source_workdir}" ]; then 187 if [ "${source_dir}" != "${source_workdir}" ]; then
202 rm -rf ${S} 188 rm -rf ${S}
203 mv ${WORKDIR}/git ${S} 189 mv ${WORKDIR}/git ${S}
204 fi 190 fi
205 cd ${S} 191 cd ${S}
206 elif [ -d "${WORKDIR}/git/" ] && [ ! -d "${WORKDIR}/git/.git" ]; then
207 # case2: the repository is a bare clone
208
209 # if S is WORKDIR/git, then we shouldn't be moving or deleting the tree.
210 if [ "${source_dir}" != "${source_workdir}" ]; then
211 rm -rf ${S}
212 mkdir -p ${S}/.git
213 mv ${WORKDIR}/git/* ${S}/.git
214 rm -rf ${WORKDIR}/git/
215 fi
216 cd ${S}
217 git config core.bare false
218 else 192 else
219 # case 3: we have no git repository at all. 193 # case: we have no git repository at all.
220 # To support low bandwidth options for building the kernel, we'll just 194 # To support low bandwidth options for building the kernel, we'll just
221 # convert the tree to a git repo and let the rest of the process work unchanged 195 # convert the tree to a git repo and let the rest of the process work unchanged
222 196
@@ -235,7 +209,6 @@ do_kernel_checkout() {
235 git commit -q -m "baseline commit: creating repo for ${PN}-${PV}" 209 git commit -q -m "baseline commit: creating repo for ${PN}-${PV}"
236 git clean -d -f 210 git clean -d -f
237 fi 211 fi
238 # end debare
239 212
240 # convert any remote branches to local tracking ones 213 # convert any remote branches to local tracking ones
241 for i in `git branch -a --no-color | grep remotes | grep -v HEAD`; do 214 for i in `git branch -a --no-color | grep remotes | grep -v HEAD`; do
@@ -246,24 +219,8 @@ do_kernel_checkout() {
246 fi 219 fi
247 done 220 done
248 221
249 # If KMETA is defined, the branch must exist, but a machine branch
250 # can be missing since it may be created later by the tools.
251 if [ -n "${KMETA}" ]; then
252 git show-ref --quiet --verify -- "refs/heads/${KMETA}"
253 if [ $? -eq 1 ]; then
254 bberror "The branch '${KMETA}' is required and was not found"
255 bberror "Ensure that the SRC_URI points to a valid linux-yocto"
256 bbfatal_log "kernel repository"
257 fi
258 fi
259
260
261 # Create a working tree copy of the kernel by checking out a branch 222 # Create a working tree copy of the kernel by checking out a branch
262 machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}" 223 machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}"
263 git show-ref --quiet --verify -- "refs/heads/${machine_branch}"
264 if [ $? -ne 0 ]; then
265 machine_branch="master"
266 fi
267 224
268 # checkout and clobber any unimportant files 225 # checkout and clobber any unimportant files
269 git checkout -f ${machine_branch} 226 git checkout -f ${machine_branch}
@@ -313,7 +270,7 @@ python do_kernel_configcheck() {
313 kmeta = "." + kmeta 270 kmeta = "." + kmeta
314 271
315 pathprefix = "export PATH=%s:%s; " % (d.getVar('PATH', True), "${S}/scripts/util/") 272 pathprefix = "export PATH=%s:%s; " % (d.getVar('PATH', True), "${S}/scripts/util/")
316 cmd = d.expand("cd ${S}; kconf_check -config- %s/meta-series ${S} ${B}" % kmeta) 273 cmd = d.expand("cd ${S}; kconf_check -config %s/meta-series ${S} ${B}" % kmeta)
317 ret, result = oe.utils.getstatusoutput("%s%s" % (pathprefix, cmd)) 274 ret, result = oe.utils.getstatusoutput("%s%s" % (pathprefix, cmd))
318 275
319 config_check_visibility = int(d.getVar( "KCONF_AUDIT_LEVEL", True ) or 0) 276 config_check_visibility = int(d.getVar( "KCONF_AUDIT_LEVEL", True ) or 0)
@@ -351,7 +308,6 @@ python do_kernel_configcheck() {
351do_validate_branches() { 308do_validate_branches() {
352 set +e 309 set +e
353 cd ${S} 310 cd ${S}
354 export KMETA=${KMETA}
355 311
356 machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}" 312 machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}"
357 machine_srcrev="${SRCREV_machine}" 313 machine_srcrev="${SRCREV_machine}"
@@ -377,28 +333,6 @@ do_validate_branches() {
377 force_srcrev=${machine_srcrev} 333 force_srcrev=${machine_srcrev}
378 fi 334 fi
379 335
380 ## KMETA branch validation.
381 target_meta_head="${SRCREV_meta}"
382 if [ "${target_meta_head}" = "AUTOINC" ] || [ "${target_meta_head}" = "" ]; then
383 bbnote "SRCREV validation skipped for AUTOREV or empty meta branch"
384 else
385 meta_head=`git show-ref -s --heads ${KMETA}`
386
387 git cat-file -t ${target_meta_head} > /dev/null
388 if [ $? -ne 0 ]; then
389 bberror "${target_meta_head} is not a valid commit ID"
390 bbfatal_log "The kernel source tree may be out of sync"
391 fi
392 if [ "$meta_head" != "$target_meta_head" ]; then
393 bbnote "Setting branch ${KMETA} to ${target_meta_head}"
394 git branch -m ${KMETA} ${KMETA}-orig
395 git checkout -q -b ${KMETA} ${target_meta_head}
396 if [ $? -ne 0 ];then
397 bbfatal_log "Could not checkout ${KMETA} branch from known hash ${target_meta_head}"
398 fi
399 fi
400 fi
401
402 git checkout -q -f ${machine_branch} 336 git checkout -q -f ${machine_branch}
403 if [ -n "${force_srcrev}" ]; then 337 if [ -n "${force_srcrev}" ]; then
404 # see if the branch we are about to patch has been properly reset to the defined 338 # see if the branch we are about to patch has been properly reset to the defined
diff --git a/meta/recipes-kernel/linux/linux-yocto-dev.bb b/meta/recipes-kernel/linux/linux-yocto-dev.bb
index 588a89f641..0be30893ac 100644
--- a/meta/recipes-kernel/linux/linux-yocto-dev.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-dev.bb
@@ -23,9 +23,10 @@ python () {
23} 23}
24 24
25KBRANCH = "standard/base" 25KBRANCH = "standard/base"
26KMETA = "meta" 26KMETA = "kernel-meta"
27 27
28SRC_URI = "git://git.yoctoproject.org/linux-yocto-dev.git;bareclone=1;branch=${KBRANCH},${KMETA};name=machine,meta" 28SRC_URI = "git://git.yoctoproject.org/linux-yocto-dev.git;branch=${KBRANCH};name=machine \
29 git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=master;destsuffix=${KMETA}"
29 30
30# Set default SRCREVs. Both the machine and meta SRCREVs are statically set 31# Set default SRCREVs. Both the machine and meta SRCREVs are statically set
31# to the korg v3.7 tag, and hence prevent network access during parsing. If 32# to the korg v3.7 tag, and hence prevent network access during parsing. If
diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_3.14.bb b/meta/recipes-kernel/linux/linux-yocto-rt_3.14.bb
index 9bdbc49ffe..0bd94f0c60 100644
--- a/meta/recipes-kernel/linux/linux-yocto-rt_3.14.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_3.14.bb
@@ -5,15 +5,16 @@ require recipes-kernel/linux/linux-yocto.inc
5 5
6SRCREV_machine ?= "863ba0912f559ba9d64ab94bf04f0226fdf0cb49" 6SRCREV_machine ?= "863ba0912f559ba9d64ab94bf04f0226fdf0cb49"
7SRCREV_machine_qemuppc ?= "9d464d6696a0fc755c65a2cf75ad7a4656ac6e1e" 7SRCREV_machine_qemuppc ?= "9d464d6696a0fc755c65a2cf75ad7a4656ac6e1e"
8SRCREV_meta ?= "94fa1d7e980c97fcd59b37daedcd863bd6daaee4" 8SRCREV_meta ?= "b55cfc0308bf7158843db4b8f69f866487a0919e"
9 9
10SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.14.git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta" 10SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.14.git;branch=${KBRANCH};name=machine \
11 git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-3.14;destsuffix=${KMETA}"
11 12
12LINUX_VERSION ?= "3.14.36" 13LINUX_VERSION ?= "3.14.36"
13 14
14PV = "${LINUX_VERSION}+git${SRCPV}" 15PV = "${LINUX_VERSION}+git${SRCPV}"
15 16
16KMETA = "meta" 17KMETA = "kernel-meta"
17KCONF_BSP_AUDIT_LEVEL = "2" 18KCONF_BSP_AUDIT_LEVEL = "2"
18 19
19LINUX_KERNEL_TYPE = "preempt-rt" 20LINUX_KERNEL_TYPE = "preempt-rt"
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_3.14.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_3.14.bb
index bd7b6da28c..f486d41efa 100644
--- a/meta/recipes-kernel/linux/linux-yocto-tiny_3.14.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-tiny_3.14.bb
@@ -6,15 +6,16 @@ require recipes-kernel/linux/linux-yocto.inc
6 6
7LINUX_VERSION ?= "3.14.36" 7LINUX_VERSION ?= "3.14.36"
8 8
9KMETA = "meta" 9KMETA = "kernel-meta"
10KCONF_BSP_AUDIT_LEVEL = "2" 10KCONF_BSP_AUDIT_LEVEL = "2"
11 11
12SRCREV_machine ?= "7534aeb01883b48cc42eb4900d0a8c64e8160e14" 12SRCREV_machine ?= "7534aeb01883b48cc42eb4900d0a8c64e8160e14"
13SRCREV_meta ?= "94fa1d7e980c97fcd59b37daedcd863bd6daaee4" 13SRCREV_meta ?= "b55cfc0308bf7158843db4b8f69f866487a0919e"
14 14
15PV = "${LINUX_VERSION}+git${SRCPV}" 15PV = "${LINUX_VERSION}+git${SRCPV}"
16 16
17SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.14.git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta" 17SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.14.git;branch=${KBRANCH};name=machine; \
18 git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-3.14;destsuffix=${KMETA}"
18 19
19COMPATIBLE_MACHINE = "(qemux86)" 20COMPATIBLE_MACHINE = "(qemux86)"
20 21
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_3.19.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_3.19.bb
index 172d3b4800..c82da37268 100644
--- a/meta/recipes-kernel/linux/linux-yocto-tiny_3.19.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-tiny_3.19.bb
@@ -6,15 +6,16 @@ require recipes-kernel/linux/linux-yocto.inc
6 6
7LINUX_VERSION ?= "3.19.5" 7LINUX_VERSION ?= "3.19.5"
8 8
9KMETA = "meta" 9KMETA = "kernel-meta"
10KCONF_BSP_AUDIT_LEVEL = "2" 10KCONF_BSP_AUDIT_LEVEL = "2"
11 11
12SRCREV_machine ?= "e152349de59b43b2a75f2c332b44171df461d5a0" 12SRCREV_machine ?= "e152349de59b43b2a75f2c332b44171df461d5a0"
13SRCREV_meta ?= "a70b2eb273ef6349d344920474a494697474b98e" 13SRCREV_meta ?= "361c186effc0b0038dfbfd3fe71ecf3df5edb43d"
14 14
15PV = "${LINUX_VERSION}+git${SRCPV}" 15PV = "${LINUX_VERSION}+git${SRCPV}"
16 16
17SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.19.git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta" 17SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.19.git;branch=${KBRANCH};name=machine \
18 git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-3.19;destsuffix=${KMETA}"
18 19
19COMPATIBLE_MACHINE = "(qemux86)" 20COMPATIBLE_MACHINE = "(qemux86)"
20 21
diff --git a/meta/recipes-kernel/linux/linux-yocto_3.14.bb b/meta/recipes-kernel/linux/linux-yocto_3.14.bb
index 7f32c7a1b5..9bbcecc76f 100644
--- a/meta/recipes-kernel/linux/linux-yocto_3.14.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_3.14.bb
@@ -19,15 +19,16 @@ SRCREV_machine_qemux86 ?= "48833301518748d82cbc2412fea3617eeee6d01b"
19SRCREV_machine_qemux86-64 ?= "7534aeb01883b48cc42eb4900d0a8c64e8160e14" 19SRCREV_machine_qemux86-64 ?= "7534aeb01883b48cc42eb4900d0a8c64e8160e14"
20SRCREV_machine_qemumips64 ?= "c910c6d8338ab7291f066edc06de83de5b645d8f" 20SRCREV_machine_qemumips64 ?= "c910c6d8338ab7291f066edc06de83de5b645d8f"
21SRCREV_machine ?= "7534aeb01883b48cc42eb4900d0a8c64e8160e14" 21SRCREV_machine ?= "7534aeb01883b48cc42eb4900d0a8c64e8160e14"
22SRCREV_meta ?= "94fa1d7e980c97fcd59b37daedcd863bd6daaee4" 22SRCREV_meta ?= "b55cfc0308bf7158843db4b8f69f866487a0919e"
23 23
24SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.14.git;bareclone=1;branch=${KBRANCH},${KMETA};name=machine,meta" 24SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.14.git;branch=${KBRANCH};name=machine; \
25 git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-3.14;destsuffix=${KMETA}"
25 26
26LINUX_VERSION ?= "3.14.36" 27LINUX_VERSION ?= "3.14.36"
27 28
28PV = "${LINUX_VERSION}+git${SRCPV}" 29PV = "${LINUX_VERSION}+git${SRCPV}"
29 30
30KMETA = "meta" 31KMETA = "kernel-meta"
31KCONF_BSP_AUDIT_LEVEL = "2" 32KCONF_BSP_AUDIT_LEVEL = "2"
32 33
33COMPATIBLE_MACHINE = "qemuarm|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64" 34COMPATIBLE_MACHINE = "qemuarm|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64"
diff --git a/meta/recipes-kernel/linux/linux-yocto_3.19.bb b/meta/recipes-kernel/linux/linux-yocto_3.19.bb
index cab06266f9..364f1f60dd 100644
--- a/meta/recipes-kernel/linux/linux-yocto_3.19.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_3.19.bb
@@ -19,15 +19,16 @@ SRCREV_machine_qemux86 ?= "e152349de59b43b2a75f2c332b44171df461d5a0"
19SRCREV_machine_qemux86-64 ?= "e152349de59b43b2a75f2c332b44171df461d5a0" 19SRCREV_machine_qemux86-64 ?= "e152349de59b43b2a75f2c332b44171df461d5a0"
20SRCREV_machine_qemumips64 ?= "3eb70cea3532e22ab1b6da9864446621229e6616" 20SRCREV_machine_qemumips64 ?= "3eb70cea3532e22ab1b6da9864446621229e6616"
21SRCREV_machine ?= "e152349de59b43b2a75f2c332b44171df461d5a0" 21SRCREV_machine ?= "e152349de59b43b2a75f2c332b44171df461d5a0"
22SRCREV_meta ?= "a70b2eb273ef6349d344920474a494697474b98e" 22SRCREV_meta ?= "361c186effc0b0038dfbfd3fe71ecf3df5edb43d"
23 23
24SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.19.git;bareclone=1;branch=${KBRANCH},${KMETA};name=machine,meta" 24SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.19.git;name=machine;branch=${KBRANCH}; \
25 git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-3.19;destsuffix=${KMETA}"
25 26
26LINUX_VERSION ?= "3.19.5" 27LINUX_VERSION ?= "3.19.5"
27 28
28PV = "${LINUX_VERSION}+git${SRCPV}" 29PV = "${LINUX_VERSION}+git${SRCPV}"
29 30
30KMETA = "meta" 31KMETA = "kernel-meta"
31KCONF_BSP_AUDIT_LEVEL = "2" 32KCONF_BSP_AUDIT_LEVEL = "2"
32 33
33COMPATIBLE_MACHINE = "qemuarm|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64" 34COMPATIBLE_MACHINE = "qemuarm|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64"