Added interrupt and exception handling
This commit is contained in:
13
Makefile
13
Makefile
@@ -38,7 +38,7 @@ TARGET = BOOTX64.EFI
|
||||
TARGET_SO = bootx64.so
|
||||
OBJ = $(BUILD_DIR)/main.o
|
||||
KERNEL_TARGET = kernel.elf
|
||||
KERNEL_OBJS = $(BUILD_DIR)/kernel.o $(BUILD_DIR)/string_utils.o $(BUILD_DIR)/commands.o
|
||||
KERNEL_OBJS = $(BUILD_DIR)/kernel.o $(BUILD_DIR)/string_utils.o $(BUILD_DIR)/commands.o $(BUILD_DIR)/idt.o $(BUILD_DIR)/isr.o
|
||||
KERNEL_LD = kernel.ld
|
||||
|
||||
# QEMU settings
|
||||
@@ -76,7 +76,6 @@ QEMU_FLAGS = -machine q35 \
|
||||
-drive if=pflash,format=raw,file=$(BUILD_DIR)/OVMF_VARS.fd \
|
||||
-drive format=raw,file=fat:rw:$(BUILD_DIR) \
|
||||
-net none \
|
||||
-nographic \
|
||||
-no-reboot
|
||||
|
||||
# Phony targets
|
||||
@@ -112,6 +111,16 @@ $(BUILD_DIR)/commands.o: $(SRC_DIR)/commands.c
|
||||
$(CC) -ffreestanding -fno-stack-protector -fno-pic -fshort-wchar \
|
||||
-mno-red-zone -Wall -Wextra $(EFI_INCLUDES) -c $< -o $@
|
||||
|
||||
$(BUILD_DIR)/idt.o: $(SRC_DIR)/idt.c
|
||||
@echo "Compiling idt.c..."
|
||||
$(CC) -ffreestanding -fno-stack-protector -fno-pic -fshort-wchar \
|
||||
-mno-red-zone -Wall -Wextra $(EFI_INCLUDES) -c $< -o $@
|
||||
|
||||
$(BUILD_DIR)/isr.o: $(SRC_DIR)/isr.S
|
||||
@echo "Compiling isr.S..."
|
||||
$(CC) -ffreestanding -fno-stack-protector -fno-pic -fshort-wchar \
|
||||
-mno-red-zone -Wall -Wextra $(EFI_INCLUDES) -c $< -o $@
|
||||
|
||||
# Link kernel ELF
|
||||
$(BUILD_DIR)/$(KERNEL_TARGET): $(KERNEL_OBJS) $(KERNEL_LD)
|
||||
@echo "Linking kernel ELF..."
|
||||
|
||||
Reference in New Issue
Block a user