Patchwork [1/2] kernel.bbclass: Find the kernel consistently.

login
register
mail settings
Submitter Mike Crowe
Date Aug. 25, 2011, 12:59 p.m.
Message ID <1314277168-4324-1-git-send-email-mac@mcrowe.com>
Download mbox | patch
Permalink /patch/10531/
State New, archived
Headers show

Comments

Mike Crowe - Aug. 25, 2011, 12:59 p.m.
Use KERNEL_OUTPUT variable to find the generated kernel image rather than
duplicating the existing path. This also means it can be overridden simply.

Signed-off-by: Mike Crowe <mac@mcrowe.com>
---
 meta/classes/kernel.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Saul Wold - Aug. 25, 2011, 7:32 p.m.
On 08/25/2011 05:59 AM, Mike Crowe wrote:
> Use KERNEL_OUTPUT variable to find the generated kernel image rather than
> duplicating the existing path. This also means it can be overridden simply.
>
There are other places in kernel.bbclass that use the path vs 
KERNEL_OUTPUT, is there a reason you did not change those also?

Sau!

> Signed-off-by: Mike Crowe<mac@mcrowe.com>
> ---
>   meta/classes/kernel.bbclass |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index a2b10f2..04e673a 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -476,7 +476,7 @@ KERNEL_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME"
>   KERNEL_IMAGE_SYMLINK_NAME ?= "${KERNEL_IMAGETYPE}-${MACHINE}"
>
>   kernel_do_deploy() {
> -	install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
> +	install -m 0644 ${KERNEL_OUTPUT} ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
>   	if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
>   		tar -cvzf ${DEPLOYDIR}/modules-${KERNEL_VERSION}-${PR}-${MACHINE}.tgz -C ${D} lib
>   	fi
Mike Crowe - Aug. 26, 2011, 9:17 a.m.
On Thu, Aug 25, 2011 at 12:32:25PM -0700, Saul Wold wrote:
> On 08/25/2011 05:59 AM, Mike Crowe wrote:
> >Use KERNEL_OUTPUT variable to find the generated kernel image rather than
> >duplicating the existing path. This also means it can be overridden simply.
> >
> There are other places in kernel.bbclass that use the path vs
> KERNEL_OUTPUT, is there a reason you did not change those also?

The patch came out of an earlier attempt to do what I was doing in
PATCH 2/2 and I hadn't needed to change the other places. :(

Looking at the other places now I think that the two in do_sizecheck
are candidates for changing to KERNEL_OUTPUT. I'm less sure about the
uImage ones in kernel_do_deploy due to there being other references to
arch/${ARCH}/boot/... nearby. I wouldn't want to make the code less
clear.

Updated patch follows.

Thanks for your comments.

Mike.

Patch

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index a2b10f2..04e673a 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -476,7 +476,7 @@  KERNEL_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME"
 KERNEL_IMAGE_SYMLINK_NAME ?= "${KERNEL_IMAGETYPE}-${MACHINE}"
 
 kernel_do_deploy() {
-	install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
+	install -m 0644 ${KERNEL_OUTPUT} ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
 	if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
 		tar -cvzf ${DEPLOYDIR}/modules-${KERNEL_VERSION}-${PR}-${MACHINE}.tgz -C ${D} lib
 	fi