forked from crazyettin/EttinOS
27 lines
617 B
Bash
Executable file
27 lines
617 B
Bash
Executable file
#!/bin/bash
|
|
|
|
rm -f EttinOS.img
|
|
if [[ ! -d "bin" ]]
|
|
then
|
|
mkdir bin
|
|
fi
|
|
|
|
cd src/
|
|
if [ "$1" == "-1440" ]
|
|
then nasm BOOT.ASM -d F1440 -f bin -o ../bin/BOOT.BIN
|
|
else nasm BOOT.ASM -f bin -o ../bin/BOOT.BIN
|
|
fi
|
|
nasm SYSTEM.ASM -f bin -o ../bin/SYSTEM.BIN
|
|
nasm HELLO.ASM -f bin -o ../bin/HELLO.BIN
|
|
|
|
cd ..
|
|
if [ "$1" == "-1440" ]
|
|
then mkfs.fat -C EttinOS.img 1440
|
|
else mkfs.fat -C EttinOS.img 360
|
|
fi
|
|
dd if=bin/BOOT.BIN of=EttinOS.img conv=notrunc bs=512 count=1
|
|
mcopy -i EttinOS.img bin/SYSTEM.BIN ::
|
|
mcopy -i EttinOS.img bin/HELLO.BIN ::
|
|
mcopy -i EttinOS.img README.MD ::
|
|
mcopy -i EttinOS.img LICENSE.MD ::
|