blob: bbddce8f2fc0a5b7147e03006e58265a21e3144b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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
|