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
F131728257: D38589.id117215.diff
Fri, Oct 10, 4:54 PM
F131728251: D38589.id117212.diff
Fri, Oct 10, 4:54 PM
F131711168: D38589.id117215.diff
Fri, Oct 10, 1:29 PM
F131711166: D38589.id117247.diff
Fri, Oct 10, 1:29 PM
F131711163: D38589.id117212.diff
Fri, Oct 10, 1:29 PM
F131711159: D38589.id117199.diff
Fri, Oct 10, 1:29 PM
F131711157: D38589.id.diff
Fri, Oct 10, 1:29 PM
F131676639: D38589.diff
Fri, Oct 10, 6:38 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

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.