summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorKevin Hao <kexin.hao@windriver.com>2015-09-30 10:29:33 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-10-01 07:43:37 +0100
commit4266cc986add2551b7a200d20a75bd4f3cb2b1a9 (patch)
tree33d6f0f73ae17dd98add67814b3c4ae58704f2d7 /meta
parentec1146e3e47bc009fef295ffcb1a48a434dd2c7b (diff)
downloadpoky-4266cc986add2551b7a200d20a75bd4f3cb2b1a9.tar.gz
kernel.bbclass: fix the bug of checking the existing sections in do_strip()
Ross reported the following waring when building edgerouter BSP: WARNING: Section not found: .comment The reason is that the testing of the existing sections in do_strip() returned the wrong value. Please see the following code in do_strip(): for str in ${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS}; do { if [ "$headers" != *"$str"* ]; then bbwarn "Section not found: $str"; fi "$CROSS_COMPILE"strip -s -R $str ${KERNEL_OUTPUT} }; done The "*" doesn't have special meaning in the if string test, so it will return true even the $str is a substring of $headers. Fix this issue by replacing it with "! (echo "$headers" | grep -q "^$str$")". Reported-by: Ross Burton <ross.burton@intel.com> (From OE-Core rev: 4965f122ca67c0ff60dc60f7885db1ed9db909b4) Signed-off-by: Kevin Hao <kexin.hao@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/kernel.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index dfbdfd24ff..5e8b6cf343 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -413,7 +413,7 @@ do_strip() {
413 gawk '{print $1}'` 413 gawk '{print $1}'`
414 414
415 for str in ${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS}; do { 415 for str in ${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS}; do {
416 if [ "$headers" != *"$str"* ]; then 416 if ! (echo "$headers" | grep -q "^$str$"); then
417 bbwarn "Section not found: $str"; 417 bbwarn "Section not found: $str";
418 fi 418 fi
419 419