Received: from list by lists.gnu.org with archive (Exim 4.71) id 1hY6fY-00074n-Fw for mharc-grub-devel@gnu.org; Tue, 04 Jun 2019 06:27:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34593) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hY6fQ-0006zv-Mo for grub-devel@gnu.org; Tue, 04 Jun 2019 06:27:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hY6fO-0005Kk-Ru for grub-devel@gnu.org; Tue, 04 Jun 2019 06:27:44 -0400 Received: from mail.csgraf.de ([188.138.100.120]:35798 helo=zulu616.server4you.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hY6fM-0005J8-Rf for grub-devel@gnu.org; Tue, 04 Jun 2019 06:27:42 -0400 Received: from server.alex.local (x5f732cb8.dyn.telefonica.de [95.115.44.184]) by csgraf.de (Postfix) with ESMTPSA id 687B73900559; Tue, 4 Jun 2019 12:27:37 +0200 (CEST) From: Alexander Graf To: grub-devel@gnu.org Cc: Daniel Kiper , Leif Lindholm Subject: [PATCH v3 08/10] travis: Test module loading from tftp as well Date: Tue, 4 Jun 2019 12:27:32 +0200 Message-Id: <20190604102734.1525-9-agraf@csgraf.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190604102734.1525-1-agraf@csgraf.de> References: <20190604102734.1525-1-agraf@csgraf.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 188.138.100.120 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jun 2019 10:27:46 -0000 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 Reviewed-by: Daniel Kiper --- 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