[OE-core] [PATCH] kernel.bbclass: Use the correct path of kernel build image file except for vmlinux

Kunihiko Hayashi hayashi.kunihiko at socionext.com
Wed Apr 12 08:25:49 UTC 2017


[Adding the maintainer - Richard P]

The log is a bit descriptive. In short, we would like to compress and
use the arch/arm/boot/Image for cases like AARCH64.

Best Regards
Kunihiko Hayashi

On Thu, 30 Mar 2017 00:57:23 +0000 <hayashi.kunihiko at socionext.com> wrote:
> Use the correct path of kernel build image file except for vmlinux when
> producing gzipped kernel image.
>
> The kernel_do_compile() function produces the gzipped kernel
> image from the original kernel image when an image types included in
> KERNEL_IMAGETYPES has a suffix .gz.
>
> Although the original kernel image file is usually built on the
> directory arch/${ARCH}/boot/ except for vmlinux, the name of image types
> included in KERNEL_IMAGETYPES doesn't have a path of
> 'arch/${ARCH}/boot', then bitbake fails to produce the gzipped kernel
> image which type has a suffix .gz.
>
> This fixes above failure by using 'arch/${ARCH}/boot/' prefix for image
> path unless ${typeformake} is "vmlinux".
>
> Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko at socionext.com>
> Signed-off-by: Jassi Brar <jaswinder.singh at linaro.org>
> ---
>  meta/classes/kernel.bbclass | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index 244087a..5e26965 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -268,7 +268,11 @@ kernel_do_compile() {
>                 for type in ${KERNEL_IMAGETYPES} ; do
>                         if test "${typeformake}.gz" = "${type}"; then
>                                 mkdir -p "${KERNEL_OUTPUT_DIR}"
> -                               gzip -9c < "${typeformake}" > "${KERNEL_OUTPUT_DIR}/${type}"
> +                               if test x${typeformake} = x"vmlinux"; then
> +                                       gzip -9c < "${typeformake}" > "${KERNEL_OUTPUT_DIR}/${type}"
> +                               else
> +                                       gzip -9c < "arch/${ARCH}/boot/${typeformake}" > "${KERNEL_OUTPUT_DIR}/${type}"
> +                               fi
>                                 break;
>                         fi
>                 done
> --
> 2.7.4
>






More information about the Openembedded-core mailing list