All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] Travis fixes
@ 2019-04-27 22:55 Alexander Graf
  2019-04-27 22:55 ` [PATCH 1/6] travis: Run bootstrap instead of autogen.sh Alexander Graf
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Alexander Graf @ 2019-04-27 22:55 UTC (permalink / raw)
  To: grub-devel

This patch set collects a few fixes for Travis CI since the initial
commit was applied:

  - catch up with the tree
  - fix targets that need a board specified
  - make mkimage loop more robust
  - add QEMU tests for ARM and AArch64 EFI targets

That way we should hopefully catch even more problems going forward.

Alexander Graf (6):
  travis: Run bootstrap instead of autogen.sh
  travis: Fix sparc64 test
  travis: Fix mips QEMU target
  travis: Fix arm coreboot test and make loop more robus
  arm coreboot: Use common directory path
  travis: Add smoke tests for arm and aarch64

 .travis.yml    | 22 +++++++++++++++-------
 util/mkimage.c |  4 ++--
 2 files changed, 17 insertions(+), 9 deletions(-)

-- 
2.16.4



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/6] travis: Run bootstrap instead of autogen.sh
  2019-04-27 22:55 [PATCH 0/6] Travis fixes Alexander Graf
@ 2019-04-27 22:55 ` Alexander Graf
  2019-04-27 22:55 ` [PATCH 2/6] travis: Fix sparc64 test Alexander Graf
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Alexander Graf @ 2019-04-27 22:55 UTC (permalink / raw)
  To: grub-devel

Commit 35b909062e7b3 ("gnulib: Upgrade Gnulib and switch to bootstrap tool")
changed the build flow from running ./autogen.sh to running ./bootstrap
but missed to update .travis.yml. Adapt it accordingly.

Fixes: 35b909062e7b3 ("gnulib: Upgrade Gnulib and switch to bootstrap tool")
Signed-off-by: Alexander Graf <agraf@csgraf.de>
---
 .travis.yml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 81de20fa3..6184a373f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -18,6 +18,7 @@ addons:
     - python
     - qemu-system
     - unifont
+    - gnulib
 
 env:
   global:
@@ -35,7 +36,7 @@ before_script:
 script:
   # Comments must be outside the command strings below, or the Travis parser
   # will get confused.
-  - ./autogen.sh
+  - ./bootstrap
 
   # Build all selected GRUB targets.
   - for target in $GRUB_TARGETS; do
-- 
2.16.4



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/6] travis: Fix sparc64 test
  2019-04-27 22:55 [PATCH 0/6] Travis fixes Alexander Graf
  2019-04-27 22:55 ` [PATCH 1/6] travis: Run bootstrap instead of autogen.sh Alexander Graf
@ 2019-04-27 22:55 ` Alexander Graf
  2019-04-27 22:55 ` [PATCH 3/6] travis: Fix mips QEMU target Alexander Graf
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Alexander Graf @ 2019-04-27 22:55 UTC (permalink / raw)
  To: grub-devel

For sparc64, we were not selecting the correct mkimage output type. Just
pick aout at random. Also, make sure the rest of the variable logic can
deal with the 3rd element.

Signed-off-by: Alexander Graf <agraf@csgraf.de>
---
 .travis.yml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 6184a373f..c3e6513f2 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -41,7 +41,8 @@ script:
   # Build all selected GRUB targets.
   - for target in $GRUB_TARGETS; do
       plat=${target#*-};
-      arch=${target%-*};
+      plat=${plat%-*};
+      arch=${target%%-*};
       [ "$arch" = "arm64" ] && arch=aarch64-linux;
       [ "$arch" = "arm" ] && arch=arm-linux-gnueabi;
       [ "$arch" = "ia64" ] && arch=ia64-linux;
@@ -81,7 +82,7 @@ matrix:
         - CROSS_TARGETS="powerpc64-linux"
     - name: "sparc64"
       env:
-        - GRUB_TARGETS="sparc64-ieee1275"
+        - GRUB_TARGETS="sparc64-ieee1275-aout"
         - CROSS_TARGETS="sparc64-linux"
     - name: "ia64"
       env:
-- 
2.16.4



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/6] travis: Fix mips QEMU target
  2019-04-27 22:55 [PATCH 0/6] Travis fixes Alexander Graf
  2019-04-27 22:55 ` [PATCH 1/6] travis: Run bootstrap instead of autogen.sh Alexander Graf
  2019-04-27 22:55 ` [PATCH 2/6] travis: Fix sparc64 test Alexander Graf
@ 2019-04-27 22:55 ` Alexander Graf
  2019-04-27 22:55 ` [PATCH 4/6] travis: Fix arm coreboot test and make loop more robus Alexander Graf
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Alexander Graf @ 2019-04-27 22:55 UTC (permalink / raw)
  To: grub-devel

The MIPS QEMU targets can be built as either elf binary or flash image.
Build one each for BE/LE and make sure we pass the correct one into
mkimage.

Signed-off-by: Alexander Graf <agraf@csgraf.de>
---
 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index c3e6513f2..570181e81 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -90,7 +90,7 @@ matrix:
         - CROSS_TARGETS="ia64-linux"
     - name: "mips"
       env:
