diff options
Diffstat (limited to 'make.sh')
| -rw-r--r-- | make.sh | 35 |
1 files changed, 35 insertions, 0 deletions
@@ -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 |
