From ee34e141f134e7c9f37eb5f2168c9e3b7481d33e Mon Sep 17 00:00:00 2001 From: Marco Cavallini Date: Tue, 8 Jan 2013 08:51:44 +0100 Subject: [PATCH] kernel.bbclass: kernel_do_install fails with kernel <2.6.30 * kernels <2.6.30 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 (From OE-Core rev: 4dd39a23dfe069ad34a925e00407b4dde978cb01) Signed-off-by: Marco Cavallini Signed-off-by: Saul Wold Signed-off-by: Richard Purdie --- meta/classes/kernel.bbclass | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index 96b23bc..aff8842 100644 --- a/meta/classes/kernel.bbclass +++ b/meta/classes/kernel.bbclass @@ -204,8 +204,11 @@ 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 + # kernels <2.6.30 don't have $kerneldir/tools directory so we check if it exists before calling sed + 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() { -- 2.7.4