mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-26 20:12:44 +00:00
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
This commit is contained in:
parent
454c425dbe
commit
ac4f03e03e
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user