From 6535758dff5f02739f5b28c5539ebeea28ca2f23 Mon Sep 17 00:00:00 2001 From: Danny Holman Date: Sat, 3 May 2025 18:15:25 -0500 Subject: bootstrap: create build files 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 --- bootstrap/stage2/arch/x86_64/linker.ld | 21 +++++++++++++++++++++ bootstrap/stage2/arch/x86_64/make.config | 6 ++++++ 2 files changed, 27 insertions(+) create mode 100644 bootstrap/stage2/arch/x86_64/linker.ld create mode 100644 bootstrap/stage2/arch/x86_64/make.config (limited to 'bootstrap/stage2/arch') 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= -- cgit v1.2.3