Patchwork kernel.bbclass: update image name to keep it same in D and DEPLOYDIR

login
register
mail settings
Submitter Ting Liu
Date July 12, 2012, 9:17 a.m.
Message ID <1342084646-23822-1-git-send-email-b28495@freescale.com>
Download mbox | patch
Permalink /patch/31797/
State New
Headers show

Comments

Ting Liu - July 12, 2012, 9:17 a.m.
From: Ting Liu <b28495@freescale.com>

Signed-off-by: Ting Liu <b28495@freescale.com>
---
 meta/classes/kernel.bbclass |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
Richard Purdie - July 12, 2012, 11:02 a.m.
On Thu, 2012-07-12 at 04:17 -0500, b28495@freescale.com wrote:
> From: Ting Liu <b28495@freescale.com>
> 
> Signed-off-by: Ting Liu <b28495@freescale.com>
> ---
>  meta/classes/kernel.bbclass |    7 ++++++-
>  1 files changed, 6 insertions(+), 1 deletions(-)
> 
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index 81c334b..420a1ec 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -122,7 +122,12 @@ kernel_do_install() {
>  	#
>  	install -d ${D}/${KERNEL_IMAGEDEST}
>  	install -d ${D}/boot
> -	install -m 0644 ${KERNEL_OUTPUT} ${D}/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_VERSION}
> +        install -m 0644 ${KERNEL_OUTPUT} ${D}/${KERNEL_IMAGEDEST}/${KERNEL_IMAGE_BASE_NAME}.bin
> +        cd ${D}/${KERNEL_IMAGEDEST}/
> +        rm -f ${KERNEL_IMAGE_SYMLINK_NAME}.bin
> +        ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin ${KERNEL_IMAGE_SYMLINK_NAME}.bin
> +        ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin ${KERNEL_IMAGETYPE}
> +	cd -
>  	install -m 0644 System.map ${D}/boot/System.map-${KERNEL_VERSION}
>  	install -m 0644 .config ${D}/boot/config-${KERNEL_VERSION}
>  	install -m 0644 vmlinux ${D}/boot/vmlinux-${KERNEL_VERSION}

This is going to break users who rely on the existing naming/layout. 

The patch description is lacking on why we need to do this too, it just
says what you're doing and not why.

Cheers,

Richard
Ting Liu - July 15, 2012, 11:18 a.m.
-----Original Message-----
From: openembedded-core-bounces@lists.openembedded.org [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of Richard Purdie
Sent: Thursday, July 12, 2012 7:03 PM
To: Patches and discussions about the oe-core layer
Cc: McClintock Matthew-B29882
Subject: Re: [OE-core] [PATCH] kernel.bbclass: update image name to keep it same in D and DEPLOYDIR

On Thu, 2012-07-12 at 04:17 -0500, b28495@freescale.com wrote:
> From: Ting Liu <b28495@freescale.com>
> 
> Signed-off-by: Ting Liu <b28495@freescale.com>
> ---
>  meta/classes/kernel.bbclass |    7 ++++++-
>  1 files changed, 6 insertions(+), 1 deletions(-)
> 
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass 
> index 81c334b..420a1ec 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -122,7 +122,12 @@ kernel_do_install() {
>  	#
>  	install -d ${D}/${KERNEL_IMAGEDEST}
>  	install -d ${D}/boot
> -	install -m 0644 ${KERNEL_OUTPUT} ${D}/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_VERSION}
> +        install -m 0644 ${KERNEL_OUTPUT} ${D}/${KERNEL_IMAGEDEST}/${KERNEL_IMAGE_BASE_NAME}.bin
> +        cd ${D}/${KERNEL_IMAGEDEST}/
> +        rm -f ${KERNEL_IMAGE_SYMLINK_NAME}.bin
> +        ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin ${KERNEL_IMAGE_SYMLINK_NAME}.bin
> +        ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin ${KERNEL_IMAGETYPE}
> +	cd -
>  	install -m 0644 System.map ${D}/boot/System.map-${KERNEL_VERSION}
>  	install -m 0644 .config ${D}/boot/config-${KERNEL_VERSION}
>  	install -m 0644 vmlinux ${D}/boot/vmlinux-${KERNEL_VERSION}

This is going to break users who rely on the existing naming/layout. 

The patch description is lacking on why we need to do this too, it just says what you're doing and not why.

Cheers,

Richard


[Liu Ting-B28495] on our side, we used two ways to load the kernel images. 1) load from Ethernet 2) load from hard disk which deployed with the rootfs image containing kernel image (installing the package 'kernel-image'). We cannot use the same bootargs in u-boot due to the mismatched name.
Khem Raj - July 15, 2012, 4:02 p.m.
On Sun, Jul 15, 2012 at 4:18 AM, Liu Ting-B28495 <B28495@freescale.com> wrote:
> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of Richard Purdie
> Sent: Thursday, July 12, 2012 7:03 PM
> To: Patches and discussions about the oe-core layer
> Cc: McClintock Matthew-B29882
> Subject: Re: [OE-core] [PATCH] kernel.bbclass: update image name to keep it same in D and DEPLOYDIR
>
> On Thu, 2012-07-12 at 04:17 -0500, b28495@freescale.com wrote:
>> From: Ting Liu <b28495@freescale.com>
>>
>> Signed-off-by: Ting Liu <b28495@freescale.com>
>> ---
>>  meta/classes/kernel.bbclass |    7 ++++++-
>>  1 files changed, 6 insertions(+), 1 deletions(-)
>>
>> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
>> index 81c334b..420a1ec 100644
>> --- a/meta/classes/kernel.bbclass
>> +++ b/meta/classes/kernel.bbclass
>> @@ -122,7 +122,12 @@ kernel_do_install() {
>>       #
>>       install -d ${D}/${KERNEL_IMAGEDEST}
>>       install -d ${D}/boot
>> -     install -m 0644 ${KERNEL_OUTPUT} ${D}/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_VERSION}
>> +        install -m 0644 ${KERNEL_OUTPUT} ${D}/${KERNEL_IMAGEDEST}/${KERNEL_IMAGE_BASE_NAME}.bin
>> +        cd ${D}/${KERNEL_IMAGEDEST}/
>> +        rm -f ${KERNEL_IMAGE_SYMLINK_NAME}.bin
>> +        ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin ${KERNEL_IMAGE_SYMLINK_NAME}.bin
>> +        ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin ${KERNEL_IMAGETYPE}
>> +     cd -
>>       install -m 0644 System.map ${D}/boot/System.map-${KERNEL_VERSION}
>>       install -m 0644 .config ${D}/boot/config-${KERNEL_VERSION}
>>       install -m 0644 vmlinux ${D}/boot/vmlinux-${KERNEL_VERSION}
>
> This is going to break users who rely on the existing naming/layout.
>
> The patch description is lacking on why we need to do this too, it just says what you're doing and not why.
>
> Cheers,
>
> Richard
>
>
> [Liu Ting-B28495] on our side, we used two ways to load the kernel images. 1) load from Ethernet 2) load from hard disk which deployed with the rootfs image containing kernel image (installing the package 'kernel-image'). We cannot use the same bootargs in u-boot due to the mismatched name.

