build/boot: "we can be errors, just for one day"
This commit is contained in:
parent
2c560fd2b4
commit
35d1e1138f
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue