Skip to contentSkip to conversation

dm-verity-image-initramfs: Zero out the IMAGE_ROOTFS_EXTRA_SPACE in initramfs image

PATCH In review Kevin Hao 1 participant 2 messages Feb 22, 2024 – Mar 5, 2024

lore
Share & tools
lore

Kevin Hao

author
#0 lore raw

PATCH 1/1 dm-verity-image-initramfs: Zero out the IMAGE_ROOTFS_EXTRA_SPACE in initramfs image

From: Kevin Hao <[email protected]>

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.

---
 recipes-core/images/dm-verity-image-initramfs.bb | 1 +
 1 file changed, 1 insertion(+)
recipes-core/images/dm-verity-image-initramfs.bb +1 -0
index 78f7b49b27d6..b6d3bdc424d2 100644
@@ -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() {
Signature · 1 line
2.40.1
author
#1 lore raw
Quoted 7 lines · Kevin Hao

From: Kevin Hao <[email protected]>

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

Quoted 21 lines
---
 recipes-core/images/dm-verity-image-initramfs.bb | 1 +
 1 file changed, 1 insertion(+)
recipes-core/images/dm-verity-image-initramfs.bb +1 -0
index 78f7b49b27d6..b6d3bdc424d2 100644
@@ -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() {
Signature · 1 line
2.40.1