summaryrefslogtreecommitdiff
path: root/bootstrap/stage2/arch
diff options
context:
space:
mode:
authorDanny Holman <dholman@gymli.org>2025-05-03 18:15:25 -0500
committerDanny Holman <dholman@gymli.org>2025-05-04 11:51:11 -0500
commit6535758dff5f02739f5b28c5539ebeea28ca2f23 (patch)
tree69b095cfd2c279825dd94a6165b85d4155decdd7 /bootstrap/stage2/arch
parent1cfbd25dc9eb39467406686c8ae1efbfd5517865 (diff)
bootstrap: create build filesHEADmaster
Create build infrastructure for a bootloader implementation. This loader should support UEFI and be able to load an ELF kernel at a designated entry point. Signed-off-by: Danny Holman <dholman@gymli.org>
Diffstat (limited to 'bootstrap/stage2/arch')
-rw-r--r--bootstrap/stage2/arch/x86_64/linker.ld21
-rw-r--r--bootstrap/stage2/arch/x86_64/make.config6
2 files changed, 27 insertions, 0 deletions
diff --git a/bootstrap/stage2/arch/x86_64/linker.ld b/bootstrap/stage2/arch/x86_64/linker.ld
new file mode 100644
index 0000000..04b6148
--- /dev/null
+++ b/bootstrap/stage2/arch/x86_64/linker.ld
@@ -0,0 +1,21 @@
+ENTRY(bootstrap_main)
+
+SECTIONS {
+ . = 0x2000;
+ __bstart = .;
+
+ .text : {
+ *(.text)
+ }
+
+ .data : {
+ *(.data)
+ }
+
+ .bss : {
+ *(.bss)
+ *(COMMON)
+ }
+
+ __bend = .;
+}
diff --git a/bootstrap/stage2/arch/x86_64/make.config b/bootstrap/stage2/arch/x86_64/make.config
new file mode 100644
index 0000000..3c73a35
--- /dev/null
+++ b/bootstrap/stage2/arch/x86_64/make.config
@@ -0,0 +1,6 @@
+STAGE2_ARCH_INCLUDE=-I$(ARCHDIR)/include
+STAGE2_ARCH_CFLAGS=-target x86_64-pc-none-elf -mno-red-zone -mno-mmx -mno-sse -mno-sse2
+STAGE2_ARCH_LDFLAGS=
+STAGE2_ARCH_LIBS=
+
+STAGE2_ARCH_OBJS=