linux-yocto: consolidated pull request
cover linux-yocto: consolidated pull request
Richard/Saul,
I've been running with these changes since before ELC, so they've had some good soak time. The first two changes lay the ground for for some 1.1 functionality and are used by recipes in the meta-kernel-dev layer. The changes are transparent to existing recipes.
In particular they are related to auto creating meta data for kernel repository builds. They are enough for basic korg/defconfig builds and limited other repository building. More changes will complete this work shortly.
The last patch just updates the SRCREVs to pickup Khem's backported perf tool / gcc 4.6.0 patch.
There are about 8 more pending patches that deal with some recipe renames, cleanup and more 1.1 functionality but I wanted to get this first set of 3 out before rebasing the rest.
Sorry about the big cross post, but these changes span quite a few different interest groups.
Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: zedd/kernel
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=zedd/kernel
Thanks,
Bruce Ashfield <[email protected]>
---
Bruce Ashfield (3):
linux-yocto: apply meta data to external repos
linux-yocto: safely process unbranched repositories
linux-yocto: update SRCREVs
meta/classes/kernel-yocto.bbclass | 34 +++++++++++++++----- .../kern-tools/kern-tools-native_git.bb | 2 +- meta/recipes-kernel/linux/linux-yocto_git.bb | 24 +++++++------- 3 files changed, 39 insertions(+), 21 deletions(-)
PATCH 1/3 linux-yocto: apply meta data to external repos
To support quick uprev and testing, it is desireable to build repositories that do not have embedded meta data. In this scenario the meta data can be automatically created or provided externally. This commit supports the first situation by detecting the lack of meta data and then automatically creating a base set of meta files.
--- meta/classes/kernel-yocto.bbclass | 27 +++++++++++++++---- .../kern-tools/kern-tools-native_git.bb | 2 +- 2 files changed, 22 insertions(+), 7 deletions(-)
meta/classes/kernel-yocto.bbclass +21 -6
@@ -66,8 +66,15 @@ IFS=' fi cd ${S} - # checkout and clobber and unimportant files - git checkout -f ${KBRANCH} + set +e + git show-ref --quiet --verify -- "refs/heads/${KBRANCH}" + if [ $? -eq 0 ]; then + # checkout and clobber and unimportant files + git checkout -f ${KBRANCH} + else + echo "Not checking out ${KBRANCH}, it will be created later" + git checkout -f master + fi } do_kernel_checkout[dirs] = "${S}"
@@ -105,21 +112,29 @@ python do_kernel_configcheck() { bb.plain( "%s" % result ) } +# overrides the base kernel_do_configure, since we don't want all the +# defconfig processing in there +kernel_do_configure() { + yes '' | oe_runmake oldconfig +} + + # Ensure that the branches (BSP and meta) are on the locatios specified by # their SRCREV values. If they are NOT on the right commits, the branches # are reset to the correct commit. do_validate_branches() { cd ${S} - branch_head=`git show-ref -s --heads ${KBRANCH}` - meta_head=`git show-ref -s --heads ${KMETA}` - target_branch_head="${SRCREV_machine}" - target_meta_head="${SRCREV_meta}" # nothing to do if bootstrapping if [ -n "${YOCTO_KERNEL_EXTERNAL_BRANCH}" ]; then return fi + branch_head=`git show-ref -s --heads ${KBRANCH}` + meta_head=`git show-ref -s --heads ${KMETA}` + target_branch_head="${SRCREV_machine}" + target_meta_head="${SRCREV_meta}" + current=`git branch |grep \*|sed 's/^\* //'` if [ -n "$target_branch_head" ] && [ "$branch_head" != "$target_branch_head" ]; then if [ -n "${KERNEL_REVISION_CHECKING}" ]; then
meta/recipes-kernel/kern-tools/kern-tools-native_git.bb +1 -1
@@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://git/tools/kgit;beginline=5;endline=9;md5=e2bf4415f3d8 DEPENDS = "git-native guilt-native" -SRCREV = "8f61abb6344e78677450994e8930cabc86102d78" +SRCREV = "92b965b02e3ac32badde3ee71a1e7d3a85cedeb8" PR = r10 PV = "0.1+git${SRCPV}"
Signature · 1 line
1.7.0.4
PATCH 2/3 linux-yocto: safely process unbranched repositories
In reply to Bruce AshfieldThe BSP bootstrap and -dev use cases can be applied against unbranched or repos without meta data. To allow the proper and safe processing of those repositories, slight modifications to the tools are required to pass the branch on the command line (rather than detecting it always) and to only checkout branches that exist.
--- meta/classes/kernel-yocto.bbclass | 7 +++++-- .../kern-tools/kern-tools-native_git.bb | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-)
meta/classes/kernel-yocto.bbclass +5 -2
@@ -25,7 +25,7 @@ do_patch() { addon_features="$addon_features --feature $feat" done fi - updateme ${addon_features} ${ARCH} ${MACHINE} ${WORKDIR} + updateme --branch ${kbranch} ${addon_features} ${ARCH} ${MACHINE} ${WORKDIR} if [ $? -ne 0 ]; then echo "ERROR. Could not update ${kbranch}" exit 1
@@ -87,9 +87,12 @@ do_kernel_configme() { if [ -n "${YOCTO_KERNEL_EXTERNAL_BRANCH}" ]; then # switch from a generic to a specific branch kbranch=${YOCTO_KERNEL_EXTERNAL_BRANCH} + cd ${S} + git checkout ${kbranch} + else + cd ${S} fi - cd ${S} configme --reconfig --output ${B} ${kbranch} ${MACHINE} if [ $? -ne 0 ]; then echo "ERROR. Could not configure ${KMACHINE}-${LINUX_KERNEL_TYPE}"
meta/recipes-kernel/kern-tools/kern-tools-native_git.bb +1 -1
@@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://git/tools/kgit;beginline=5;endline=9;md5=e2bf4415f3d8 DEPENDS = "git-native guilt-native" -SRCREV = "92b965b02e3ac32badde3ee71a1e7d3a85cedeb8" +SRCREV = "c5896a60acc61f8966cfee3bb241ff564610cea4" PR = r10 PV = "0.1+git${SRCPV}"
Signature · 1 line
1.7.0.4
PATCH 3/3 linux-yocto: update SRCREVs
In reply to Bruce AshfieldUpdating the linux-yocto/2.6.37 SRCREVs to pickup:
perf tool: Fix gcc 4.6.0 issues
1/1 [
Author: Kyle McMartin
Email: [email protected]
Subject: perf tool: Fix gcc 4.6.0 issues
Date: Thu, 5 May 2011 00:06:01 -0400
commit fb7d0b3cefb80a105f7fd26bbc62e0cbf9192822 upstream.
GCC 4.6.0 in Fedora rawhide turned up some compile errors in tools/perf due to the -Werror=unused-but-set-variable flag.
I've gone through and annotated some of the assignments that had side effects (ie: return value from a function) with the __used annotation, and in some cases, just removed unused code.
In a few cases, we were assigning something useful, but not using it in later parts of the function.
kyle@dreadnought:~/src% gcc --version
gcc (GCC) 4.6.0 20110122 (Red Hat 4.6.0-0.3)
Cc: Ingo Molnar <[email protected]>
LKML-Reference: <[email protected]>
]
--- meta/recipes-kernel/linux/linux-yocto_git.bb | 24 ++++++++++++------------ 1 files changed, 12 insertions(+), 12 deletions(-)
meta/recipes-kernel/linux/linux-yocto_git.bb +12 -12
@@ -18,20 +18,20 @@ KMETA = meta LINUX_VERSION ?= "2.6.37" LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}" -SRCREV_machine_qemuarm = "e5ca41def834db9d18b28393a45d53a8d18f3d05" -SRCREV_machine_qemumips = "9bbc8e3432406429923fab0de038af5d3e647901" -SRCREV_machine_qemuppc = "f0ff494e62bfaa921e844c1ec7fe6cf4a977980a" -SRCREV_machine_qemux86 = "cb0537a40dadea20f12bc10e0986fd2a70290b42" -SRCREV_machine_qemux86-64 = "69cfbdf9f1ff461a75e5b77d6d7ba35e97db4cc3" -SRCREV_machine_emenlow = "2215a346eb4f9e09053d00bdf61ed999ff80e029" -SRCREV_machine_atom-pc = "69cfbdf9f1ff461a75e5b77d6d7ba35e97db4cc3" -SRCREV_machine_routerstationpro = "8db69980d76e1f863af409e70175963f23de83ab" -SRCREV_machine_mpc8315e-rdb = "6861d8a4d58f8aa75997f7678cc454791544507a" -SRCREV_machine_beagleboard = "69cfbdf9f1ff461a75e5b77d6d7ba35e97db4cc3" -SRCREV_machine = "69cfbdf9f1ff461a75e5b77d6d7ba35e97db4cc3" +SRCREV_machine_qemuarm = "b0375c21e29453458f9aa9986dc3f1ec69bf1aef" +SRCREV_machine_qemumips = "f5d26f2eda2be8b942172cda8f27de33ebf38ec3" +SRCREV_machine_qemuppc = "7eb6c68d977d9039a2b5a734172b064a9d19cdc1" +SRCREV_machine_qemux86 = "ad62d1aab734513cd96c8f4517f816420a218e77" +SRCREV_machine_qemux86-64 = "b906f358fd404a1e74a961f25079274e0d933ee1" +SRCREV_machine_emenlow = "c3bbcb676f929c4fc0511a6e66494b8770d015a1" +SRCREV_machine_atom-pc = "b906f358fd404a1e74a961f25079274e0d933ee1" +SRCREV_machine_routerstationpro = "95ca94d2e71ca2db6822a37a7f575fa79c3d05d0" +SRCREV_machine_mpc8315e-rdb = "53c800c244e73d81d2832f6da306eeae3b09e5dc" +SRCREV_machine_beagleboard = "b906f358fd404a1e74a961f25079274e0d933ee1" +SRCREV_machine = "b906f358fd404a1e74a961f25079274e0d933ee1" SRCREV_meta = "ecab1e2bc12a8b0c4d064a00acc3260f6e8528c5" -PR = "r16" +PR = "r17" PV = "${LINUX_VERSION}+git${SRCPV}" SRCREV_FORMAT = "meta_machine"
Signature · 1 line
1.7.0.4