git: ac4f03e03e6d - main - Firecracker: Make root disk configurable
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 07 Aug 2023 16:21:40 UTC
The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=ac4f03e03e6d94ac46fed7c4f7801b522d290423 commit ac4f03e03e6d94ac46fed7c4f7801b522d290423 Author: Colin Percival <cperciva@FreeBSD.org> AuthorDate: 2023-07-14 22:11:22 +0000 Commit: Colin Percival <cperciva@FreeBSD.org> CommitDate: 2023-08-07 16:21:08 +0000 Firecracker: Make root disk configurable Add a FCROOTFSSZ variable which defaults to "1g" which controls the size of the Firecracker root filesystem; it can be set as low as "300m" at present. Allow WITHOUTS to be overridden if users want to build a root disk with more -- or fewer -- parts of the FreeBSD base system. Reviewed by: gjb Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D41041 --- release/Makefile.firecracker | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/release/Makefile.firecracker b/release/Makefile.firecracker index bb54db7da5db..dc5506f364d2 100644 --- a/release/Makefile.firecracker +++ b/release/Makefile.firecracker @@ -17,7 +17,7 @@ WITHOUT_FC_ENOENT=WITHOUT_ACPI=YES WITHOUT_BOOT=YES WITHOUT_BHYVE=YES \ WITHOUT_FC_FEATURES=WITHOUT_DEBUG_FILES=YES WITHOUT_INCLUDES=YES \ WITHOUT_INSTALLLIB=YES WITHOUT_TESTS=YES WITHOUT_TOOLCHAIN=YES # All the excluded bits -WITHOUTS=${WITHOUT_VM_ENOENT} ${WITHOUT_FC_ENOENT} ${WITHOUT_FC_FEATURES} +WITHOUTS?=${WITHOUT_VM_ENOENT} ${WITHOUT_FC_ENOENT} ${WITHOUT_FC_FEATURES} firecracker: firecracker-freebsd-kern.bin firecracker-freebsd-rootfs.bin @@ -35,6 +35,7 @@ firecracker-freebsd-kern.bin: cp ${FCKDIR}/boot/kernel/kernel ${DESTDIR}/freebsd-kern.bin FCWDIR= ${.OBJDIR}/${TARGET}/firecracker-world +FCROOTFSSZ?= 1g firecracker-freebsd-rootfs.bin: mkdir -p ${FCWDIR} ${MAKE} -C ${WORLDDIR} DESTDIR=${FCWDIR} \ @@ -54,5 +55,5 @@ firecracker-freebsd-rootfs.bin: -u 1001 -g 1001 -G 0 -c "FreeBSD User" -d /home/freebsd -s /bin/sh pw -R ${FCWDIR} usermod root -w yes touch ${FCWDIR}/firstboot - makefs -s 1g -o label=rootfs -o version=2 -o softupdates=1 \ + makefs -s ${FCROOTFSSZ} -o label=rootfs -o version=2 -o softupdates=1 \ ${DESTDIR}/freebsd-rootfs.bin ${FCWDIR}