Last active
January 27, 2019 09:16
-
-
Save benwei/3d29ac4a59c437ac63f1fa5d7b1ef8cd to your computer and use it in GitHub Desktop.
For testing with orangeos's example chapter1-a
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
# 2019-01-25 Ben Wei <ben@juluos.org> | |
IMAGE=a.img | |
BINFILE=boot.bin | |
all: $(IMAGE) $(BINFILE) | |
$(BINFILE): boot.asm | |
nasm boot.asm -f bin -o $(BINFILE) | |
dd if=$(BINFILE) of=./$(IMAGE) bs=512 count=1 | |
$(IMAGE): | |
qemu-img create -f raw $(IMAGE) 1440k | |
mkfs.msdos -s 1 $(IMAGE) | |
run: | |
qemu-system-x86_64 -fda $(BINFILE) | |
runraw: | |
qemu-system-x86_64 -drive format=raw,file=$(BINFILE) | |
clean: | |
rm -f $(BINFILE) $(IMAGE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment