Skip to content

Instantly share code, notes, and snippets.

@benwei
Last active January 27, 2019 09:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benwei/3d29ac4a59c437ac63f1fa5d7b1ef8cd to your computer and use it in GitHub Desktop.
Save benwei/3d29ac4a59c437ac63f1fa5d7b1ef8cd to your computer and use it in GitHub Desktop.
For testing with orangeos's example chapter1-a
# 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