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)
May 19 2024, 9:10 PM
Unknown Object (File)
May 15 2024, 5:45 PM
Unknown Object (File)
Mar 11 2024, 2:13 PM
Unknown Object (File)
Mar 11 2024, 2:13 PM
Unknown Object (File)
Mar 11 2024, 2:13 PM
Unknown Object (File)
Mar 11 2024, 2:13 PM
Unknown Object (File)
Mar 11 2024, 2:13 PM
Unknown Object (File)
Mar 8 2024, 2:00 AM
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

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.