Commit f0dba45e authored by Lorenzo "Palinuro" Faletra's avatar Lorenzo "Palinuro" Faletra
Browse files

Import Debian changes 2.02+dfsg1-9parrot1

grub2 (2.02+dfsg1-9parrot1) testing; urgency=medium

  * Import new Debian release.

grub2 (2.02+dfsg1-9) unstable; urgency=medium

  [ Colin Watson ]
  * Sync Maintainer/Uploaders in debian/signing-template/control.in with the
    main packaging.
  * Tell reportbug to submit bug reports against unsigned packages rather
    than generated signed packages.
  * Update Homepage, debian/copyright Source, and debian/watch to use HTTPS.
  * Move bash completions to /usr/share/bash-completion/completions/grub and
    add appropriate symlinks (closes: #912852).
  * Build with GCC 8 (closes: #915735).

  [ Leif Lindholm ]
  * Apply patch series (mostly) from upstream to switch the arm loader over
    to use the arm64 loader code and improve arm/arm64 initrd handling
    (closes: #907596, #909420, #915091).

  [ Matthew Garrett ]
  * Don't enforce Shim signature validation if Secure Boot is disabled.
parent c950f75b
# see git-dpm(1) from git-dpm package
b735acae310e78152bcc1633d179c74d13fbd841
b735acae310e78152bcc1633d179c74d13fbd841
614ea0626131fc49f82d80e6459a200b8bc8e591
614ea0626131fc49f82d80e6459a200b8bc8e591
59aeb1cfaa3d5bfd7bbeeee0f0d37f6d9eed51fe
59aeb1cfaa3d5bfd7bbeeee0f0d37f6d9eed51fe
grub2_2.02+dfsg1.orig.tar.xz
......
grub2 (2.02+dfsg1-9parrot1) testing; urgency=medium
* Import new Debian release.
-- Lorenzo "Palinuro" Faletra <palinuro@parrotsec.org> Sat, 12 Jan 2019 02:18:20 +0100
grub2 (2.02+dfsg1-9) unstable; urgency=medium
[ Colin Watson ]
* Sync Maintainer/Uploaders in debian/signing-template/control.in with the
main packaging.
* Tell reportbug to submit bug reports against unsigned packages rather
than generated signed packages.
* Update Homepage, debian/copyright Source, and debian/watch to use HTTPS.
* Move bash completions to /usr/share/bash-completion/completions/grub and
add appropriate symlinks (closes: #912852).
* Build with GCC 8 (closes: #915735).
[ Leif Lindholm ]
* Apply patch series (mostly) from upstream to switch the arm loader over
to use the arm64 loader code and improve arm/arm64 initrd handling
(closes: #907596, #909420, #915091).
[ Matthew Garrett ]
* Don't enforce Shim signature validation if Secure Boot is disabled.
-- Colin Watson <cjwatson@debian.org> Fri, 07 Dec 2018 10:38:37 +0000
grub2 (2.02+dfsg1-8parrot1) testing; urgency=medium
* Import new Debian release.
......
......@@ -13,8 +13,8 @@ Build-Depends: debhelper (>= 7.4.2~),
po-debconf,
help2man,
texinfo,
gcc-7,
gcc-7-multilib [i386 kopensolaris-i386 any-amd64 any-ppc64 any-sparc],
gcc-8,
gcc-8-multilib [i386 kopensolaris-i386 any-amd64 any-ppc64 any-sparc],
xfonts-unifont,
libfreetype6-dev,
gettext,
......@@ -33,9 +33,10 @@ Build-Depends: debhelper (>= 7.4.2~),
wamerican,
libparted-dev [any-powerpc any-ppc64 any-ppc64el],
pkg-config,
bash-completion,
Build-Conflicts: autoconf2.13, libzfs-dev, libnvpair-dev
Standards-Version: 3.9.6
Homepage: http://www.gnu.org/software/grub/
Homepage: https://www.gnu.org/software/grub/
Vcs-Git: https://salsa.debian.org/grub-team/grub.git
Vcs-Browser: https://salsa.debian.org/grub-team/grub
......
Name: GNU GRUB
Source: http://www.gnu.org/software/grub/
Source: https://www.gnu.org/software/grub/
Files-Excluded: grub-core/lib/libgcrypt*/cipher/crc.c
Files: *
......
debian/tmp-grub-@COMMON_PLATFORM@/etc/bash_completion.d/grub
......@@ -2,7 +2,6 @@
../../debian/grub.d etc
../../debian/init-select.cfg etc/default/grub.d
etc/bash_completion.d
etc/grub.d
usr/bin/grub-editenv
usr/bin/grub-file
......
usr/share/grub/grub-mkconfig_lib usr/lib/grub/grub-mkconfig_lib
usr/share/bash-completion/completions/grub usr/share/bash-completion/completions/grub-editenv
usr/share/bash-completion/completions/grub usr/share/bash-completion/completions/grub-mkconfig
usr/share/bash-completion/completions/grub usr/share/bash-completion/completions/grub-mkfont
usr/share/bash-completion/completions/grub usr/share/bash-completion/completions/grub-mkimage
usr/share/bash-completion/completions/grub usr/share/bash-completion/completions/grub-mkpasswd-pbkdf2
usr/share/bash-completion/completions/grub usr/share/bash-completion/completions/grub-mkrescue
usr/share/bash-completion/completions/grub usr/share/bash-completion/completions/grub-probe
usr/share/bash-completion/completions/grub usr/share/bash-completion/completions/grub-script-check
rm_conffile /etc/bash_completion.d/grub 2.02+dfsg1-9~
usr/share/bash-completion/completions/grub usr/share/bash-completion/completions/grub-sparc64-setup
usr/share/bash-completion/completions/grub usr/share/bash-completion/completions/grub-sparc64-setup
usr/lib/grub/@CPU_PLATFORM@/grub-ntldr-img usr/bin/grub-ntldr-img
usr/lib/grub/@CPU_PLATFORM@/grub-bios-setup usr/sbin/grub-bios-setup
usr/share/bash-completion/completions/grub usr/share/bash-completion/completions/grub-bios-setup
usr/sbin/update-grub usr/sbin/update-grub2
usr/share/man/man8/update-grub.8 usr/share/man/man8/update-grub2.8
usr/share/bash-completion/completions/grub usr/share/bash-completion/completions/grub-install
usr/share/bash-completion/completions/grub usr/share/bash-completion/completions/grub-reboot
usr/share/bash-completion/completions/grub usr/share/bash-completion/completions/grub-set-default
From 63630fac4d3e315d1626936160f947dc04f15755 Mon Sep 17 00:00:00 2001
From: Leif Lindholm <leif.lindholm@linaro.org>
Date: Thu, 1 Feb 2018 18:18:51 +0000
Subject: make GRUB_LINUX_MAGIC_SIGNATURE architecture-specific
Rename GRUB_LINUX_MAGIC_SIGNATURE GRUB_LINUX_I386_MAGIC_SIGNATURE,
to be usable in code that supports more than one image type.
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Origin: upstream, https://git.savannah.gnu.org/cgit/grub.git/commit/?id=3245f02d9d7274e942426541cf73dc73e7298f02
Bug-Debian: https://bugs.debian.org/907596
Bug-Debian: https://bugs.debian.org/909420
Last-Update: 2018-12-06
Patch-Name: GRUB_LINUX_MAGIC_SIGNATURE-arch-specific.patch
---
grub-core/commands/file.c | 4 ++--
grub-core/loader/i386/linux.c | 2 +-
grub-core/loader/i386/pc/linux.c | 6 +++---
grub-core/loader/i386/xen_file.c | 2 +-
include/grub/i386/linux.h | 2 +-
5 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/grub-core/commands/file.c b/grub-core/commands/file.c
index 12fba99e0..474666d3a 100644
--- a/grub-core/commands/file.c
+++ b/grub-core/commands/file.c
@@ -508,7 +508,7 @@ grub_cmd_file (grub_extcmd_context_t ctxt, int argc, char **args)
/* FIXME: some really old kernels (< 1.3.73) will fail this. */
if (lh.header !=
- grub_cpu_to_le32_compile_time (GRUB_LINUX_MAGIC_SIGNATURE)
+ grub_cpu_to_le32_compile_time (GRUB_LINUX_I386_MAGIC_SIGNATURE)
|| grub_le_to_cpu16 (lh.version) < 0x0200)
break;
@@ -521,7 +521,7 @@ grub_cmd_file (grub_extcmd_context_t ctxt, int argc, char **args)
/* FIXME: 2.03 is not always good enough (Linux 2.4 can be 2.03 and
still not support 32-bit boot. */
if (lh.header !=
- grub_cpu_to_le32_compile_time (GRUB_LINUX_MAGIC_SIGNATURE)
+ grub_cpu_to_le32_compile_time (GRUB_LINUX_I386_MAGIC_SIGNATURE)
|| grub_le_to_cpu16 (lh.version) < 0x0203)
break;
diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c
index adffe589c..4d043fd6f 100644
--- a/grub-core/loader/i386/linux.c
+++ b/grub-core/loader/i386/linux.c
@@ -762,7 +762,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
/* FIXME: 2.03 is not always good enough (Linux 2.4 can be 2.03 and
still not support 32-bit boot. */
- if (lh.header != grub_cpu_to_le32_compile_time (GRUB_LINUX_MAGIC_SIGNATURE)
+ if (lh.header != grub_cpu_to_le32_compile_time (GRUB_LINUX_I386_MAGIC_SIGNATURE)
|| grub_le_to_cpu16 (lh.version) < 0x0203)
{
grub_error (GRUB_ERR_BAD_OS, "version too old for 32-bit boot"
diff --git a/grub-core/loader/i386/pc/linux.c b/grub-core/loader/i386/pc/linux.c
index a293b17aa..31a687644 100644
--- a/grub-core/loader/i386/pc/linux.c
+++ b/grub-core/loader/i386/pc/linux.c
@@ -169,7 +169,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
maximal_cmdline_size = 256;
- if (lh.header == grub_cpu_to_le32_compile_time (GRUB_LINUX_MAGIC_SIGNATURE)
+ if (lh.header == grub_cpu_to_le32_compile_time (GRUB_LINUX_I386_MAGIC_SIGNATURE)
&& grub_le_to_cpu16 (lh.version) >= 0x0200)
{
grub_linux_is_bzimage = (lh.loadflags & GRUB_LINUX_FLAG_BIG_KERNEL);
@@ -322,7 +322,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
goto fail;
}
- if (lh.header != grub_cpu_to_le32_compile_time (GRUB_LINUX_MAGIC_SIGNATURE)
+ if (lh.header != grub_cpu_to_le32_compile_time (GRUB_LINUX_I386_MAGIC_SIGNATURE)
|| grub_le_to_cpu16 (lh.version) < 0x0200)
/* Clear the heap space. */
grub_memset (grub_linux_real_chunk
@@ -407,7 +407,7 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
lh = (struct linux_kernel_header *) grub_linux_real_chunk;
- if (!(lh->header == grub_cpu_to_le32_compile_time (GRUB_LINUX_MAGIC_SIGNATURE)
+ if (!(lh->header == grub_cpu_to_le32_compile_time (GRUB_LINUX_I386_MAGIC_SIGNATURE)
&& grub_le_to_cpu16 (lh->version) >= 0x0200))
{
grub_error (GRUB_ERR_BAD_OS, "the kernel is too old for initrd");
diff --git a/grub-core/loader/i386/xen_file.c b/grub-core/loader/i386/xen_file.c
index 99fad4cad..6e76e16aa 100644
--- a/grub-core/loader/i386/xen_file.c
+++ b/grub-core/loader/i386/xen_file.c
@@ -43,7 +43,7 @@ grub_xen_file (grub_file_t file)
goto fail;
if (lh.boot_flag != grub_cpu_to_le16_compile_time (0xaa55)
- || lh.header != grub_cpu_to_le32_compile_time (GRUB_LINUX_MAGIC_SIGNATURE)
+ || lh.header != grub_cpu_to_le32_compile_time (GRUB_LINUX_I386_MAGIC_SIGNATURE)
|| grub_le_to_cpu16 (lh.version) < 0x0208)
{
grub_error (GRUB_ERR_BAD_OS, "version too old for xen boot");
diff --git a/include/grub/i386/linux.h b/include/grub/i386/linux.h
index 7647f4907..ed6c941a8 100644
--- a/include/grub/i386/linux.h
+++ b/include/grub/i386/linux.h
@@ -19,7 +19,7 @@
#ifndef GRUB_I386_LINUX_HEADER
#define GRUB_I386_LINUX_HEADER 1
-#define GRUB_LINUX_MAGIC_SIGNATURE 0x53726448 /* "HdrS" */
+#define GRUB_LINUX_I386_MAGIC_SIGNATURE 0x53726448 /* "HdrS" */
#define GRUB_LINUX_DEFAULT_SETUP_SECTS 4
#define GRUB_LINUX_INITRD_MAX_ADDRESS 0x37FFFFFF
#define GRUB_LINUX_MAX_SETUP_SECTS 64
From c632c77593675f3e30eb1606097e81006327a99a Mon Sep 17 00:00:00 2001
From: Leif Lindholm <leif.lindholm@linaro.org>
Date: Mon, 9 Jul 2018 18:33:04 +0100
Subject: arm: Delete unused efi support from loader/arm
The 32-bit arm efi port now shares the 64-bit linux loader, so delete
the now unused bits from the 32-bit linux loader.
This in turn leaves the grub-core/kern/arm/efi/misc.c unused, so
delete that too.
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Origin: backport, https://git.savannah.gnu.org/cgit/grub.git/commit/?id=77808dd66bda72ff14873bcd701ec25a0db1dfee
Bug-Debian: https://bugs.debian.org/907596
Last-Update: 2018-12-06
Patch-Name: arm-delete-unused-efi-support-from-loader-arm.patch
---
grub-core/Makefile.am | 1 -
grub-core/kern/arm/efi/misc.c | 202 ----------------------------------
grub-core/loader/arm/linux.c | 28 -----
include/grub/arm/efi/loader.h | 26 -----
include/grub/arm/linux.h | 16 ---
5 files changed, 273 deletions(-)
delete mode 100644 grub-core/kern/arm/efi/misc.c
delete mode 100644 include/grub/arm/efi/loader.h
diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am
index 04e9395fd..44bb981c2 100644
--- a/grub-core/Makefile.am
+++ b/grub-core/Makefile.am
@@ -240,7 +240,6 @@ KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/arm/system.h
endif
if COND_arm_efi
-KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/arm/efi/loader.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/efi.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/disk.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/arm/system.h
diff --git a/grub-core/kern/arm/efi/misc.c b/grub-core/kern/arm/efi/misc.c
deleted file mode 100644
index c95e8299d..000000000
--- a/grub-core/kern/arm/efi/misc.c
+++ /dev/null
@@ -1,202 +0,0 @@
-/* misc.c - various system functions for an arm-based EFI system */
-/*
- * GRUB -- GRand Unified Bootloader
- * Copyright (C) 2013 Free Software Foundation, Inc.
- *
- * GRUB is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * GRUB is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <grub/misc.h>
-#include <grub/mm.h>
-#include <grub/cpu/linux.h>
-#include <grub/cpu/system.h>
-#include <grub/efi/efi.h>
-#include <grub/machine/loader.h>
-
-static inline grub_size_t
-page_align (grub_size_t size)
-{
- return (size + (1 << 12) - 1) & (~((1 << 12) - 1));
-}
-
-/* Find the optimal number of pages for the memory map. Is it better to
- move this code to efi/mm.c? */
-static grub_efi_uintn_t
-find_mmap_size (void)
-{
- static grub_efi_uintn_t mmap_size = 0;
-
- if (mmap_size != 0)
- return mmap_size;
-
- mmap_size = (1 << 12);
- while (1)
- {
- int ret;
- grub_efi_memory_descriptor_t *mmap;
- grub_efi_uintn_t desc_size;
-
- mmap = grub_malloc (mmap_size);
- if (! mmap)
- return 0;
-
- ret = grub_efi_get_memory_map (&mmap_size, mmap, 0, &desc_size, 0);
- grub_free (mmap);
-
- if (ret < 0)
- {
- grub_error (GRUB_ERR_IO, "cannot get memory map");
- return 0;
- }
- else if (ret > 0)
- break;
-
- mmap_size += (1 << 12);
- }
-
- /* Increase the size a bit for safety, because GRUB allocates more on
- later, and EFI itself may allocate more. */
- mmap_size += (1 << 12);
-
- return page_align (mmap_size);
-}
-
-#define NEXT_MEMORY_DESCRIPTOR(desc, size) \
- ((grub_efi_memory_descriptor_t *) ((char *) (desc) + (size)))
-#define PAGE_SHIFT 12
-
-void *
-grub_efi_allocate_loader_memory (grub_uint32_t min_offset, grub_uint32_t size)
-{
- grub_efi_uintn_t desc_size;
- grub_efi_memory_descriptor_t *mmap, *mmap_end;
- grub_efi_uintn_t mmap_size, tmp_mmap_size;
- grub_efi_memory_descriptor_t *desc;
- void *mem = NULL;
- grub_addr_t min_start = 0;
-
- mmap_size = find_mmap_size();
- if (!mmap_size)
- return NULL;
-
- mmap = grub_malloc(mmap_size);
- if (!mmap)
- return NULL;
-
- tmp_mmap_size = mmap_size;
- if (grub_efi_get_memory_map (&tmp_mmap_size, mmap, 0, &desc_size, 0) <= 0)
- {
- grub_error (GRUB_ERR_IO, "cannot get memory map");
- goto fail;
- }
-
- mmap_end = NEXT_MEMORY_DESCRIPTOR (mmap, tmp_mmap_size);
- /* Find lowest accessible RAM location */
- {
- int found = 0;
- for (desc = mmap ; !found && (desc < mmap_end) ;
- desc = NEXT_MEMORY_DESCRIPTOR(desc, desc_size))
- {
- switch (desc->type)
- {
- case GRUB_EFI_CONVENTIONAL_MEMORY:
- case GRUB_EFI_LOADER_CODE:
- case GRUB_EFI_LOADER_DATA:
- min_start = desc->physical_start + min_offset;
- found = 1;
- break;
- default:
- break;
- }
- }
- }
-
- /* First, find free pages for the real mode code
- and the memory map buffer. */
- for (desc = mmap ; desc < mmap_end ;
- desc = NEXT_MEMORY_DESCRIPTOR(desc, desc_size))
- {
- grub_uint64_t start, end;
-
- grub_dprintf("mm", "%s: 0x%08x bytes @ 0x%08x\n",
- __FUNCTION__,
- (grub_uint32_t) (desc->num_pages << PAGE_SHIFT),
- (grub_uint32_t) (desc->physical_start));
-
- if (desc->type != GRUB_EFI_CONVENTIONAL_MEMORY)
- continue;
-
- start = desc->physical_start;
- end = start + (desc->num_pages << PAGE_SHIFT);
- grub_dprintf("mm", "%s: start=0x%016llx, end=0x%016llx\n",
- __FUNCTION__, start, end);
- start = start < min_start ? min_start : start;
- if (start + size > end)
- continue;
- grub_dprintf("mm", "%s: let's allocate some (0x%x) pages @ 0x%08x...\n",
- __FUNCTION__, (size >> PAGE_SHIFT), (grub_addr_t) start);
- mem = grub_efi_allocate_fixed (start, (size >> PAGE_SHIFT) + 1);
- grub_dprintf("mm", "%s: retval=0x%08x\n",
- __FUNCTION__, (grub_addr_t) mem);
- if (! mem)
- {
- grub_error (GRUB_ERR_OUT_OF_MEMORY, "cannot allocate memory");
- goto fail;
- }
- break;
- }
-
- if (! mem)
- {
- grub_error (GRUB_ERR_OUT_OF_MEMORY, "cannot allocate memory");
- goto fail;
- }
-
- grub_free (mmap);
- return mem;
-
- fail:
- grub_free (mmap);
- return NULL;
-}
-
-grub_err_t
-grub_efi_prepare_platform (void)
-{
- grub_efi_uintn_t mmap_size;
- grub_efi_uintn_t map_key;
- grub_efi_uintn_t desc_size;
- grub_efi_uint32_t desc_version;
- grub_efi_memory_descriptor_t *mmap_buf;
- grub_err_t err;
-
- /*
- * Cloned from IA64
- * Must be done after grub_machine_fini because map_key is used by
- *exit_boot_services.
- */
- mmap_size = find_mmap_size ();
- if (! mmap_size)
- return GRUB_ERR_OUT_OF_MEMORY;
- mmap_buf = grub_efi_allocate_any_pages (page_align (mmap_size) >> 12);
- if (! mmap_buf)
- return GRUB_ERR_OUT_OF_MEMORY;
-
- err = grub_efi_finish_boot_services (&mmap_size, mmap_buf, &map_key,
- &desc_size, &desc_version);
- if (err != GRUB_ERR_NONE)
- return err;
-
- return GRUB_ERR_NONE;
-}
diff --git a/grub-core/loader/arm/linux.c b/grub-core/loader/arm/linux.c
index 5ec7d6644..9300adc8f 100644
--- a/grub-core/loader/arm/linux.c
+++ b/grub-core/loader/arm/linux.c
@@ -271,15 +271,6 @@ linux_boot (void)
*/
linuxmain = (kernel_entry_t) linux_addr;
-#ifdef GRUB_MACHINE_EFI
- {
- grub_err_t err;
- err = grub_efi_prepare_platform();
- if (err != GRUB_ERR_NONE)
- return err;
- }
-#endif
-
grub_arm_disable_caches_mmu ();
linuxmain (0, machine_type, fdt_addr);
@@ -298,13 +289,7 @@ linux_load (const char *filename, grub_file_t file)
size = grub_file_size (file);
-#ifdef GRUB_MACHINE_EFI
- linux_addr = (grub_addr_t) grub_efi_allocate_loader_memory (LINUX_PHYS_OFFSET, size);
- if (!linux_addr)
- return grub_errno;
-#else
linux_addr = LINUX_ADDRESS;
-#endif
grub_dprintf ("loader", "Loading Linux to 0x%08x\n",
(grub_addr_t) linux_addr);
@@ -409,20 +394,7 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
size = grub_get_initrd_size (&initrd_ctx);
-#ifdef GRUB_MACHINE_EFI
- if (initrd_start)
- grub_efi_free_pages (initrd_start,
- (initrd_end - initrd_start + 0xfff) >> 12);
- initrd_start = (grub_addr_t) grub_efi_allocate_loader_memory (LINUX_INITRD_PHYS_OFFSET, size);
-
- if (!initrd_start)
- {
- grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("out of memory"));
- goto fail;
- }
-#else
initrd_start = LINUX_INITRD_ADDRESS;
-#endif
grub_dprintf ("loader", "Loading initrd to 0x%08x\n",
(grub_addr_t) initrd_start);
diff --git a/include/grub/arm/efi/loader.h b/include/grub/arm/efi/loader.h
deleted file mode 100644
index 4bab18e83..000000000
--- a/include/grub/arm/efi/loader.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * GRUB -- GRand Unified Bootloader
- * Copyright (C) 2013 Free Software Foundation, Inc.
- *
- * GRUB is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * GRUB is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef GRUB_LOADER_MACHINE_HEADER
-#define GRUB_LOADER_MACHINE_HEADER 1
-
-grub_err_t EXPORT_FUNC (grub_efi_prepare_platform) (void);
-void * EXPORT_FUNC (grub_efi_allocate_loader_memory) (grub_uint32_t min_offset,
- grub_uint32_t size);
-
-#endif /* ! GRUB_LOADER_MACHINE_HEADER */
diff --git a/include/grub/arm/linux.h b/include/grub/arm/linux.h
index ab53de9ba..5da1a5b15 100644
--- a/include/grub/arm/linux.h
+++ b/include/grub/arm/linux.h
@@ -46,22 +46,6 @@ struct linux_arm_kernel_header {
# define LINUX_FDT_ADDRESS (LINUX_INITRD_ADDRESS - 0x10000)
# define grub_arm_firmware_get_boot_data grub_uboot_get_boot_data
# define grub_arm_firmware_get_machine_type grub_uboot_get_machine_type
-#elif defined GRUB_MACHINE_EFI
-# include <grub/efi/efi.h>
-# include <grub/arm/efi/loader.h>
-/* On UEFI platforms - load the images at the lowest available address not
- less than *_PHYS_OFFSET from the first available memory location. */
-# define LINUX_PHYS_OFFSET (0x00008000)
-# define LINUX_INITRD_PHYS_OFFSET (LINUX_PHYS_OFFSET + 0x02000000)
-# define LINUX_FDT_PHYS_OFFSET (LINUX_INITRD_PHYS_OFFSET - 0x10000)
-# define grub_arm_firmware_get_boot_data (grub_addr_t)grub_efi_get_firmware_fdt
-static inline grub_uint32_t
-grub_arm_firmware_get_machine_type (void)
-{
- return GRUB_ARM_MACHINE_TYPE_FDT;
-}
#endif
-#define FDT_ADDITIONAL_ENTRIES_SIZE 0x300
-
#endif /* ! GRUB_ARM_LINUX_HEADER */
From 0a7ec8f6baed19a7cb568fe84f5b9ee0c4b12b8c Mon Sep 17 00:00:00 2001
From: Leif Lindholm <leif.lindholm@linaro.org>
Date: Mon, 9 Jul 2018 18:33:03 +0100
Subject: arm/efi: Switch to arm64 linux loader
The arm64 and arm linux kernel EFI-stub support presents pretty much
identical interfaces, so the same linux loader source can be used for
both architectures.
Switch 32-bit ARM UEFI platforms over to the existing EFI-stub aware
loader initially developed for arm64.
This *WILL* stop non-efistub Linux kernels from booting on arm-efi.