diff mbox series

[isar-cip-core,v1,1/1] wic: Set size for rootfs partition

Message ID 20240702081708.3339644-2-Adithya.Balakumar@toshiba-tsip.com (mailing list archive)
State Rejected
Headers show
Series Set size for rootfs partition in .wks file for reproducibility | expand

Commit Message

Adithya Balakumar July 2, 2024, 8:17 a.m. UTC
In the case where no size parameter is set in the wks file, wic estimates
the rootfs size from the rootfs directory in WORKDIR. Sometimes the
ROOTFS_SIZE variable is not the same between builds, although the rootfs
contents are identical. This can lead to different partition images
(in terms of number of blocks in each partiton image) which makes the
partition images non-reproducible.

Although this patch doesn't fix the core problem, setting a reasonable
size to the rootfs partition would not cause any harm.

Signed-off-by: Adithya Balakumar <Adithya.Balakumar@toshiba-tsip.com>
---
 wic/bbb.wks            | 2 +-
 wic/x86_64-generic.wks | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Jan Kiszka July 2, 2024, 8:55 a.m. UTC | #1
On 02.07.24 10:17, Adithya Balakumar wrote:
> In the case where no size parameter is set in the wks file, wic estimates
> the rootfs size from the rootfs directory in WORKDIR. Sometimes the
> ROOTFS_SIZE variable is not the same between builds, although the rootfs
> contents are identical. This can lead to different partition images
> (in terms of number of blocks in each partiton image) which makes the
> partition images non-reproducible.
> 
> Although this patch doesn't fix the core problem, setting a reasonable
> size to the rootfs partition would not cause any harm.
> 

I would like to understand the root cause first before taking such such
workaround measures.

Jan
diff mbox series

Patch

diff --git a/wic/bbb.wks b/wic/bbb.wks
index b46282d..6b441e8 100644
--- a/wic/bbb.wks
+++ b/wic/bbb.wks
@@ -9,6 +9,6 @@ 
 part --source rawcopy --sourceparams "file=/usr/lib/u-boot/bbb/MLO" --no-table --align 128
 part --source rawcopy --sourceparams "file=/usr/lib/u-boot/bbb/u-boot.img" --no-table --align 384
 
-part / --source rootfs-u-boot --ondisk mmcblk0 --fstype ext4 --mkfs-extraopts "-T default" --label platform --align 1024 --active --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 --uuid 25d57b24-f34d-412e-8c88-28629f23aa0d
+part / --source rootfs-u-boot --ondisk mmcblk0 --fstype ext4 --mkfs-extraopts "-T default" --label platform --align 1024 --active --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 --uuid 25d57b24-f34d-412e-8c88-28629f23aa0d --size 1G
 
 bootloader --append "rootwait console=ttyO0,115200"
diff --git a/wic/x86_64-generic.wks b/wic/x86_64-generic.wks
index a2b9c21..ac63bb7 100644
--- a/wic/x86_64-generic.wks
+++ b/wic/x86_64-generic.wks
@@ -8,6 +8,6 @@ 
 
 part /boot --source bootimg-efi-isar --sourceparams "loader=grub-efi" --label efi --part-type EF00 --align 1024 --fsuuid 0x4321dcba --uuid cf142945-6fa1-4945-b0f2-b8d6226298c0
 
-part / --source rootfs --fstype ext4 --mkfs-extraopts "-T default" --label platform --align 1024 --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 --uuid f225331b-2d9c-45a2-bcfe-4a6e86287dfb
+part / --source rootfs --fstype ext4 --mkfs-extraopts "-T default" --label platform --align 1024 --fsuuid 1f55d66a-40d8-11ee-be56-0242ac120002 --uuid f225331b-2d9c-45a2-bcfe-4a6e86287dfb --size 1G
 
 bootloader --ptable gpt --timeout 2 --append "console=ttyS0,115200"