diff mbox series

[meta-security] dm-verity-image-initramfs: Zero out the IMAGE_ROOTFS_EXTRA_SPACE in initramfs image

Message ID 20240222100738.919774-1-haokexin@gmail.com
State New
Headers show
Series [meta-security] dm-verity-image-initramfs: Zero out the IMAGE_ROOTFS_EXTRA_SPACE in initramfs image | expand

Commit Message

Kevin Hao Feb. 22, 2024, 10:07 a.m. UTC
From: Kevin Hao <kexin.hao@windriver.com>

It may trigger the following error if we set a big value to IMAGE_ROOTFS_EXTRA_SPACE.
  ERROR: dm-verity-image-initramfs-1.0-r0 do_image_cpio: The initramfs size 5308416(K) exceeds INITRAMFS_MAXSIZE: 131072(K)

So zero out it for initramfs image to fix this issue. This is also what
the initramfs images do in oe-core.

Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
---
 recipes-core/images/dm-verity-image-initramfs.bb | 1 +
 1 file changed, 1 insertion(+)

Comments

Kevin Hao March 5, 2024, 9:02 a.m. UTC | #1
On Thu, Feb 22, 2024 at 06:07:38PM +0800, Kevin Hao wrote:
> From: Kevin Hao <kexin.hao@windriver.com>
> 
> It may trigger the following error if we set a big value to IMAGE_ROOTFS_EXTRA_SPACE.
>   ERROR: dm-verity-image-initramfs-1.0-r0 do_image_cpio: The initramfs size 5308416(K) exceeds INITRAMFS_MAXSIZE: 131072(K)
> 
> So zero out it for initramfs image to fix this issue. This is also what
> the initramfs images do in oe-core.

Ping.

Thanks,
Kevin

> 
> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
> ---
>  recipes-core/images/dm-verity-image-initramfs.bb | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/recipes-core/images/dm-verity-image-initramfs.bb b/recipes-core/images/dm-verity-image-initramfs.bb
> index 78f7b49b27d6..b6d3bdc424d2 100644
> --- a/recipes-core/images/dm-verity-image-initramfs.bb
> +++ b/recipes-core/images/dm-verity-image-initramfs.bb
> @@ -17,6 +17,7 @@ PACKAGE_INSTALL = " \
>  # We want a clean, minimal image.
>  IMAGE_FEATURES = ""
>  IMAGE_LINGUAS = ""
> +IMAGE_ROOTFS_EXTRA_SPACE = "0"
>  
>  # Can we somehow inspect reverse dependencies to avoid these variables?
>  python __anonymous() {
> -- 
> 2.40.1
>
diff mbox series

Patch

diff --git a/recipes-core/images/dm-verity-image-initramfs.bb b/recipes-core/images/dm-verity-image-initramfs.bb
index 78f7b49b27d6..b6d3bdc424d2 100644
--- a/recipes-core/images/dm-verity-image-initramfs.bb
+++ b/recipes-core/images/dm-verity-image-initramfs.bb
@@ -17,6 +17,7 @@  PACKAGE_INSTALL = " \
 # We want a clean, minimal image.
 IMAGE_FEATURES = ""
 IMAGE_LINGUAS = ""
+IMAGE_ROOTFS_EXTRA_SPACE = "0"
 
 # Can we somehow inspect reverse dependencies to avoid these variables?
 python __anonymous() {