-        - GRUB_TARGETS="mips-arc mipsel-arc mipsel-qemu_mips mips-qemu_mips"
+        - GRUB_TARGETS="mips-arc mipsel-arc mipsel-qemu_mips-elf mips-qemu_mips-flash"
         - CROSS_TARGETS="mips64-linux"
     - name: "arm"
       env:
-- 
2.16.4



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 4/6] travis: Fix arm coreboot test and make loop more robus
  2019-04-27 22:55 [PATCH 0/6] Travis fixes Alexander Graf
                   ` (2 preceding siblings ...)
  2019-04-27 22:55 ` [PATCH 3/6] travis: Fix mips QEMU target Alexander Graf
@ 2019-04-27 22:55 ` Alexander Graf
  2019-04-27 22:55 ` [PATCH 5/6] arm coreboot: Use common directory path Alexander Graf
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Alexander Graf @ 2019-04-27 22:55 UTC (permalink / raw)
  To: grub-devel

We missed the fact that the coreboot target did not succeed on mkimage.
Properly abort the loop if we see a failure and fix the coreboot target
to also indicate the board target.

Signed-off-by: Alexander Graf <agraf@csgraf.de>
---
 .travis.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 570181e81..29013bb9b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -62,7 +62,7 @@ script:
   - echo -e "insmod echo\\ninsmod reboot\\necho hello world\\nreboot" > 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; done
+  - ( for target in $GRUB_TARGETS; do grub-mkimage -c grub.cfg -p / -O $target -o grub-$target echo reboot normal || exit; 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
@@ -94,7 +94,7 @@ matrix:
         - CROSS_TARGETS="mips64-linux"
     - name: "arm"
       env:
-        - GRUB_TARGETS="arm-coreboot arm-efi arm-uboot"
+        - GRUB_TARGETS="arm-coreboot-vexpress arm-efi arm-uboot"
         - CROSS_TARGETS="arm-linux-gnueabi"
     - name: "arm64"
       env:
-- 
2.16.4



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 5/6] arm coreboot: Use common directory path
  2019-04-27 22:55 [PATCH 0/6] Travis fixes Alexander Graf
                   ` (3 preceding siblings ...)
  2019-04-27 22:55 ` [PATCH 4/6] travis: Fix arm coreboot test and make loop more robus Alexander Graf
@ 2019-04-27 22:55 ` Alexander Graf
  2019-04-27 22:55 ` [PATCH 5/5] travis: Add smoke tests for arm and aarch64 Alexander Graf
  2019-04-27 22:55 ` [PATCH 6/6] " Alexander Graf
  6 siblings, 0 replies; 8+ messages in thread
From: Alexander Graf @ 2019-04-27 22:55 UTC (permalink / raw)
  To: grub-devel

The ARM coreboot target supports multiple boards, but they are all built
using the same object path. The only difference in target boards is done
in mkimage to determine the load address.

Currently, mkimage is looking at a board specific path
(/usr/lib/grub/arm-coreboot-vexpress) for modules while it installs it
at a non-specific path (/usr/lib/grub/arm-coreboot).

So let's sync the two up again and tell mkimage to look for coreboot
modules at a board agnostic path, syncing it up with all other targets.

Signed-off-by: Alexander Graf <agraf@csgraf.de>
---
 util/mkimage.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/util/mkimage.c b/util/mkimage.c
index 37d6249f1..f1a9c9c86 100644
--- a/util/mkimage.c
+++ b/util/mkimage.c
@@ -553,7 +553,7 @@ static const struct grub_install_image_target_desc image_targets[] =
     },
     /* For coreboot versions that don't support self-relocating images. */
     {
-      .dirname = "arm-coreboot-vexpress",
+      .dirname = "arm-coreboot",
       .names = { "arm-coreboot-vexpress", NULL },
       .voidp_sizeof = 4,
       .bigendian = 0,
@@ -572,7 +572,7 @@ static const struct grub_install_image_target_desc image_targets[] =
       .link_addr = 0x62000000,
     },
     {
-      .dirname = "arm-coreboot-veyron",
+      .dirname = "arm-coreboot",
       .names = { "arm-coreboot-veyron", NULL },
       .voidp_sizeof = 4,
       .bigendian = 0,
-- 
2.16.4



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 5/5] travis: Add smoke tests for arm and aarch64
  2019-04-27 22:55 [PATCH 0/6] Travis fixes Alexander Graf
                   ` (4 preceding siblings ...)
  2019-04-27 22:55 ` [PATCH 5/6] arm coreboot: Use common directory path Alexander Graf
@ 2019-04-27 22:55 ` Alexander Graf
  2019-04-27 22:55 ` [PATCH 6/6] " Alexander Graf
  6 siblings, 0 replies; 8+ messages in thread
From: Alexander Graf @ 2019-04-27 22:55 UTC (permalink / raw)
  To: grub-devel

We've had an arm regression in grub recently where grub would not even
be able to boot up anymore. So let's include arm and aarch64 in our
simple "hello world" smoke tests as well.

For OVMF on ARM to work, we need a newer version of QEMU, add a PPA
dependency for it.

Signed-off-by: Alexander Graf <agraf@csgraf.de>
---
 .travis.yml | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index bce1c6daf..d089383c4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -11,6 +11,8 @@ language: c
 
 addons:
   apt:
+    sources:
+    - sourceline: 'ppa:jacob/virtualisation'
     packages:
     - libsdl1.2-dev
     - lzop
@@ -32,6 +34,8 @@ before_script:
   - for i in $CROSS_TARGETS; do
         ( cd /tmp/cross; wget -t 3 -O - https://mirrors.kernel.org/pub/tools/crosstool/files/bin/x86_64/8.1.0/x86_64-gcc-8.1.0-nolibc-$i.tar.xz | tar xJ );
     done
+  - if [[ "$GRUB_TARGETS" == *"arm64-efi"* ]]; then wget http://snapshots.linaro.org/components/kernel/leg-virt-tianocore-edk2-upstream/3525/QEMU-AARCH64/RELEASE_GCC5/QEMU_EFI.fd -O QEMU_EFI.aarch64.fd; fi
+  - if [[ "$GRUB_TARGETS" == *"arm-efi"* ]]; then wget http://snapshots.linaro.org/components/kernel/leg-virt-tianocore-edk2-upstream/3525/QEMU-ARM/RELEASE_GCC5/QEMU_EFI.fd -O QEMU_EFI.arm.fd; fi
 
 script:
   # Comments must be outside the command strings below, or the Travis parser
@@ -65,7 +69,9 @@ script:
   - for target in $GRUB_TARGETS; do grub-mkimage -c grub.cfg -p / -O $target -o grub-$target echo reboot normal || break; 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" == *"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
 
 matrix:
   include:
-- 
2.16.4



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 6/6] travis: Add smoke tests for arm and aarch64
  2019-04-27 22:55 [PATCH 0/6] Travis fixes Alexander Graf
                   ` (5 preceding siblings ...)
  2019-04-27 22:55 ` [PATCH 5/5] travis: Add smoke tests for arm and aarch64 Alexander Graf
@ 2019-04-27 22:55 ` Alexander Graf
  6 siblings, 0 replies; 8+ messages in thread
