First pass at getting Acadia running under bochs.

- Create a bochs build script.
- Properly configure COM1
This commit is contained in:
Drew Galbraith 2025-05-06 22:22:02 -07:00
parent 93d1299bd9
commit 5a20c23569
9 changed files with 153 additions and 40 deletions

View file

@ -8,26 +8,9 @@ echo $DIR
BUILD_DIR="${DIR}/../builddbg"
pushd $BUILD_DIR
ninja
ninja install
CARGO_USR_ROOT="${DIR}/../sysroot/usr/"
CARGO_SYS_ROOT="${DIR}/../sysroot/"
# Need to pushd so rustup gets the toolchain from rust/rust_toolchain.toml
pushd "${DIR}/../rust"
for BIN in ${DIR}/../rust/usr/*/; do
cargo install --force --path "${BIN}" --root $CARGO_USR_ROOT
done
for BIN in ${DIR}/../rust/sys/*/; do
cargo install --all-features --force --path "${BIN}" --root $CARGO_SYS_ROOT
done
popd
sudo sh ${DIR}/build_image.sh disk.img
bash ${DIR}/build.sh
sudo sh ${DIR}/build_image.sh ${BUILD_DIR}/disk.img
QEMU_ARGS=
if [[ $1 == "debug" ]]; then
@ -35,7 +18,7 @@ if [[ $1 == "debug" ]]; then
fi
# Use machine q35 to access PCI devices.
qemu-system-x86_64 -machine q35 -d guest_errors -m 1G -serial stdio -hda disk.img ${QEMU_ARGS} -device nec-usb-xhci,id=xhci -device usb-kbd,bus=xhci.0
qemu-system-x86_64 -machine q35 -d guest_errors -m 1G -serial stdio -hda ${BUILD_DIR}/disk.img ${QEMU_ARGS} -device nec-usb-xhci,id=xhci -device usb-kbd,bus=xhci.0
popd
# Extra options to add to this script in the future.