summaryrefslogtreecommitdiff
path: root/yocto-poky/meta/classes/kernel.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'yocto-poky/meta/classes/kernel.bbclass')
-rw-r--r--yocto-poky/meta/classes/kernel.bbclass17
1 files changed, 13 insertions, 4 deletions
diff --git a/yocto-poky/meta/classes/kernel.bbclass b/yocto-poky/meta/classes/kernel.bbclass
index dfbdfd24f..ee3e9a0d9 100644
--- a/yocto-poky/meta/classes/kernel.bbclass
+++ b/yocto-poky/meta/classes/kernel.bbclass
@@ -309,9 +309,18 @@ do_shared_workdir () {
cp -fR include/generated/* $kerneldir/include/generated/
fi
- if [ -d arch/${ARCH}/include/generated ]; then
- mkdir -p $kerneldir/arch/${ARCH}/include/generated/
- cp -fR arch/${ARCH}/include/generated/* $kerneldir/arch/${ARCH}/include/generated/
+ # When ARCH is set to i386 or x86_64, we need to map ARCH to the real name of src
+ # dir (x86) under arch/ of kenrel tree, so that we can find correct source to copy.
+
+ if [ "${ARCH}" = "i386" ] || [ "${ARCH}" = "x86_64" ]; then
+ KERNEL_SRCARCH=x86
+ else
+ KERNEL_SRCARCH=${ARCH}
+ fi
+
+ if [ -d arch/${KERNEL_SRCARCH}/include/generated ]; then
+ mkdir -p $kerneldir/arch/${KERNEL_SRCARCH}/include/generated/
+ cp -fR arch/${KERNEL_SRCARCH}/include/generated/* $kerneldir/arch/${KERNEL_SRCARCH}/include/generated/
fi
}
@@ -413,7 +422,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