From aa38917ca8767dd0184d6bb4207fee4e39e41cee Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Thu, 12 Aug 2021 12:34:53 +0200 Subject: [PATCH] File structure refactor --- compile.sh | 4 ++-- src/{ => bootloader}/bios.asm | 0 src/{ => bootloader}/bios/convert.asm | 0 src/{ => bootloader}/bios/disk.asm | 0 src/{ => bootloader}/bios/print.asm | 0 src/{ => bootloader}/bootloader.asm | 0 src/{ => bootloader}/equ/ascii.asm | 0 src/{ => bootloader}/equ/bios.asm | 0 src/{ => bootloader}/equ/vga.asm | 0 src/{ => bootloader}/pm.asm | 0 src/{ => bootloader}/pm/gdt.asm | 0 src/{ => bootloader}/pm/vga/print.asm | 0 src/{ => kernel}/kernel.c | 0 src/{ => kernel}/lib/vga.c | 0 14 files changed, 2 insertions(+), 2 deletions(-) rename src/{ => bootloader}/bios.asm (100%) rename src/{ => bootloader}/bios/convert.asm (100%) rename src/{ => bootloader}/bios/disk.asm (100%) rename src/{ => bootloader}/bios/print.asm (100%) rename src/{ => bootloader}/bootloader.asm (100%) rename src/{ => bootloader}/equ/ascii.asm (100%) rename src/{ => bootloader}/equ/bios.asm (100%) rename src/{ => bootloader}/equ/vga.asm (100%) rename src/{ => bootloader}/pm.asm (100%) rename src/{ => bootloader}/pm/gdt.asm (100%) rename src/{ => bootloader}/pm/vga/print.asm (100%) rename src/{ => kernel}/kernel.c (100%) rename src/{ => kernel}/lib/vga.c (100%) diff --git a/compile.sh b/compile.sh index a1a90f3..ad0984d 100755 --- a/compile.sh +++ b/compile.sh @@ -7,10 +7,10 @@ srcDir=src binDir=bin echo "Compiling bootloader... " -nasm -f bin $srcDir/bootloader.asm -i $srcDir -o $binDir/bootloader.bin +nasm -f bin $srcDir/bootloader/bootloader.asm -i $srcDir/bootloader -o $binDir/bootloader.bin echo "Compiling kernel... " -gcc -fno-pie -m32 -Os -ffreestanding -c $srcDir/kernel.c -o $binDir/kernel.o && gcc -o $binDir/kernel.bin $binDir/kernel.o -Wl,--oformat=binary -ffreestanding -nostdlib -shared -Ttext 0x1000 -m32 +gcc -fno-pie -m32 -Os -ffreestanding -c $srcDir/kernel/kernel.c -o $binDir/kernel.o && gcc -o $binDir/kernel.bin $binDir/kernel.o -Wl,--oformat=binary -ffreestanding -nostdlib -shared -Ttext 0x1000 -m32 echo "Creating OS image... " cat $binDir/bootloader.bin $binDir/kernel.bin > $binDir/os-image diff --git a/src/bios.asm b/src/bootloader/bios.asm similarity index 100% rename from src/bios.asm rename to src/bootloader/bios.asm diff --git a/src/bios/convert.asm b/src/bootloader/bios/convert.asm similarity index 100% rename from src/bios/convert.asm rename to src/bootloader/bios/convert.asm diff --git a/src/bios/disk.asm b/src/bootloader/bios/disk.asm similarity index 100% rename from src/bios/disk.asm rename to src/bootloader/bios/disk.asm diff --git a/src/bios/print.asm b/src/bootloader/bios/print.asm similarity index 100% rename from src/bios/print.asm rename to src/bootloader/bios/print.asm diff --git a/src/bootloader.asm b/src/bootloader/bootloader.asm similarity index 100% rename from src/bootloader.asm rename to src/bootloader/bootloader.asm diff --git a/src/equ/ascii.asm b/src/bootloader/equ/ascii.asm similarity index 100% rename from src/equ/ascii.asm rename to src/bootloader/equ/ascii.asm diff --git a/src/equ/bios.asm b/src/bootloader/equ/bios.asm similarity index 100% rename from src/equ/bios.asm rename to src/bootloader/equ/bios.asm diff --git a/src/equ/vga.asm b/src/bootloader/equ/vga.asm similarity index 100% rename from src/equ/vga.asm rename to src/bootloader/equ/vga.asm diff --git a/src/pm.asm b/src/bootloader/pm.asm similarity index 100% rename from src/pm.asm rename to src/bootloader/pm.asm diff --git a/src/pm/gdt.asm b/src/bootloader/pm/gdt.asm similarity index 100% rename from src/pm/gdt.asm rename to src/bootloader/pm/gdt.asm diff --git a/src/pm/vga/print.asm b/src/bootloader/pm/vga/print.asm similarity index 100% rename from src/pm/vga/print.asm rename to src/bootloader/pm/vga/print.asm diff --git a/src/kernel.c b/src/kernel/kernel.c similarity index 100% rename from src/kernel.c rename to src/kernel/kernel.c diff --git a/src/lib/vga.c b/src/kernel/lib/vga.c similarity index 100% rename from src/lib/vga.c rename to src/kernel/lib/vga.c