Patchwork [CONSOLIDATED,PULL,16/18] linux-yocto: prefer in-tree tools to external ones

login
register
mail settings
Submitter Saul Wold
Date Dec. 2, 2011, 6:55 a.m.
Message ID <e4aed79d07c3df37ac6a8950a490ba9b812b4612.1322808632.git.sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/16059/
State Accepted
Commit ae7b3c518020715dde8b9eabdf30c71430e31712
Headers show

Comments

Saul Wold - Dec. 2, 2011, 6:55 a.m.
From: Bruce Ashfield <bruce.ashfield@windriver.com>

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
 meta/classes/kernel-yocto.bbclass |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

Patch

diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index 04a2f88..ad14aac 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -6,6 +6,15 @@  do_patch() {
 	    defconfig=${WORKDIR}/defconfig
 	fi
 
+	# if kernel tools are available in-tree, they are preferred
+	# and are placed on the path before any external tools. Unless
+	# the external tools flag is set, in that case we do nothing.
+	if [ -f "${S}/scripts/util/configme" ]; then
+		if [ -z "${EXTERNAL_KERNEL_TOOLS}" ]; then
+			PATH=${S}/scripts/util:${PATH}
+		fi
+	fi
+
 	kbranch=${KBRANCH}
 	if [ -n "${YOCTO_KERNEL_EXTERNAL_BRANCH}" ]; then
            # switch from a generic to a specific branch
@@ -100,6 +109,7 @@  do_kernel_configme() {
 	fi
 
 	cd ${S}
+	PATH=${PATH}:${S}/scripts/util
 	configme ${configmeflags} --reconfig --output ${B} ${KBRANCH} ${KMACHINE}
 	if [ $? -ne 0 ]; then
 		echo "ERROR. Could not configure ${KMACHINE}-${LINUX_KERNEL_TYPE}"
@@ -116,7 +126,7 @@  python do_kernel_configcheck() {
     bb.plain("NOTE: validating kernel configuration")
 
     pathprefix = "export PATH=%s; " % d.getVar('PATH', True)
-    cmd = bb.data.expand("cd ${B}/..; kconf_check -config- ${B} ${S} ${B} ${KBRANCH}",d )
+    cmd = bb.data.expand("cd ${B}/..; ${S}/scripts/util/kconf_check -config- ${B} ${S} ${B} ${KBRANCH}",d )
     ret, result = commands.getstatusoutput("%s%s" % (pathprefix, cmd))
 
     bb.plain( "%s" % result )