so define two macros nfsboot and diskboot which take care of setting all
required parameters as well as other env vars.

>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
McClintock Matthew-B29882 - July 16, 2012, 10:20 p.m.
On Sun, Jul 15, 2012 at 6:18 AM, Liu Ting-B28495 <B28495@freescale.com> wrote:
> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of Richard Purdie
> Sent: Thursday, July 12, 2012 7:03 PM
> To: Patches and discussions about the oe-core layer
> Cc: McClintock Matthew-B29882
> Subject: Re: [OE-core] [PATCH] kernel.bbclass: update image name to keep it same in D and DEPLOYDIR
>
> On Thu, 2012-07-12 at 04:17 -0500, b28495@freescale.com wrote:
>> From: Ting Liu <b28495@freescale.com>
>>
>> Signed-off-by: Ting Liu <b28495@freescale.com>
>> ---
>>  meta/classes/kernel.bbclass |    7 ++++++-
>>  1 files changed, 6 insertions(+), 1 deletions(-)
>>
>> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
>> index 81c334b..420a1ec 100644
>> --- a/meta/classes/kernel.bbclass
>> +++ b/meta/classes/kernel.bbclass
>> @@ -122,7 +122,12 @@ kernel_do_install() {
>>       #
>>       install -d ${D}/${KERNEL_IMAGEDEST}
>>       install -d ${D}/boot
>> -     install -m 0644 ${KERNEL_OUTPUT} ${D}/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_VERSION}
>> +        install -m 0644 ${KERNEL_OUTPUT} ${D}/${KERNEL_IMAGEDEST}/${KERNEL_IMAGE_BASE_NAME}.bin
>> +        cd ${D}/${KERNEL_IMAGEDEST}/
>> +        rm -f ${KERNEL_IMAGE_SYMLINK_NAME}.bin
>> +        ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin ${KERNEL_IMAGE_SYMLINK_NAME}.bin
>> +        ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin ${KERNEL_IMAGETYPE}
>> +     cd -
>>       install -m 0644 System.map ${D}/boot/System.map-${KERNEL_VERSION}
>>       install -m 0644 .config ${D}/boot/config-${KERNEL_VERSION}
>>       install -m 0644 vmlinux ${D}/boot/vmlinux-${KERNEL_VERSION}
>
> This is going to break users who rely on the existing naming/layout.
>
> The patch description is lacking on why we need to do this too, it just says what you're doing and not why.
>
> Cheers,
>
> Richard
>
>
> [Liu Ting-B28495] on our side, we used two ways to load the kernel images. 1) load from Ethernet 2) load from hard disk which deployed with the rootfs image containing kernel image (installing the package 'kernel-image'). We cannot use the same bootargs in u-boot due to the mismatched name.

