Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/2] linux-yocto: custom repo fixes
@ 2012-08-23  4:08 Bruce Ashfield
  2012-08-23  4:08 ` [PATCH 1/2] kernel-yocto: don't require meta branch for custom repos Bruce Ashfield
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Bruce Ashfield @ 2012-08-23  4:08 UTC (permalink / raw)
  To: richard.purdie; +Cc: openembedded-core, saul.wold

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(-)

-- 
1.7.5.4




^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] kernel-yocto: don't require meta branch for custom repos
  2012-08-23  4:08 [PATCH 0/2] linux-yocto: custom repo fixes Bruce Ashfield
@ 2012-08-23  4:08 ` Bruce Ashfield
  2012-08-23  4:08 ` [PATCH 2/2] kernel-yocto: set master branch to a defined SRCREV Bruce Ashfield
  2012-08-27 15:42 ` [PATCH 0/2] linux-yocto: custom repo fixes Saul Wold
  2 siblings, 0 replies; 4+ messages in thread
From: Bruce Ashfield @ 2012-08-23  4:08 UTC (permalink / raw)
  To: richard.purdie; +Cc: openembedded-core, saul.wold

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.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
 meta/classes/kernel-yocto.bbclass |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index 1b37dc7..bb0915c 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -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
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] kernel-yocto: set master branch to a defined SRCREV
  2012-08-23  4:08 [PATCH 0/2] linux-yocto: custom repo fixes Bruce Ashfield
  2012-08-23  4:08 ` [PATCH 1/2] kernel-yocto: don't require meta branch for custom repos Bruce Ashfield
@ 2012-08-23  4:08 ` Bruce Ashfield
  2012-08-27 15:42 ` [PATCH 0/2] linux-yocto: custom repo fixes Saul Wold
  2 siblings, 0 replies; 4+ messages in thread
From: Bruce Ashfield @ 2012-08-23  4:08 UTC (permalink / raw)
  To: richard.purdie; +Cc: openembedded-core, saul.wold

To 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.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
 meta/classes/kernel-yocto.bbclass                  |   12 ++++++++----
 .../kern-tools/kern-tools-native_git.bb            |    2 +-
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index bb0915c..3dcc8b5 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -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
 
diff --git a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
index 974b86e..0ff8b19 100644
--- a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
+++ b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb
@@ -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}"
 
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] linux-yocto: custom repo fixes
  2012-08-23  4:08 [PATCH 0/2] linux-yocto: custom repo fixes Bruce Ashfield
  2012-08-23  4:08 ` [PATCH 1/2] kernel-yocto: don't require meta branch for custom repos Bruce Ashfield
  2012-08-23  4:08 ` [PATCH 2/2] kernel-yocto: set master branch to a defined SRCREV Bruce Ashfield
@ 2012-08-27 15:42 ` Saul Wold
  2 siblings, 0 replies; 4+ messages in thread
From: Saul Wold @ 2012-08-27 15:42 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: openembedded-core

On 08/22/2012 09:08 PM, Bruce Ashfield wrote:
> 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(-)
>

Merged into OE-Core

Thanks
	Sau!




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-08-27 15:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-23  4:08 [PATCH 0/2] linux-yocto: custom repo fixes Bruce Ashfield
2012-08-23  4:08 ` [PATCH 1/2] kernel-yocto: don't require meta branch for custom repos Bruce Ashfield
2012-08-23  4:08 ` [PATCH 2/2] kernel-yocto: set master branch to a defined SRCREV Bruce Ashfield
2012-08-27 15:42 ` [PATCH 0/2] linux-yocto: custom repo fixes Saul Wold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox