Page MenuHomeFreeBSD

Cirrus-CI: use makefs if size exceeds QEMU's virtual FAT limit
ClosedPublic

Authored by emaste on Feb 14 2023, 2:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 28, 9:13 AM
Unknown Object (File)
Tue, Nov 12, 8:30 PM
Unknown Object (File)
Tue, Nov 5, 11:20 AM
Unknown Object (File)
Oct 18 2024, 5:02 AM
Unknown Object (File)
Oct 2 2024, 1:34 PM
Unknown Object (File)
Oct 2 2024, 1:14 PM
Unknown Object (File)
Sep 20 2024, 12:50 PM
Unknown Object (File)
Sep 17 2024, 4:10 PM
Subscribers
None

Details

Summary
We use QEMU's virtual FAT support to avoid having to create a disk
image, but this support is limited to about 500MB.  Artifacts produced
by the GCC 12 CI job exceed this size.  Add support for creating a FAT
partition image and MBR-partitioned disk image and use it when the
file system is too large for QEMU.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

emaste created this revision.
tools/boot/ci-qemu-test.sh
112

this is somewhat less than 500MB...
Also, du -sk is likely safer since that will always be kb regardless of env settings.

Might also want to drop a comment in saying that we bother checking the size because it's a lot faster to just use qemu virtual FAT when we can... (a trick I need to teach my full-test.sh)

Use -k as suggested by @imp, also add -A since FAT doesn't support sparse files

Will change comment to

# Using QEMU's virtual FAT support is much faster than creating a disk image,
# but only supports about 500MB.  Fall back to creating a disk image if the
# staged root is too large.

Love it now.

Not sure how much cleanup is needed in this env, but I think the whole thing is thrown away so you don't need to cleanup image.fat and image.mbr, right?

This revision is now accepted and ready to land.Feb 14 2023, 4:46 PM
In D38589#878045, @imp wrote:

Not sure how much cleanup is needed in this env, but I think the whole thing is thrown away so you don't need to cleanup image.fat and image.mbr, right?

Right, everything is under ${WORKDIR} and it's all deleted in tmpdir_cleanup.