diff options
-rwxr-xr-x | build.sh | 8 | ||||
-rw-r--r-- | src/grub.cfg | 6 | ||||
-rw-r--r-- | src/kernel/boot.asm (renamed from src/boot.asm) | 10 | ||||
-rw-r--r-- | src/kernel/commands/command.c (renamed from src/commands/command.c) | 0 | ||||
-rw-r--r-- | src/kernel/commands/command.h (renamed from src/commands/command.h) | 0 | ||||
-rw-r--r-- | src/kernel/gdt/gdt.asm (renamed from src/gdt/gdt.asm) | 0 | ||||
-rw-r--r-- | src/kernel/gdt/gdt.c (renamed from src/gdt/gdt.c) | 0 | ||||
-rw-r--r-- | src/kernel/gdt/gdt.h (renamed from src/gdt/gdt.h) | 0 | ||||
-rw-r--r-- | src/kernel/graphics/graphics.h (renamed from src/graphics/graphics.h) | 0 | ||||
-rw-r--r-- | src/kernel/graphics/vga.c (renamed from src/graphics/vga.c) | 0 | ||||
-rw-r--r-- | src/kernel/grub.cfg | 6 | ||||
-rw-r--r-- | src/kernel/input/input.h (renamed from src/input/input.h) | 0 | ||||
-rw-r--r-- | src/kernel/input/ps2/keyboard.c (renamed from src/input/ps2/keyboard.c) | 0 | ||||
-rw-r--r-- | src/kernel/input/ps2/mouse.c (renamed from src/input/ps2/mouse.c) | 0 | ||||
-rw-r--r-- | src/kernel/interrupts/idt.asm (renamed from src/interrupts/idt.asm) | 0 | ||||
-rw-r--r-- | src/kernel/interrupts/idt.c (renamed from src/interrupts/idt.c) | 0 | ||||
-rw-r--r-- | src/kernel/interrupts/interrupts.h (renamed from src/interrupts/interrupts.h) | 0 | ||||
-rw-r--r-- | src/kernel/interrupts/irq.asm (renamed from src/interrupts/irq.asm) | 0 | ||||
-rw-r--r-- | src/kernel/interrupts/irq.c (renamed from src/interrupts/irq.c) | 0 | ||||
-rw-r--r-- | src/kernel/interrupts/isr.asm (renamed from src/interrupts/isr.asm) | 0 | ||||
-rw-r--r-- | src/kernel/interrupts/isr.c (renamed from src/interrupts/isr.c) | 0 | ||||
-rw-r--r-- | src/kernel/io/io.asm (renamed from src/io/io.asm) | 0 | ||||
-rw-r--r-- | src/kernel/io/io.c (renamed from src/io/io.c) | 0 | ||||
-rw-r--r-- | src/kernel/io/io.h (renamed from src/io/io.h) | 0 | ||||
-rw-r--r-- | src/kernel/kernel.c (renamed from src/kernel.c) | 9 | ||||
-rw-r--r-- | src/kernel/lib/lib.h (renamed from src/lib/lib.h) | 0 | ||||
-rw-r--r-- | src/kernel/lib/memory.c (renamed from src/lib/memory.c) | 0 | ||||
-rw-r--r-- | src/kernel/lib/string.c (renamed from src/lib/string.c) | 0 | ||||
-rw-r--r-- | src/kernel/linker.ld (renamed from src/linker.ld) | 0 | ||||
-rw-r--r-- | src/kernel/sound/frequency.c (renamed from src/sound/frequency.c) | 0 | ||||
-rw-r--r-- | src/kernel/sound/sound.h (renamed from src/sound/sound.h) | 0 | ||||
-rw-r--r-- | src/kernel/timer/timer.c (renamed from src/timer/timer.c) | 0 | ||||
-rw-r--r-- | src/kernel/timer/timer.h (renamed from src/timer/timer.h) | 0 |
33 files changed, 15 insertions, 24 deletions
@@ -9,11 +9,11 @@ rm -rf ./build/ ./iso/ mkdir ./build/ # Assemble ASM files -nasm -f elf ./src/boot.asm -o ./build/boot.o +nasm -f elf ./src/kernel/boot.asm -o ./build/boot.o # Make all C files files="" -find ./src -name \*.c >./build/tmp +find ./src/kernel/ -name \*.c >./build/tmp while read -r line; do stripped=$(echo "${line}" | sed -r 's/\//_/g') stripped=${stripped#??????} @@ -25,7 +25,7 @@ rm ./build/tmp # shellcheck disable=SC2086 # Shellcheck suppression is needed because gcc would think that $files is one file -i686-elf-gcc -T ./src/linker.ld -o ./build/melvix.bin -ffreestanding -O2 -nostdlib ./build/boot.o $files -lgcc +i686-elf-gcc -T ./src/kernel/linker.ld -o ./build/melvix.bin -ffreestanding -O2 -nostdlib ./build/boot.o $files -lgcc # Testing if grub-file --is-x86-multiboot ./build/melvix.bin; then @@ -38,7 +38,7 @@ fi # Create ISO mkdir -p ./iso/boot/grub cp ./build/melvix.bin ./iso/boot/ -cp ./src/grub.cfg ./iso/boot/grub/ +cp ./src/kernel/grub.cfg ./iso/boot/grub/ grub-mkrescue -o ./build/melvix.iso ./iso/ # Run ISO diff --git a/src/grub.cfg b/src/grub.cfg deleted file mode 100644 index 8106b6c..0000000 --- a/src/grub.cfg +++ /dev/null @@ -1,6 +0,0 @@ -set timeout=0 -set default=0 - -menuentry "Melvix" { - multiboot /boot/melvix.bin -}
\ No newline at end of file diff --git a/src/boot.asm b/src/kernel/boot.asm index 0581eb6..eddd3a4 100644 --- a/src/boot.asm +++ b/src/kernel/boot.asm @@ -34,15 +34,15 @@ stublet: call kernel_main jmp $ -%include "src/gdt/gdt.asm" +%include "src/kernel/gdt/gdt.asm" -%include "src/interrupts/idt.asm" +%include "src/kernel/interrupts/idt.asm" -%include "src/interrupts/isr.asm" +%include "src/kernel/interrupts/isr.asm" -%include "src/interrupts/irq.asm" +%include "src/kernel/interrupts/irq.asm" -%include "src/io/io.asm" +%include "src/kernel/io/io.asm" ; Store the stack SECTION .bss diff --git a/src/commands/command.c b/src/kernel/commands/command.c index 9cbcb07..9cbcb07 100644 --- a/src/commands/command.c +++ b/src/kernel/commands/command.c diff --git a/src/commands/command.h b/src/kernel/commands/command.h index 2a43416..2a43416 100644 --- a/src/commands/command.h +++ b/src/kernel/commands/command.h diff --git a/src/gdt/gdt.asm b/src/kernel/gdt/gdt.asm index c2128e4..c2128e4 100644 --- a/src/gdt/gdt.asm +++ b/src/kernel/gdt/gdt.asm diff --git a/src/gdt/gdt.c b/src/kernel/gdt/gdt.c index 813b432..813b432 100644 --- a/src/gdt/gdt.c +++ b/src/kernel/gdt/gdt.c diff --git a/src/gdt/gdt.h b/src/kernel/gdt/gdt.h index 46d80e2..46d80e2 100644 --- a/src/gdt/gdt.h +++ b/src/kernel/gdt/gdt.h diff --git a/src/graphics/graphics.h b/src/kernel/graphics/graphics.h index a9ed917..a9ed917 100644 --- a/src/graphics/graphics.h +++ b/src/kernel/graphics/graphics.h diff --git a/src/graphics/vga.c b/src/kernel/graphics/vga.c index 86c00ff..86c00ff 100644 --- a/src/graphics/vga.c +++ b/src/kernel/graphics/vga.c diff --git a/src/kernel/grub.cfg b/src/kernel/grub.cfg new file mode 100644 index 0000000..1029549 --- /dev/null +++ b/src/kernel/grub.cfg @@ -0,0 +1,6 @@ +set timeout = 0 +set default = 0 + +menuentry "Melvix" { +multiboot /boot/melvix.bin +}
\ No newline at end of file diff --git a/src/input/input.h b/src/kernel/input/input.h index 60d2f79..60d2f79 100644 --- a/src/input/input.h +++ b/src/kernel/input/input.h diff --git a/src/input/ps2/keyboard.c b/src/kernel/input/ps2/keyboard.c index ae17675..ae17675 100644 --- a/src/input/ps2/keyboard.c +++ b/src/kernel/input/ps2/keyboard.c diff --git a/src/input/ps2/mouse.c b/src/kernel/input/ps2/mouse.c index 49c5a6c..49c5a6c 100644 --- a/src/input/ps2/mouse.c +++ b/src/kernel/input/ps2/mouse.c diff --git a/src/interrupts/idt.asm b/src/kernel/interrupts/idt.asm index 90eab47..90eab47 100644 --- a/src/interrupts/idt.asm +++ b/src/kernel/interrupts/idt.asm diff --git a/src/interrupts/idt.c b/src/kernel/interrupts/idt.c index ba71339..ba71339 100644 --- a/src/interrupts/idt.c +++ b/src/kernel/interrupts/idt.c diff --git a/src/interrupts/interrupts.h b/src/kernel/interrupts/interrupts.h index 755a633..755a633 100644 --- a/src/interrupts/interrupts.h +++ b/src/kernel/interrupts/interrupts.h diff --git a/src/interrupts/irq.asm b/src/kernel/interrupts/irq.asm index c485613..c485613 100644 --- a/src/interrupts/irq.asm +++ b/src/kernel/interrupts/irq.asm diff --git a/src/interrupts/irq.c b/src/kernel/interrupts/irq.c index cf9e1fe..cf9e1fe 100644 --- a/src/interrupts/irq.c +++ b/src/kernel/interrupts/irq.c diff --git a/src/interrupts/isr.asm b/src/kernel/interrupts/isr.asm index cf75157..cf75157 100644 --- a/src/interrupts/isr.asm +++ b/src/kernel/interrupts/isr.asm diff --git a/src/interrupts/isr.c b/src/kernel/interrupts/isr.c index 8da7919..8da7919 100644 --- a/src/interrupts/isr.c +++ b/src/kernel/interrupts/isr.c diff --git a/src/io/io.asm b/src/kernel/io/io.asm index 6ab3707..6ab3707 100644 --- a/src/io/io.asm +++ b/src/kernel/io/io.asm diff --git a/src/io/io.c b/src/kernel/io/io.c index 7bddb13..7bddb13 100644 --- a/src/io/io.c +++ b/src/kernel/io/io.c diff --git a/src/io/io.h b/src/kernel/io/io.h index e00a5f0..e00a5f0 100644 --- a/src/io/io.h +++ b/src/kernel/io/io.h diff --git a/src/kernel.c b/src/kernel/kernel.c index e08c370..49fe0b7 100644 --- a/src/kernel.c +++ b/src/kernel/kernel.c @@ -19,14 +19,5 @@ void kernel_main(void) { timer_install(); keyboard_install(); mouse_install(); - - beep(262, 20); - beep(294, 20); - beep(330, 20); - beep(349, 20); - beep(392, 20); - beep(440, 20); - beep(494, 20); - beep(523, 20); // __asm__ ("div %0" :: "r"(0)); // Exception testing x/0 }
\ No newline at end of file diff --git a/src/lib/lib.h b/src/kernel/lib/lib.h index f0d7d1b..f0d7d1b 100644 --- a/src/lib/lib.h +++ b/src/kernel/lib/lib.h diff --git a/src/lib/memory.c b/src/kernel/lib/memory.c index e306ada..e306ada 100644 --- a/src/lib/memory.c +++ b/src/kernel/lib/memory.c diff --git a/src/lib/string.c b/src/kernel/lib/string.c index 6ef0316..6ef0316 100644 --- a/src/lib/string.c +++ b/src/kernel/lib/string.c diff --git a/src/linker.ld b/src/kernel/linker.ld index 6461b2b..6461b2b 100644 --- a/src/linker.ld +++ b/src/kernel/linker.ld diff --git a/src/sound/frequency.c b/src/kernel/sound/frequency.c index 6d02690..6d02690 100644 --- a/src/sound/frequency.c +++ b/src/kernel/sound/frequency.c diff --git a/src/sound/sound.h b/src/kernel/sound/sound.h index baf70b2..baf70b2 100644 --- a/src/sound/sound.h +++ b/src/kernel/sound/sound.h diff --git a/src/timer/timer.c b/src/kernel/timer/timer.c index 38f5be6..38f5be6 100644 --- a/src/timer/timer.c +++ b/src/kernel/timer/timer.c diff --git a/src/timer/timer.h b/src/kernel/timer/timer.h index 66b3c95..66b3c95 100644 --- a/src/timer/timer.h +++ b/src/kernel/timer/timer.h |