Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The program is now usable, albeit barely, running inside QEMU, with the only dependency being UEFI! Very cool! Right now, no output is printed to the screen when you type characters, newlines aren't printed correctly, and the program doesn't accept Enter as valid whitespace when reading input.
- Loading branch information
Jonas
committed
Mar 9, 2020
1 parent
78d7fb7
commit 6280c68
Showing
7 changed files
with
79 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
/main | ||
/out | ||
/OVMF_CODE.fd | ||
/OVMF_VARS.fd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,23 @@ | ||
.PHONY: run | ||
run: main | ||
cat sys.f - | ./main | ||
.PHONY: qemu | ||
qemu: out/main 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 \ | ||
-drive if=pflash,format=raw,unit=1,file=OVMF_VARS.fd \ | ||
-net none \ | ||
-drive format=raw,file=fat:rw:out \ | ||
-display type=gtk,zoom-to-fit=on | ||
|
||
main: main.asm impl.asm bootstrap.asm sys.f | ||
fasm $< $@ | ||
# Assuming 'ovmf' package on Arch Linux is installed. | ||
OVMF_CODE.fd: /usr/share/ovmf/x64/OVMF_CODE.fd | ||
cp $< $@ | ||
OVMF_VARS.fd: /usr/share/ovmf/x64/OVMF_VARS.fd | ||
cp $< $@ | ||
|
||
out/main: main.asm impl.asm bootstrap.asm sys.f uefi.asm | ||
mkdir -p out | ||
fasm $< out/main | ||
|
||
.PHONY: clean | ||
clean: | ||
rm -f main | ||
rm -rf out OVMF_CODE.fd OVMF_VARS.fd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.