ROOTFS_SIZE changes between multiple builds

24 views
Skip to first unread message

Adithya....@toshiba-tsip.com

unread,
Jul 4, 2024, 10:30:43 AM (2 days ago) Jul 4
to isar-...@googlegroups.com, dinesh...@toshiba-tsip.com, Shivanand...@toshiba-tsip.com

Hi All,

I have been recently working on reproducible builds for a downstream project (isar-cip-core).

On that effort, I came across a behavior with the ROOTFS_SIZE variable. Sometimes I see that when I build 2 images to check for reproducibility, the value of the ROOTFS_SIZE variable changes between builds. The variation usually only by a few KB's and this behavior is not seen quite often either. At the moment I am not sure about the cause of this problem, Hence posting here seeking suggestions from the rest of you.

I tried checking the rootfs contents, but the contents are identical despite the difference in the size of the rootfs directory.

I am trying to understand this for the following reasons:
1.  In the case where no size parameter is set for a partition in the wks file, wic estimates the rootfs size from the rootfs directory in WORKDIR, See [1]. When the rootfs size is different for the 2 builds, the resulting filesystem images are also different (in the case that I encountered, the 2 ext4 filesystem images are off by a few blocks).
2.  While creating an ext4 filesystem images with the IMAGE_CMD of isar, the filesystem images are created based the ROOTFS_SIZE. In the scenario where ROOTFS_SIZE are the different, the resultant filesystem images are also non-reproducible. See [2]

With regards to point 2 above, that maybe a different topic as there are other problems in achieving reproducibility of ext4 filesystem images, like support for file timestamp clamping to SOURCE_DATE_EPOCH was only recently added to mkfs.ext4 (v1.47.1)

Would like to understand if anyone here has come across such a scenario / any pointers on how to get to the root cause?


[1] https://github.com/ilbers/isar/blob/master/scripts/lib/wic/partition.py#L242
[2] https://github.com/ilbers/isar/blob/master/meta/classes/imagetypes.bbclass#L19

Thanks and Regards,

Adithya Balakumar

Reply all
Reply to author
Forward
0 new messages