aboutsummaryrefslogtreecommitdiff
path: root/i686
diff options
context:
space:
mode:
Diffstat (limited to 'i686')
-rw-r--r--i686/include/gdt.h (renamed from i686/gdt.h)0
-rw-r--r--i686/include/idt.h (renamed from i686/idt.h)0
-rw-r--r--i686/include/paging.h (renamed from i686/paging.h)0
-rw-r--r--i686/include/sys/control.h (renamed from i686/sys/control.h)0
-rw-r--r--i686/include/sys/cpuid.h (renamed from i686/sys/cpuid.h)0
-rw-r--r--i686/include/sys/io.h (renamed from i686/sys/io.h)0
-rw-r--r--i686/include/sys/syscall.h (renamed from i686/sys/syscall.h)0
-rw-r--r--i686/meson.build24
-rwxr-xr-xi686/mk16
-rw-r--r--i686/toolchain.mk35
10 files changed, 24 insertions, 51 deletions
diff --git a/i686/gdt.h b/i686/include/gdt.h
index 2bdfb22..2bdfb22 100644
--- a/i686/gdt.h
+++ b/i686/include/gdt.h
diff --git a/i686/idt.h b/i686/include/idt.h
index ca39bde..ca39bde 100644
--- a/i686/idt.h
+++ b/i686/include/idt.h
diff --git a/i686/paging.h b/i686/include/paging.h
index f5bfa78..f5bfa78 100644
--- a/i686/paging.h
+++ b/i686/include/paging.h
diff --git a/i686/sys/control.h b/i686/include/sys/control.h
index 89ab067..89ab067 100644
--- a/i686/sys/control.h
+++ b/i686/include/sys/control.h
diff --git a/i686/sys/cpuid.h b/i686/include/sys/cpuid.h
index 6613967..6613967 100644
--- a/i686/sys/cpuid.h
+++ b/i686/include/sys/cpuid.h
diff --git a/i686/sys/io.h b/i686/include/sys/io.h
index 4ff5d85..4ff5d85 100644
--- a/i686/sys/io.h
+++ b/i686/include/sys/io.h
diff --git a/i686/sys/syscall.h b/i686/include/sys/syscall.h
index 9e62c89..9e62c89 100644
--- a/i686/sys/syscall.h
+++ b/i686/include/sys/syscall.h
diff --git a/i686/meson.build b/i686/meson.build
new file mode 100644
index 0000000..21ff729
--- /dev/null
+++ b/i686/meson.build
@@ -0,0 +1,24 @@
+
+i686_srcs = files(
+ 'boot.s', 'init.s',
+ 'gdt.c', 'lgdt.c',
+ 'lidt.c', 'isr.c',
+)
+i686_incl = include_directories('include')
+
+i686 = declare_dependency(
+ link_with: static_library('i686', i686_srcs,
+ include_directories: i686_incl,
+ dependencies: libk
+ ),
+ include_directories: i686_incl,
+)
+
+# tests
+test('GDT',
+ executable('test_gdt', 'test_gdt.cc',
+ include_directories: i686_incl,
+ dependencies: [ gtest ],
+ native: true),
+ suite: 'i686'
+)
diff --git a/i686/mk b/i686/mk
deleted file mode 100755
index 312e553..0000000
--- a/i686/mk
+++ /dev/null
@@ -1,16 +0,0 @@
-#!../mach
-
-INCLUDES := -isystem../grub
-${ARCH}_CFLAGS += ${INCLUDES}
-${ARCH}_CXXFLAGS += ${INCLUDES}
-
-TARGETLIB += arch
-arch.SRCS = boot.s init.s \
- gdt.c lgdt.c \
- lidt.c isr.c
-
-HOSTTARGETBIN += test_gdt
-test_gdt.SRCS = test_gdt.cc
-
-TESTS += test_gdt
-
diff --git a/i686/toolchain.mk b/i686/toolchain.mk
deleted file mode 100644
index 460717e..0000000
--- a/i686/toolchain.mk
+++ /dev/null
@@ -1,35 +0,0 @@
-ARCH=i686
-
-# define compiler, linker, archiver and strip and their flags
-${ARCH}_AS := i686-elf-as
-
-${ARCH}_CC := i686-elf-gcc -ansi
-${ARCH}_CCID := $(shell ${${ARCH}_CC} --version | head -n1)
-${ARCH}_CFLAGS := -Wall -Wextra -Wpedantic -Werror=shadow -Wconversion -fanalyzer \
- -D__ARCH__="${ARCH}" -ffreestanding -mgeneral-regs-only \
- $(shell echo ${CONFIG_CFLAGS})
-
-${ARCH}_LD := i686-elf-ld
-${ARCH}_LDID := $(shell ${${ARCH}_LD} --version | head -n1)
-${ARCH}_LDFLAGS := -static -nostdlib \
- $(shell echo ${CONFIG_LDFLAGS})
-
-${ARCH}_AR := i686-elf-ar
-${ARCH}_ARFLAGS := -crus
-
-${ARCH}_STRIP := i686-elf-strip
-
-# define compiler and flags for test targets
-HOST_CC := gcc
-HOST_CFLAGS := -Wall -Wextra -Wpedantic -Werror=shadow -Wconversion \
- ${CFLAGS}
-HOST_CXX := g++
-HOST_CXXFLAGS := -Wall -Wextra -Wpedantic -Werror=shadow -Wconversion -g -Og \
- $(shell pkg-config --cflags gtest gtest_main gmock) \
- ${CXXFLAGS}
-
-HOST_LDFLAGS := $(shell pkg-config --libs gtest gtest_main gmock)
-
-# emulator name and flags
-QEMU := qemu-system-i386 -accel kvm -machine pc
-