[yocto] fail to create compressed kernel image

Kunihiko Hayashi hayashi.kunihiko at socionext.com
Tue Dec 27 00:04:26 PST 2016


Hello, all

To build compressed kernel, I specify the following line on my machine
configuration:

   KERNEL_IMAGETYPE = "Image.gz"

and I've got such an error:

   "cannot open Image: No such file"

According to meta/classes/kernel.bbclass, compressed kernel image is created
by the following line (in the case of yocto-2.1).

    gzip -9c < "${KERNEL_IMAGETYPE_FOR_MAKE}" > "${KERNEL_OUTPUT}"

KERNEL_IMAGETYPE_FOR_MAKE is a string removed a suffix '.gz' from
KERNEL_IMAGETYPE. Kernel raw image ("Image") is created on
'arch/${ARCH}/boot' directory, and I think that the path of the kernel
raw image is required for this case as follows.

For yocto-2.1:

-   gzip -9c < "${KERNEL_IMAGETYPE_FOR_MAKE}" > "${KERNEL_OUTPUT}"
+   gzip -9c < "arch/${ARCH}/boot/${KERNEL_IMAGETYPE_FOR_MAKE}" > "${KERNEL_OUTPUT}"

For yocto-2.2:

-   gzip -9c < "${typeformake}" > "${KERNEL_OUTPUT_DIR}/${type}"
+   gzip -9c < "arch/${ARCH}/boot/${typeformake}" > "${KERNEL_OUTPUT_DIR}/${type}"

I've checked it in the case of arm/arm64.
However I'm not sure that kernel raw images of all architectures are
created in the same way, are there any better suggestions?

Regards,

---
Kunihiko Hayashi
:hayashi.kunihiko at socionext.com




More information about the yocto mailing list