grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 8/8] travis: Test module loading from tftp as well


From: Alexander Graf
Subject: [PATCH v2 8/8] travis: Test module loading from tftp as well
Date: Thu, 2 May 2019 08:55:37 +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>

---

v1 -> v2:

  - new patch
---
 .travis.yml | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index d8f6170e6..9bed42ac5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -67,15 +67,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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]