aboutsummaryrefslogtreecommitdiff
path: root/i686
diff options
context:
space:
mode:
authoraqua <aqua@iserlohn-fortress.net>2022-12-04 16:25:08 +0200
committeraqua <aqua@iserlohn-fortress.net>2022-12-04 17:10:01 +0200
commit16241aafa780ebf188b2ceb96d51bf5af5d6bbe2 (patch)
treec41a990a838eb1bcc369fd6c2efedac6785ec99f /i686
parentAdd FILE struct (diff)
downloadkernel-16241aafa780ebf188b2ceb96d51bf5af5d6bbe2.tar.xz
Remove custom include paths in makefiles
Add symlinks target to top-level makefile
Diffstat (limited to 'i686')
-rw-r--r--i686/Makefile2
-rw-r--r--i686/boot.S2
-rw-r--r--i686/lidt.c1
-rw-r--r--i686/sys/syscall.h8
-rw-r--r--i686/toolchain.mk2
5 files changed, 10 insertions, 5 deletions
diff --git a/i686/Makefile b/i686/Makefile
index 8575d99..9d7f06c 100644
--- a/i686/Makefile
+++ b/i686/Makefile
@@ -1,7 +1,5 @@
include ../Makefile.config
-CCFLAGS += -I../grub/include -I../lib -mgeneral-regs-only
-
arch.SRCS = boot.S init.s \
gdt.c lgdt.c \
lidt.c isr.c
diff --git a/i686/boot.S b/i686/boot.S
index 1eea9a3..16d54a3 100644
--- a/i686/boot.S
+++ b/i686/boot.S
@@ -1,5 +1,5 @@
#define ASM_FILE
-#include <multiboot2.h>
+#include <grub/multiboot2.h>
#include "macros.s"
/* Declare a multiboot header that marks this program as a kernel */
diff --git a/i686/lidt.c b/i686/lidt.c
index 59a2611..cf8084e 100644
--- a/i686/lidt.c
+++ b/i686/lidt.c
@@ -1,6 +1,5 @@
#include "idt.h"
#include <stdint.h>
-#include <stdio.h>
struct __attribute__((packed)) Pointer {
uint16_t limit;
diff --git a/i686/sys/syscall.h b/i686/sys/syscall.h
new file mode 100644
index 0000000..9e62c89
--- /dev/null
+++ b/i686/sys/syscall.h
@@ -0,0 +1,8 @@
+#pragma once
+
+static inline int
+syscall(int number)
+{
+ asm volatile("int $0x80");
+ return 0;
+}
diff --git a/i686/toolchain.mk b/i686/toolchain.mk
index 1747a8b..6f69cdb 100644
--- a/i686/toolchain.mk
+++ b/i686/toolchain.mk
@@ -4,7 +4,7 @@ ARCH=i686
#
AS := i686-elf-as
CC := i686-elf-gcc
-CCFLAGS := -Wall -Wextra -Wpedantic -fanalyzer -ffreestanding -std=gnu11 -mgeneral-regs-only
+CCFLAGS := -Wall -Wextra -Wpedantic -Wshadow -Wconversion -fanalyzer -ffreestanding -std=gnu11 -mgeneral-regs-only
CCFLAGS += $(shell echo ${CONFIG_CCFLAGS})
LD := i686-elf-ld
LDFLAGS := -static -nostdlib