aboutsummaryrefslogtreecommitdiffstats
path: root/make.sh
diff options
context:
space:
mode:
authorkotorifan <kotorifan05@gmail.com>2026-01-31 13:32:57 +0100
committerkotorifan <kotorifan05@gmail.com>2026-02-04 09:01:10 +0100
commitdfe4a33865ef01c5068804f77da844cdebd87f00 (patch)
tree46dd2fe032a0dc0358737147cbfe5cfd1ab60a56 /make.sh
parente0030889e85b070576c40917c649df3338a384df (diff)
downloadkotori-os-dfe4a33865ef01c5068804f77da844cdebd87f00.tar.gz
Added stage 1 of the bootloader + make.sh
Diffstat (limited to 'make.sh')
-rw-r--r--make.sh35
1 files changed, 35 insertions, 0 deletions
diff --git a/make.sh b/make.sh
index e69de29..bbddce8 100644
--- a/make.sh
+++ b/make.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+AS_BOOT=nasm -fbin
+SRC_DIR=src
+DST_DIR=dst
+IMG_FILE=disk.iso
+
+clean()
+{
+ rm -f $IMG_FILE
+ rm -rf $DST_DIR
+}
+
+build()
+{
+ clean()
+ $AS_BOOT $SRC_DIR/boot/boot.stage1.asm -o $DST_DIR/s1_boot.bin
+}
+
+run()
+{
+ qemu-system-x86_64 -cdrom $IMG_FILE
+}
+
+debug()
+{
+ qemu-system-x86_64 -cdrom $IMG_FILE -S -s
+}
+case $1 in
+ "clean") clean ;;
+ "build") build ;;
+ "run") run ;;
+ "debug") debug ;;
+ *) echo "Use clean|build|run|debug" ;;
+esac