From 52be99d8c0862ff87db9a4f9ccec1ac4b5f7caed Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Fri, 2 Sep 2022 09:18:52 +0200 Subject: added a quite unsorted first version of a floppy boot loader --- floppy/build.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 floppy/build.sh (limited to 'floppy/build.sh') diff --git a/floppy/build.sh b/floppy/build.sh new file mode 100755 index 0000000..d8bc7c9 --- /dev/null +++ b/floppy/build.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +nasm -o boot.img boot.asm +if test $? -ne 0; then + exit 1 +fi +stat -c "%n: %s" boot.img +stat -c "%n: %s" bzImage +stat -c "%n: %s" ramdisk.img +touch EOF +stat -c "%n: %s" EOF +tar -cvf data.tar -b1 bzImage ramdisk.img EOF +cat boot.img data.tar > floppy.img +stat -c "%n %s" floppy.img + +tcc -lbsd -Og -g -Wall -o lstar lstar.c +./lstar floppy.img +split -b 1474560 floppy.img +mv xaa floppy1.img +mv xab floppy2.img + +#qemu-system-i386 -no-reboot -boot c -cpu 486 -m 32M -drive "file=floppy1.img,if=none,format=raw,id=drive1" -device floppy,drive-type=144,drive=drive1 -drive "file=floppy2.img,if=none,format=raw,id=drive2" -device floppy,drive-type=144,drive=drive2 -nographic && reset +#qemu-system-i386 -cpu 486 -m 32M -drive "file=floppy1.img,if=floppy,format=raw,drive-type=144" +#bochs -q -f bochs.config 'boot:floppy' 'floppya: 1_44=boot.img, status=inserted' -- cgit v1.2.3-70-g09d2