Driver section separation
This commit is contained in:
Binary file not shown.
7
makefile
7
makefile
@@ -8,10 +8,11 @@ SRC_DIR = src
|
|||||||
KERNEL_DIR = $(SRC_DIR)/kernel
|
KERNEL_DIR = $(SRC_DIR)/kernel
|
||||||
LIBC_DIR = $(SRC_DIR)/libc
|
LIBC_DIR = $(SRC_DIR)/libc
|
||||||
PROGRAMS_DIR = $(SRC_DIR)/programs
|
PROGRAMS_DIR = $(SRC_DIR)/programs
|
||||||
|
DRIVERS_DIR = $(SRC_DIR)/drivers
|
||||||
OBJ_DIR = build
|
OBJ_DIR = build
|
||||||
|
|
||||||
C_SOURCES = $(wildcard $(KERNEL_DIR)/*.c) $(wildcard $(LIBC_DIR)/*.c) $(wildcard $(PROGRAMS_DIR)/*.c)
|
C_SOURCES = $(wildcard $(KERNEL_DIR)/*.c) $(wildcard $(LIBC_DIR)/*.c) $(wildcard $(PROGRAMS_DIR)/*.c) $(wildcard $(DRIVERS_DIR)/*.c)
|
||||||
ASM_SOURCES = $(wildcard $(KERNEL_DIR)/*.s) $(wildcard $(LIBC_DIR)/*.s) $(wildcard $(PROGRAMS_DIR)/*.s)
|
ASM_SOURCES = $(wildcard $(KERNEL_DIR)/*.s) $(wildcard $(LIBC_DIR)/*.s) $(wildcard $(PROGRAMS_DIR)/*.s) $(wildcard $(DRIVERS_DIR)/*.s)
|
||||||
|
|
||||||
OBJECTS = $(patsubst $(SRC_DIR)/%, $(OBJ_DIR)/%, $(C_SOURCES:.c=.o) $(ASM_SOURCES:.s=.o))
|
OBJECTS = $(patsubst $(SRC_DIR)/%, $(OBJ_DIR)/%, $(C_SOURCES:.c=.o) $(ASM_SOURCES:.s=.o))
|
||||||
|
|
||||||
@@ -19,7 +20,7 @@ all: $(OBJ_DIR) kernel.elf
|
|||||||
|
|
||||||
$(OBJ_DIR):
|
$(OBJ_DIR):
|
||||||
mkdir -p $(OBJ_DIR)
|
mkdir -p $(OBJ_DIR)
|
||||||
mkdir -p $(OBJ_DIR)/kernel $(OBJ_DIR)/libc $(OBJ_DIR)/programs
|
mkdir -p $(OBJ_DIR)/kernel $(OBJ_DIR)/libc $(OBJ_DIR)/programs $(OBJ_DIR)/drivers
|
||||||
|
|
||||||
kernel.elf: $(OBJECTS)
|
kernel.elf: $(OBJECTS)
|
||||||
ld $(LDFLAGS) $(OBJECTS) -o kernel.elf
|
ld $(LDFLAGS) $(OBJECTS) -o kernel.elf
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#include "io.h"
|
#include "../kernel/io.h"
|
||||||
#include "../libc/stdio.h"
|
#include "../libc/stdio.h"
|
||||||
#include "system.h"
|
#include "../kernel/system.h"
|
||||||
|
|
||||||
#define KEYBOARD_BUFFER_SIZE 256
|
#define KEYBOARD_BUFFER_SIZE 256
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "io.h"
|
#include "../kernel/io.h"
|
||||||
#include "serial.h"
|
#include "serial.h"
|
||||||
|
|
||||||
int init_serial()
|
int init_serial()
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "system.h"
|
#include "../kernel/system.h"
|
||||||
#include "../libc/stdio.h"
|
#include "../libc/stdio.h"
|
||||||
|
|
||||||
volatile unsigned long global_ticks = 0;
|
volatile unsigned long global_ticks = 0;
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
#include "../libc/stdio.h"
|
#include "../libc/stdio.h"
|
||||||
#include "serial.h"
|
#include "../drivers/serial.h"
|
||||||
#include "gdt.h"
|
#include "gdt.h"
|
||||||
#include "idt.h"
|
#include "idt.h"
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
@@ -33,7 +33,7 @@ int kmain(int retvalue)
|
|||||||
clear();
|
clear();
|
||||||
|
|
||||||
colorputs(ascii_title, 10);
|
colorputs(ascii_title, 10);
|
||||||
colorputs(" by @xamidev - star the repo for a cookie!\n\n", 11);
|
colorputs(" by @xamidev - star the repo for a cookie!\n\n", 14);
|
||||||
|
|
||||||
// TODO: Grub modules to load programs
|
// TODO: Grub modules to load programs
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user