From: Alexander Graf @ 2019-04-27 22:55 UTC (permalink / raw)
  To: grub-devel

We've had an arm regression in grub recently where grub would not even
be able to boot up anymore. So let's include arm and aarch64 in our
simple "hello world" smoke tests as well.

For OVMF on ARM to work, we need a newer version of QEMU, add a PPA
dependency for it.

Signed-off-by: Alexander Graf <agraf@csgraf.de>
---
 .travis.yml | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 29013bb9b..e6eab6ecf 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -11,6 +11,8 @@ language: c
 
 addons:
   apt:
+    sources:
+    - sourceline: 'ppa:jacob/virtualisation'
     packages:
     - libsdl1.2-dev
     - lzop
@@ -32,6 +34,8 @@ before_script:
   - for i in $CROSS_TARGETS; do
         ( cd /tmp/cross; wget -t 3 -O - https://mirrors.kernel.org/pub/tools/crosstool/files/bin/x86_64/8.1.0/x86_64-gcc-8.1.0-nolibc-$i.tar.xz | tar xJ );
     done
+  - if [[ "$GRUB_TARGETS" == *"arm64-efi"* ]]; then wget http://snapshots.linaro.org/components/kernel/leg-virt-tianocore-edk2-upstream/3525/QEMU-AARCH64/RELEASE_GCC5/QEMU_EFI.fd -O QEMU_EFI.aarch64.fd; fi
+  - if [[ "$GRUB_TARGETS" == *"arm-efi"* ]]; then wget http://snapshots.linaro.org/components/kernel/leg-virt-tianocore-edk2-upstream/3525/QEMU-ARM/RELEASE_GCC5/QEMU_EFI.fd -O QEMU_EFI.arm.fd; fi
 
 script:
   # Comments must be outside the command strings below, or the Travis parser
@@ -65,7 +69,9 @@ script:
   - ( for target in $GRUB_TARGETS; do grub-mkimage -c grub.cfg -p / -O $target -o grub-$target echo reboot normal || exit; 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" == *"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
 
 matrix:
   include:
-- 
2.16.4



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-04-27 22:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-27 22:55 [PATCH 0/6] Travis fixes Alexander Graf
2019-04-27 22:55 ` [PATCH 1/6] travis: Run bootstrap instead of autogen.sh Alexander Graf
2019-04-27 22:55 ` [PATCH 2/6] travis: Fix sparc64 test Alexander Graf
2019-04-27 22:55 ` [PATCH 3/6] travis: Fix mips QEMU target Alexander Graf
2019-04-27 22:55 ` [PATCH 4/6] travis: Fix arm coreboot test and make loop more robus Alexander Graf
2019-04-27 22:55 ` [PATCH 5/6] arm coreboot: Use common directory path Alexander Graf
2019-04-27 22:55 ` [PATCH 5/5] travis: Add smoke tests for arm and aarch64 Alexander Graf
2019-04-27 22:55 ` [PATCH 6/6] " Alexander Graf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.