summaryrefslogtreecommitdiffhomepage
path: root/Private/makefile
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-28 14:23:37 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-28 14:23:37 +0100
commitb177e9c4c954170b590d777fe77442ff3a0cd8d7 (patch)
tree7282e804cabc35d8b905aeb45a94c88cffd982fe /Private/makefile
parent89326d7a262b48701cec9dba71b43235d18c6e30 (diff)
HEL: Improve UEFI support, will add a EPM wrapper over it.
EPM will be used to load the Operating System and it's partitions. It was originally meant for kickStart, but we'll it also here. Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private/makefile')
-rw-r--r--Private/makefile12
1 files changed, 10 insertions, 2 deletions
diff --git a/Private/makefile b/Private/makefile
index aa0631b1..c3e12823 100644
--- a/Private/makefile
+++ b/Private/makefile
@@ -5,14 +5,18 @@ ASM = nasm
ASMFLAGS = -f elf64
# This file is the kernel, responsible of task management, memory, drivers and more.
-KERNEL = hKernel.elf
+KERNEL = hKernel.efi
# The kernel entrypoint
SCRIPT = --script=Linker/AMD64.ld
-# we want a flat binary
+# we want a flat binary
FMT = elf64
+.PHONY: kernel-no
+kernel-no:
+ @echo "Use make all instead."
+
.PHONY: kernel-build
kernel-build:
$(CC) $(CCFLAGS) Source/*.cxx HALKit/AMD64/PCI/*.cpp Source/Network/*.cpp\
@@ -21,9 +25,13 @@ kernel-build:
$(ASM) -f elf64 HALKit/AMD64/SMPCoreManager.asm
mv *.o HALKit/AMD64/*.o Obj/
+
+OBJCOPY = x86_64-elf-objcopy
+
.PHONY: kernel-link
kernel-link:
$(LD) $(SCRIPT) Obj/*.o -o $(KERNEL)
+ $(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel -j .rela -j .rel.* -j .rela.* -j .reloc --target efi-app-x86_64 --subsystem=10 $(KERNEL) $(KERNEL)
cp $(KERNEL) Root/System
.PHONY: all