diff options
author | Michel Thebeau <michel.thebeau@windriver.com> | 2013-04-08 16:15:51 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-04-08 22:26:24 +0100 |
commit | e57284abca76fe7e6c29484104ae4349459c63dc (patch) | |
tree | 2fd376325c7baab1bdfd6ab9269b8615159b551d /meta/classes | |
parent | a6502081b7c7acc49187aa7c68ad19e0751ee030 (diff) | |
download | poky-e57284abca76fe7e6c29484104ae4349459c63dc.tar.gz |
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]
(From OE-Core rev: f0b19ddce3c92c5d06976cf73d4c4c480e053dff)
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Michel Thebeau <michel.thebeau@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | 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 d57d1f50b7..af58887f28 100644 --- a/meta/classes/kernel.bbclass +++ b/meta/classes/kernel.bbclass | |||
@@ -293,15 +293,16 @@ python split_kernel_packages () { | |||
293 | # with a fixed length or there is a limit in transferring the kernel to memory | 293 | # with a fixed length or there is a limit in transferring the kernel to memory |
294 | do_sizecheck() { | 294 | do_sizecheck() { |
295 | if [ ! -z "${KERNEL_IMAGE_MAXSIZE}" ]; then | 295 | if [ ! -z "${KERNEL_IMAGE_MAXSIZE}" ]; then |
296 | size=`ls -l ${KERNEL_OUTPUT} | awk '{ print $5}'` | 296 | cd ${B} |
297 | size=`ls -lL ${KERNEL_OUTPUT} | awk '{ print $5}'` | ||
297 | if [ $size -ge ${KERNEL_IMAGE_MAXSIZE} ]; then | 298 | if [ $size -ge ${KERNEL_IMAGE_MAXSIZE} ]; then |
298 | rm ${KERNEL_OUTPUT} | ||
299 | 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." | 299 | 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." |
300 | fi | 300 | fi |
301 | fi | 301 | fi |
302 | } | 302 | } |
303 | do_sizecheck[dirs] = "${B}" | ||
303 | 304 | ||
304 | addtask sizecheck before do_install after do_compile | 305 | addtask sizecheck before do_install after do_kernel_link_vmlinux |
305 | 306 | ||
306 | KERNEL_IMAGE_BASE_NAME ?= "${KERNEL_IMAGETYPE}-${PE}-${PV}-${PR}-${MACHINE}-${DATETIME}" | 307 | KERNEL_IMAGE_BASE_NAME ?= "${KERNEL_IMAGETYPE}-${PE}-${PV}-${PR}-${MACHINE}-${DATETIME}" |
307 | # Don't include the DATETIME variable in the sstate package signatures | 308 | # Don't include the DATETIME variable in the sstate package signatures |