summaryrefslogtreecommitdiffstats
path: root/meta/classes/kernel-yocto.bbclass
diff options
context:
space:
mode:
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