summaryrefslogtreecommitdiffstats
path: root/meta/classes/kernel-yocto.bbclass
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/kernel-yocto.bbclass
parentf20edfe129ae69420f22c857d4100891282932a8 (diff)
downloadpoky-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/kernel-yocto.bbclass')
-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 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}
72do_kernel_checkout[dirs] = "${S}" 79do_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
117kernel_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.
111do_validate_branches() { 125do_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