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.bbclass55
1 files changed, 40 insertions, 15 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index ec5fb7b1de..2abbc2ff66 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -105,6 +105,8 @@ do_kernel_metadata() {
105 cd ${S} 105 cd ${S}
106 export KMETA=${KMETA} 106 export KMETA=${KMETA}
107 107
108 bbnote "do_kernel_metadata: for summary/debug, set KCONF_AUDIT_LEVEL > 0"
109
108 # if kernel tools are available in-tree, they are preferred 110 # if kernel tools are available in-tree, they are preferred
109 # and are placed on the path before any external tools. Unless 111 # and are placed on the path before any external tools. Unless
110 # the external tools flag is set, in that case we do nothing. 112 # the external tools flag is set, in that case we do nothing.
@@ -192,7 +194,7 @@ do_kernel_metadata() {
192 # SRC_URI. If they were supplied, we convert them into include directives 194 # SRC_URI. If they were supplied, we convert them into include directives
193 # for the update part of the process 195 # for the update part of the process
194 for f in ${feat_dirs}; do 196 for f in ${feat_dirs}; do
195 if [ -d "${WORKDIR}/$f/meta" ]; then 197 if [ -d "${WORKDIR}/$f/kernel-meta" ]; then
196 includes="$includes -I${WORKDIR}/$f/kernel-meta" 198 includes="$includes -I${WORKDIR}/$f/kernel-meta"
197 elif [ -d "${WORKDIR}/../oe-local-files/$f" ]; then 199 elif [ -d "${WORKDIR}/../oe-local-files/$f" ]; then
198 includes="$includes -I${WORKDIR}/../oe-local-files/$f" 200 includes="$includes -I${WORKDIR}/../oe-local-files/$f"
@@ -252,6 +254,23 @@ do_kernel_metadata() {
252 bbfatal_log "Could not generate configuration queue for ${KMACHINE}." 254 bbfatal_log "Could not generate configuration queue for ${KMACHINE}."
253 fi 255 fi
254 fi 256 fi
257
258 if [ ${KCONF_AUDIT_LEVEL} -gt 0 ]; then
259 bbnote "kernel meta data summary for ${KMACHINE} (${LINUX_KERNEL_TYPE}):"
260 bbnote "======================================================================"
261 if [ -n "${KMETA_EXTERNAL_BSPS}" ]; then
262 bbnote "Non kernel-cache (external) bsp"
263 fi
264 bbnote "BSP entry point / definition: $bsp_definition"
265 if [ -n "$in_tree_defconfig" ]; then
266 bbnote "KBUILD_DEFCONFIG: ${KBUILD_DEFCONFIG}"
267 fi
268 bbnote "Fragments from SRC_URI: $sccs_from_src_uri"
269 bbnote "KERNEL_FEATURES: $KERNEL_FEATURES_FINAL"
270 bbnote "Final scc/cfg list: $sccs_defconfig $bsp_definition $sccs $KERNEL_FEATURES_FINAL"
271 fi
272
273 set -e
255} 274}
256 275
257do_patch() { 276do_patch() {
@@ -281,6 +300,8 @@ do_patch() {
281 fi 300 fi
282 done 301 done
283 fi 302 fi
303
304 set -e
284} 305}
285 306
286do_kernel_checkout() { 307do_kernel_checkout() {
@@ -303,6 +324,21 @@ do_kernel_checkout() {
303 fi 324 fi
304 fi 325 fi
305 cd ${S} 326 cd ${S}
327
328 # convert any remote branches to local tracking ones
329 for i in `git branch -a --no-color | grep remotes | grep -v HEAD`; do
330 b=`echo $i | cut -d' ' -f2 | sed 's%remotes/origin/%%'`;
331 git show-ref --quiet --verify -- "refs/heads/$b"
332 if [ $? -ne 0 ]; then
333 git branch $b $i > /dev/null
334 fi
335 done
336
337 # Create a working tree copy of the kernel by checking out a branch
338 machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}"
339
340 # checkout and clobber any unimportant files
341 git checkout -f ${machine_branch}
306 else 342 else
307 # case: we have no git repository at all. 343 # case: we have no git repository at all.
308 # To support low bandwidth options for building the kernel, we'll just 344 # To support low bandwidth options for building the kernel, we'll just
@@ -325,20 +361,7 @@ do_kernel_checkout() {
325 git clean -d -f 361 git clean -d -f
326 fi 362 fi
327 363
328 # convert any remote branches to local tracking ones 364 set -e
329 for i in `git branch -a --no-color | grep remotes | grep -v HEAD`; do
330 b=`echo $i | cut -d' ' -f2 | sed 's%remotes/origin/%%'`;
331 git show-ref --quiet --verify -- "refs/heads/$b"
332 if [ $? -ne 0 ]; then
333 git branch $b $i > /dev/null
334 fi
335 done
336
337 # Create a working tree copy of the kernel by checking out a branch
338 machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}"
339
340 # checkout and clobber any unimportant files
341 git checkout -f ${machine_branch}
342} 365}
343do_kernel_checkout[dirs] = "${S}" 366do_kernel_checkout[dirs] = "${S}"
344 367
@@ -506,6 +529,8 @@ do_validate_branches() {
506 kgit-s2q --clean 529 kgit-s2q --clean
507 fi 530 fi
508 fi 531 fi
532
533 set -e
509} 534}
510 535
511OE_TERMINAL_EXPORTS += "KBUILD_OUTPUT" 536OE_TERMINAL_EXPORTS += "KBUILD_OUTPUT"