[oe-commits] Michel Thebeau : kernel.bbclass: do_sizecheck: update path to build image and do not delete
git at git.openembedded.org
git at git.openembedded.org
Mon Apr 8 21:23:34 UTC 2013
Module: openembedded-core.git
Branch: master
Commit: f0b19ddce3c92c5d06976cf73d4c4c480e053dff
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=f0b19ddce3c92c5d06976cf73d4c4c480e053dff
Author: Michel Thebeau <michel.thebeau at windriver.com>
Date: Mon Apr 8 16:15:51 2013 -0400
kernel.bbclass: do_sizecheck: update path to build image and do not delete
do_sizecheck has a few issues especially with vmlinux image type.
It breaks because KERNEL_OUTPUT is a path relative to ${B}. When
do_sizecheck runs it does not find the file (because the working
directory is elsewhere) and does not fail.
Also, the image file referenced by KERNEL_OUTPUT may be a link.
Finally, when do_sizecheck deletes the oversized kernel image it leaves
the previously run do_compile task with inaccurate status.
So, do the following:
- specify that the working directory should be ${B}
- use ls -L to reference to the real file, and ensure that the link
file is created
- keep the oversized image file so the status of do_compile is valid
[YOCTO #3514]
Signed-off-by: Bruce Ashfield <bruce.ashfield at windriver.com>
Signed-off-by: Michel Thebeau <michel.thebeau at windriver.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/classes/kernel.bbclass | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index d57d1f5..af58887 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -293,15 +293,16 @@ python split_kernel_packages () {
# with a fixed length or there is a limit in transferring the kernel to memory
do_sizecheck() {
if [ ! -z "${KERNEL_IMAGE_MAXSIZE}" ]; then
- size=`ls -l ${KERNEL_OUTPUT} | awk '{ print $5}'`
+ cd ${B}
+ size=`ls -lL ${KERNEL_OUTPUT} | awk '{ print $5}'`
if [ $size -ge ${KERNEL_IMAGE_MAXSIZE} ]; then
- rm ${KERNEL_OUTPUT}
die "This kernel (size=$size > ${KERNEL_IMAGE_MAXSIZE}) is too big for your device. Please reduce the size of the kernel by making more of it modular."
fi
fi
}
+do_sizecheck[dirs] = "${B}"
-addtask sizecheck before do_install after do_compile
+addtask sizecheck before do_install after do_kernel_link_vmlinux
KERNEL_IMAGE_BASE_NAME ?= "${KERNEL_IMAGETYPE}-${PE}-${PV}-${PR}-${MACHINE}-${DATETIME}"
# Don't include the DATETIME variable in the sstate package signatures
More information about the Openembedded-commits
mailing list