mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
FreeBSD VM/cloud images tend to be highly compressible: The generic VM images compress roughly 3.5:1, and cloud images typically even more since they have significant unused space in their virtual disks. This generally doesn't matter for users who can download compressed release images and extract them locally, but for EC2 in particular relying on uncompressed image formats is painful: We now upload over 500 GB/week to AWS. This commit adds the "stream-optimized" version of the VMDK format, which compresses each 64 kB "grain" individually (and omits grains which are all zeroes). Compared to uncompressed formats, this can produce much smaller images; experiments indicate that using this format for EC2 image uploads will reduce the weekly traffic to under 100 GB/week. Co-authored-by: Claude Opus 5.5 MFC after: 2 weeks Sponsored by: Amazon Differential Revision: https://reviews.freebsd.org/D60151
38 lines
501 B
Makefile
38 lines
501 B
Makefile
.include <src.opts.mk>
|
|
|
|
PROG= mkimg
|
|
SRCS+= format.c image.c mkimg.c scheme.c uuid.c
|
|
MAN= mkimg.1
|
|
|
|
MKIMG_VERSION=20161016
|
|
mkimg.o: Makefile
|
|
|
|
CFLAGS+=-DMKIMG_VERSION=${MKIMG_VERSION}
|
|
CFLAGS+=-DSPARSE_WRITE
|
|
CFLAGS+=-I${SRCTOP}/sys/sys/disk
|
|
|
|
# List of formats to support
|
|
SRCS+= \
|
|
qcow.c \
|
|
raw.c \
|
|
vhd.c \
|
|
vhdx.c \
|
|
vmdk.c
|
|
|
|
# List of schemes to support
|
|
SRCS+= \
|
|
apm.c \
|
|
bsd.c \
|
|
ebr.c \
|
|
gpt.c \
|
|
mbr.c
|
|
|
|
BINDIR?=/usr/bin
|
|
|
|
LIBADD= util z
|
|
|
|
HAS_TESTS=
|
|
SUBDIR.${MK_TESTS}+= tests
|
|
|
|
.include <bsd.prog.mk>
|