This causes us to reinstall and rebuild the image each time we run qemu. This necessary now that we are loading files from the disk because cmake makes it tricky (impossible?) to have a command rely on a different target being "installed". Because of this, updates to the teton executable were not being picked up on the image.
23 lines
428 B
Bash
Executable file
23 lines
428 B
Bash
Executable file
#! /bin/bash
|
|
|
|
set -e
|
|
|
|
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
echo $DIR
|
|
|
|
BUILD_DIR="${DIR}/../builddbg"
|
|
|
|
pushd $BUILD_DIR
|
|
ninja && ninja install
|
|
|
|
sudo sh ${DIR}/build_image.sh disk.img
|
|
|
|
# Use machine q35 to access PCI devices.
|
|
qemu-system-x86_64 -machine q35 -d guest_errors -m 1G -serial stdio -hda disk.img
|
|
popd
|
|
|
|
# Extra options to add to this script in the future.
|
|
# Debug opts: -S -s
|
|
# Interrupt opts: -d int
|
|
|