* [PATCH 1/2] arm/edk2: add support for qemuarm and qemuarm64
@ 2022-06-20 15:29 Jon Mason
2022-06-20 15:29 ` [PATCH 2/2] ci: update edk2 yml file to work with qemuarm/qemuarm64 Jon Mason
2022-06-27 14:03 ` [PATCH 1/2] arm/edk2: add support for qemuarm and qemuarm64 Jon Mason
0 siblings, 2 replies; 3+ messages in thread
From: Jon Mason @ 2022-06-20 15:29 UTC (permalink / raw)
To: meta-arm
Add basic support for running edk2 on qemuarm and qemuarm64. This
necessitated the need to add ACPI and EFI to the default kernel configs
for these machines.
Signed-off-by: Jon Mason <jon.mason@arm.com>
---
meta-arm/recipes-bsp/uefi/edk2-firmware.inc | 5 +++++
.../recipes-bsp/uefi/edk2-firmware_%.bbappend | 17 +++++++++++++++++
.../recipes-kernel/linux/linux-yocto/efi.cfg | 2 ++
.../recipes-kernel/linux/linux-yocto_%.bbappend | 6 ++++++
4 files changed, 30 insertions(+)
create mode 100644 meta-arm/recipes-kernel/linux/linux-yocto/efi.cfg
diff --git a/meta-arm/recipes-bsp/uefi/edk2-firmware.inc b/meta-arm/recipes-bsp/uefi/edk2-firmware.inc
index 63c422f6..21bc58dd 100644
--- a/meta-arm/recipes-bsp/uefi/edk2-firmware.inc
+++ b/meta-arm/recipes-bsp/uefi/edk2-firmware.inc
@@ -71,9 +71,14 @@ export BTOOLS_PATH = "${EDK_TOOLS_PATH}/BinWrappers/PosixLike"
EDK_COMPILER ?= "GCC5"
export GCC5_AARCH64_PREFIX = "${TARGET_PREFIX}"
+export GCC5_ARM_PREFIX = "${TARGET_PREFIX}"
EDK_COMPILER:toolchain-clang = "CLANG38"
export CLANG38_AARCH64_PREFIX = "${TARGET_PREFIX}"
+export CLANG38_ARM_PREFIX = "${TARGET_PREFIX}"
+
+#FIXME - arm32 doesn't work with clang due to a linker issue
+TOOLCHAIN:arm = "gcc"
do_configure:prepend() {
sed -i -e "s#-target ${HOST_ARCH}-linux-gnu*#-target ${HOST_SYS}#" ${S}/BaseTools/Conf/tools_def.template
diff --git a/meta-arm/recipes-bsp/uefi/edk2-firmware_%.bbappend b/meta-arm/recipes-bsp/uefi/edk2-firmware_%.bbappend
index f65cb094..7a39bb03 100644
--- a/meta-arm/recipes-bsp/uefi/edk2-firmware_%.bbappend
+++ b/meta-arm/recipes-bsp/uefi/edk2-firmware_%.bbappend
@@ -3,6 +3,15 @@ EDK2_PLATFORM:qemuarm64-secureboot = "ArmVirtQemu-AARCH64"
EDK2_PLATFORM_DSC:qemuarm64-secureboot = "ArmVirtPkg/ArmVirtQemu.dsc"
EDK2_BIN_NAME:qemuarm64-secureboot = "QEMU_EFI.fd"
+COMPATIBLE_MACHINE:qemuarm64 = "qemuarm64"
+EDK2_PLATFORM:qemuarm64 = "ArmVirtQemu-AARCH64"
+EDK2_PLATFORM_DSC:qemuarm64 = "ArmVirtPkg/ArmVirtQemu.dsc"
+EDK2_BIN_NAME:qemuarm64 = "QEMU_EFI.fd"
+
+COMPATIBLE_MACHINE:qemuarm = "qemuarm"
+EDK2_PLATFORM:qemuarm = "ArmVirtQemu-ARM"
+EDK2_PLATFORM_DSC:qemuarm = "ArmVirtPkg/ArmVirtQemu.dsc"
+EDK2_BIN_NAME:qemuarm = "QEMU_EFI.fd"
COMPATIBLE_MACHINE:qemu-generic-arm64 = "qemu-generic-arm64"
DEPENDS:append:qemu-generic-arm64 = " trusted-firmware-a coreutils-native"
@@ -21,3 +30,11 @@ do_install:append:qemu-generic-arm64() {
# QEMU requires that the images be minimum of 256M in size
truncate -s 256M ${D}/firmware/SBSA_FLASH*.fd
}
+
+do_install:append:qemuarm64() {
+ install ${B}/Build/${EDK2_PLATFORM}/${EDK2_BUILD_MODE}_${EDK_COMPILER}/FV/${EDK2_BIN_NAME} ${D}/firmware/
+}
+
+do_install:append:qemuarm() {
+ install ${B}/Build/${EDK2_PLATFORM}/${EDK2_BUILD_MODE}_${EDK_COMPILER}/FV/${EDK2_BIN_NAME} ${D}/firmware/
+}
diff --git a/meta-arm/recipes-kernel/linux/linux-yocto/efi.cfg b/meta-arm/recipes-kernel/linux/linux-yocto/efi.cfg
new file mode 100644
index 00000000..00be1bc6
--- /dev/null
+++ b/meta-arm/recipes-kernel/linux/linux-yocto/efi.cfg
@@ -0,0 +1,2 @@
+CONFIG_ACPI=y
+CONFIG_EFI=y
diff --git a/meta-arm/recipes-kernel/linux/linux-yocto_%.bbappend b/meta-arm/recipes-kernel/linux/linux-yocto_%.bbappend
index cf093f04..1d01daa0 100644
--- a/meta-arm/recipes-kernel/linux/linux-yocto_%.bbappend
+++ b/meta-arm/recipes-kernel/linux/linux-yocto_%.bbappend
@@ -16,3 +16,9 @@ FILESEXTRAPATHS:prepend:qemuarm-secureboot = "${ARMFILESPATHS}"
SRC_URI:append:qemuarm-secureboot = " \
file://tee.cfg \
"
+
+FILESEXTRAPATHS:prepend:qemuarm64 = "${ARMFILESPATHS}"
+SRC_URI:append:qemuarm64 = " file://efi.cfg"
+
+FILESEXTRAPATHS:prepend:qemuarm = "${ARMFILESPATHS}"
+SRC_URI:append:qemuarm = " file://efi.cfg"
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] ci: update edk2 yml file to work with qemuarm/qemuarm64
2022-06-20 15:29 [PATCH 1/2] arm/edk2: add support for qemuarm and qemuarm64 Jon Mason
@ 2022-06-20 15:29 ` Jon Mason
2022-06-27 14:03 ` [PATCH 1/2] arm/edk2: add support for qemuarm and qemuarm64 Jon Mason
1 sibling, 0 replies; 3+ messages in thread
From: Jon Mason @ 2022-06-20 15:29 UTC (permalink / raw)
To: meta-arm
Signed-off-by: Jon Mason <jon.mason@arm.com>
---
.gitlab-ci.yml | 4 ++++
ci/edk2.yml | 6 ++++++
ci/jobs-to-kas | 2 +-
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 6532fd09..f91d678a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -185,6 +185,9 @@ qemuarm64:
extends: .build
parallel:
matrix:
+ - TOOLCHAINS: [gcc, clang]
+ EFI: [uboot, edk2]
+ TESTING: testimage
- VIRT: xen
qemuarm-secureboot:
@@ -199,6 +202,7 @@ qemuarm:
parallel:
matrix:
- TOOLCHAINS: [gcc, clang]
+ EFI: [uboot, edk2]
TESTING: testimage
- VIRT: xen
diff --git a/ci/edk2.yml b/ci/edk2.yml
index 77eaee88..219ee28b 100644
--- a/ci/edk2.yml
+++ b/ci/edk2.yml
@@ -7,3 +7,9 @@ local_conf_header:
MACHINE_FEATURES += "efi"
TFA_UBOOT = "0"
TFA_UEFI = "1"
+
+ EXTRA_IMAGEDEPENDS += "edk2-firmware"
+ EFI_PROVIDER ?= "grub-efi"
+
+ QB_DEFAULT_BIOS = "QEMU_EFI.fd"
+ WKS_FILE ?= "efi-disk.wks.in"
diff --git a/ci/jobs-to-kas b/ci/jobs-to-kas
index f442a22d..d6896b77 100755
--- a/ci/jobs-to-kas
+++ b/ci/jobs-to-kas
@@ -18,7 +18,7 @@ for i in $(echo $1 | cut -s -d ':' -f 2 | sed 's/[][,]//g'); do
# defaults, we can simply ignore those parameters. They are necessary
# to pass in so that matrix can correctly setup all of the permutations
# of each individual run.
- if [[ $i == 'none' || $i == 'gcc' || $i == 'glibc' ]]; then
+ if [[ $i == 'none' || $i == 'gcc' || $i == 'glibc' || $i == 'uboot' ]]; then
continue
fi
FILES+=":ci/$i.yml"
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] arm/edk2: add support for qemuarm and qemuarm64
2022-06-20 15:29 [PATCH 1/2] arm/edk2: add support for qemuarm and qemuarm64 Jon Mason
2022-06-20 15:29 ` [PATCH 2/2] ci: update edk2 yml file to work with qemuarm/qemuarm64 Jon Mason
@ 2022-06-27 14:03 ` Jon Mason
1 sibling, 0 replies; 3+ messages in thread
From: Jon Mason @ 2022-06-27 14:03 UTC (permalink / raw)
To: meta-arm, Jon Mason
On Mon, 20 Jun 2022 11:29:12 -0400, Jon Mason wrote:
> Add basic support for running edk2 on qemuarm and qemuarm64. This
> necessitated the need to add ACPI and EFI to the default kernel configs
> for these machines.
Applied, thanks!
[1/2] arm/edk2: add support for qemuarm and qemuarm64
commit: 493690f0d1defa2d92148aa46bc8f9219b7d21b5
[2/2] ci: update edk2 yml file to work with qemuarm/qemuarm64
commit: 47264aff0ba88caf6c7435fb2abc34d1c91ebdfe
Best regards,
--
Jon Mason <jon.mason@arm.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-06-27 14:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-20 15:29 [PATCH 1/2] arm/edk2: add support for qemuarm and qemuarm64 Jon Mason
2022-06-20 15:29 ` [PATCH 2/2] ci: update edk2 yml file to work with qemuarm/qemuarm64 Jon Mason
2022-06-27 14:03 ` [PATCH 1/2] arm/edk2: add support for qemuarm and qemuarm64 Jon Mason
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.