Ting,

I understand what you said but what does this have to do with u-boot
bootargs? Need a bit more info here. Can you tell us what images are
generated before, and after your patch? And also, update the commit
message with this info?

-M

>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Ting Liu - July 17, 2012, 8:30 a.m.
> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org
> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of
> Khem Raj
> Sent: Monday, July 16, 2012 12:02 AM
> To: Patches and discussions about the oe-core layer
> Cc: McClintock Matthew-B29882; Luo Zhenhua-B19537
> Subject: Re: [OE-core] [PATCH] kernel.bbclass: update image name to keep
> it same in D and DEPLOYDIR
> 
> On Sun, Jul 15, 2012 at 4:18 AM, Liu Ting-B28495 <B28495@freescale.com>
> wrote:
> > -----Original Message-----
> > From: openembedded-core-bounces@lists.openembedded.org
> > [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of
> > Richard Purdie
> > Sent: Thursday, July 12, 2012 7:03 PM
> > To: Patches and discussions about the oe-core layer
> > Cc: McClintock Matthew-B29882
> > Subject: Re: [OE-core] [PATCH] kernel.bbclass: update image name to
> > keep it same in D and DEPLOYDIR
> >
> > On Thu, 2012-07-12 at 04:17 -0500, b28495@freescale.com wrote:
> >> From: Ting Liu <b28495@freescale.com>
> >>
> >> Signed-off-by: Ting Liu <b28495@freescale.com>
> >> ---
> >>  meta/classes/kernel.bbclass |    7 ++++++-
> >>  1 files changed, 6 insertions(+), 1 deletions(-)
> >>
> >> diff --git a/meta/classes/kernel.bbclass
> >> b/meta/classes/kernel.bbclass index 81c334b..420a1ec 100644
> >> --- a/meta/classes/kernel.bbclass
> >> +++ b/meta/classes/kernel.bbclass
> >> @@ -122,7 +122,12 @@ kernel_do_install() {
> >>       #
> >>       install -d ${D}/${KERNEL_IMAGEDEST}
> >>       install -d ${D}/boot
> >> -     install -m 0644 ${KERNEL_OUTPUT}
> ${D}/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_VERSION}
> >> +        install -m 0644 ${KERNEL_OUTPUT}
> ${D}/${KERNEL_IMAGEDEST}/${KERNEL_IMAGE_BASE_NAME}.bin
> >> +        cd ${D}/${KERNEL_IMAGEDEST}/
> >> +        rm -f ${KERNEL_IMAGE_SYMLINK_NAME}.bin
> >> +        ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin
> ${KERNEL_IMAGE_SYMLINK_NAME}.bin
> >> +        ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin ${KERNEL_IMAGETYPE}
> >> +     cd -
> >>       install -m 0644 System.map ${D}/boot/System.map-${KERNEL_VERSION}
> >>       install -m 0644 .config ${D}/boot/config-${KERNEL_VERSION}
> >>       install -m 0644 vmlinux ${D}/boot/vmlinux-${KERNEL_VERSION}
> >
> > This is going to break users who rely on the existing naming/layout.
> >
> > The patch description is lacking on why we need to do this too, it just
> says what you're doing and not why.
> >
> > Cheers,
> >
> > Richard
> >
> >
> > [Liu Ting-B28495] on our side, we used two ways to load the kernel
> images. 1) load from Ethernet 2) load from hard disk which deployed with
> the rootfs image containing kernel image (installing the package 'kernel-
> image'). We cannot use the same bootargs in u-boot due to the mismatched
> name.
> 
> so define two macros nfsboot and diskboot which take care of setting all
> required parameters as well as other env vars.
> 

[Liu Ting-B28495] Maybe I made a misunderstanding here. The problem is that:
for the same kernel image, the one get deployed has a name, and the one 
contained in rootfs has another name. It will be helpful if we can unify them.

Patch

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 81c334b..420a1ec 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -122,7 +122,12 @@  kernel_do_install() {
 	#
 	install -d ${D}/${KERNEL_IMAGEDEST}
 	install -d ${D}/boot
-	install -m 0644 ${KERNEL_OUTPUT} ${D}/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_VERSION}
+        install -m 0644 ${KERNEL_OUTPUT} ${D}/${KERNEL_IMAGEDEST}/${KERNEL_IMAGE_BASE_NAME}.bin
+        cd ${D}/${KERNEL_IMAGEDEST}/
+        rm -f ${KERNEL_IMAGE_SYMLINK_NAME}.bin
+        ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin ${KERNEL_IMAGE_SYMLINK_NAME}.bin
+        ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin ${KERNEL_IMAGETYPE}
+	cd -
 	install -m 0644 System.map ${D}/boot/System.map-${KERNEL_VERSION}
 	install -m 0644 .config ${D}/boot/config-${KERNEL_VERSION}
 	install -m 0644 vmlinux ${D}/boot/vmlinux-${KERNEL_VERSION}