All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 3/6] configs/aarch64_efi_defconfig: build the EDK2 firmware from source
@ 2020-07-26 10:07 D. Olsson
  2020-07-27 15:30 ` Erico Nunes
  0 siblings, 1 reply; 3+ messages in thread
From: D. Olsson @ 2020-07-26 10:07 UTC (permalink / raw)
  To: buildroot

From: Dick Olsson <hi@senzilla.io>

Prior to this, you had to manually download a pre-built EDK2 flash device
image (QEMU_EFI.fd) in order to boot this configuration with QEMU.
Now, the configuration is building EDK2 from source.

Signed-off-by: Dick Olsson <hi@senzilla.io>

---

Revision 2:

 * Explicitly added the default EDK2 platform to defconfig
---
 board/aarch64-efi/readme.txt  | 8 +++-----
 configs/aarch64_efi_defconfig | 2 ++
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/board/aarch64-efi/readme.txt b/board/aarch64-efi/readme.txt
index 65a6345b6c..08747027e1 100644
--- a/board/aarch64-efi/readme.txt
+++ b/board/aarch64-efi/readme.txt
@@ -22,13 +22,11 @@ qemu-system-aarch64 \
 	-cpu cortex-a57 \
 	-m 512 \
 	-nographic \
-	-bios </path/to/QEMU_EFI.fd> \
+	-bios output/images/QEMU_EFI.fd \
 	-drive file=output/images/disk.img,if=none,format=raw,id=hd0 \
 	-device virtio-blk-device,drive=hd0 \
 	-netdev user,id=eth0 \
 	-device virtio-net-device,netdev=eth0
 
-Note that </path/to/QEMU_EFI.fd> needs to point to a valid aarch64 UEFI
-firmware image for qemu.
-It may be provided by your distribution as a edk2-aarch64 or AAVMF
-package, in path such as /usr/share/edk2/aarch64/QEMU_EFI.fd .
+Note that output/images/QEMU_EFI.fd is the flash device file built by
+the EDK2 package.
diff --git a/configs/aarch64_efi_defconfig b/configs/aarch64_efi_defconfig
index 2aab6e9699..3da6542ea0 100644
--- a/configs/aarch64_efi_defconfig
+++ b/configs/aarch64_efi_defconfig
@@ -12,6 +12,8 @@ BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
 BR2_PACKAGE_HOST_GENIMAGE=y
 
 # Bootloader
+BR2_TARGET_EDK2=y
+BR2_TARGET_EDK2_PLATFORM_ARM_VIRT_QEMU=y
 BR2_TARGET_GRUB2=y
 BR2_TARGET_GRUB2_ARM64_EFI=y
 
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH v2 3/6] configs/aarch64_efi_defconfig: build the EDK2 firmware from source
  2020-07-26 10:07 [Buildroot] [PATCH v2 3/6] configs/aarch64_efi_defconfig: build the EDK2 firmware from source D. Olsson
@ 2020-07-27 15:30 ` Erico Nunes
  2020-07-31 11:44   ` D. Olsson
  0 siblings, 1 reply; 3+ messages in thread
From: Erico Nunes @ 2020-07-27 15:30 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, Jul 26, 2020 at 12:07 PM D. Olsson <hi@senzilla.io> wrote:
>
> From: Dick Olsson <hi@senzilla.io>
>
> Prior to this, you had to manually download a pre-built EDK2 flash device
> image (QEMU_EFI.fd) in order to boot this configuration with QEMU.
> Now, the configuration is building EDK2 from source.
>
> Signed-off-by: Dick Olsson <hi@senzilla.io>
>
> ---
>
> Revision 2:
>
>  * Explicitly added the default EDK2 platform to defconfig
> ---
>  board/aarch64-efi/readme.txt  | 8 +++-----
>  configs/aarch64_efi_defconfig | 2 ++
>  2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/board/aarch64-efi/readme.txt b/board/aarch64-efi/readme.txt
> index 65a6345b6c..08747027e1 100644
> --- a/board/aarch64-efi/readme.txt
> +++ b/board/aarch64-efi/readme.txt
> @@ -22,13 +22,11 @@ qemu-system-aarch64 \
>         -cpu cortex-a57 \
>         -m 512 \
>         -nographic \
> -       -bios </path/to/QEMU_EFI.fd> \
> +       -bios output/images/QEMU_EFI.fd \
>         -drive file=output/images/disk.img,if=none,format=raw,id=hd0 \

Should we change this to point to the QEMU_VARS file too as was done
in patch 4 for board/pc/readme.txt ?

Otherwise looks good, I tested it and it works for me.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH v2 3/6] configs/aarch64_efi_defconfig: build the EDK2 firmware from source
  2020-07-27 15:30 ` Erico Nunes
@ 2020-07-31 11:44   ` D. Olsson
  0 siblings, 0 replies; 3+ messages in thread
From: D. Olsson @ 2020-07-31 11:44 UTC (permalink / raw)
  To: buildroot

Hi Erico,

On Monday, 27 July 2020 17:30, Erico Nunes <nunes.erico@gmail.com> wrote:

> > +         -bios output/images/QEMU_EFI.fd \
> >           -drive file=output/images/disk.img,if=none,format=raw,id=hd0 \
> >
> >
>
> Should we change this to point to the QEMU_VARS file too as was done
> in patch 4 for board/pc/readme.txt ?

Yes, that makes sense. I will also switch from using -bios to use the
-pflash interface instead as this is considered better practice when
building the firmware like this (in fact, locally I've been testing with
pflash the whole time).


Cheers!

D. Olsson
PGP: 8204A8CD

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-07-31 11:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-26 10:07 [Buildroot] [PATCH v2 3/6] configs/aarch64_efi_defconfig: build the EDK2 firmware from source D. Olsson
2020-07-27 15:30 ` Erico Nunes
2020-07-31 11:44   ` D. Olsson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.