diff --git a/SConstruct b/SConstruct index 4cda479..361f96e 100644 --- a/SConstruct +++ b/SConstruct @@ -56,6 +56,7 @@ if env["ARCH"] == "amd64": env.Append(CPPFLAGS = [ "-target", "x86_64-freebsd-freebsd-elf" ]) elif env["ARCH"] == "arm64": env.Append(CPPFLAGS = [ "-target", "arm64-freebsd-freebsd-elf" ]) + env.Append(LINKFLAGS = [ "-fuse-ld=lld", "-Wl,-maarch64elf" ]) else: print("Unsupported architecture: " + env["ARCH"]) sys.exit(-1) @@ -152,7 +153,7 @@ if not conf.CheckCC(): if not env["CCVERSION"].startswith("15."): print('Only Clang 15 is supported') print('You are running: ' + env["CCVERSION"]) - CheckFailed() +# CheckFailed() conf.Finish() diff --git a/sys/SConscript b/sys/SConscript index e2d1c49..5439d59 100644 --- a/sys/SConscript +++ b/sys/SConscript @@ -38,9 +38,9 @@ src_amd64 = [ src_arm64 = [ # Multiboot requires multiboot.S to be the first file - "arm64/multiboot.S", + "arm64/locore.S", "arm64/mbentry.c", - # AMD64 + # ARM64 "arm64/debug.c", "arm64/disasm.c", "arm64/irq.c", diff --git a/sys/arm64/multiboot.S b/sys/arm64/locore.S similarity index 89% rename from sys/arm64/multiboot.S rename to sys/arm64/locore.S index 12e1c16..1946d62 100644 --- a/sys/arm64/multiboot.S +++ b/sys/arm64/locore.S @@ -1,5 +1,5 @@ /* - * Multiboot Entry + * Boot */ #define STACK_SIZE 0x4000 @@ -7,8 +7,6 @@ #define KERNEL_BASE 0xFFFF800000000000 #define LOWMEM(_x) (_x - KERNEL_BASE) -.extern mb_entry - .text /**