summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--boot/arch/amd64/mbr/Makefile5
-rwxr-xr-xhost/bootfs.sh6
3 files changed, 11 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index d03a640..8f41440 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
*.o
*.d
*.bin
+*.rdar
diff --git a/boot/arch/amd64/mbr/Makefile b/boot/arch/amd64/mbr/Makefile
index f41e5cc..9ea0a6f 100644
--- a/boot/arch/amd64/mbr/Makefile
+++ b/boot/arch/amd64/mbr/Makefile
@@ -13,4 +13,7 @@ all: mbr
.PHONY: mbr
mbr:
- clang -Tlink.ld $(CFLAGS) mbr.S -o $(GLOBAL_PROJECT_ROOT)/artifacts/mbr.bin
+ clang -Tlink.ld $(CFLAGS) mbr.S -o mbr.bin
+ $(GLOBAL_PROJECT_ROOT)/host/bootfs.sh
+ cat mbr.bin bootfs.rdar >$(GLOBAL_PROJECT_ROOT)/artifacts/mbr.bin
+ rm -f mbr.bin
diff --git a/host/bootfs.sh b/host/bootfs.sh
new file mode 100755
index 0000000..8e9b9df
--- /dev/null
+++ b/host/bootfs.sh
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+mkdir -p boot_root
+echo "&" >boot_root/test.txt
+rdar -i boot_root -o bootfs.rdar
+rm -rf boot_root/