From ce0c451e37d761024774fb752d86f300c810a8d8 Mon Sep 17 00:00:00 2001 From: Ada Christine Date: Mon, 29 Jan 2024 23:40:41 +0000 Subject: more temporary --- debug.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/debug.sh b/debug.sh index 00f043d..dd662a6 100755 --- a/debug.sh +++ b/debug.sh @@ -7,22 +7,26 @@ make -C loader && BOOT_DIR=EFI/BOOT BOOT_FILE=BOOTX64.EFI SYS_DIR=adasoft/sophia +OVMF_DIR=/usr/share/ovmf/x64 LOADER_FILE=loader/loader.efi SHIM_FILE=kc/boot/efi.os KERNEL_FILE=kc/core/kernel.os -tempdir=$(mktemp -d) +tempdir=$(mktemp -d) && +rundir=${tempdir}/run && -mkdir -p ${tempdir}/${BOOT_DIR} ${tempdir}/${SYS_DIR} && -cp ${LOADER_FILE} ${tempdir}/${BOOT_DIR}/${BOOT_FILE} && -cp ${SHIM_FILE} ${KERNEL_FILE} ${tempdir}/${SYS_DIR} && +cp ${OVMF_DIR}/OVMF_VARS.fd ${tempdir} && + +mkdir -p ${rundir}/${BOOT_DIR} ${rundir}/${SYS_DIR} && +cp ${LOADER_FILE} ${rundir}/${BOOT_DIR}/${BOOT_FILE} && +cp ${SHIM_FILE} ${KERNEL_FILE} ${rundir}/${SYS_DIR} && qemu-system-x86_64 -d int \ -drive if=pflash,format=raw,unit=0,file=/usr/share/ovmf/x64/OVMF_CODE.fd,readonly=on \ - -drive if=pflash,format=raw,unit=1,file=OVMF_VARS.fd \ - -net none -drive file=fat:rw:${tempdir} -monitor stdio \ + -drive if=pflash,format=raw,unit=1,file=${tempdir}/OVMF_VARS.fd \ + -net none -drive file=fat:rw:${rundir} -monitor stdio \ -serial file:sophia.log -no-shutdown -no-reboot -s -S rm -rf ${tempdir} -- cgit v1.3.1-1-g115d