summaryrefslogtreecommitdiff
path: root/boot/arch/amd64/biosboot
diff options
context:
space:
mode:
Diffstat (limited to 'boot/arch/amd64/biosboot')
-rw-r--r--boot/arch/amd64/biosboot/Makefile16
-rw-r--r--boot/arch/amd64/biosboot/biosboot.S5
2 files changed, 21 insertions, 0 deletions
diff --git a/boot/arch/amd64/biosboot/Makefile b/boot/arch/amd64/biosboot/Makefile
new file mode 100644
index 0000000..c782240
--- /dev/null
+++ b/boot/arch/amd64/biosboot/Makefile
@@ -0,0 +1,16 @@
+CC = clang
+CFLAGS = \
+ -ffreestanding \
+ -nostdlib \
+ -nostdinc \
+ -mno-red-zone \
+ -mno-sse \
+ -mno-sse2 \
+ -target i386-unknown-elf
+
+.PHONY: all
+all: biosboot
+
+.PHONY: biosboot
+biosboot:
+ clang -T../mbr/link.ld $(CFLAGS) biosboot.S -o biosboot.bin
diff --git a/boot/arch/amd64/biosboot/biosboot.S b/boot/arch/amd64/biosboot/biosboot.S
new file mode 100644
index 0000000..717d29d
--- /dev/null
+++ b/boot/arch/amd64/biosboot/biosboot.S
@@ -0,0 +1,5 @@
+ .code16
+_start:
+ cli
+ hlt
+ jmp _start