From fca1b839ff150dd38ae27201e52b6c76c4fa4ba9 Mon Sep 17 00:00:00 2001 From: Braiden Vasco Date: Wed, 8 Nov 2017 08:56:12 +0000 Subject: [PATCH] Rename "arch/" to "arch/x86/" --- .gitignore | 2 +- Makefile | 6 +++--- arch/none/Makefile | 1 + arch/{ => x86}/Makefile | 2 +- arch/{ => x86}/asm.h | 0 arch/{ => x86}/config.h | 0 arch/{ => x86}/console.c | 0 arch/{ => x86}/console.h | 0 arch/{ => x86}/exception.c | 0 arch/{ => x86}/hwint.c | 0 arch/{ => x86}/hwint.h | 0 arch/{ => x86}/init.c | 0 arch/{ => x86}/interrupt.asm | 0 arch/{ => x86}/interrupt.h | 0 arch/{ => x86}/keyboard.c | 0 arch/{ => x86}/keyboard.h | 0 arch/{ => x86}/linker.ld | 0 arch/{ => x86}/logger.c | 0 arch/{ => x86}/logger.h | 0 arch/{ => x86}/main.c | 0 arch/{ => x86}/multiboot.c | 0 arch/{ => x86}/multiboot.h | 0 arch/{ => x86}/paging.asm | 0 arch/{ => x86}/paging.c | 0 arch/{ => x86}/paging.h | 0 arch/{ => x86}/panic.asm | 0 arch/{ => x86}/panic.c | 0 arch/{ => x86}/panic.h | 0 arch/{ => x86}/pfa.c | 0 arch/{ => x86}/pfa.h | 0 arch/{ => x86}/pic.c | 0 arch/{ => x86}/pic.h | 0 arch/{ => x86}/protected.asm | 0 arch/{ => x86}/protected.c | 0 arch/{ => x86}/protected.h | 0 arch/{ => x86}/start.s | 0 arch/{ => x86}/syscall.c | 0 arch/{ => x86}/tasks.asm | 0 arch/{ => x86}/tasks.h | 0 arch/{ => x86}/timer.c | 0 arch/{ => x86}/timer.h | 0 arch/{ => x86}/tss.asm | 0 arch/{ => x86}/tss.c | 0 arch/{ => x86}/tss.h | 0 env/build-x86.mk | 1 + env/test-host.mk | 1 + 46 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 arch/none/Makefile rename arch/{ => x86}/Makefile (97%) rename arch/{ => x86}/asm.h (100%) rename arch/{ => x86}/config.h (100%) rename arch/{ => x86}/console.c (100%) rename arch/{ => x86}/console.h (100%) rename arch/{ => x86}/exception.c (100%) rename arch/{ => x86}/hwint.c (100%) rename arch/{ => x86}/hwint.h (100%) rename arch/{ => x86}/init.c (100%) rename arch/{ => x86}/interrupt.asm (100%) rename arch/{ => x86}/interrupt.h (100%) rename arch/{ => x86}/keyboard.c (100%) rename arch/{ => x86}/keyboard.h (100%) rename arch/{ => x86}/linker.ld (100%) rename arch/{ => x86}/logger.c (100%) rename arch/{ => x86}/logger.h (100%) rename arch/{ => x86}/main.c (100%) rename arch/{ => x86}/multiboot.c (100%) rename arch/{ => x86}/multiboot.h (100%) rename arch/{ => x86}/paging.asm (100%) rename arch/{ => x86}/paging.c (100%) rename arch/{ => x86}/paging.h (100%) rename arch/{ => x86}/panic.asm (100%) rename arch/{ => x86}/panic.c (100%) rename arch/{ => x86}/panic.h (100%) rename arch/{ => x86}/pfa.c (100%) rename arch/{ => x86}/pfa.h (100%) rename arch/{ => x86}/pic.c (100%) rename arch/{ => x86}/pic.h (100%) rename arch/{ => x86}/protected.asm (100%) rename arch/{ => x86}/protected.c (100%) rename arch/{ => x86}/protected.h (100%) rename arch/{ => x86}/start.s (100%) rename arch/{ => x86}/syscall.c (100%) rename arch/{ => x86}/tasks.asm (100%) rename arch/{ => x86}/tasks.h (100%) rename arch/{ => x86}/timer.c (100%) rename arch/{ => x86}/timer.h (100%) rename arch/{ => x86}/tss.asm (100%) rename arch/{ => x86}/tss.c (100%) rename arch/{ => x86}/tss.h (100%) diff --git a/.gitignore b/.gitignore index c5a55f8..3670cc9 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,7 @@ /config.mk -/arch/kernel +/arch/x86/kernel /libk/libk.a /iso/image.iso /iso/rootfs/boot/kernelmq diff --git a/Makefile b/Makefile index 08a1c7e..1e6b91d 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ include config.mk export INCLUDE = $(shell pwd)/include -export KERNEL = $(shell pwd)/arch/kernel +export KERNEL = $(shell pwd)/arch/$(ARCH)/kernel export LIBK = $(shell pwd)/libk/libk.a export MODULES = $(addprefix $(shell pwd)/modules/, dummy1.bin dummy2.bin) @@ -17,10 +17,10 @@ test: run-test ########## all-kernel: all-libk - make all -C arch + make all -C arch/$(ARCH) clean-kernel: - make clean -C arch + make clean -C arch/$(ARCH) ####### # ISO # diff --git a/arch/none/Makefile b/arch/none/Makefile new file mode 100644 index 0000000..ad6a457 --- /dev/null +++ b/arch/none/Makefile @@ -0,0 +1 @@ +clean: diff --git a/arch/Makefile b/arch/x86/Makefile similarity index 97% rename from arch/Makefile rename to arch/x86/Makefile index 762e77a..b8821dc 100644 --- a/arch/Makefile +++ b/arch/x86/Makefile @@ -10,7 +10,7 @@ OBJS += pfa.c.o OBJS += paging.c.o paging.asm.cpp.o # Architecture-independent -OBJS += ../src/info.c.o +OBJS += ../../src/info.c.o OBJS += main.c.o # Built-in drivers diff --git a/arch/asm.h b/arch/x86/asm.h similarity index 100% rename from arch/asm.h rename to arch/x86/asm.h diff --git a/arch/config.h b/arch/x86/config.h similarity index 100% rename from arch/config.h rename to arch/x86/config.h diff --git a/arch/console.c b/arch/x86/console.c similarity index 100% rename from arch/console.c rename to arch/x86/console.c diff --git a/arch/console.h b/arch/x86/console.h similarity index 100% rename from arch/console.h rename to arch/x86/console.h diff --git a/arch/exception.c b/arch/x86/exception.c similarity index 100% rename from arch/exception.c rename to arch/x86/exception.c diff --git a/arch/hwint.c b/arch/x86/hwint.c similarity index 100% rename from arch/hwint.c rename to arch/x86/hwint.c diff --git a/arch/hwint.h b/arch/x86/hwint.h similarity index 100% rename from arch/hwint.h rename to arch/x86/hwint.h diff --git a/arch/init.c b/arch/x86/init.c similarity index 100% rename from arch/init.c rename to arch/x86/init.c diff --git a/arch/interrupt.asm b/arch/x86/interrupt.asm similarity index 100% rename from arch/interrupt.asm rename to arch/x86/interrupt.asm diff --git a/arch/interrupt.h b/arch/x86/interrupt.h similarity index 100% rename from arch/interrupt.h rename to arch/x86/interrupt.h diff --git a/arch/keyboard.c b/arch/x86/keyboard.c similarity index 100% rename from arch/keyboard.c rename to arch/x86/keyboard.c diff --git a/arch/keyboard.h b/arch/x86/keyboard.h similarity index 100% rename from arch/keyboard.h rename to arch/x86/keyboard.h diff --git a/arch/linker.ld b/arch/x86/linker.ld similarity index 100% rename from arch/linker.ld rename to arch/x86/linker.ld diff --git a/arch/logger.c b/arch/x86/logger.c similarity index 100% rename from arch/logger.c rename to arch/x86/logger.c diff --git a/arch/logger.h b/arch/x86/logger.h similarity index 100% rename from arch/logger.h rename to arch/x86/logger.h diff --git a/arch/main.c b/arch/x86/main.c similarity index 100% rename from arch/main.c rename to arch/x86/main.c diff --git a/arch/multiboot.c b/arch/x86/multiboot.c similarity index 100% rename from arch/multiboot.c rename to arch/x86/multiboot.c diff --git a/arch/multiboot.h b/arch/x86/multiboot.h similarity index 100% rename from arch/multiboot.h rename to arch/x86/multiboot.h diff --git a/arch/paging.asm b/arch/x86/paging.asm similarity index 100% rename from arch/paging.asm rename to arch/x86/paging.asm diff --git a/arch/paging.c b/arch/x86/paging.c similarity index 100% rename from arch/paging.c rename to arch/x86/paging.c diff --git a/arch/paging.h b/arch/x86/paging.h similarity index 100% rename from arch/paging.h rename to arch/x86/paging.h diff --git a/arch/panic.asm b/arch/x86/panic.asm similarity index 100% rename from arch/panic.asm rename to arch/x86/panic.asm diff --git a/arch/panic.c b/arch/x86/panic.c similarity index 100% rename from arch/panic.c rename to arch/x86/panic.c diff --git a/arch/panic.h b/arch/x86/panic.h similarity index 100% rename from arch/panic.h rename to arch/x86/panic.h diff --git a/arch/pfa.c b/arch/x86/pfa.c similarity index 100% rename from arch/pfa.c rename to arch/x86/pfa.c diff --git a/arch/pfa.h b/arch/x86/pfa.h similarity index 100% rename from arch/pfa.h rename to arch/x86/pfa.h diff --git a/arch/pic.c b/arch/x86/pic.c similarity index 100% rename from arch/pic.c rename to arch/x86/pic.c diff --git a/arch/pic.h b/arch/x86/pic.h similarity index 100% rename from arch/pic.h rename to arch/x86/pic.h diff --git a/arch/protected.asm b/arch/x86/protected.asm similarity index 100% rename from arch/protected.asm rename to arch/x86/protected.asm diff --git a/arch/protected.c b/arch/x86/protected.c similarity index 100% rename from arch/protected.c rename to arch/x86/protected.c diff --git a/arch/protected.h b/arch/x86/protected.h similarity index 100% rename from arch/protected.h rename to arch/x86/protected.h diff --git a/arch/start.s b/arch/x86/start.s similarity index 100% rename from arch/start.s rename to arch/x86/start.s diff --git a/arch/syscall.c b/arch/x86/syscall.c similarity index 100% rename from arch/syscall.c rename to arch/x86/syscall.c diff --git a/arch/tasks.asm b/arch/x86/tasks.asm similarity index 100% rename from arch/tasks.asm rename to arch/x86/tasks.asm diff --git a/arch/tasks.h b/arch/x86/tasks.h similarity index 100% rename from arch/tasks.h rename to arch/x86/tasks.h diff --git a/arch/timer.c b/arch/x86/timer.c similarity index 100% rename from arch/timer.c rename to arch/x86/timer.c diff --git a/arch/timer.h b/arch/x86/timer.h similarity index 100% rename from arch/timer.h rename to arch/x86/timer.h diff --git a/arch/tss.asm b/arch/x86/tss.asm similarity index 100% rename from arch/tss.asm rename to arch/x86/tss.asm diff --git a/arch/tss.c b/arch/x86/tss.c similarity index 100% rename from arch/tss.c rename to arch/x86/tss.c diff --git a/arch/tss.h b/arch/x86/tss.h similarity index 100% rename from arch/tss.h rename to arch/x86/tss.h diff --git a/env/build-x86.mk b/env/build-x86.mk index d8977a0..f8136dc 100644 --- a/env/build-x86.mk +++ b/env/build-x86.mk @@ -1 +1,2 @@ export CCPREFIX = i686-elf- +export ARCH = x86 diff --git a/env/test-host.mk b/env/test-host.mk index 3175952..a2d3998 100644 --- a/env/test-host.mk +++ b/env/test-host.mk @@ -1 +1,2 @@ export CCPREFIX = +export ARCH = none