diff mbox series

[meta-swupdate] swupdate-image: Generate INITRAMFS_FSTYPE image as well

Message ID 20200225003250.779032-1-raj.khem@gmail.com
State Changes Requested
Headers show
Series [meta-swupdate] swupdate-image: Generate INITRAMFS_FSTYPE image as well | expand

Commit Message

Khem Raj Feb. 25, 2020, 12:32 a.m. UTC
To bundle this into kernel we need a cpio image generated as well

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 recipes-extended/images/swupdate-image.inc | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Stefano Babic Feb. 28, 2020, 10:26 a.m. UTC | #1
Hi Khem,

On 25.02.20 01:32, Khem Raj wrote:
> To bundle this into kernel we need a cpio image generated as well
> 

Why ? I mean, yes it is a way to do it, but not the only one, and....

> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  recipes-extended/images/swupdate-image.inc | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/recipes-extended/images/swupdate-image.inc b/recipes-extended/images/swupdate-image.inc
> index 795b4a2..2d6141c 100644
> --- a/recipes-extended/images/swupdate-image.inc
> +++ b/recipes-extended/images/swupdate-image.inc
> @@ -16,8 +16,7 @@ IMAGE_INSTALL = "base-files \
>  		util-linux-sfdisk \
>  		 "
>  
> -IMAGE_FSTYPES = "ext4.gz.u-boot"
> -
> -inherit image
> +IMAGE_FSTYPES = "${INITRAMFS_FSTYPES} ext4.gz.u-boot"

...anyway, why not, we can add it ;-)

> +inherit core-image
>  

But this is a problem. swupdate-image is used to create rescue system
where footprint plays a big role. The whole stuff (bootloader +
ATF/PMU/SCU FW for new SOCs, kernel, ramdisk and so on) is often put
into a small device (I have a lot projects with SPI flash). Any often
some other componets are added, like bitstreams (Xilinx and Altera
SOCs), or logos, or something else that people want to have at the time
a rescue is running (often using a fitImage).

This is the reason I inherit from image and not from core-image. And
core-image allows to extend it with CORE_IMAGE_EXTRA_INSTALL, and people
become angry because they cannot build the rescue anymore.

Best regards,
Stefano

>  IMAGE_LINGUAS = " "
>
Khem Raj Feb. 28, 2020, 2:47 p.m. UTC | #2
On Fri, Feb 28, 2020 at 2:26 AM Stefano Babic <sbabic@denx.de> wrote:
>
> Hi Khem,
>
> On 25.02.20 01:32, Khem Raj wrote:
> > To bundle this into kernel we need a cpio image generated as well
> >
>
> Why ? I mean, yes it is a way to do it, but not the only one, and....
>

its to support default kernel initramfs settings from core

> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > ---
> >  recipes-extended/images/swupdate-image.inc | 5 ++---
> >  1 file changed, 2 insertions(+), 3 deletions(-)
> >
> > diff --git a/recipes-extended/images/swupdate-image.inc b/recipes-extended/images/swupdate-image.inc
> > index 795b4a2..2d6141c 100644
> > --- a/recipes-extended/images/swupdate-image.inc
> > +++ b/recipes-extended/images/swupdate-image.inc
> > @@ -16,8 +16,7 @@ IMAGE_INSTALL = "base-files \
> >               util-linux-sfdisk \
> >                "
> >
> > -IMAGE_FSTYPES = "ext4.gz.u-boot"
> > -
> > -inherit image
> > +IMAGE_FSTYPES = "${INITRAMFS_FSTYPES} ext4.gz.u-boot"
>
> ...anyway, why not, we can add it ;-)
>
> > +inherit core-image
> >
>
> But this is a problem. swupdate-image is used to create rescue system
> where footprint plays a big role. The whole stuff (bootloader +
> ATF/PMU/SCU FW for new SOCs, kernel, ramdisk and so on) is often put
> into a small device (I have a lot projects with SPI flash). Any often
> some other componets are added, like bitstreams (Xilinx and Altera
> SOCs), or logos, or something else that people want to have at the time
> a rescue is running (often using a fitImage).
>
> This is the reason I inherit from image and not from core-image. And
> core-image allows to extend it with CORE_IMAGE_EXTRA_INSTALL, and people
> become angry because they cannot build the rescue anymore.

I think you have a good point,  I was trying to make this image into a
initramfs image
bundled into kernel and I ran into a problem where IMAGE_FEATURE check starts
to fail when I have something in EXTRA_IMAGE_FEATURES which is meant
for main image, so inheriting core-image allowed to get over that.
However, I think it would be better to ignore IMAGE_FEATURES completely here.
I have sent to v2, which should address this.

>
> Best regards,
> Stefano
>
> >  IMAGE_LINGUAS = " "
> >
>
>
> --
> =====================================================================
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
> =====================================================================
diff mbox series

Patch

diff --git a/recipes-extended/images/swupdate-image.inc b/recipes-extended/images/swupdate-image.inc
index 795b4a2..2d6141c 100644
--- a/recipes-extended/images/swupdate-image.inc
+++ b/recipes-extended/images/swupdate-image.inc
@@ -16,8 +16,7 @@  IMAGE_INSTALL = "base-files \
 		util-linux-sfdisk \
 		 "
 
-IMAGE_FSTYPES = "ext4.gz.u-boot"
-
-inherit image
+IMAGE_FSTYPES = "${INITRAMFS_FSTYPES} ext4.gz.u-boot"
+inherit core-image
 
 IMAGE_LINGUAS = " "