From 2b26539cad61b4464f6f478aa509ff5609261242 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Krzy=C5=BCanowski?= Date: Sat, 21 Oct 2023 00:27:04 +0200 Subject: [PATCH] Split up scripts for compiling, formatting code, creating iso and starting --- compile.sh | 4 ++++ format.sh | 1 + makeiso.sh | 4 ++++ start.sh | 6 +++--- 4 files changed, 12 insertions(+), 3 deletions(-) create mode 100755 compile.sh create mode 100755 format.sh create mode 100755 makeiso.sh diff --git a/compile.sh b/compile.sh new file mode 100755 index 0000000..66d59f2 --- /dev/null +++ b/compile.sh @@ -0,0 +1,4 @@ +#!/bin/bash +../Kompilator/cross/bin/i686-elf-as boot.s -o boot.o +../Kompilator/cross/bin/i686-elf-gcc -c kernel.c -o kernel.o -std=gnu99 -ffreestanding -O2 -Wall -Wextra +../Kompilator/cross/bin/i686-elf-gcc -T linker.ld -o mkos.bin -ffreestanding -O2 -nostdlib boot.o kernel.o -lgcc diff --git a/format.sh b/format.sh new file mode 100755 index 0000000..82d0513 --- /dev/null +++ b/format.sh @@ -0,0 +1 @@ +indent -nbad -bap -nbc -bbo -hnl -bl -bli0 -brs -c33 -cd33 -ncdb -ncdw -ci4 -cli0 -d0 -di1 -nfc1 -i8 -ip0 -l80 -lp -npcs -nprs -npsl -sai -saf -saw -ncs -nsc -sob -nfca -cp33 -ss -ts8 -il1 kernel.c diff --git a/makeiso.sh b/makeiso.sh new file mode 100755 index 0000000..4c79f25 --- /dev/null +++ b/makeiso.sh @@ -0,0 +1,4 @@ +#!/bin/bash +cp mkos.bin isodir/boot/mkos.bin +cp grub.cfg isodir/boot/grub/grub.cfg +grub-mkrescue -o mkos.iso isodir diff --git a/start.sh b/start.sh index e74fbac..01430e2 100755 --- a/start.sh +++ b/start.sh @@ -1,4 +1,4 @@ #!/bin/bash -../Kompilator/cross/bin/i686-elf-gcc -c kernel.c -o kernel.o -std=gnu99 -ffreestanding -O2 -Wall -Wextra -../Kompilator/cross/bin/i686-elf-gcc -T linker.ld -o mkos.bin -ffreestanding -O2 -nostdlib boot.o kernel.o -lgcc -qemu-system-i386 -kernel mkos.bin +./compile.sh +./makeiso.sh +bochs