diff options
author | Bruce Ashfield <bruce.ashfield@windriver.com> | 2011-04-03 23:50:19 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-05-05 12:26:47 +0100 |
commit | 1fc39646575e423a32c5594fe26dd5980b28ebff (patch) | |
tree | a5da750add5046adf3cf944fc49f2526f770d68b | |
parent | f20edfe129ae69420f22c857d4100891282932a8 (diff) | |
download | poky-1fc39646575e423a32c5594fe26dd5980b28ebff.tar.gz |
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.
(From OE-Core rev: 32c56cd6a5756f21d19d8a32239b783a7854aed3)
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/kernel-yocto.bbclass | 27 | ||||
-rw-r--r-- | meta/recipes-kernel/kern-tools/kern-tools-native_git.bb | 2 |
2 files changed, 22 insertions, 7 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass index fc9f3a76c0..78a13099ee 100644 --- a/meta/classes/kernel-yocto.bbclass +++ b/meta/classes/kernel-yocto.bbclass | |||
@@ -66,8 +66,15 @@ IFS=' | |||
66 | fi | 66 | fi |
67 | cd ${S} | 67 | cd ${S} |
68 | 68 | ||
69 | # checkout and clobber and unimportant files | 69 | set +e |
70 | git checkout -f ${KBRANCH} | 70 | git show-ref --quiet --verify -- "refs/heads/${KBRANCH}" |
71 | if [ $? -eq 0 ]; then | ||
72 | # checkout and clobber and unimportant files | ||
73 | git checkout -f ${KBRANCH} | ||
74 | else | ||
75 | echo "Not checking out ${KBRANCH}, it will be created later" | ||
76 | git checkout -f master | ||
77 | fi | ||
71 | } | 78 | } |
72 | do_kernel_checkout[dirs] = "${S}" | 79 | do_kernel_checkout[dirs] = "${S}" |
73 | 80 | ||
@@ -105,21 +112,29 @@ python do_kernel_configcheck() { | |||
105 | bb.plain( "%s" % result ) | 112 | bb.plain( "%s" % result ) |
106 | } | 113 | } |
107 | 114 | ||
115 | # overrides the base kernel_do_configure, since we don't want all the | ||
116 | # defconfig processing in there | ||
117 | kernel_do_configure() { | ||
118 | yes '' | oe_runmake oldconfig | ||
119 | } | ||
120 | |||
121 | |||
108 | # Ensure that the branches (BSP and meta) are on the locatios specified by | 122 | # Ensure that the branches (BSP and meta) are on the locatios specified by |
109 | # their SRCREV values. If they are NOT on the right commits, the branches | 123 | # their SRCREV values. If they are NOT on the right commits, the branches |
110 | # are reset to the correct commit. | 124 | # are reset to the correct commit. |
111 | do_validate_branches() { | 125 | do_validate_branches() { |
112 | cd ${S} | 126 | cd ${S} |
113 | branch_head=`git show-ref -s --heads ${KBRANCH}` | ||
114 | meta_head=`git show-ref -s --heads ${KMETA}` | ||
115 | target_branch_head="${SRCREV_machine}" | ||
116 | target_meta_head="${SRCREV_meta}" | ||
117 | 127 | ||
118 | # nothing to do if bootstrapping | 128 | # nothing to do if bootstrapping |
119 | if [ -n "${YOCTO_KERNEL_EXTERNAL_BRANCH}" ]; then | 129 | if [ -n "${YOCTO_KERNEL_EXTERNAL_BRANCH}" ]; then |
120 | return | 130 | return |
121 | fi | 131 | fi |
122 | 132 | ||
133 | branch_head=`git show-ref -s --heads ${KBRANCH}` | ||
134 | meta_head=`git show-ref -s --heads ${KMETA}` | ||
135 | target_branch_head="${SRCREV_machine}" | ||
136 | target_meta_head="${SRCREV_meta}" | ||
137 | |||
123 | current=`git branch |grep \*|sed 's/^\* //'` | 138 | current=`git branch |grep \*|sed 's/^\* //'` |
124 | if [ -n "$target_branch_head" ] && [ "$branch_head" != "$target_branch_head" ]; then | 139 | if [ -n "$target_branch_head" ] && [ "$branch_head" != "$target_branch_head" ]; then |
125 | if [ -n "${KERNEL_REVISION_CHECKING}" ]; then | 140 | if [ -n "${KERNEL_REVISION_CHECKING}" ]; then |
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 00cc666018..cc711790a1 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=e2bf4415f3d8 | |||
4 | 4 | ||
5 | DEPENDS = "git-native guilt-native" | 5 | DEPENDS = "git-native guilt-native" |
6 | 6 | ||
7 | SRCREV = "8f61abb6344e78677450994e8930cabc86102d78" | 7 | SRCREV = "92b965b02e3ac32badde3ee71a1e7d3a85cedeb8" |
8 | PR = r10 | 8 | PR = r10 |
9 | PV = "0.1+git${SRCPV}" | 9 | PV = "0.1+git${SRCPV}" |
10 | 10 | ||