aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile9
-rw-r--r--boot/startup-x86_64.s (renamed from startup.s)0
-rw-r--r--compiler/x86_64-linker.ld (renamed from src/arch/x86_64/linker.ld)0
-rw-r--r--compiler/x86_64-rustubs.json (renamed from x86_64-rustubs.json)0
4 files changed, 5 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index a7cade0..0e3f565 100644
--- a/Makefile
+++ b/Makefile
@@ -18,7 +18,8 @@ BUILD = build
ARCH = x86_64
ASM = nasm
ASMOBJFORMAT = elf64
-LINKER_SCRIPT = ./src/arch/$(ARCH)/linker.ld
+LINKER_SCRIPT = ./compiler/$(ARCH)-linker.ld
+CARGO_XBUILD_TARGET = ./compiler/$(ARCH)-rustubs.json
CARGO_XBUILD_FLAGS =
# ---------- No need to edit below this line --------------
# ---------- If you have to, something is wrong -----------
@@ -61,13 +62,13 @@ $(BUILD)/_%.o : %.s | $(BUILD)
# Compile the rust part: note that the the cargo crate is of type [staticlib], if you don't
# define this, the linker will have troubles, especially when we use a "no_std" build
rust_kernel:
- cargo xbuild --target $(ARCH)-rustubs.json $(CARGO_XBUILD_FLAG)
+ cargo xbuild --target $(CARGO_XBUILD_TARGET) $(CARGO_XBUILD_FLAG)
# need nasm
# TODO make this arch dependent
-startup.o: startup.s | $(BUILD)
+startup.o: boot/startup-$(ARCH).s | $(BUILD)
@if test \( ! \( -d $(@D) \) \) ;then mkdir -p $(@D);fi
- nasm -f elf64 -o $(BUILD)/startup.o startup.s
+ nasm -f elf64 -o $(BUILD)/startup.o boot/startup-$(ARCH).s
.PHONY: $(BUILD)
$(BUILD):
diff --git a/startup.s b/boot/startup-x86_64.s
index dfc6262..dfc6262 100644
--- a/startup.s
+++ b/boot/startup-x86_64.s
diff --git a/src/arch/x86_64/linker.ld b/compiler/x86_64-linker.ld
index b484366..b484366 100644
--- a/src/arch/x86_64/linker.ld
+++ b/compiler/x86_64-linker.ld
diff --git a/x86_64-rustubs.json b/compiler/x86_64-rustubs.json
index 93512ed..93512ed 100644
--- a/x86_64-rustubs.json
+++ b/compiler/x86_64-rustubs.json