kernel.bbclass: do_sizecheck: update path to build image and do not delete
authorMichel Thebeau <michel.thebeau@windriver.com>
Mon, 8 Apr 2013 20:15:51 +0000 (16:15 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 8 Apr 2013 21:26:24 +0000 (22:26 +0100)
commitc4e7434f52bd12875c50081e4be1fc32c76580c7
treeee8db07558cb8565284649e4e32e50f831be7029
parentd6d0a1da12643692ebb13981f5aabce43a43e152
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>
meta/classes/kernel.bbclass