[PATCH] Fix error message about the wrong command having failed: mformat instead of mcopy
--- util/grub-mkrescue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/grub-mkrescue.c b/util/grub-mkrescue.c index 21e5ce4e4..ce2cbc4f1 100644 --- a/util/grub-mkrescue.c +++ b/util/grub-mkrescue.c @@ -815,7 +815,7 @@ main (int argc, char *argv[]) grub_util_error ("`%s` invocation failed\n", "mformat"); rv = grub_util_exec ((const char * []) { "mcopy", "-s", "-i", efiimgfat, efidir_efi, "::/", NULL }); if (rv != 0) - grub_util_error ("`%s` invocation failed\n", "mformat"); + grub_util_error ("`%s` invocation failed\n", "mcopy"); xorriso_push ("--efi-boot"); xorriso_push ("efi.img"); xorriso_push ("-efi-boot-part"); -- 2.19.1 ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
[PATCH 6/6] travis: Add smoke tests for arm and aarch64
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 --- .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 ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
[PATCH 5/5] travis: Add smoke tests for arm and aarch64
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 --- .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 ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
[PATCH 1/6] travis: Run bootstrap instead of autogen.sh
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 --- .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 ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
[PATCH 0/6] Travis fixes
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 ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
[PATCH] arm: Align section alignment with manual relocation offset code
The arm relocation code has a manual special case for EFI binaries to add the natural alignment to its own relocation awareness. Since commit a51f953f4ee87 ("mkimage: Align efi sections on 4k boundary") we changed that alignment from 0x400 to 0x1000 bytes. Reflect the change in that branch that we forgot as well. This fixes running 32bit arm grub efi binaries for me again. Fixes: a51f953f4ee87 ("mkimage: Align efi sections on 4k boundary") Reported-by: Heinrich Schuchardt Reported-by: Steve McIntyre Signed-off-by: Alexander Graf --- util/grub-mkimagexx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/grub-mkimagexx.c b/util/grub-mkimagexx.c index a79034e7b..2059890c3 100644 --- a/util/grub-mkimagexx.c +++ b/util/grub-mkimagexx.c @@ -1137,7 +1137,7 @@ SUFFIX (relocate_addrs) (Elf_Ehdr *e, struct section_metadata *smd, (int) sym_addr, (int) sym_addr); /* Data will be naturally aligned */ if (image_target->id == IMAGE_EFI) -sym_addr += 0x400; +sym_addr += GRUB_PE32_SECTION_ALIGNMENT; *target = grub_host_to_target32 (grub_target_to_host32 (*target) + sym_addr); } break; -- 2.16.4 ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
[PATCH 2/6] travis: Fix sparc64 test
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 --- .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 ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
[PATCH 4/6] travis: Fix arm coreboot test and make loop more robus
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 --- .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 ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
[PATCH 3/6] travis: Fix mips QEMU target
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 --- .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 ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
[PATCH 5/6] arm coreboot: Use common directory path
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 --- 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 = 0x6200, }, { - .dirname = "arm-coreboot-veyron", + .dirname = "arm-coreboot", .names = { "arm-coreboot-veyron", NULL }, .voidp_sizeof = 4, .bigendian = 0, -- 2.16.4 ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel