752ceb1
From 2cdd22ab9b7d938249ff6e84ac3b4657b2f43b99 Mon Sep 17 00:00:00 2001
752ceb1
From: Peter Jones <pjones@redhat.com>
752ceb1
Date: Tue, 26 Jun 2018 17:16:06 -0400
752ceb1
Subject: [PATCH] Minor fixes to make armv7hl build as arm-efi
752ceb1
752ceb1
- /remove/ the code to use use softfloat unconditionally on arm
752ceb1
  (I can't get our arm bins to build with it for whatever reason...)
752ceb1
- Fix one type error
752ceb1
- build the secure boot loader code on arm
752ceb1
752ceb1
Signed-off-by: Peter Jones <pjones@redhat.com>
752ceb1
---
752ceb1
 configure.ac                 | 2 +-
752ceb1
 grub-core/Makefile.core.def  | 1 +
752ceb1
 grub-core/loader/efi/linux.c | 2 +-
752ceb1
 3 files changed, 3 insertions(+), 2 deletions(-)
752ceb1
752ceb1
diff --git a/configure.ac b/configure.ac
752ceb1
index aa7632b56c3..997ac051449 100644
752ceb1
--- a/configure.ac
752ceb1
+++ b/configure.ac
752ceb1
@@ -863,7 +863,7 @@ fi
752ceb1
 # that floats are a good fit to run instead of what's written in the code.
752ceb1
 # Given that floating point unit is disabled (if present to begin with)
752ceb1
 # when GRUB is running which may result in various hard crashes.
752ceb1
-if test x"$platform" != xemu ; then
752ceb1
+if test x"$platform" != xemu -a "x$target_cpu" != xarm ; then
752ceb1
   AC_CACHE_CHECK([for options to get soft-float], grub_cv_target_cc_soft_float, [
752ceb1
     grub_cv_target_cc_soft_float=no
752ceb1
     if test "x$target_cpu" = xarm64; then
752ceb1
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
752ceb1
index cdafd91c677..a656930800e 100644
752ceb1
--- a/grub-core/Makefile.core.def
752ceb1
+++ b/grub-core/Makefile.core.def
752ceb1
@@ -1714,6 +1714,7 @@ module = {
752ceb1
   sparc64_ieee1275 = loader/sparc64/ieee1275/linux.c;
752ceb1
   ia64_efi = loader/ia64/efi/linux.c;
752ceb1
   arm = loader/arm/linux.c;
752ceb1
+  arm = loader/efi/linux.c;
752ceb1
   arm64 = loader/arm64/linux.c;
752ceb1
   arm64 = loader/efi/linux.c;
752ceb1
   emu = loader/emu/linux.c;
752ceb1
diff --git a/grub-core/loader/efi/linux.c b/grub-core/loader/efi/linux.c
752ceb1
index 7fe7201a388..8453b5c8017 100644
752ceb1
--- a/grub-core/loader/efi/linux.c
752ceb1
+++ b/grub-core/loader/efi/linux.c
752ceb1
@@ -50,7 +50,7 @@ grub_linuxefi_secure_validate (void *data, grub_uint32_t size)
752ceb1
 
752ceb1
   grub_dprintf ("secureboot", "Asking shim to verify kernel signature\n");
752ceb1
   status = shim_lock->verify (data, size);
752ceb1
-  grub_dprintf ("secureboot", "shim_lock->verify(): %ld\n", status);
752ceb1
+  grub_dprintf ("secureboot", "shim_lock->verify(): %ld\n", (long int)status);
752ceb1
   if (status == GRUB_EFI_SUCCESS)
752ceb1
     {
752ceb1
       grub_dprintf ("secureboot", "Kernel signature verification passed\n");