build/boot: "we can be errors, just for one day"

This commit is contained in:
Franco Fichtner 2020-07-21 17:50:04 +02:00
parent 2c560fd2b4
commit 35d1e1138f
1 changed files with 13 additions and 3 deletions

View File

@ -33,19 +33,29 @@ SELF=boot
if [ -z "${1}" ]; then
echo ">> No image given."
exit 0
exit 1
fi
IMAGE=$(find ${IMAGESDIR} -name "*-${1}-${PRODUCT_ARCH}.*")
if [ ! -f "${IMAGE}" ]; then
echo ">> No image found."
exit 1
fi
echo ">>> Booting image ${IMAGE}..."
ifconfig tap create # XXX requires tap0 to be created now
TAPDEV=tap0
if ! ifconfig ${TAPDEV}; then
TAPDEV=$(ifconfig tap create)
fi
kldstat -qm vmm || kldload vmm
bhyveload -m 1024 -d ${IMAGE} vm0
bhyve -c 1 -m 1024 -AHP \
-s 0:0,hostbridge \
-s 1:0,virtio-net,tap0 \
-s 1:0,virtio-net,${TAPDEV} \
-s 2:0,ahci-hd,${IMAGE} \
-s 31,lpc -l com1,stdio \
vm0 || true