[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 08/10] travis: Test module loading from tftp as well
From: |
Alexander Graf |
Subject: |
[PATCH v3 08/10] travis: Test module loading from tftp as well |
Date: |
Tue, 4 Jun 2019 12:27:32 +0200 |
The travis test today only uses modules that are delivered with the
grub.efi binary. Let's drop echo and reboot and see if grub can load
them dynamically.
For this, we need to ensure that all modules required to load additional
modules are included in the grub binary. Some of these are target
specific (like efinet), so only include them conditionally.
Furthermore, the iPXE option rom included in Ubuntu Xenial seems to be
broken, so we need to ensure that we only use the OVMF built-in network
driver and not pass in an option rom.
Signed-off-by: Alexander Graf <address@hidden>
Reviewed-by: Daniel Kiper <address@hidden>
---
v1 -> v2:
- new patch
---
.travis.yml | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 170af5312..5867efea5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -69,15 +69,27 @@ script:
done
# Our test canary.
- - echo -e "insmod echo\\ninsmod reboot\\necho hello world\\nreboot" >
grub.cfg
+ - echo -e "insmod echo\\ninsmod reboot\\necho hello world\\nreboot" >
/tmp/grub/lib/grub/grub.cfg
# Assemble images and possibly run them.
- - ( for target in $GRUB_TARGETS; do grub-mkimage -c grub.cfg -p / -O $target
-o grub-$target echo reboot normal || exit; done )
+ - ( for target in $GRUB_TARGETS; do
+ pushd /tmp/grub/lib/grub/;
+ if [ -f $target/efinet.mod ]; then
+ EXTMODULES="efinet";
+ else
+ EXTMODULES="";
+ fi;
+ grub-mkimage -p / -O $target -o grub-$target normal tftp $EXTMODULES
|| exit;
+ popd;
+ done )
# Run images we know how to run.
- - if [[ "$GRUB_TARGETS" == *"x86_64-efi"* ]]; then qemu-system-x86_64
-bios /usr/share/ovmf/OVMF.fd -m 512 -no-reboot -nographic
-net nic -net user,tftp=.,bootfile=grub-x86_64-efi | tee grub.log && grep
"hello world" grub.log; fi
- - if [[ "$GRUB_TARGETS" == *"arm64-efi"* ]]; then qemu-system-aarch64 -M
virt -cpu cortex-a57 -bios QEMU_EFI.aarch64.fd -m 512 -no-reboot -nographic
-net nic -net user,tftp=.,bootfile=grub-arm64-efi | tee grub.log && grep
"hello world" grub.log; fi
- - if [[ "$GRUB_TARGETS" == *"arm-efi"* ]]; then qemu-system-arm -M
virt -cpu cortex-a15 -bios QEMU_EFI.arm.fd -m 512 -no-reboot -nographic
-net nic -net user,tftp=.,bootfile=grub-arm-efi | tee grub.log && grep
"hello world" grub.log; fi
+ - if [[ "$GRUB_TARGETS" == *"x86_64-efi"* ]]; then qemu-system-x86_64
-bios /usr/share/ovmf/OVMF.fd
+ -m 512 -no-reboot -nographic -net none -netdev
user,id=nd,tftp=/tmp/grub/lib/grub/,bootfile=grub-x86_64-efi -device
virtio-net-pci,netdev=nd,romfile="" | tee grub.log && grep "hello world"
grub.log; fi
+ - if [[ "$GRUB_TARGETS" == *"arm64-efi"* ]]; then qemu-system-aarch64 -M
virt -cpu cortex-a57 -bios QEMU_EFI.aarch64.fd
+ -m 512 -no-reboot -nographic -net none -netdev
user,id=nd,tftp=/tmp/grub/lib/grub/,bootfile=grub-arm64-efi -device
virtio-net-pci,netdev=nd,romfile="" | tee grub.log && grep "hello world"
grub.log; fi
+ - if [[ "$GRUB_TARGETS" == *"arm-efi"* ]]; then qemu-system-arm -M
virt -cpu cortex-a15 -bios QEMU_EFI.arm.fd
+ -m 512 -no-reboot -nographic -net none -netdev
user,id=nd,tftp=/tmp/grub/lib/grub/,bootfile=grub-arm-efi -device
virtio-net-pci,netdev=nd,romfile="" | tee grub.log && grep "hello world"
grub.log; fi
matrix:
include:
--
2.16.4
- [PATCH v3 00/10] Travis fixes, Alexander Graf, 2019/06/04
- [PATCH v3 02/10] travis: Fix sparc64 test, Alexander Graf, 2019/06/04
- [PATCH v3 03/10] travis: Fix mips QEMU target, Alexander Graf, 2019/06/04
- [PATCH v3 04/10] travis: Fix arm coreboot test and make loop more robus, Alexander Graf, 2019/06/04
- [PATCH v3 01/10] travis: Run bootstrap instead of autogen.sh, Alexander Graf, 2019/06/04
- [PATCH v3 07/10] travis: Add ARM thumb target to tests, Alexander Graf, 2019/06/04
- [PATCH v3 05/10] arm coreboot: Use common directory path, Alexander Graf, 2019/06/04
- [PATCH v3 08/10] travis: Test module loading from tftp as well,
Alexander Graf <=
- [PATCH v3 09/10] travis: Disable MIPS target, Alexander Graf, 2019/06/04
- Re: [PATCH v3 09/10] travis: Disable MIPS target, Daniel Kiper, 2019/06/04
Re: [PATCH v3 09/10] travis: Disable MIPS target, Leif Lindholm, 2019/06/04
[PATCH v3 06/10] travis: Add smoke tests for arm and aarch64, Alexander Graf, 2019/06/04