From 0344d8645260cfe0f81912a775d775db39fc0624 Mon Sep 17 00:00:00 2001 From: Jonas Hvid Date: Mon, 5 Oct 2020 02:33:04 +0200 Subject: [PATCH] Add startup.nsh to QEMU drive This reduces the amount of typing that we have to do. Now the UEFI application automatically runs on startup. --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c812dcc..4b8184f 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ .PHONY: qemu -qemu: out/main OVMF_CODE.fd OVMF_VARS.fd +qemu: out/main out/startup.nsh OVMF_CODE.fd OVMF_VARS.fd # Based on https://wiki.osdev.org/UEFI#Emulation_with_QEMU_and_OVMF qemu-system-x86_64 -cpu qemu64 \ -drive if=pflash,format=raw,unit=0,file=OVMF_CODE.fd,readonly=on \ @@ -18,6 +18,10 @@ out/main: main.asm impl.asm bootstrap.asm sys.f os/uefi.asm mkdir -p out OS_INCLUDE=os/uefi.asm fasm $< $@ +out/startup.nsh: + mkdir -p out + echo 'fs0:main' >out/startup.nsh + main: main.asm impl.asm bootstrap.asm sys.f os/linux.asm OS_INCLUDE=os/linux.asm fasm $< $@ -- 2.39.2