Split up scripts for compiling, formatting code, creating iso and starting

This commit is contained in:
Maciej Krzyżanowski 2023-10-21 00:27:04 +02:00
parent 60b847b3fd
commit 2b26539cad
4 changed files with 12 additions and 3 deletions

4
compile.sh Executable file
View File

@ -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

1
format.sh Executable file
View File

@ -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

4
makeiso.sh Executable file
View File

@ -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

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/bin/bash
../Kompilator/cross/bin/i686-elf-gcc -c kernel.c -o kernel.o -std=gnu99 -ffreestanding -O2 -Wall -Wextra ./compile.sh
../Kompilator/cross/bin/i686-elf-gcc -T linker.ld -o mkos.bin -ffreestanding -O2 -nostdlib boot.o kernel.o -lgcc ./makeiso.sh
qemu-system-i386 -kernel mkos.bin bochs