mirror of
https://git.yoctoproject.org/poky
synced 2026-04-29 18:32:20 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
ec1146e3e4
commit
4266cc986a
@@ -413,7 +413,7 @@ do_strip() {
|
||||
gawk '{print $1}'`
|
||||
|
||||
for str in ${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS}; do {
|
||||
if [ "$headers" != *"$str"* ]; then
|
||||
if ! (echo "$headers" | grep -q "^$str$"); then
|
||||
bbwarn "Section not found: $str";
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user