Moved stuff around and added a makefile also got a custom bootloader

based on the JazzOS bootloader (modified a bit)
This commit is contained in:
2025-10-20 10:52:03 +01:00
parent 07932e2ce0
commit d38a233b62
33 changed files with 1248 additions and 890 deletions

View File

@@ -1,14 +1,3 @@
#!/bin/sh
# This script assembles the CrawOS bootloader, kernel and programs
# with NASM, and then creates floppy and CD images (on Linux)
# Only the root user can mount the floppy disk image as a virtual
# drive (loopback mounting), in order to copy across the files
# (If you need to blank the floppy image: 'mkdosfs disk_images/crawos.flp')
if test "`whoami`" != "root" ; then
echo "You must be logged in as root to build (for loopback mounting)"
echo "Enter 'su' or 'sudo bash' to switch to root"
@@ -34,10 +23,6 @@ cd source
nasm -O0 -w+orphan-labels -f bin -o kernel.bin kernel.asm || exit
cd ..
echo ">>> Assembling programs..."
echo ">>> Adding bootloader to floppy image..."
dd status=noxfer conv=notrunc if=source/bootload/bootload.bin of=disk_images/crawos.flp || exit
@@ -49,6 +34,7 @@ rm -rf tmp-loop
mkdir tmp-loop && mount -o loop -t vfat disk_images/crawos.flp tmp-loop && cp source/kernel.bin tmp-loop/
cp data/*
sleep 0.2
@@ -62,9 +48,9 @@ rm -rf tmp-loop
echo ">>> Creating CD-ROM ISO image..."
rm -f disk_images/crawos.iso
mkisofs -quiet -V 'MIKEOS' -input-charset iso8859-1 -o disk_images/crawos.iso -b crawos.flp disk_images/ || exit
mkisofs -quiet -V 'CRAWOS' -input-charset iso8859-1 -o disk_images/crawos.iso -b crawos.flp disk_images/ || exit
echo '>>> Done!'
#qemu-system-i386 -drive file=disk_images/crawos.flp,index=0,if=floppy,format=raw
qemu-system-i386 -drive file=disk_images/crawos.flp,index=0,if=floppy,format=raw