summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@windriver.com>2011-04-03 23:50:19 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-05-05 12:26:47 +0100
commit1fc39646575e423a32c5594fe26dd5980b28ebff (patch)
treea5da750add5046adf3cf944fc49f2526f770d68b /meta/classes
parentf20edfe129ae69420f22c857d4100891282932a8 (diff)
downloadast2050-yocto-poky-1fc39646575e423a32c5594fe26dd5980b28ebff.zip
ast2050-yocto-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>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/kernel-yocto.bbclass27
1 files changed, 21 insertions, 6 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index fc9f3a7..78a1309 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -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
OpenPOWER on IntegriCloud