diff --git a/arch.mk b/arch.mk index e12fe0b6..15f7fd75 100644 --- a/arch.mk +++ b/arch.mk @@ -342,7 +342,7 @@ ifeq ($(TARGET),x86_64_efi) GNU_EFI_LSCRIPT=$(GNU_EFI_LIB_PATH)/elf_x86_64_efi.lds CFLAGS += -fpic -ffreestanding -fno-stack-protector -fno-stack-check \ -fshort-wchar -mno-red-zone -maccumulate-outgoing-args - CFLAGS += -I/usr/include/efi -DPLATFORM_X86_64_EFI + CFLAGS += -I/usr/include/efi -I/usr/include/efi/x86_64 -DPLATFORM_X86_64_EFI LDFLAGS = -shared -Bsymbolic -L/usr/lib -T$(GNU_EFI_LSCRIPT) LD_START_GROUP = $(GNU_EFI_CRT0) LD_END_GROUP = -lgnuefi -lefi diff --git a/config/examples/x86_64_efi.config b/config/examples/x86_64_efi.config index a26308d3..17210038 100644 --- a/config/examples/x86_64_efi.config +++ b/config/examples/x86_64_efi.config @@ -4,5 +4,7 @@ WOLFBOOT_SMALL_STACK=1 SIGN?=ED25519 HASH?=SHA256 IMAGE_HEADER_SIZE?=0x100 -DEBUG=0 +DEBUG=1 SPMATH=0 +# required for keytools +WOLFBOOT_SECTOR_SIZE?=0x1000 diff --git a/docs/Targets.md b/docs/Targets.md index 01c6ca7e..eaec8213 100644 --- a/docs/Targets.md +++ b/docs/Targets.md @@ -1041,7 +1041,17 @@ x86-64bit machine with UEFI bios can run wolfBoot as EFI application. On a debian-like system it is sufficient to install the packages as follows: -`apt install qemu ovmf gnu-efi` +``` +# for wolfBoot and others +apt install git make gcc + +# for test scripts +apt install sudo dosfstools curl +apt install qemu qemu-system-x86 ovmf gnu-efi + +# for buildroot +apt install file bzip2 g++ wget cpio unzip rsync bc +``` ### Configuration @@ -1076,6 +1086,27 @@ tools/efi/compile_efi_linux.sh tools/efi/run_efi.sh ``` +``` +EFI v2.70 (EDK II, 0x00010000) +[700/1832] +Mapping table + FS0: Alias(s):F0a:;BLK0: + PciRoot(0x0)/Pci(0x1,0x1)/Ata(0x0) + BLK1: Alias(s): + PciRoot(0x0)/Pci(0x1,0x1)/Ata(0x0) +Press ESC in 1 seconds to skip startup.nsh or any other key to continue. +Starting wolfBoot EFI... +Image base: 0xE3C6000 +Opening file: kernel.img, size: 6658272 +Opening file: update.img, size: 6658272 +Active Part 1 +Firmware Valid +Booting at 0D630000 +Staging kernel at address D630100, size: 6658016 +``` + +You can `Ctrl-C` or login as `root` and power off qemu with `poweroff` + ## Nordic nRF52840