Use sparse files for the generated disk images on all OSes

Rather than just on macOS. This can save quite a bit of space depending
on the amount of free space on the root filesystem of the disk image.
This commit is contained in:
bjorn3 2024-01-08 19:09:31 +01:00
commit cf04f50d86

View file

@ -41,7 +41,6 @@ ifeq ($(UNAME),Darwin)
VB_AUDIO=coreaudio
VBM=/Applications/VirtualBox.app/Contents/MacOS/VBoxManage
HOST_TARGET ?= $(HOST_ARCH)-apple-darwin
ALLOC_FILE=truncate -s "$(FILESYSTEM_SIZE)m"
else ifeq ($(UNAME),FreeBSD)
FUMOUNT=sudo umount
export NPROC=sysctl -n hw.ncpu
@ -49,7 +48,6 @@ else ifeq ($(UNAME),FreeBSD)
VB_AUDIO=pulse # To check, will probaly be OSS on most setups
VBM=VBoxManage
HOST_TARGET ?= $(HOST_ARCH)-unknown-freebsd
ALLOC_FILE=fallocate --posix --length "$(FILESYSTEM_SIZE)MiB"
else
# Detect which version of the fusermount binary is available.
ifneq (, $(shell which fusermount3))
@ -63,7 +61,6 @@ else
VB_AUDIO=pulse
VBM=VBoxManage
HOST_TARGET ?= $(HOST_ARCH)-unknown-linux-gnu
ALLOC_FILE=fallocate --posix --length "$(FILESYSTEM_SIZE)MiB"
endif
ifneq ($(UNAME),Linux)