From 11239640cba1d187f0b09c4bc3c3e0b76d03bd0c Mon Sep 17 00:00:00 2001 From: Ada Christine Date: Sat, 13 May 2023 10:59:24 +0000 Subject: no more image.sh, use qemu fat emulation --- debug.sh | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'debug.sh') diff --git a/debug.sh b/debug.sh index 988fb5c..00f043d 100755 --- a/debug.sh +++ b/debug.sh @@ -4,11 +4,26 @@ make -C kc/core && make -C kc/boot && make -C loader && -./image.sh && +BOOT_DIR=EFI/BOOT +BOOT_FILE=BOOTX64.EFI +SYS_DIR=adasoft/sophia + +LOADER_FILE=loader/loader.efi + +SHIM_FILE=kc/boot/efi.os +KERNEL_FILE=kc/core/kernel.os + +tempdir=$(mktemp -d) + +mkdir -p ${tempdir}/${BOOT_DIR} ${tempdir}/${SYS_DIR} && +cp ${LOADER_FILE} ${tempdir}/${BOOT_DIR}/${BOOT_FILE} && +cp ${SHIM_FILE} ${KERNEL_FILE} ${tempdir}/${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=uefi.img,if=ide,format=raw -monitor stdio \ - -serial file:sophia.log -no-shutdown -no-reboot -s -S + -net none -drive file=fat:rw:${tempdir} -monitor stdio \ + -serial file:sophia.log -no-shutdown -no-reboot -s -S + +rm -rf ${tempdir} -- cgit v1.3.1-1-g115d