diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-04-22 09:57:35 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-04-22 09:57:35 +0200 |
| commit | 76c0c6b21532aee82df5bd62cd886bc63d933899 (patch) | |
| tree | 2df231f8601402147514572120f762c69bf5c84a /Private/NewBoot/Source/makefile | |
| parent | e548e79578d692dce885e7ef3cb38d993e90e07f (diff) | |
MHR-5: Fix BootFileReader on EFI platforms (AMD64), also added CoreBoot
directory for CoreBoot API (NeWS)
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private/NewBoot/Source/makefile')
| -rw-r--r-- | Private/NewBoot/Source/makefile | 20 |
1 files changed, 15 insertions, 5 deletions
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-<arch> 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__ |
