From 76c0c6b21532aee82df5bd62cd886bc63d933899 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Mon, 22 Apr 2024 09:57:35 +0200 Subject: MHR-5: Fix BootFileReader on EFI platforms (AMD64), also added CoreBoot directory for CoreBoot API (NeWS) Signed-off-by: Amlal El Mahrouss --- Private/NewBoot/Source/makefile | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'Private/NewBoot/Source/makefile') diff --git a/Private/NewBoot/Source/makefile b/Private/NewBoot/Source/makefile index 530abea8..197eb91b 100644 --- a/Private/NewBoot/Source/makefile +++ b/Private/NewBoot/Source/makefile @@ -20,7 +20,7 @@ endif IMG=epm.img IMG_2=epm-slave.img -EMU_FLAGS=-net none -smp 4 -m 4G -M q35 -bios OVMF.fd -device piix3-ide,id=ide -drive id=disk,file=$(IMG),format=raw,if=none -device ide-hd,drive=disk,bus=ide.0 -drive file=fat:rw:CDROM,index=2,format=raw -d int -hdd epm-slave.img +EMU_FLAGS=-net none -smp 4 -m 8G -M q35 -bios OVMF.fd -device piix3-ide,id=ide -drive id=disk,file=$(IMG),format=raw,if=none -device ide-hd,drive=disk,bus=ide.0 -drive file=fat:rw:CDROM,index=2,format=raw -d int -hdd epm-slave.img LD_FLAGS=-e Main --subsystem=10 @@ -36,13 +36,23 @@ FLAG_GNU=-fshort-wchar -D__EFI_x86_64__ -mgeneral-regs-only -mno-red-zone -D__KE invalid-recipe: @echo "invalid-recipe: Use make bootloader- instead." +KERNEL_OBJ=kernel.bin +DD=dd +IMG_CREATE=qemu-img +MAX_KERNEL_SIZE=1024K +BOOT_LOADER=NewBoot.exe +KERNEL=NewKernel.exe + .PHONY: all all: compile-amd64 mkdir -p CDROM/EFI/BOOT - $(LD_GNU) $(OBJ) $(LD_FLAGS) -o NewBoot.exe - $(COPY) NewBoot.exe CDROM/EFI/BOOT/BOOTX64.EFI - $(COPY) NewBoot.exe CDROM/EFI/BOOT/NEWBOOT.EFI - $(COPY) NewBoot.exe ../../Root/Boot/NewBoot.exe + $(LD_GNU) $(OBJ) $(LD_FLAGS) -o $(KERNEL_OBJ) + $(IMG_CREATE) create -f raw $(BOOT_LOADER) $(MAX_KERNEL_SIZE) + $(DD) if=$(KERNEL_OBJ) of=$(BOOT_LOADER) bs=1 seek=0 conv=notrunc + $(COPY) $(BOOT_LOADER) CDROM/EFI/BOOT/BOOTX64.EFI + $(COPY) $(BOOT_LOADER) CDROM/EFI/BOOT/NEWBOOT.EFI + $(COPY) $(BOOT_LOADER) ../../Root/Boot/$(BOOT_LOADER) + $(COPY) ../../$(KERNEL) CDROM/$(KERNEL) ifneq ($(DEBUG_SUPPORT), ) DEBUG = -D__DEBUG__ -- cgit v1.2.3