linux-yocto: consolidated pull request
cover linux-yocto: consolidated pull request
Richard/Saul,
This pull request contains three changes on top of the previously sent changes that are still pending:
linux-yocto: enable arch ARM config settings for KARCH based boards
linux-yocto-stable: add atom-pc preempt_rt support
linux-yocto: add systemtap config to -stable and -dev kernels
But I wanted to send these anyway, since them sitting on my disk here isn't helping anyone.
The first commit:
linux-yocto: update validate_branches to detected invalid commit IDs
Addresses a problem that Richard ran into when invalid commit IDs are used for SRCREVs. I tested this while fixing the ARM boot issues.
The second commit:
linux-yocto: streamline new BSP creation
Is self explanitory, as is the commit message. With this change you can throw a previously unknown machine at the yocto kernel and have a resonable first effort at booting the board and creating an environment for development.
And finally:
linux-yocto: beagleboard enablement
Enables the beagleboard for 2.6.37. The patch itself has the details.
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: beagleboard enablement
linux-yocto: streamline new BSP creation
linux-yocto: update validate_branches to detected invalid commit IDs
meta/classes/kernel-yocto.bbclass | 37 ++++++++++++++++++++--------------- meta/conf/machine/beagleboard.conf | 6 ++-- 2 files changed, 24 insertions(+), 19 deletions(-)
PATCH 1/3 linux-yocto: beagleboard enablement
Enable beagleboard support for 2.6.37. The only non-kernel related change for the board is to update the serial console designation.
The Beagleboard use omap serial driver, so we replace ttyS2 with ttyO2. This is described in following link:
http://www.mail-archive.com/[email protected]/msg40838.html
--- meta/conf/machine/beagleboard.conf | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
meta/conf/machine/beagleboard.conf +3 -3
@@ -19,10 +19,10 @@ IMAGE_FSTYPES += "tar.bz2 jffs2" EXTRA_IMAGECMD_jffs2 = "-lnp " # Guesswork -SERIAL_CONSOLE = "115200 ttyS2" +SERIAL_CONSOLE = "115200 ttyO2" -PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-stable" -#PREFERRED_PROVIDER_linux-libc-headers ?= "linux-libc-headers-yocto" +PREFERRED_PROVIDER_virtual/kernel = "linux-yocto" +PREFERRED_PROVIDER_linux-libc-headers ?= "linux-libc-headers-yocto" KERNEL_IMAGETYPE = "uImage"
Signature · 1 line
1.7.0.4
PATCH 2/3 linux-yocto: streamline new BSP creation
In reply to Bruce AshfieldBy setting BOOTSTRAP to the branch that should be used for a currently undefined BSP a build can be completed and an environment for streamlining the BSP created.
With the appropriate machine.conf, and a defconfig any MACHINE can be built against and inherit the configuration of the standard yocto kernel.
--- meta/classes/kernel-yocto.bbclass | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-)
meta/classes/kernel-yocto.bbclass +8 -3
@@ -24,7 +24,7 @@ python __anonymous () { bb.data.setVar("KMACHINE", "${MACHINE}", d) # track the global configuration on a bootstrapped BSP bb.data.setVar("SRCREV_machine", "${SRCREV_meta}", d) - bb.data.setVar("BOOTSTRAP", "t", d) + bb.data.setVar("BOOTSTRAP", bb.data.expand("${MACHINE}",d) + "-standard", d) else: # The branch for a build is: # yocto/<kernel type>/${KMACHINE} or
@@ -44,10 +44,10 @@ python __anonymous () { bb.data.setVar('KMACHINE_' + bb.data.expand("${MACHINE}",d), kmachine, d) if mach == "UNDEFINED": - bb.data.setVar("KBRANCH", "yocto/standard/base", d) bb.data.setVar('KMACHINE_' + bb.data.expand("${MACHINE}",d), bb.data.expand("${MACHINE}",d), d) + bb.data.setVar("KBRANCH", "yocto/standard/base", d) bb.data.setVar("SRCREV_machine", "standard", d) - bb.data.setVar("BOOTSTRAP", "t", d) + bb.data.setVar("BOOTSTRAP", "yocto/standard/" + bb.data.expand("${MACHINE}",d), d) } do_patch() {
@@ -57,6 +57,11 @@ do_patch() { fi kbranch=${KBRANCH} + if [ -n "${BOOTSTRAP}" ]; then + # switch from a generic to a specific branch + kbranch=${BOOTSTRAP} + fi + # simply ensures that a branch of the right name has been created createme ${ARCH} ${kbranch} ${defconfig}
Signature · 1 line
1.7.0.4
PATCH 3/3 linux-yocto: update validate_branches to detected invalid commit IDs
In reply to Bruce AshfieldThe previous implementation of invalid commit ID checks would error early when a bad object was detected. Rather than changing to set +e for the entire routine, we'll capture the output and do an explicit check for a bad object and throw a useful error message when it is detected.
--- meta/classes/kernel-yocto.bbclass | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-)
meta/classes/kernel-yocto.bbclass +13 -13
@@ -161,30 +161,30 @@ do_validate_branches() { current=`git branch |grep \*|sed 's/^\* //'` if [ -n "$target_branch_head" ] && [ "$branch_head" != "$target_branch_head" ]; then if [ -n "${KERNEL_REVISION_CHECKING}" ]; then - git show ${target_branch_head} > /dev/null 2>&1 - if [ $? -eq 0 ]; then - echo "Forcing branch $current to ${target_branch_head}" - git branch -m $current $current-orig - git checkout -b $current ${target_branch_head} - else + ref=`git show ${target_meta_head} 2>&1 | head -n1 || true` + if [ "$ref" = "fatal: bad object ${target_meta_head}" ]; then echo "ERROR ${target_branch_head} is not a valid commit ID." echo "The kernel source tree may be out of sync" exit 1 - fi + else + echo "Forcing branch $current to ${target_branch_head}" + git branch -m $current $current-orig + git checkout -b $current ${target_branch_head} + fi fi fi if [ "$meta_head" != "$target_meta_head" ]; then if [ -n "${KERNEL_REVISION_CHECKING}" ]; then - git show ${target_meta_head} > /dev/null 2>&1 - if [ $? -eq 0 ]; then - echo "Forcing branch meta to ${target_meta_head}" - git branch -m ${KMETA} ${KMETA}-orig - git checkout -b ${KMETA} ${target_meta_head} - else + ref=`git show ${target_meta_head} 2>&1 | head -n1 || true` + if [ "$ref" = "fatal: bad object ${target_meta_head}" ]; then echo "ERROR ${target_meta_head} is not a valid commit ID" echo "The kernel source tree may be out of sync" exit 1 + else + echo "Forcing branch meta to ${target_meta_head}" + git branch -m ${KMETA} ${KMETA}-orig + git checkout -b ${KMETA} ${target_meta_head} fi fi fi
Signature · 1 line
1.7.0.4