Received: from list by lists.gnu.org with archive (Exim 4.71) id 1hM5dK-0003Jn-Cz for mharc-grub-devel@gnu.org; Thu, 02 May 2019 02:55:54 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52875) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hM5dH-0003EW-NT for grub-devel@gnu.org; Thu, 02 May 2019 02:55:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hM5dF-00055m-MG for grub-devel@gnu.org; Thu, 02 May 2019 02:55:51 -0400 Received: from zulu616.server4you.de ([188.138.100.120]:54202) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hM5dE-00052J-0e for grub-devel@gnu.org; Thu, 02 May 2019 02:55:49 -0400 Received: from server.alex.local (x5f734459.dyn.telefonica.de [95.115.68.89]) by csgraf.de (Postfix) with ESMTPSA id 81A8339005A1 for ; Thu, 2 May 2019 08:55:39 +0200 (CEST) From: Alexander Graf To: grub-devel@gnu.org Subject: [PATCH v2 8/8] travis: Test module loading from tftp as well Date: Thu, 2 May 2019 08:55:37 +0200 Message-Id: <20190502065537.25636-9-agraf@csgraf.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190502065537.25636-1-agraf@csgraf.de> References: <20190502065537.25636-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: Thu, 02 May 2019 06:55:53 -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 --- 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