diff mbox series

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

Message ID 20200228145003.1311570-1-raj.khem@gmail.com
State New
Headers show
Series [meta-swupdate,v3] swupdate-image: Generate INITRAMFS_FSTYPE image as well | expand

Commit Message

Khem Raj Feb. 28, 2020, 2:50 p.m. UTC
To bundle this into kernel we need a cpio image generated as well

Do not entertain IMAGE_FEATURES as they are meant for full image

Use PACKAGE_INSTALL directly so it ignores bootstrap and packages introduced
by features

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
v2: Use PACKAGE_INSTALL and empty out IMAGE_FEATURES
v3: keep inheriting image instead of core-image

 recipes-extended/images/swupdate-image.inc | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Comments

Stefano Babic Feb. 29, 2020, 3:12 p.m. UTC | #1
Hi Khem,

On 28.02.20 15:50, Khem Raj wrote:
> To bundle this into kernel we need a cpio image generated as well
> 
> Do not entertain IMAGE_FEATURES as they are meant for full image
> 
> Use PACKAGE_INSTALL directly so it ignores bootstrap and packages introduced
> by features
> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
> v2: Use PACKAGE_INSTALL and empty out IMAGE_FEATURES
> v3: keep inheriting image instead of core-image
> 
>  recipes-extended/images/swupdate-image.inc | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/recipes-extended/images/swupdate-image.inc b/recipes-extended/images/swupdate-image.inc
> index 795b4a2..ead79e0 100644
> --- a/recipes-extended/images/swupdate-image.inc
> +++ b/recipes-extended/images/swupdate-image.inc
> @@ -4,7 +4,7 @@ USE_DEVFS = "1"
>  # This variable is triggered to check if sysvinit must be overwritten by a single rcS
>  export SYSVINIT = "no"
>  
> -IMAGE_INSTALL = "base-files \
> +PACKAGE_INSTALL = "base-files \
>  		base-passwd \
>  		busybox \
>  		mtd-utils \
> @@ -16,7 +16,10 @@ IMAGE_INSTALL = "base-files \
>  		util-linux-sfdisk \
>  		 "
>  

I have some doubts here. The current use case for swupdate-image is to
create the rescue image for projects that can support it. Let's say,
Raspberry cannot, because it has not a different storage (just SD),
Computer Module / BB can because it can be put on mmcblkXbootY. The use
case is to create a "full image" like rootfs, but with just what is
necessary for each project. And this varies: some projects adds
swupdate-image.bbappend with IMAGE_INSTALL_append, maybe for
diagnostics, maybe something else...

If we switch to PACKAGE_INSTALL, we break projects (ok, well, this is
not bad, we should just communicate it), but as far as I know
PACKAGE_INSTALL contains the whole list of packages to be installed,
while IMAGE_INSTALL is an intermediate variable that will lead to
PACKAGE_INSTALL. Appending PACKAGE_INSTALL is bad and not conform to the
manual. I guess you want to have it for Raspi, but as I said, Raspi with
just the SD card is not suitable for rescue and I run it with an A/B
concept (well, I have also some patches because I use it as terminal
server, maybe I can post them and someone can find useful) without
rescue. swupdate-image is also included, see swupdate-gui-image, where a
simple GUI is integrated into the rescue - this will be broken here. If
this must be strictly necessary, what about to have
swupdate-image-initramfs.bb doing whatever you want ? We have then no
conflicts.

> -IMAGE_FSTYPES = "ext4.gz.u-boot"
> +IMAGE_FSTYPES = "${INITRAMFS_FSTYPES} ext4.gz.u-boot"
> +
> +# Do not pollute the initramfs image with rootfs features
> +IMAGE_FEATURES = ""

Right, this must be done.

>  
>  inherit image
>  
> 

Best regards,
Stefano
diff mbox series

Patch

diff --git a/recipes-extended/images/swupdate-image.inc b/recipes-extended/images/swupdate-image.inc
index 795b4a2..ead79e0 100644
--- a/recipes-extended/images/swupdate-image.inc
+++ b/recipes-extended/images/swupdate-image.inc
@@ -4,7 +4,7 @@  USE_DEVFS = "1"
 # This variable is triggered to check if sysvinit must be overwritten by a single rcS
 export SYSVINIT = "no"
 
-IMAGE_INSTALL = "base-files \
+PACKAGE_INSTALL = "base-files \
 		base-passwd \
 		busybox \
 		mtd-utils \
@@ -16,7 +16,10 @@  IMAGE_INSTALL = "base-files \
 		util-linux-sfdisk \
 		 "
 
-IMAGE_FSTYPES = "ext4.gz.u-boot"
+IMAGE_FSTYPES = "${INITRAMFS_FSTYPES} ext4.gz.u-boot"
+
+# Do not pollute the initramfs image with rootfs features
+IMAGE_FEATURES = ""
 
 inherit image