Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/floppy/build.sh
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2022-09-02 09:18:52 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2022-09-02 09:18:52 +0200
commit52be99d8c0862ff87db9a4f9ccec1ac4b5f7caed (patch)
tree1a1a1c98090afd8459cc8f045f9de2d4a7cba5ab /floppy/build.sh
parent15adaba9eaa6a98c8b55bc5c5f73c3a9e0e55e7a (diff)
added a quite unsorted first version of a floppy boot loader
Diffstat (limited to 'floppy/build.sh')
-rwxr-xr-xfloppy/build.sh24
1 files changed, 24 insertions, 0 deletions
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'