linux-yocto: custom repo fixes
cover linux-yocto: custom repo fixes
Richard/Saul,
I worked through some custom repository issues over the past day, and the outcome is two small patches to fix some corner cases. I've tested these with the standard linux-yocto recipes, with my base linux-yocto-custom, eternalsrc and the repositories that were showing the error.
(patches are stacked on my yocto base, but that history has no impact).
Cheers,
Bruce
The following changes since commit 19ff55a53b436d463f9577adaed15be77708f0d2:
routerstationpro: move board off 3.0 and onto the 3.4 kernel (2012-08-22 14:26:10 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib zedd/kernel
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=zedd/kernel
Bruce Ashfield (2):
kernel-yocto: don't require meta branch for custom repos
kernel-yocto: set master branch to a defined SRCREV
meta/classes/kernel-yocto.bbclass | 17 +++++++++++------ .../kern-tools/kern-tools-native_git.bb | 2 +- 2 files changed, 12 insertions(+), 7 deletions(-)
Signature · 1 line
1.7.5.4
PATCH 1/2 kernel-yocto: don't require meta branch for custom repos
The commit a9f11849 [linux-yocto: explicitly export KMETA to scripts] allows the meta branch name to be changed by exporting it to all phases of the build.
But if a custom kernel without a meta branch is built, we end up passing an empty string to the creation scripts, which breaks the build since input is expected.
Inhibiting the export of KMETA to the creation scripts when empty fixes the problem.
--- meta/classes/kernel-yocto.bbclass | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
meta/classes/kernel-yocto.bbclass +3 -2
@@ -61,9 +61,10 @@ do_patch() { # if we have a defined/set meta branch we should not be generating # any meta data. The passed branch has what we need. if [ -n "${KMETA}" ]; then - createme_flags="--disable-meta-gen" + createme_flags="--disable-meta-gen --meta ${KMETA}" fi - createme ${createme_flags} --meta ${KMETA} ${ARCH} ${kbranch} + + createme ${createme_flags} ${ARCH} ${kbranch} if [ $? -ne 0 ]; then echo "ERROR. Could not create ${kbranch}" exit 1
Signature · 1 line
1.7.5.4
PATCH 2/2 kernel-yocto: set master branch to a defined SRCREV
In reply to Bruce AshfieldTo support custom repositories that set a SRCREV and that only have a single master branch, do_validate_branches needs a special case for 'master'. We can't delete and recreate the branch, since you cannot delete the current branch, instead we must reset the branch to the proper SRCREV.
--- meta/classes/kernel-yocto.bbclass | 12 ++++++++---- .../kern-tools/kern-tools-native_git.bb | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-)
meta/classes/kernel-yocto.bbclass +8 -4
@@ -274,11 +274,15 @@ do_validate_branches() { # SRCREV (if it isn't the current HEAD of that branch) git checkout -q master for b in $containing_branches; do - branch_head=`git show-ref -s --heads ${b}` + branch_head=`git show-ref -s --heads ${b}` if [ "$branch_head" != "$target_branch_head" ]; then - echo "[INFO] Setting branch $b to ${target_branch_head}" - git branch -D $b > /dev/null - git branch $b $target_branch_head > /dev/null + echo "[INFO] Setting branch $b to ${target_branch_head}" + if [ "$b" == "master" ]; then + git reset --hard $target_branch_head > /dev/null + else + git branch -D $b > /dev/null + git branch $b $target_branch_head > /dev/null + fi fi done
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=d8d1d729a70c DEPENDS = "git-native guilt-native" -SRCREV = "33068f21169b327c64ac7e957fe9d89c391897a3" +SRCREV = "7d936da57db11f1114f3860e4fcc15221e796275" PR = "r12" PV = "0.1+git${SRCPV}"
Signature · 1 line
1.7.5.4
Saul Wold
AppliedQuoted 21 lines · Bruce Ashfield
Richard/Saul,
I worked through some custom repository issues over the past day, and the outcome is two small patches to fix some corner cases. I've tested these with the standard linux-yocto recipes, with my base linux-yocto-custom, eternalsrc and the repositories that were showing the error.
(patches are stacked on my yocto base, but that history has no impact).
Cheers,
Bruce
The following changes since commit
19ff55a53b436d463f9577adaed15be77708f0d2:routerstationpro: move board off 3.0 and onto the 3.4 kernel (2012-08-22 14:26:10 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contribzedd/kernel
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=zedd/kernel
Quoted 8 lines
Bruce Ashfield (2):
kernel-yocto: don't require meta branch for custom repos
kernel-yocto: set master branch to a defined SRCREVmeta/classes/kernel-yocto.bbclass | 17 +++++++++++------ .../kern-tools/kern-tools-native_git.bb | 2 +- 2 files changed, 12 insertions(+), 7 deletions(-)
Merged into OE-Core
Thanks
Sau!