forked from crazyettin/EttinOS
Add support for Sortix build environment.
Co-authored-by: Jonas 'Sortie' Termansen <sortie@maxsi.org>
This commit is contained in:
parent
2bfa61b669
commit
5aa6bcb79c
2 changed files with 10 additions and 6 deletions
|
@ -18,8 +18,8 @@ Building
|
||||||
|
|
||||||
Build dependencies:
|
Build dependencies:
|
||||||
* A Unix-like operating system
|
* A Unix-like operating system
|
||||||
* bash
|
|
||||||
* coreutils
|
* coreutils
|
||||||
|
* rw (optional)
|
||||||
* dosfstools
|
* dosfstools
|
||||||
* mtools
|
* mtools
|
||||||
* nasm
|
* nasm
|
||||||
|
|
14
make.sh
14
make.sh
|
@ -1,13 +1,13 @@
|
||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
rm -f EttinOS.img
|
rm -f EttinOS.img
|
||||||
if [[ ! -d "bin" ]]
|
if [ ! -d "bin" ]
|
||||||
then
|
then
|
||||||
mkdir bin
|
mkdir bin
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd src/
|
cd src/
|
||||||
if [ "$1" == "-1440" ]
|
if [ "$1" = "-1440" ]
|
||||||
then nasm BOOT.ASM -d F1440 -f bin -o ../bin/BOOT.BIN
|
then nasm BOOT.ASM -d F1440 -f bin -o ../bin/BOOT.BIN
|
||||||
else nasm BOOT.ASM -f bin -o ../bin/BOOT.BIN
|
else nasm BOOT.ASM -f bin -o ../bin/BOOT.BIN
|
||||||
fi
|
fi
|
||||||
|
@ -15,11 +15,15 @@ nasm SYSTEM.ASM -f bin -o ../bin/SYSTEM.BIN
|
||||||
nasm HELLO.ASM -f bin -o ../bin/HELLO.BIN
|
nasm HELLO.ASM -f bin -o ../bin/HELLO.BIN
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
if [ "$1" == "-1440" ]
|
if [ "$1" = "-1440" ]
|
||||||
then mkfs.fat -C EttinOS.img 1440
|
then mkfs.fat -C EttinOS.img 1440
|
||||||
else mkfs.fat -C EttinOS.img 360
|
else mkfs.fat -C EttinOS.img 360
|
||||||
fi
|
fi
|
||||||
dd if=bin/BOOT.BIN of=EttinOS.img conv=notrunc bs=512 count=1
|
|
||||||
|
if which rw > /dev/null 2>&1
|
||||||
|
then rw -i bin/BOOT.BIN -o EttinOS.img -b 512 -c 1x
|
||||||
|
else dd if=bin/BOOT.BIN of=EttinOS.img conv=notrunc bs=512 count=1
|
||||||
|
fi
|
||||||
mcopy -i EttinOS.img bin/SYSTEM.BIN ::
|
mcopy -i EttinOS.img bin/SYSTEM.BIN ::
|
||||||
mcopy -i EttinOS.img bin/HELLO.BIN ::
|
mcopy -i EttinOS.img bin/HELLO.BIN ::
|
||||||
mcopy -i EttinOS.img README.MD ::
|
mcopy -i EttinOS.img README.MD ::
|
||||||
|
|
Loading…
Reference in a new issue