Patchwork [meta-oe] kernel.bbclass: kernel_do_install fails with 2.6 kernel recipes

login
register
mail settings
Submitter Marco Cavallini
Date Jan. 7, 2013, 1:30 p.m.
Message ID <1357565417-21325-1-git-send-email-koansoftware@gmail.com>
Download mbox | patch
Permalink /patch/42199/
State Not Applicable
Headers show

Comments

Marco Cavallini - Jan. 7, 2013, 1:30 p.m.
From: Marco Cavallini <m.cavallini@koansoftware.com>

 * old 2.6.x kernels don't have $kerneldir/tools directory
 * so we got this error:
 * sed: can't read ...SNIP...linux/2.6.30-r0/image/usr/src/kernel/tools/perf/Makefile: No such file or directory
 * ERROR: Function failed: do_install

Signed-off-by: Marco Cavallini <m.cavallini@koansoftware.com>
---
 meta/classes/kernel.bbclass | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Patch

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index aee8a77..06b23e0 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -204,8 +204,10 @@  kernel_do_install() {
 		rm -f $kerneldir/$entry
 	done
 
-	# Fix SLANG_INC for slang.h
-	sed -i 's#-I/usr/include/slang#-I=/usr/include/slang#g' $kerneldir/tools/perf/Makefile
+	if [ -f $kerneldir/tools/perf/Makefile ]; then
+		# Fix SLANG_INC for slang.h
+		sed -i 's#-I/usr/include/slang#-I=/usr/include/slang#g' $kerneldir/tools/perf/Makefile
+	fi
 }
 
 sysroot_stage_all_append() {