Linker and boot cleanup

This commit is contained in:
Ali Mashtizadeh 2023-11-09 11:54:56 -05:00
parent 944a67a596
commit 0ecfc3f99c
3 changed files with 5 additions and 6 deletions

View File

@ -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()

View File

@ -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",

View File

@ -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
/**