diff --git a/test/vkernel/Makefile b/test/vkernel/Makefile index 9ba98bb..3fa9d4d 100644 --- a/test/vkernel/Makefile +++ b/test/vkernel/Makefile @@ -3,10 +3,23 @@ # require it to be specified SRCDIR ?= ${.CURDIR}/../.. -ROOTSIZE ?= 2048M PHYSMEM ?= 256m NCPUS ?= 2 +.if ${FSTYPE} == "hammer" +NEWFS_CMD = newfs_${FSTYPE} +NEWFS_ARGS = -L VKROOT -f +MOUNT_CMD = mount_${FSTYPE} +ROOTSIZE ?= 5G +.elif ${FSTYPE} == "4.2BSD" +NEWFS_CMD = newfs +NEWFS_ARGS = "" +MOUNT_CMD = mount +ROOTSIZE ?= 2G +.else + @(echo "Invalid filesystem ${FSTYPE}"; /usr/bin/false) +.endif + all: help .if ${MACHINE_ARCH} == "i386" @@ -99,17 +112,19 @@ root: check fdisk -IB `cat ${VKDIR}/vn.which` disklabel -r -w `cat ${VKDIR}/vn.which`s1 auto disklabel `cat ${VKDIR}/vn.which`s1 > ${VKDIR}/label.tmp - echo 'a: * 0 4.2BSD' >> ${VKDIR}/label.tmp + echo 'a: * 0 ${FSTYPE}' >> ${VKDIR}/label.tmp disklabel -R `cat ${VKDIR}/vn.which`s1 ${VKDIR}/label.tmp disklabel -B `cat ${VKDIR}/vn.which`s1 - newfs /dev/`cat ${VKDIR}/vn.which`s1a + ${NEWFS_CMD} ${NEWFS_ARGS} /dev/`cat ${VKDIR}/vn.which`s1a mkdir -p ${VKDIR}/root vnconfig -u `cat ${VKDIR}/vn.which` > /dev/null 2>&1 mount: check vnconfig -c -s labels `cat ${VKDIR}/vn.which` ${VKDIR}/root.img - fsck -p /dev/`cat ${VKDIR}/vn.which`s1a - mount /dev/`cat ${VKDIR}/vn.which`s1a ${VKDIR}/root +. if ${FSTYPE} == "4.2BSD" + fsck -p /dev/`cat ${VKDIR}/vn.which`s1a +. endif + ${MOUNT_CMD} /dev/`cat ${VKDIR}/vn.which`s1a ${VKDIR}/root @echo "Mounted ${VKDIR}/root" umount: check