diff mbox series

[kvm-unit-tests,2/3] arm/efi/run: Add Fedora's path to QEMU_EFI

Message ID 20230607185905.32810-3-andrew.jones@linux.dev (mailing list archive)
State New, archived
Headers show
Series EFI runtime fixes | expand

Commit Message

Andrew Jones June 7, 2023, 6:59 p.m. UTC
Try Fedora's default path too.

Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
---
 arm/efi/run | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

Comments

Nikos Nikoleris June 15, 2023, 2:47 p.m. UTC | #1
On 07/06/2023 19:59, Andrew Jones wrote:
> Try Fedora's default path too.
> 
> Signed-off-by: Andrew Jones <andrew.jones@linux.dev>

Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>

> ---
>   arm/efi/run | 13 +++++++++----
>   1 file changed, 9 insertions(+), 4 deletions(-)
> 
> diff --git a/arm/efi/run b/arm/efi/run
> index c61da31183a7..f75ef157acf3 100755
> --- a/arm/efi/run
> +++ b/arm/efi/run
> @@ -15,8 +15,14 @@ source config.mak
>   source scripts/arch-run.bash
>   source scripts/common.bash
>   
> +if [ -f /usr/share/qemu-efi-aarch64/QEMU_EFI.fd ]; then
> +	DEFAULT_UEFI=/usr/share/qemu-efi-aarch64/QEMU_EFI.fd
> +elif [ -f /usr/share/edk2/aarch64/QEMU_EFI.silent.fd ]; then
> +	DEFAULT_UEFI=/usr/share/edk2/aarch64/QEMU_EFI.silent.fd
> +fi
> +
>   : "${EFI_SRC:=$(realpath "$(dirname "$0")/../")}"
> -: "${EFI_UEFI:=/usr/share/qemu-efi-aarch64/QEMU_EFI.fd}"
> +: "${EFI_UEFI:=$DEFAULT_UEFI}"
>   : "${EFI_TEST:=efi-tests}"
>   : "${EFI_CASE:=$(basename $1 .efi)}"
>   : "${EFI_VAR_GUID:=97ef3e03-7329-4a6a-b9ba-6c1fdcc5f823}"
> @@ -24,9 +30,8 @@ source scripts/common.bash
>   [ "$EFI_USE_ACPI" = "y" ] || EFI_USE_DTB=y
>   
>   if [ ! -f "$EFI_UEFI" ]; then
> -	echo "UEFI firmware not found: $EFI_UEFI"
> -	echo "Please install the UEFI firmware to this path"
> -	echo "Or specify the correct path with the env variable EFI_UEFI"
> +	echo "UEFI firmware not found."
> +	echo "Please specify the path with the env variable EFI_UEFI"
>   	exit 2
>   fi
>
diff mbox series

Patch

diff --git a/arm/efi/run b/arm/efi/run
index c61da31183a7..f75ef157acf3 100755
--- a/arm/efi/run
+++ b/arm/efi/run
@@ -15,8 +15,14 @@  source config.mak
 source scripts/arch-run.bash
 source scripts/common.bash
 
+if [ -f /usr/share/qemu-efi-aarch64/QEMU_EFI.fd ]; then
+	DEFAULT_UEFI=/usr/share/qemu-efi-aarch64/QEMU_EFI.fd
+elif [ -f /usr/share/edk2/aarch64/QEMU_EFI.silent.fd ]; then
+	DEFAULT_UEFI=/usr/share/edk2/aarch64/QEMU_EFI.silent.fd
+fi
+
 : "${EFI_SRC:=$(realpath "$(dirname "$0")/../")}"
-: "${EFI_UEFI:=/usr/share/qemu-efi-aarch64/QEMU_EFI.fd}"
+: "${EFI_UEFI:=$DEFAULT_UEFI}"
 : "${EFI_TEST:=efi-tests}"
 : "${EFI_CASE:=$(basename $1 .efi)}"
 : "${EFI_VAR_GUID:=97ef3e03-7329-4a6a-b9ba-6c1fdcc5f823}"
@@ -24,9 +30,8 @@  source scripts/common.bash
 [ "$EFI_USE_ACPI" = "y" ] || EFI_USE_DTB=y
 
 if [ ! -f "$EFI_UEFI" ]; then
-	echo "UEFI firmware not found: $EFI_UEFI"
-	echo "Please install the UEFI firmware to this path"
-	echo "Or specify the correct path with the env variable EFI_UEFI"
+	echo "UEFI firmware not found."
+	echo "Please specify the path with the env variable EFI_UEFI"
 	exit 2
 fi