From b4787552b02c7a3a124f1d2178309383c36f5c03 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Fri, 8 Jan 2016 09:49:08 +0100 Subject: [PATCH] Tests: Support arm-efi --- tests/ahci_test.in | 2 +- tests/ehci_test.in | 2 +- tests/ohci_test.in | 2 +- tests/partmap_test.in | 3 +++ tests/pata_test.in | 2 +- tests/uhci_test.in | 2 +- tests/util/grub-shell.in | 15 ++++++++++++--- 7 files changed, 20 insertions(+), 8 deletions(-) diff --git a/tests/ahci_test.in b/tests/ahci_test.in index 40441768e..1d01d1f59 100644 --- a/tests/ahci_test.in +++ b/tests/ahci_test.in @@ -30,7 +30,7 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in mips*-arc | mips*-qemu_mips) exit 0;; # FIXME: No native drivers are available for those - powerpc-ieee1275 | sparc64-ieee1275 | arm64-efi) + powerpc-ieee1275 | sparc64-ieee1275 | arm*-efi) exit 0;; esac diff --git a/tests/ehci_test.in b/tests/ehci_test.in index 8de56ee98..7dd8d3e8f 100644 --- a/tests/ehci_test.in +++ b/tests/ehci_test.in @@ -30,7 +30,7 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in mips*-arc | mips*-qemu_mips) exit 0;; # FIXME: No native drivers are available for those - powerpc-ieee1275 | sparc64-ieee1275 | arm64-efi) + powerpc-ieee1275 | sparc64-ieee1275 | arm*-efi) exit 0;; esac diff --git a/tests/ohci_test.in b/tests/ohci_test.in index da517629f..7fede6f26 100644 --- a/tests/ohci_test.in +++ b/tests/ohci_test.in @@ -30,7 +30,7 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in mips*-arc | mips*-qemu_mips) exit 0;; # FIXME: No native drivers are available for those - powerpc-ieee1275 | sparc64-ieee1275 | arm64-efi) + powerpc-ieee1275 | sparc64-ieee1275 | arm*-efi) exit 0;; esac diff --git a/tests/partmap_test.in b/tests/partmap_test.in index 4230ba228..f8dc456fb 100644 --- a/tests/partmap_test.in +++ b/tests/partmap_test.in @@ -88,6 +88,9 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in mipsel-arc) disk=arc/scsi0/disk0/rdisk0 ;; + arm*-efi) + disk=hd3 + ;; *) disk=hd0 ;; diff --git a/tests/pata_test.in b/tests/pata_test.in index 4bf644fe6..c1d0f63ea 100644 --- a/tests/pata_test.in +++ b/tests/pata_test.in @@ -30,7 +30,7 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in *-arc) exit 0;; # FIXME: No native drivers are available for those - powerpc-ieee1275 | sparc64-ieee1275 | arm64-efi) + powerpc-ieee1275 | sparc64-ieee1275 | arm*-efi) exit 0;; i386-ieee1275) disk=hdb diff --git a/tests/uhci_test.in b/tests/uhci_test.in index 5ec503033..89e2c1805 100644 --- a/tests/uhci_test.in +++ b/tests/uhci_test.in @@ -30,7 +30,7 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in mips*-arc | mips*-qemu_mips) exit 0;; # FIXME: No native drivers are available for those - powerpc-ieee1275 | sparc64-ieee1275 | arm64-efi) + powerpc-ieee1275 | sparc64-ieee1275 | arm*-efi) exit 0;; esac diff --git a/tests/util/grub-shell.in b/tests/util/grub-shell.in index cff597ea1..5ba2c299c 100644 --- a/tests/util/grub-shell.in +++ b/tests/util/grub-shell.in @@ -182,6 +182,15 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in disk="device virtio-blk-device,drive=hd1 -drive if=none,id=hd1,file=" serial_port=efi0 ;; + arm-efi) + qemu=qemu-system-arm + boot=hd + console=console + trim=1 + qemuopts="-machine virt -bios /usr/share/ovmf-arm/QEMU_EFI.fd $qemuopts" + disk="device virtio-blk-device,drive=hd1 -drive if=none,id=hd1,file=" + serial_port=efi0 + ;; *) boot=hd qemu=qemu-system-i386 @@ -233,7 +242,7 @@ for option in "$@"; do echo "(hd$disk) $dsk" >> "$device_map" disk="$((disk+1))" else - if [ $disk = error ]; then + if [ "$disk" = error ]; then echo "Too many disks" 1>&2 exit 1; fi @@ -370,7 +379,7 @@ if [ x$boot != xnet ] && [ x$boot != xemu ]; then ${files} >/dev/null 2>&1 fi if [ x$boot = xhd ]; then - if [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" = arm64-efi ]; then + if [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" = arm64-efi ] || [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" = arm-efi ]; then device="device virtio-blk-device,drive=hd0 -drive if=none,id=hd0,file=" elif [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" = mips-arc ]; then device="hdb " @@ -380,7 +389,7 @@ if [ x$boot = xhd ]; then bootdev="-boot c" fi if [ x$boot = xcd ]; then - if [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" = arm64-efi ]; then + if [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" = arm64-efi ] || [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" = arm-efi ]; then device="device virtio-blk-device,drive=cd0 -drive if=none,id=cd0,media=cdrom,file=" elif [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" = powerpc-ieee1275 ] && [ x$pseries != xy ] ; then device="-drive if=ide,media=cdrom,file=" -- 2.39.5