diff options
| author | Amlal El Mahrouss <amlalelmahrouss@icloud.com> | 2024-02-25 16:12:36 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlalelmahrouss@icloud.com> | 2024-02-25 16:12:36 +0100 |
| commit | 2bd2e28868d50a2f3ced8b1bfea68216ed35622a (patch) | |
| tree | 4bf376821d13f005d72cbf5feca5cb1f18ae60cd /Private/NewBoot/Source/makefile | |
| parent | 9be51d883414584db0926ab854d6026e1785048b (diff) | |
WiP: See below.
- Reworking bootloader to adapt if kernel and programs are already here
or not for HCoreLdr.
- Working on IDT support for HCoreKrnl.
- Add Award and Mahrouss Logic logo in recovery-mode for HCoreKrnl.
- Working on reading .NewBoot section in HCoreLdr.
Signed-off-by: Amlal El Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Private/NewBoot/Source/makefile')
| -rw-r--r-- | Private/NewBoot/Source/makefile | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/Private/NewBoot/Source/makefile b/Private/NewBoot/Source/makefile new file mode 100644 index 00000000..0e9cd4d2 --- /dev/null +++ b/Private/NewBoot/Source/makefile @@ -0,0 +1,34 @@ +################################################## +# ; (C) Mahrouss Logic, 2024, all rights reserved. +# This is the bootloader makefile. +################################################## + +CC_GNU=x86_64-w64-mingw32-g++ +LD_GNU=x86_64-w64-mingw32-ld +LD_FLAGS=-e efi_main -shared --subsystem=10 -ffreestanding +ASM=nasm +OBJ=$(wildcard *.obj) $(wildcard *.o) $(wildcard ../../Obj/*.obj) $(wildcard HEL/AMD64/*.obj) $(wildcard HEL/AMD64/*.o) + +FLAG_ASM=-f win64 +FLAG_GNU=-fshort-wchar -O0 -D__DEBUG__ -fPIC -DEFI_FUNCTION_WRAPPER -I../ -I../../ -I./ -c -ffreestanding -fno-rtti -fno-exceptions -std=c++20 -D__HAVE_HCORE_APIS__ -D__HCORE__ -I./ -I$(HOME)/ + +.PHONY: invalid-recipe +invalid-recipe: + @echo "invalid-recipe: Use make bootloader-<arch> all instead." + +.PHONY: bootloader-amd64 +bootloader-amd64: + $(CC_GNU) $(FLAG_GNU) HEL/AMD64/*.cxx *.cxx + $(ASM) $(FLAG_ASM) HEl/AMD64/AMD64-VirtualMemory.asm + $(LD_GNU) $(OBJ) $(LD_FLAGS) -o HCoreKrnl.exe + cp HCoreKrnl.exe CDROM/EFI/BOOT/BOOTX64.EFI + cp ../../HCoreKrnl.dll CDROM/HCOREKRNL.DLL + +.PHONY: run-efi-amd64 +run-efi-amd64: + wget https://retrage.github.io/edk2-nightly/bin/DEBUGX64_OVMF.fd -O OVMF.fd + qemu-system-x86_64 -net none -smp 2 -m 4G -M q35 -bios OVMF.fd -drive file=fat:rw:CDROM,index=1,format=raw -serial stdio + +.PHONY: clean +clean: + rm -f $(OBJ) HCoreLdr.exe OVMF.fd |
