Folder restructuration
This commit is contained in:
4
Makefile
4
Makefile
@@ -1,6 +1,8 @@
|
|||||||
|
SOURCES = src/io/kbd/ps2.c src/io/serial/serial.c src/io/term/printf.c src/io/term/term.c src/idt/idt.c src/mem/gdt/gdt.c src/mem/misc/utils.c src/time/timer.c src/kmain.c
|
||||||
|
|
||||||
build:
|
build:
|
||||||
rm -f *.o
|
rm -f *.o
|
||||||
x86_64-elf-gcc -g -c -I src src/kbd/ps2.c src/time/timer.c src/idt/idt.c src/mem/utils.c src/mem/gdt.c src/io/serial.c src/io/term.c src/io/printf.c src/kmain.c -Wall -Wextra -std=gnu99 -nostdlib -ffreestanding -fno-stack-protector -fno-stack-check -fno-PIC -ffunction-sections -fdata-sections -mcmodel=kernel
|
x86_64-elf-gcc -g -c -I src $(SOURCES) -Wall -Wextra -std=gnu99 -nostdlib -ffreestanding -fno-stack-protector -fno-stack-check -fno-PIC -ffunction-sections -fdata-sections -mcmodel=kernel
|
||||||
objcopy -O elf64-x86-64 -B i386 -I binary zap-light16.psf zap-light16.o
|
objcopy -O elf64-x86-64 -B i386 -I binary zap-light16.psf zap-light16.o
|
||||||
nasm -f elf64 src/idt/idt.S -o idt_stub.o
|
nasm -f elf64 src/idt/idt.S -o idt_stub.o
|
||||||
x86_64-elf-ld -o pepperk -T linker.ld *.o
|
x86_64-elf-ld -o pepperk -T linker.ld *.o
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#include "idt.h"
|
#include "idt.h"
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include "../io/serial.h"
|
#include "../io/serial/serial.h"
|
||||||
#include "../kbd/ps2.h"
|
#include "../io/kbd/ps2.h"
|
||||||
|
|
||||||
struct interrupt_descriptor idt[256];
|
struct interrupt_descriptor idt[256];
|
||||||
struct idtr idt_reg;
|
struct idtr idt_reg;
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
// PS/2 Keyboard support
|
// PS/2 Keyboard support
|
||||||
|
|
||||||
#include "../io/serial.h"
|
#include "../serial/serial.h"
|
||||||
#include "../io/printf.h"
|
#include "../term/printf.h"
|
||||||
#include "ps2.h"
|
#include "ps2.h"
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "../io/term.h"
|
#include "../term/term.h"
|
||||||
|
|
||||||
// The key status bitfield will be used to see if ALT, CONTROL, or SHIFT is pressed
|
// The key status bitfield will be used to see if ALT, CONTROL, or SHIFT is pressed
|
||||||
uint8_t key_status = 0b00000000;
|
uint8_t key_status = 0b00000000;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "../kernel.h"
|
#include <kernel.h>
|
||||||
#include "serial.h"
|
#include "serial.h"
|
||||||
|
|
||||||
void outb(int port, unsigned char data)
|
void outb(int port, unsigned char data)
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include <limine.h>
|
#include <limine.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include "kernel.h"
|
#include <kernel.h>
|
||||||
#include "term.h"
|
#include "term.h"
|
||||||
|
|
||||||
extern struct limine_framebuffer* framebuffer;
|
extern struct limine_framebuffer* framebuffer;
|
||||||
12
src/kmain.c
12
src/kmain.c
@@ -1,15 +1,15 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <limine.h>
|
#include <limine.h>
|
||||||
#include "io/term.h"
|
#include "io/term/term.h"
|
||||||
#include "io/printf.h"
|
#include "io/term/printf.h"
|
||||||
#include "io/serial.h"
|
#include "io/serial/serial.h"
|
||||||
#include "mem/gdt.h"
|
#include "mem/gdt/gdt.h"
|
||||||
#include "mem/utils.h"
|
#include "mem/misc/utils.h"
|
||||||
#include "idt/idt.h"
|
#include "idt/idt.h"
|
||||||
#include "kernel.h"
|
#include "kernel.h"
|
||||||
#include "time/timer.h"
|
#include "time/timer.h"
|
||||||
#include "kbd/ps2.h"
|
#include "io/kbd/ps2.h"
|
||||||
|
|
||||||
// Limine version used
|
// Limine version used
|
||||||
__attribute__((used, section(".limine_requests")))
|
__attribute__((used, section(".limine_requests")))
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#include "gdt.h"
|
#include "gdt.h"
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "../io/serial.h"
|
#include "../../io/serial/serial.h"
|
||||||
|
|
||||||
// Descriptors are 8-byte wide (64bits)
|
// Descriptors are 8-byte wide (64bits)
|
||||||
// So the selectors will be (in bytes): 0x0, 0x8, 0x10, 0x18, etc..
|
// So the selectors will be (in bytes): 0x0, 0x8, 0x10, 0x18, etc..
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "../io/serial.h"
|
#include "../io/serial/serial.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
For now, the timer module will be using the PIC.
|
For now, the timer module will be using the PIC.
|
||||||
|
|||||||
Reference in New Issue
Block a user