]> git.proxmox.com Git - grub2.git/log
grub2.git
5 years agoefi: Add grub_efi_get_ram_base() function for arm64
Leif Lindholm [Mon, 9 Jul 2018 17:33:01 +0000 (18:33 +0100)]
efi: Add grub_efi_get_ram_base() function for arm64

Since ARM platforms do not have a common memory map, add a helper
function that finds the lowest address region with the EFI_MEMORY_WB
attribute set in the UEFI memory map.

Required for the arm64 efi linux loader to restrict the initrd
location to where it will be accessible by the kernel at runtime.

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=bad144c60f664a83f5a7d3a014927bffaa2abbf1
Bug-Debian: https://bugs.debian.org/907596
Bug-Debian: https://bugs.debian.org/909420
Last-Update: 2018-12-06

Patch-Name: efi-add-grub_efi_get_ram_base-for-arm64.patch

Gbp-Pq: Name efi-add-grub_efi_get_ram_base-for-arm64.patch

5 years agoefi: Add central copy of grub_efi_find_mmap_size
Leif Lindholm [Mon, 9 Jul 2018 17:33:00 +0000 (18:33 +0100)]
efi: Add central copy of grub_efi_find_mmap_size

There are several implementations of this function in the tree.
Add a central version in grub-core/efi/mm.c.

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=8ec18d1a4c26129c0a018ee7a61739a929ee1a25
Bug-Debian: https://bugs.debian.org/907596
Bug-Debian: https://bugs.debian.org/909420
Last-Update: 2018-12-06

Patch-Name: efi-add-central-copy-of-grub_efi_find_mmap_size.patch

Gbp-Pq: Name efi-add-central-copy-of-grub_efi_find_mmap_size.patch

5 years agocommands/file: Use definitions from arm64/linux.h
Leif Lindholm [Mon, 25 Jun 2018 17:01:29 +0000 (18:01 +0100)]
commands/file: Use definitions from arm64/linux.h

Clean up code for matching IS_ARM64 slightly by making use of struct
linux_arm64_kernel_header and GRUB_LINUX_ARM64_MAGIC_SIGNATURE.

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=9b37229f013db1b150082ac130be7c20b3db8cea
Bug-Debian: https://bugs.debian.org/907596
Bug-Debian: https://bugs.debian.org/909420
Last-Update: 2018-12-06

Patch-Name: file-definitions-from-arm64-linux-h.patch

Gbp-Pq: Name file-definitions-from-arm64-linux-h.patch

5 years agocommands/file: Use definitions from arm/linux.h
Leif Lindholm [Mon, 25 Jun 2018 17:01:28 +0000 (18:01 +0100)]
commands/file: Use definitions from arm/linux.h

Clean up code for matching IS_ARM slightly by making use of struct
linux_arm_kernel_header and GRUB_LINUX_ARM_MAGIC_SIGNATURE.

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=40dc61ed75e08e7dc2951bdae5c59fecb15bbb72
Bug-Debian: https://bugs.debian.org/907596
Bug-Debian: https://bugs.debian.org/909420
Last-Update: 2018-12-06

Patch-Name: file-definitions-from-arm-linux-h.patch

Gbp-Pq: Name file-definitions-from-arm-linux-h.patch

5 years agoarm: make linux.h safe to include for non-native builds
Leif Lindholm [Thu, 1 Feb 2018 18:18:56 +0000 (18:18 +0000)]
arm: make linux.h safe to include for non-native builds

<grub/machine/loader.h> (for machine arm/efi) and
<grub/machine/kernel.h> (for machine arm/coreboot) will not always
resolve (and will likely not be valid to) if pulled in when building
non-native commands, such as host tools or the "file" command.
So explicitly include them with their expanded pathnames.

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=a244d9ebc7547f7ed373d9796a3bf186e7c035a1
Bug-Debian: https://bugs.debian.org/907596
Bug-Debian: https://bugs.debian.org/909420
Last-Update: 2018-12-06

Patch-Name: arm-linux-h-safe-for-non-native.patch

Gbp-Pq: Name arm-linux-h-safe-for-non-native.patch

5 years agoarm: switch linux loader to linux_arm_kernel_header struct
Leif Lindholm [Thu, 1 Feb 2018 18:18:55 +0000 (18:18 +0000)]
arm: switch linux loader to linux_arm_kernel_header struct

Use kernel header struct and magic definition to align (and coexist) with
i386/arm64 ports.

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=cda033298680b6984044563b2ef6374a725b8aac
Bug-Debian: https://bugs.debian.org/907596
Bug-Debian: https://bugs.debian.org/909420
Last-Update: 2018-12-06

Patch-Name: arm-switch-linux-loader-to-linux_arm_kernel_header.patch

Gbp-Pq: Name arm-switch-linux-loader-to-linux_arm_kernel_header.patch

5 years agoarm64: align linux kernel magic macro naming with i386
Leif Lindholm [Thu, 1 Feb 2018 18:18:54 +0000 (18:18 +0000)]
arm64: align linux kernel magic macro naming with i386

Change GRUB_ARM64_LINUX_MAGIC to GRUB_LINUX_ARM64_MAGIC_SIGNATURE.

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=7fd9722d0c5e9c5a85b782ef435c80085da308b2
Bug-Debian: https://bugs.debian.org/907596
Bug-Debian: https://bugs.debian.org/909420
Last-Update: 2018-12-06

Patch-Name: arm64-align-linux-magic-macro-with-i386.patch

Gbp-Pq: Name arm64-align-linux-magic-macro-with-i386.patch

5 years agoarm64: align linux kernel header struct naming with i386
Leif Lindholm [Thu, 1 Feb 2018 18:18:53 +0000 (18:18 +0000)]
arm64: align linux kernel header struct naming with i386

Rename struct grub_arm64_linux_kernel_header -> linux_arm64_kernel_header.

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=ff1cf2548a3f33da19278829687d074ad746dd0a
Bug-Debian: https://bugs.debian.org/907596
Bug-Debian: https://bugs.debian.org/909420
Last-Update: 2018-12-06

Patch-Name: arm64-align-linux_kernel_header-with-i386.patch

Gbp-Pq: Name arm64-align-linux_kernel_header-with-i386.patch

5 years agoi386: make struct linux_kernel_header architecture specific
Leif Lindholm [Thu, 1 Feb 2018 18:18:52 +0000 (18:18 +0000)]
i386: make struct linux_kernel_header architecture specific

struct linux_kernel_header -> struct linux_i386_kernel_header

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=7d36709d5e769eb49b41cca709bd64336b47ab4f
Bug-Debian: https://bugs.debian.org/907596
Bug-Debian: https://bugs.debian.org/909420
Last-Update: 2018-12-06

Patch-Name: i386-linux_kernel_header-arch-specific.patch

Gbp-Pq: Name i386-linux_kernel_header-arch-specific.patch

5 years agomake GRUB_LINUX_MAGIC_SIGNATURE architecture-specific
Leif Lindholm [Thu, 1 Feb 2018 18:18:51 +0000 (18:18 +0000)]
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

Gbp-Pq: Name GRUB_LINUX_MAGIC_SIGNATURE-arch-specific.patch

5 years agoMake arch-specific linux.h include guards architecture unique
Leif Lindholm [Thu, 1 Feb 2018 18:18:50 +0000 (18:18 +0000)]
Make arch-specific linux.h include guards architecture unique

Replace uses of GRUB_LINUX_MACHINE_HEADER and GRUB_LINUX_CPU_HEADER
with GRUB_<arch>_LINUX_HEADER include guards to prevent issues when
including more than one of them.

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=8776e5a942582adaadc67865ed74cdd199e56a16
Bug-Debian: https://bugs.debian.org/907596
Bug-Debian: https://bugs.debian.org/909420
Last-Update: 2018-12-06

Patch-Name: linux-h-guards.patch

Gbp-Pq: Name linux-h-guards.patch

5 years agoarm64/efi: move EFI_PAGE definitions to efi/memory.h
Leif Lindholm [Thu, 1 Feb 2018 18:18:49 +0000 (18:18 +0000)]
arm64/efi: move EFI_PAGE definitions to efi/memory.h

The EFI page definitions and macros are generic and should not be confined
to arm64 headers - so move to efi/memory.h.
Also add EFI_PAGE_SIZE macro.

Update loader sources to reflect new header location.

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=083c6e2455dcd4aafb6062d89fd6029dd3adddb6
Bug-Debian: https://bugs.debian.org/907596
Bug-Debian: https://bugs.debian.org/909420
Last-Update: 2018-12-06

Patch-Name: arm64-efi-move-EFI_PAGE-definitions.patch

Gbp-Pq: Name arm64-efi-move-EFI_PAGE-definitions.patch

5 years agoefi: change heap allocation type to GRUB_EFI_LOADER_CODE
Leif Lindholm [Thu, 3 Aug 2017 10:04:32 +0000 (11:04 +0100)]
efi: change heap allocation type to GRUB_EFI_LOADER_CODE

With upcoming changes to EDK2, allocations of type EFI_LOADER_DATA may
not return regions with execute ability. Since modules are loaded onto
the heap, change the heap allocation type to GRUB_EFI_LOADER_CODE in
order to permit execution on systems with this feature enabled.

Closes: 50420
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Origin: upstream, https://git.savannah.gnu.org/cgit/grub.git/commit/?id=f826330683675f0deb55b58fd229afd7d65fb053
Bug-Debian: https://bugs.debian.org/907596
Bug-Debian: https://bugs.debian.org/909420
Last-Update: 2018-12-06

Patch-Name: efi-change-heap-allocation-type.patch

Gbp-Pq: Name efi-change-heap-allocation-type.patch

5 years agoarm64 linux loader: improve type portability
Leif Lindholm [Thu, 3 Aug 2017 10:04:26 +0000 (11:04 +0100)]
arm64 linux loader: improve type portability

In preparation for turning this into a common loader for 32-bit and 64-bit
platforms, ensure the code will compile cleanly for either.

Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Origin: upstream, https://git.savannah.gnu.org/cgit/grub.git/commit/?id=91212e0aa07e704a61e4540c18a27f149f5e51c3
Bug-Debian: https://bugs.debian.org/907596
Bug-Debian: https://bugs.debian.org/909420
Last-Update: 2018-12-06

Patch-Name: arm64-linux-loader-improve-type-portability.patch

Gbp-Pq: Name arm64-linux-loader-improve-type-portability.patch

5 years agoefi: Add GRUB_PE32_MAGIC definition
Leif Lindholm [Thu, 3 Aug 2017 10:04:25 +0000 (11:04 +0100)]
efi: Add GRUB_PE32_MAGIC definition

Add a generic GRUB_PE32_MAGIC definition for the PE 'MZ' tag and delete
the existing one in arm64/linux.h.

Update arm64 Linux loader to use this new definition.

Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Origin: upstream, https://git.savannah.gnu.org/cgit/grub.git/commit/?id=c5841ba7f0d14c193f20854e7e55b4f7ce9207d5
Bug-Debian: https://bugs.debian.org/907596
Bug-Debian: https://bugs.debian.org/909420
Last-Update: 2018-12-06

Patch-Name: efi-add-GRUB_PE32_MAGIC-definition.patch

Gbp-Pq: Name efi-add-GRUB_PE32_MAGIC-definition.patch

5 years agoefi: move fdt helper library
Leif Lindholm [Thu, 3 Aug 2017 10:04:24 +0000 (11:04 +0100)]
efi: move fdt helper library

There is nothing ARM64 (or even ARM) specific about the efi fdt helper
library, which is used for locating or overriding a firmware-provided
devicetree in a UEFI system - so move it to loader/efi for reuse.

Move the fdtload.h include file to grub/efi and update path to
efi/fdtload.h in source code referring to it.

Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Origin: upstream, https://git.savannah.gnu.org/cgit/grub.git/commit/?id=8c9465fac901caac6802d6872a1374518b001517
Bug-Debian: https://bugs.debian.org/907596
Bug-Debian: https://bugs.debian.org/909420
Last-Update: 2018-12-06

Patch-Name: efi-move-fdt-helper-library.patch

Gbp-Pq: Name efi-move-fdt-helper-library.patch

5 years agoRemove grub_efi_allocate_pages.
Vladimir Serbinenko [Mon, 7 Aug 2017 16:33:29 +0000 (18:33 +0200)]
Remove grub_efi_allocate_pages.

grub_efi_allocate_pages Essentially does 2 unrelated things:
* Allocate at fixed address.
* Allocate at any address.

To switch between 2 different functions it uses address == 0 as magic
value which is wrong as 0 is a perfectly valid fixed adress to allocate at.

Origin: backport, https://git.savannah.gnu.org/cgit/grub.git/commit/?id=4bc909bf89f5b4ff86c9e4e609d4fe0c11a66b0c
Bug-Debian: https://bugs.debian.org/907596
Bug-Debian: https://bugs.debian.org/909420
Last-Update: 2018-12-06

Patch-Name: efi-remove-grub_efi_allocate_pages.patch

Gbp-Pq: Name efi-remove-grub_efi_allocate_pages.patch

5 years agoefi: refactor grub_efi_allocate_pages
Leif Lindholm [Thu, 3 Aug 2017 10:04:23 +0000 (11:04 +0100)]
efi: refactor grub_efi_allocate_pages

Expose a new function, grub_efi_allocate_pages_real(), making it possible
to specify allocation type and memory type as supported by the UEFI
AllocatePages boot service.

Make grub_efi_allocate_pages() a consumer of the new function,
maintaining its old functionality.

Also delete some left-around #if 1/#else blocks in the affected
functions.

Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Origin: upstream, https://git.savannah.gnu.org/cgit/grub.git/commit/?id=dd5fde2df83c5c03b7ba04d2cc5b7be96de8da7b
Bug-Debian: https://bugs.debian.org/907596
Bug-Debian: https://bugs.debian.org/909420
Last-Update: 2018-12-06

Patch-Name: efi-refactor-grub_efi_allocate_pages.patch

Gbp-Pq: Name efi-refactor-grub_efi_allocate_pages.patch

5 years agobash-completion: Drop "have" checks
Colin Watson [Fri, 16 Nov 2018 16:37:02 +0000 (16:37 +0000)]
bash-completion: Drop "have" checks

These don't work with and aren't needed by dynamically-loaded
completions.

Bug-Debian: https://bugs.debian.org/912852
Forwarded: no
Last-Update: 2018-11-16

Patch-Name: bash-completion-drop-have-checks.patch

Gbp-Pq: Name bash-completion-drop-have-checks.patch

5 years agoCope with / being on a ZFS root dataset
Colin Watson [Mon, 29 Oct 2018 12:24:41 +0000 (12:24 +0000)]
Cope with / being on a ZFS root dataset

If / is on the root dataset in a ZFS pool, then ${bootfs} will be set to
"/" (whereas if it is on a non-root dataset, there will be no trailing
slash).  Passing "root=ZFS=${rpool}/" will fail to boot, but
"root=ZFS=${rpool}" works fine, so strip the trailing slash.

Fixes: https://savannah.gnu.org/bugs/?52746
Tested-by: Fejes József <jozsef.fejes@gmail.com>
Signed-off-by: Colin Watson <cjwatson@ubuntu.com>
Bug: https://savannah.gnu.org/bugs/?52746
Bug-Debian: https://bugs.debian.org/886178
Last-Update: 2018-10-29

Patch-Name: zfs-root-dataset.patch

Gbp-Pq: Name zfs-root-dataset.patch

5 years agoi386/linux: Add support for ext_lfb_base
Arindam Nath [Thu, 12 Jul 2018 13:32:49 +0000 (19:02 +0530)]
i386/linux: Add support for ext_lfb_base

The EFI Graphics Output Protocol can return a 64-bit
linear frame buffer address in some firmware/BIOS
implementations. We currently only store the lower
32-bits in the lfb_base. This will eventually be
passed to Linux kernel and the efifb driver will
incorrectly interpret the framebuffer address as
32-bit address.

The Linux kernel has already added support to handle
64-bit linear framebuffer address in the efifb driver
since quite some time now.

This patch adds the support for 64-bit linear frame
buffer address in GRUB to address the above mentioned
scenario.

Signed-off-by: Arindam Nath <arindam.nath@amd.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Origin: upstream, https://git.savannah.gnu.org/cgit/grub.git/commit/?id=886edba8770ccbc3def0af2a7d6b346d00d0af2f
Bug-Ubuntu: https://bugs.launchpad.net/bugs/1785033
Last-Update: 2018-10-29

Patch-Name: add_ext_lfb_base_support.patch

Gbp-Pq: Name add_ext_lfb_base_support.patch

5 years agoSkip flaky grub_cmd_set_date test
Colin Watson [Sun, 28 Oct 2018 19:45:56 +0000 (19:45 +0000)]
Skip flaky grub_cmd_set_date test

Bug-Debian: https://bugs.debian.org/906470
Last-Update: 2018-10-28

Patch-Name: skip-grub_cmd_set_date.patch

Gbp-Pq: Name skip-grub_cmd_set_date.patch

5 years agox86-64: Treat R_X86_64_PLT32 as R_X86_64_PC32
H.J. Lu [Sat, 17 Feb 2018 14:47:28 +0000 (06:47 -0800)]
x86-64: Treat R_X86_64_PLT32 as R_X86_64_PC32

Starting from binutils commit bd7ab16b4537788ad53521c45469a1bdae84ad4a:

https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=bd7ab16b4537788ad53521c45469a1bdae84ad4a

x86-64 assembler generates R_X86_64_PLT32, instead of R_X86_64_PC32, for
32-bit PC-relative branches.  Grub2 should treat R_X86_64_PLT32 as
R_X86_64_PC32.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Origin: upstream, https://git.savannah.gnu.org/cgit/grub.git/commit/?id=842c390469e2c2e10b5aa36700324cd3bde25875
Last-Update: 2018-07-30

Patch-Name: R_X86_64_PLT32.patch

Gbp-Pq: Name R_X86_64_PLT32.patch

5 years agotests: Fix qemu options for UHCI test
Colin Watson [Mon, 30 Jul 2018 11:29:44 +0000 (12:29 +0100)]
tests: Fix qemu options for UHCI test

qemu 2.12 removed the -usbdevice option.  Use a more modern spelling
instead, in line with other USB-related tests.

Signed-off-by: Colin Watson <cjwatson@ubuntu.com>
Forwarded: https://lists.gnu.org/archive/html/grub-devel/2018-07/msg00114.html
Last-Update: 2018-07-30

Patch-Name: tests-fix-uhci-qemu-options.patch

Gbp-Pq: Name tests-fix-uhci-qemu-options.patch

5 years agotests: Disable sercon in SeaBIOS
Colin Watson [Mon, 30 Jul 2018 11:27:39 +0000 (12:27 +0100)]
tests: Disable sercon in SeaBIOS

SeaBIOS 1.11.0 added support for VGA emulation over a serial port, which
interferes with grub-shell.  Turn it off.

Signed-off-by: Colin Watson <cjwatson@ubuntu.com>
Forwarded: https://lists.gnu.org/archive/html/grub-devel/2018-07/msg00113.html
Last-Update: 2018-07-30

Patch-Name: tests-disable-sercon-in-seabios.patch

Gbp-Pq: Name tests-disable-sercon-in-seabios.patch

5 years agoAdd patch to fix lockdown mode
Luca Boccassi [Tue, 15 May 2018 10:36:46 +0000 (11:36 +0100)]
Add patch to fix lockdown mode

Description: do not overwrite sentinel byte in boot_params, breaks lockdown
 grub currently copies the entire boot_params, which includes setting sentinel
 byte to 0xff, which triggers sanitize_boot_params in the kernel which in
 turn clears various boot_params variables, including the indication that
 the booloader chain is verified and thus the kernel disables lockdown mode.
 According to the information on the Fedora bug tracker, only the information
 from byte 0x1f1 is necessary, so start copying from there instead.
Author: Luca Boccassi <bluca@debian.org>
Bug-Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=1418360
Forwarded: no
Patch-Name: fix_lockdown.patch

Gbp-Pq: Name fix_lockdown.patch

5 years agoDisallow unsigned kernels if UEFI Secure Boot is enabled
Linn Crosetto [Tue, 5 Apr 2016 17:49:05 +0000 (11:49 -0600)]
Disallow unsigned kernels if UEFI Secure Boot is enabled

If UEFI Secure Boot is enabled and kernel signature verification fails, do not
boot the kernel. Before this change, if kernel signature verification failed
then GRUB would fall back to calling ExitBootServices() and continuing the
boot.

Patch-Name: linuxefi_disable_sb_fallback.patch

Signed-off-by: Linn Crosetto <linn@hpe.com>
Gbp-Pq: Name linuxefi_disable_sb_fallback.patch

5 years agoUse grub-file to figure out whether multiboot2 should be used for Xen.gz
Konrad Rzeszutek Wilk [Tue, 29 Aug 2017 20:40:53 +0000 (16:40 -0400)]
Use grub-file to figure out whether multiboot2 should be used for Xen.gz

The multiboot2 is much more preferable than multiboot. Especiall
if booting under EFI where multiboot does not have the functionality
to pass ImageHandler.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Origin: backport, https://git.savannah.gnu.org/cgit/grub.git/commit/?id=b4d709b6ee789cdaf3fa7a80fd90c721a16f48c2
Bug-Debian: https://bugs.debian.org/898947
Last-Update: 2018-06-16

Patch-Name: xen-multiboot2.patch

Gbp-Pq: Name xen-multiboot2.patch

5 years agoprintf_unit_test: Disable Wformat-truncation on GCC >= 7
Vladimir Serbinenko [Wed, 30 Aug 2017 14:59:25 +0000 (16:59 +0200)]
printf_unit_test: Disable Wformat-truncation on GCC >= 7

We intentionally pass NULL as argument to format, hence disable the warning.

Origin: upstream, https://git.savannah.gnu.org/cgit/grub.git/commit/?id=32099228e6ccf209f64d509cd7e13413ea10778e
Last-Update: 2018-03-16

Patch-Name: printf-unit-test-gcc7.patch

Gbp-Pq: Name printf-unit-test-gcc7.patch

5 years agoAdd support for modern sparc64 hardware
Eric Snowberg [Thu, 22 Feb 2018 10:03:46 +0000 (10:03 +0000)]
Add support for modern sparc64 hardware

Origin: other, https://github.com/esnowberg/grub2-sparc/tree/sparc-next-v4
Bug-Debian: https://bugs.debian.org/854568
Last-Update: 2018-03-02

Patch-Name: sparc64-support.patch

Gbp-Pq: Name sparc64-support.patch

5 years agoyylex: Explicilty cast fprintf to void.
Vladimir Serbinenko [Mon, 14 Aug 2017 12:11:43 +0000 (14:11 +0200)]
yylex: Explicilty cast fprintf to void.

It's needed to avoid warning on recent GCC.

Bug-Debian: https://bugs.debian.org/890431
Last-Update: 2018-02-16

Patch-Name: fix-yylex-build.patch

Gbp-Pq: Name fix-yylex-build.patch

5 years agobuild: Use pkg-config to find FreeType
Colin Watson [Tue, 30 Jan 2018 21:54:17 +0000 (21:54 +0000)]
build: Use pkg-config to find FreeType

pkg-config is apparently preferred over freetype-config these days (see
the BUGS section of freetype-config(1)).  pkg-config support was added
to FreeType in version 2.1.5, which was released in 2003, so it should
comfortably be available everywhere by now.

We no longer need to explicitly substitute FREETYPE_CFLAGS and
FREETYPE_LIBS, since PKG_CHECK_MODULES does that automatically.

Fixes Debian bug #887721.

Reported-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Colin Watson <cjwatson@ubuntu.com>
Bug-Debian: https://bugs.debian.org/887721
Last-Update: 2018-02-11

Patch-Name: freetype-pkg-config.patch

Gbp-Pq: Name freetype-pkg-config.patch

5 years agobuild: Capitalise *freetype_* variables
Colin Watson [Tue, 30 Jan 2018 14:08:26 +0000 (14:08 +0000)]
build: Capitalise *freetype_* variables

Using FREETYPE_CFLAGS and FREETYPE_LIBS is more in line with the naming
scheme used by pkg-config macros.

Bug-Debian: https://bugs.debian.org/887721
Last-Update: 2018-02-11

Patch-Name: freetype-capitalise-variables.patch

Gbp-Pq: Name freetype-capitalise-variables.patch

5 years agotsc: Change default tsc calibration method to pmtimer on EFI systems
David E. Box [Fri, 15 Sep 2017 22:37:05 +0000 (15:37 -0700)]
tsc: Change default tsc calibration method to pmtimer on EFI systems

On efi systems, make pmtimer based tsc calibration the default over the
pit. This prevents Grub from hanging on Intel SoC systems that power gate
the pit.

Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Origin: upstream, https://git.savannah.gnu.org/cgit/grub.git/commit/?id=446794de8da4329ea532cbee4ca877bcafd0e534
Bug-Debian: https://bugs.debian.org/883193
Last-Update: 2017-12-01

Patch-Name: tsc_efi_default_to_pmtimer.patch

Gbp-Pq: Name tsc_efi_default_to_pmtimer.patch

5 years agoAllow GRUB to mount ext2/3/4 filesystems that have the encryption feature.
Eric Biggers [Thu, 29 Jun 2017 13:27:49 +0000 (13:27 +0000)]
Allow GRUB to mount ext2/3/4 filesystems that have the encryption feature.

On such a filesystem, inodes may have EXT4_ENCRYPT_FLAG set.
For a regular file, this means its contents are encrypted; for a
directory, this means the filenames in its directory entries are
encrypted; and for a symlink, this means its target is encrypted.  Since
GRUB cannot decrypt encrypted contents or filenames, just issue an error
if it would need to do so.  This is sufficient to allow unencrypted boot
files to co-exist with encrypted files elsewhere on the filesystem.

(Note that encrypted regular files and symlinks will not normally be
encountered outside an encrypted directory; however, it's possible via
hard links, so they still need to be handled.)

Tested by booting from an ext4 /boot partition on which I had run
'tune2fs -O encrypt'.  I also verified that the expected error messages
are printed when trying to access encrypted directories, files, and
symlinks from the GRUB command line.  Also ran 'sudo ./grub-fs-tester
ext4_encrypt'; note that this requires e2fsprogs v1.43+ and Linux v4.1+.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Origin: upstream, https://git.savannah.gnu.org/cgit/grub.git/commit/?id=734668238fcc0ef691a080839e04f33854fa133a
Bug-Debian: https://bugs.debian.org/840204
Last-Update: 2017-07-06

Patch-Name: ext4_feature_encrypt.patch

Gbp-Pq: Name ext4_feature_encrypt.patch

5 years agoMake grub-install check for errors from efibootmgr
Steve McIntyre [Mon, 30 Jan 2017 19:04:51 +0000 (19:04 +0000)]
Make grub-install check for errors from efibootmgr

Code is currently ignoring errors from efibootmgr, giving users
clearly bogus output like:

        Setting up grub-efi-amd64 (2.02~beta3-4) ...
        Installing for x86_64-efi platform.
        Could not delete variable: No space left on device
        Could not prepare Boot variable: No space left on device
        Installation finished. No error reported.

and then potentially unbootable systems. If efibootmgr fails,
grub-install should know that and report it!

Signed-off-by: Steve McIntyre <93sam@debian.org>
Bug-Debian: https://bugs.debian.org/853234
Forwarded: https://lists.gnu.org/archive/html/grub-devel/2017-01/msg00107.html

Patch-Name: grub-install-efibootmgr-check.patch

Gbp-Pq: Name grub-install-efibootmgr-check.patch

5 years agoefinet: Setting DNS server from UEFI protocol
Michael Chang [Thu, 27 Oct 2016 21:43:21 +0000 (17:43 -0400)]
efinet: Setting DNS server from UEFI protocol

In the URI device path node, any name rahter than address can be used for
looking up the resources so that DNS service become needed to get answer of the
name's address. Unfortunately the DNS is not defined in any of the device path
nodes so that we use the EFI_IP4_CONFIG2_PROTOCOL and EFI_IP6_CONFIG_PROTOCOL
to obtain it.

These two protcols are defined the sections of UEFI specification.

 27.5 EFI IPv4 Configuration II Protocol
 27.7 EFI IPv6 Configuration Protocol

include/grub/efi/api.h:
Add new structure and protocol UUID of EFI_IP4_CONFIG2_PROTOCOL and
EFI_IP6_CONFIG_PROTOCOL.

grub-core/net/drivers/efi/efinet.c:
Use the EFI_IP4_CONFIG2_PROTOCOL and EFI_IP6_CONFIG_PROTOCOL to obtain the list
of DNS server address for IPv4 and IPv6 respectively. The address of DNS
servers is structured into DHCPACK packet and feed into the same DHCP packet
processing functions to ensure the network interface is setting up the same way
it used to be.

Signed-off-by: Michael Chang <mchang@suse.com>
Signed-off-by: Ken Lin <ken.lin@hpe.com>
Patch-Name: efinet_set_dns_from_uefi_proto.patch

Gbp-Pq: Name efinet_set_dns_from_uefi_proto.patch

5 years agoefinet: Setting network from UEFI device path
Michael Chang [Thu, 27 Oct 2016 21:43:05 +0000 (17:43 -0400)]
efinet: Setting network from UEFI device path

The PXE Base Code protocol used to obtain cached PXE DHCPACK packet is no
longer provided for HTTP Boot. Instead, we have to get the HTTP boot
information from the device path nodes defined in following UEFI Specification
sections.

 9.3.5.12 IPv4 Device Path
 9.3.5.13 IPv6 Device Path
 9.3.5.23 Uniform Resource Identifiers (URI) Device Path

This patch basically does:

include/grub/efi/api.h:
Add new structure of Uniform Resource Identifiers (URI) Device Path

grub-core/net/drivers/efi/efinet.c:
Check if PXE Base Code is available, if not it will try to obtain the netboot
information from the device path where the image booted from. The DHCPACK
packet is recoverd from the information in device patch and feed into the same
DHCP packet processing functions to ensure the network interface is setting up
the same way it used to be.

Signed-off-by: Michael Chang <mchang@suse.com>
Signed-off-by: Ken Lin <ken.lin@hpe.com>
Patch-Name: efinet_set_network_from_uefi_devpath.patch

Gbp-Pq: Name efinet_set_network_from_uefi_devpath.patch

5 years agobootp: Add processing DHCPACK packet from HTTP Boot
Michael Chang [Thu, 27 Oct 2016 21:42:19 +0000 (17:42 -0400)]
bootp: Add processing DHCPACK packet from HTTP Boot

The vendor class identifier with the string "HTTPClient" is used to denote the
packet as responding to HTTP boot request. In DHCP4 config, the filename for
HTTP boot is the URL of the boot file while for PXE boot it is the path to the
boot file. As a consequence, the next-server becomes obseleted because the HTTP
URL already contains the server address for the boot file. For DHCP6 config,
there's no difference definition in existing config as dhcp6.bootfile-url can
be used to specify URL for both HTTP and PXE boot file.

This patch adds processing for "HTTPClient" vendor class identifier in DHCPACK
packet by treating it as HTTP format, not as the PXE format.

Signed-off-by: Michael Chang <mchang@suse.com>
Signed-off-by: Ken Lin <ken.lin@hpe.com>
Patch-Name: bootp_process_dhcpack_http_boot.patch

Gbp-Pq: Name bootp_process_dhcpack_http_boot.patch

5 years agoefinet: UEFI IPv6 PXE support
Michael Chang [Thu, 27 Oct 2016 21:41:21 +0000 (17:41 -0400)]
efinet: UEFI IPv6 PXE support

When grub2 image is booted from UEFI IPv6 PXE, the DHCPv6 Reply packet is
cached in firmware buffer which can be obtained by PXE Base Code protocol. The
network interface can be setup through the parameters in that obtained packet.

Signed-off-by: Michael Chang <mchang@suse.com>
Signed-off-by: Ken Lin <ken.lin@hpe.com>
Patch-Name: efinet_uefi_ipv6_pxe_support.patch

Gbp-Pq: Name efinet_uefi_ipv6_pxe_support.patch

5 years agobootp: New net_bootp6 command
Michael Chang [Thu, 27 Oct 2016 21:41:04 +0000 (17:41 -0400)]
bootp: New net_bootp6 command

Implement new net_bootp6 command for IPv6 network auto configuration via the
DHCPv6 protocol (RFC3315).

Signed-off-by: Michael Chang <mchang@suse.com>
Signed-off-by: Ken Lin <ken.lin@hpe.com>
Patch-Name: bootp_new_net_bootp6_command.patch

Gbp-Pq: Name bootp_new_net_bootp6_command.patch

5 years agonet: read bracketed ipv6 addrs and port numbers
Aaron Miller [Thu, 27 Oct 2016 21:39:49 +0000 (17:39 -0400)]
net: read bracketed ipv6 addrs and port numbers

Allow specifying port numbers for http and tftp paths, and allow ipv6 addresses
to be recognized with brackets around them, which is required to specify a port
number

Patch-Name: net_read_bracketed_ipv6_addr.patch

Gbp-Pq: Name net_read_bracketed_ipv6_addr.patch

5 years agomisc: fix invalid character recongition in strto*l
Aaron Miller [Thu, 27 Oct 2016 21:33:07 +0000 (17:33 -0400)]
misc: fix invalid character recongition in strto*l

Would previously allow digits larger than the base and didn't check that
subtracting the difference from 0-9 to lowercase letters for characters
larger than 9 didn't result in a value lower than 9, which allowed the
parses: ` = 9, _ = 8, ^ = 7, ] = 6, \ = 5, and [ = 4

Patch-Name: misc-fix-invalid-char-strtol.patch

Gbp-Pq: Name misc-fix-invalid-char-strtol.patch

5 years agoTell zpool to emit full device names
Chad MILLER [Thu, 27 Oct 2016 21:15:07 +0000 (17:15 -0400)]
Tell zpool to emit full device names

zfs-initramfs currently provides extraneous, undesired symlinks to
devices directly underneath /dev/ to satisfy zpool's historical output
of unqualified device names. By including this environment variable to
signal our intent to zpool, zfs-linux packages can drop the symlink
behavior when updating to its upstream or backported output behavior.

Bug: https://savannah.gnu.org/bugs/?43653
Bug-Debian: https://bugs.debian.org/824974
Bug-Ubuntu: https://bugs.launchpad.net/bugs/1527727
Last-Update: 2016-11-01

Patch-Name: zpool_full_device_name.patch

Gbp-Pq: Name zpool_full_device_name.patch

5 years agosyslinux_test: Fix out-of-tree build handling
Colin Watson [Sun, 18 Sep 2016 16:26:00 +0000 (17:26 +0100)]
syslinux_test: Fix out-of-tree build handling

When doing out-of-tree builds, abs_top_srcdir may well contain ".."
segments, and grub-syslinux2cfg canonicalises its --root argument.  As a
result, the expansion of @abs_top_srcdir@ may not match what
grub-syslinux2cfg produces.

It's somewhat difficult to portably canonicalize a path in shell, and
autoconf/automake don't offer any support for this.  But there's a much
simpler option: copy the test data to a temporary directory and make
substitutions in the expected output file based on that.

Forwarded: http://lists.gnu.org/archive/html/grub-devel/2016-09/msg00013.html
Last-Update: 2016-09-19

Patch-Name: syslinux-test-out-of-tree.patch

Gbp-Pq: Name syslinux-test-out-of-tree.patch

5 years agoGenerate alternative init entries in advanced menu
Colin Watson [Sat, 3 Jan 2015 12:04:59 +0000 (12:04 +0000)]
Generate alternative init entries in advanced menu

Add fallback boot entries for alternative installed init systems.  Based
on patches from Michael Biebl and Didier Roche.

Bug-Debian: https://bugs.debian.org/757298
Bug-Debian: https://bugs.debian.org/773173
Forwarded: no
Last-Update: 2017-06-23

Patch-Name: mkconfig_other_inits.patch

Gbp-Pq: Name mkconfig_other_inits.patch

5 years agoAdd support for forcing EFI installation to the removable media path
Steve McIntyre [Wed, 3 Dec 2014 01:25:12 +0000 (01:25 +0000)]
Add support for forcing EFI installation to the removable media path

Add an extra option to grub-install "--force-extra-removable". On EFI
platforms, this will cause an extra copy of the grub-efi image to be
written to the appropriate removable media patch
/boot/efi/EFI/BOOT/BOOT$ARCH.EFI as well. This will help with broken
UEFI implementations where the firmware does not work when configured
with new boot paths.

Signed-off-by: Steve McIntyre <93sam@debian.org>
Bug-Debian: https://bugs.debian.org/767037 https://bugs.debian.org/773092
Forwarded: Not yet
Last-Update: 2014-12-20

Patch-Name: grub-install-extra-removable.patch

Gbp-Pq: Name grub-install-extra-removable.patch

5 years agoArrange to insmod xzio and lzopio when booting a kernel as a Xen guest
Ian Campbell [Sun, 30 Nov 2014 12:12:52 +0000 (12:12 +0000)]
Arrange to insmod xzio and lzopio when booting a kernel as a Xen guest

This is needed in case the Linux kernel is compiled with CONFIG_KERNEL_XZ or
CONFIG_KERNEL_LZO rather than CONFIG_KERNEL_GZ (gzio is already loaded by
grub.cfg today).

Signed-off-by: Ian Campbell <ijc@debian.org>
Bug-Debian: https://bugs.debian.org/755256
Forwarded: http://lists.gnu.org/archive/html/grub-devel/2014-11/msg00091.html
Last-Update: 2014-11-30

Patch-Name: insmod-xzio-and-lzopio-on-xen.patch

Gbp-Pq: Name insmod-xzio-and-lzopio-on-xen.patch

5 years agogrub-install: Install PV Xen binaries into the upstream specified path
Ian Campbell [Sat, 6 Sep 2014 11:20:12 +0000 (12:20 +0100)]
grub-install: Install PV Xen binaries into the upstream specified path

Upstream have defined a specification for where guests ought to place their
xenpv grub binaries in order to facilitate chainloading from a stage 1 grub
loaded from dom0.

http://xenbits.xen.org/docs/unstable-staging/misc/x86-xenpv-bootloader.html

The spec calls for installation into /boot/xen/pvboot-i386.elf or
/boot/xen/pvboot-x86_64.elf.

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Bug-Debian: https://bugs.debian.org/762307
Forwarded: http://lists.gnu.org/archive/html/grub-devel/2014-10/msg00041.html
Last-Update: 2014-10-24

Patch-Name: grub-install-pvxen-paths.patch

Gbp-Pq: Name grub-install-pvxen-paths.patch

5 years agoDisable VSX instruction
Paulo Flabiano Smorigo [Thu, 25 Sep 2014 22:33:39 +0000 (19:33 -0300)]
Disable VSX instruction

VSX bit is enabled by default for Power7 and Power8 CPU models,
so we need to disable them in order to avoid instruction exceptions.
Kernel will activate it when necessary.

* grub-core/kern/powerpc/ieee1275/startup.S: Disable VSX.

Also-By: Adhemerval Zanella <azanella@linux.vnet.ibm.com>
Also-By: Colin Watson <cjwatson@debian.org>
Origin: other, https://lists.gnu.org/archive/html/grub-devel/2014-09/msg00078.html
Last-Update: 2015-01-27

Patch-Name: ppc64el-disable-vsx.patch

Gbp-Pq: Name ppc64el-disable-vsx.patch

5 years agoInclude a text attribute reset in the clear command for ppc
Paulo Flabiano Smorigo [Thu, 25 Sep 2014 21:41:29 +0000 (18:41 -0300)]
Include a text attribute reset in the clear command for ppc

Always clear text attribute for clear command in order to avoid problems
after it boots.

* grub-core/term/terminfo.c: Add escape for text attribute reset

Bug-Ubuntu: https://bugs.launchpad.net/bugs/1295255
Origin: other, https://lists.gnu.org/archive/html/grub-devel/2014-09/msg00076.html
Last-Update: 2014-09-26

Patch-Name: ieee1275-clear-reset.patch

Gbp-Pq: Name ieee1275-clear-reset.patch

5 years agoPort yaboot logic for various powerpc machine types
Colin Watson [Tue, 28 Jan 2014 14:40:02 +0000 (14:40 +0000)]
Port yaboot logic for various powerpc machine types

Some powerpc machines require not updating the NVRAM.  This can be handled
by existing grub-install command-line options, but it's friendlier to detect
this automatically.

On chrp_ibm machines, use the nvram utility rather than nvsetenv.  (This
is possibly suitable for other machines too, but that needs to be
verified.)

Forwarded: no
Last-Update: 2014-10-15

Patch-Name: install_powerpc_machtypes.patch

Gbp-Pq: Name install_powerpc_machtypes.patch

5 years agoDon't run gettext_strings_test
Colin Watson [Mon, 13 Jan 2014 12:13:34 +0000 (12:13 +0000)]
Don't run gettext_strings_test

This test is mainly useful as an upstream maintenance check.

Forwarded: not-needed
Last-Update: 2013-12-23

Patch-Name: skip_gettext_strings_test.patch

Gbp-Pq: Name skip_gettext_strings_test.patch

5 years agoAdd GRUB_RECOVERY_TITLE option
Colin Watson [Mon, 13 Jan 2014 12:13:33 +0000 (12:13 +0000)]
Add GRUB_RECOVERY_TITLE option

This allows the controversial "recovery mode" text to be customised.

Bug-Ubuntu: https://bugs.launchpad.net/bugs/1240360
Forwarded: no
Last-Update: 2013-12-25

Patch-Name: mkconfig_recovery_title.patch

Gbp-Pq: Name mkconfig_recovery_title.patch

5 years agoIgnore functional test failures for now as they are broken
Colin Watson [Mon, 13 Jan 2014 12:13:32 +0000 (12:13 +0000)]
Ignore functional test failures for now as they are broken

See: https://lists.gnu.org/archive/html/grub-devel/2013-11/msg00242.html

Forwarded: not-needed
Last-Update: 2013-11-19

Patch-Name: ignore_grub_func_test_failures.patch

Gbp-Pq: Name ignore_grub_func_test_failures.patch

5 years agoProbe FusionIO devices
Colin Watson [Mon, 13 Jan 2014 12:13:31 +0000 (12:13 +0000)]
Probe FusionIO devices

Bug-Ubuntu: https://bugs.launchpad.net/bugs/1237519
Forwarded: no
Last-Update: 2016-09-18

Patch-Name: probe_fusionio.patch

Gbp-Pq: Name probe_fusionio.patch

5 years agoAdd configure option to use vt.handoff=7
Colin Watson [Mon, 13 Jan 2014 12:13:30 +0000 (12:13 +0000)]
Add configure option to use vt.handoff=7

This is used for non-recovery Linux entries only; it enables
flicker-free booting if gfxpayload=keep is in use and a suitable kernel
is present.

Author: Andy Whitcroft <apw@canonical.com>
Forwarded: not-needed
Last-Update: 2013-12-25

Patch-Name: vt_handoff.patch

Gbp-Pq: Name vt_handoff.patch

5 years agoAdd configure option to enable gfxpayload=keep dynamically
Evan Broder [Mon, 13 Jan 2014 12:13:29 +0000 (12:13 +0000)]
Add configure option to enable gfxpayload=keep dynamically

Set GRUB_GFXPAYLOAD_LINUX=keep unless it's known to be unsupported on
the current hardware.  See
https://blueprints.launchpad.net/ubuntu/+spec/packageselection-foundations-n-grub2-boot-framebuffer.

Author: Colin Watson <cjwatson@ubuntu.com>
Forwarded: no
Last-Update: 2013-12-25

Patch-Name: gfxpayload_dynamic.patch

Gbp-Pq: Name gfxpayload_dynamic.patch

5 years agoAdd configure option to bypass boot menu if possible
Colin Watson [Mon, 13 Jan 2014 12:13:28 +0000 (12:13 +0000)]
Add configure option to bypass boot menu if possible

If other operating systems are installed, then automatically unhide the
menu.  Otherwise, if GRUB_HIDDEN_TIMEOUT is 0, then use keystatus if
available to check whether Shift is pressed.  If it is, show the menu,
otherwise boot immediately.  If keystatus is not available, then fall
back to a short delay interruptible with Escape.

This may or may not remain Ubuntu-specific, although it's not obviously
wanted upstream.  It implements a requirement of
https://wiki.ubuntu.com/DesktopExperienceTeam/KarmicBootExperienceDesignSpec#Bootloader.

If the previous boot failed (defined as failing to get to the end of one
of the normal runlevels), then show the boot menu regardless.

Author: Richard Laager <rlaager@wiktel.com>
Author: Robie Basak <robie.basak@ubuntu.com>
Forwarded: no
Last-Update: 2015-09-04

Patch-Name: quick_boot.patch

Gbp-Pq: Name quick_boot.patch

5 years agoCope with Kubuntu setting GRUB_DISTRIBUTOR
Colin Watson [Mon, 13 Jan 2014 12:13:27 +0000 (12:13 +0000)]
Cope with Kubuntu setting GRUB_DISTRIBUTOR

This is not a very good approach, and certainly not sanely upstreamable;
we probably need to split GRUB_DISTRIBUTOR into a couple of different
variables.

Bug-Ubuntu: https://bugs.launchpad.net/bugs/1242417
Forwarded: not-needed
Last-Update: 2013-12-25

Patch-Name: install_efi_ubuntu_flavours.patch

Gbp-Pq: Name install_efi_ubuntu_flavours.patch

5 years agoAdd configure option to reduce visual clutter at boot time
Colin Watson [Mon, 13 Jan 2014 12:13:26 +0000 (12:13 +0000)]
Add configure option to reduce visual clutter at boot time

If this option is enabled, then do all of the following:

Don't display introductory message about line editing unless we're
actually offering a shell prompt.  (This is believed to be a workaround
for a different bug.  We'll go with this for now, but will drop this in
favour of a better fix upstream if somebody figures out what that is.)

Don't clear the screen just before booting if we never drew the menu in
the first place.

Remove verbose messages printed before reading configuration.  In some
ways this is awkward because it makes debugging harder, but it's a
requirement for a smooth-looking boot process; we may be able to do
better in future.  Upstream doesn't want this, though.

Disable the cursor as well, for similar reasons of tidiness.

Suppress kernel/initrd progress messages, except in recovery mode.

Suppress "GRUB loading" message unless Shift is held down.  Upstream
doesn't want this, as it makes debugging harder.  Ubuntu wants it to
provide a cleaner boot experience.

Bug-Ubuntu: https://bugs.launchpad.net/bugs/386922
Bug-Ubuntu: https://bugs.launchpad.net/bugs/861048
Forwarded: (partial) http://lists.gnu.org/archive/html/grub-devel/2009-09/msg00056.html
Last-Update: 2014-01-03

Patch-Name: maybe_quiet.patch

Gbp-Pq: Name maybe_quiet.patch

5 years agoSkip Windows os-prober entries on Wubi systems
Colin Watson [Mon, 13 Jan 2014 12:13:24 +0000 (12:13 +0000)]
Skip Windows os-prober entries on Wubi systems

Since we're already being booted from the Windows boot loader, including
entries that take us back to it mostly just causes confusion, and stops
us from being able to hide the menu if there are no other OSes
installed.

https://blueprints.launchpad.net/ubuntu/+spec/foundations-o-wubi

Forwarded: not-needed
Last-Update: 2013-11-26

Patch-Name: wubi_no_windows.patch

Gbp-Pq: Name wubi_no_windows.patch

5 years agoAllow Shift to interrupt 'sleep --interruptible'
Colin Watson [Mon, 13 Jan 2014 12:13:23 +0000 (12:13 +0000)]
Allow Shift to interrupt 'sleep --interruptible'

Upstream would like to consider this at more length. See
http://lists.gnu.org/archive/html/grub-devel/2009-08/msg00718.html, and
the rest of the thread for context.

Forwarded: http://lists.gnu.org/archive/html/grub-devel/2009-08/msg00694.html
Last-Update: 2013-12-04

Patch-Name: sleep_shift.patch

Gbp-Pq: Name sleep_shift.patch

5 years agoInstall signed images if UEFI Secure Boot is enabled
Colin Watson [Mon, 13 Jan 2014 12:13:22 +0000 (12:13 +0000)]
Install signed images if UEFI Secure Boot is enabled

Author: Stéphane Graber <stgraber@ubuntu.com>
Author: Steve Langasek <steve.langasek@ubuntu.com>
Author: Linn Crosetto <linn@hpe.com>
Author: Mathieu Trudel-Lapierre <cyphermox@ubuntu.com>
Forwarded: no
Last-Update: 2016-11-01

Patch-Name: install_signed.patch

Gbp-Pq: Name install_signed.patch

5 years agoGenerate configuration for signed UEFI kernels if available
Colin Watson [Mon, 13 Jan 2014 12:13:21 +0000 (12:13 +0000)]
Generate configuration for signed UEFI kernels if available

Forwarded: no
Last-Update: 2013-12-25

Patch-Name: mkconfig_signed_kernel.patch

Gbp-Pq: Name mkconfig_signed_kernel.patch

5 years agoIf running under UEFI secure boot, attempt to use linuxefi loader
Colin Watson [Mon, 13 Jan 2014 12:13:20 +0000 (12:13 +0000)]
If running under UEFI secure boot, attempt to use linuxefi loader

Author: Steve Langasek <steve.langasek@canonical.com>
Forwarded: no
Last-Update: 2013-12-20

Patch-Name: linuxefi_non_sb_fallback.patch

Gbp-Pq: Name linuxefi_non_sb_fallback.patch

5 years agoMake linuxefi refuse to boot without shim
Colin Watson [Mon, 13 Jan 2014 12:13:19 +0000 (12:13 +0000)]
Make linuxefi refuse to boot without shim

This is only intended as a temporary measure.

Forwarded: not-needed
Last-Update: 2013-01-29

Patch-Name: linuxefi_require_shim.patch

Gbp-Pq: Name linuxefi_require_shim.patch

5 years agoAdd more debugging to linuxefi
Colin Watson [Mon, 13 Jan 2014 12:13:18 +0000 (12:13 +0000)]
Add more debugging to linuxefi

Forwarded: no
Last-Update: 2016-09-19

Patch-Name: linuxefi_debug.patch

Gbp-Pq: Name linuxefi_debug.patch

5 years agoAdd "linuxefi" loader which avoids ExitBootServices
Matthew Garrett [Mon, 13 Jan 2014 12:13:15 +0000 (12:13 +0000)]
Add "linuxefi" loader which avoids ExitBootServices

Origin: vendor, http://pkgs.fedoraproject.org/cgit/grub2.git/tree/grub2-linuxefi.patch
Forwarded: no
Last-Update: 2016-09-19

Patch-Name: linuxefi.patch

Gbp-Pq: Name linuxefi.patch

5 years agoRemove GNU/Linux from default distributor string for Ubuntu
Mario Limonciello [Mon, 13 Jan 2014 12:13:14 +0000 (12:13 +0000)]
Remove GNU/Linux from default distributor string for Ubuntu

Ubuntu is called "Ubuntu", not "Ubuntu GNU/Linux".

Author: Colin Watson <cjwatson@debian.org>
Author: Harald Sitter <apachelogger@kubuntu.org>
Forwarded: not-needed
Last-Update: 2013-12-25

Patch-Name: mkconfig_ubuntu_distributor.patch

Gbp-Pq: Name mkconfig_ubuntu_distributor.patch

5 years agoOutput a menu entry for firmware setup on UEFI FastBoot systems
Steve Langasek [Mon, 13 Jan 2014 12:13:12 +0000 (12:13 +0000)]
Output a menu entry for firmware setup on UEFI FastBoot systems

Forwarded: no
Last-Update: 2015-09-04

Patch-Name: uefi_firmware_setup.patch

Gbp-Pq: Name uefi_firmware_setup.patch

5 years agoBlacklist 1440x900x32 from VBE preferred mode handling
Colin Watson [Mon, 13 Jan 2014 12:13:11 +0000 (12:13 +0000)]
Blacklist 1440x900x32 from VBE preferred mode handling

Bug-Ubuntu: https://bugs.launchpad.net/bugs/701111
Forwarded: no
Last-Update: 2013-11-14

Patch-Name: blacklist_1440x900x32.patch

Gbp-Pq: Name blacklist_1440x900x32.patch

5 years agoRead /etc/default/grub.d/*.cfg after /etc/default/grub
Colin Watson [Mon, 13 Jan 2014 12:13:10 +0000 (12:13 +0000)]
Read /etc/default/grub.d/*.cfg after /etc/default/grub

Bug-Ubuntu: https://bugs.launchpad.net/bugs/901600
Forwarded: no
Last-Update: 2014-01-28

Patch-Name: default_grub_d.patch

Gbp-Pq: Name default_grub_d.patch

5 years agoDon't permit loading modules on UEFI secure boot
Matthew Garrett [Mon, 13 Jan 2014 12:13:09 +0000 (12:13 +0000)]
Don't permit loading modules on UEFI secure boot

Author: Colin Watson <cjwatson@ubuntu.com>
Origin: vendor, http://pkgs.fedoraproject.org/cgit/grub2.git/tree/grub-2.00-no-insmod-on-sb.patch
Forwarded: no
Last-Update: 2013-12-25

Patch-Name: no_insmod_on_sb.patch

Gbp-Pq: Name no_insmod_on_sb.patch

5 years agoAvoid getting confused by inaccessible loop device backing paths
Colin Watson [Mon, 13 Jan 2014 12:13:08 +0000 (12:13 +0000)]
Avoid getting confused by inaccessible loop device backing paths

Bug-Ubuntu: https://bugs.launchpad.net/bugs/938724
Forwarded: no
Last-Update: 2013-12-20

Patch-Name: mkconfig_nonexistent_loopback.patch

Gbp-Pq: Name mkconfig_nonexistent_loopback.patch

5 years agoPrefer translations from Ubuntu language packs if available
Colin Watson [Mon, 13 Jan 2014 12:13:07 +0000 (12:13 +0000)]
Prefer translations from Ubuntu language packs if available

Bug-Ubuntu: https://bugs.launchpad.net/bugs/537998
Forwarded: not-needed
Last-Update: 2013-12-25

Patch-Name: install_locale_langpack.patch

Gbp-Pq: Name install_locale_langpack.patch

5 years ago"single" -> "recovery" when friendly-recovery is installed
Colin Watson [Mon, 13 Jan 2014 12:13:06 +0000 (12:13 +0000)]
"single" -> "recovery" when friendly-recovery is installed

If configured with --enable-ubuntu-recovery, also set nomodeset for
recovery mode, and disable 'set gfxpayload=keep' even if the system
normally supports it.  See
https://launchpad.net/ubuntu/+spec/desktop-o-xorg-tools-and-processes.

Author: Stéphane Graber <stgraber@ubuntu.com>
Forwarded: no
Last-Update: 2013-12-25

Patch-Name: mkconfig_ubuntu_recovery.patch

Gbp-Pq: Name mkconfig_ubuntu_recovery.patch

5 years agoFall back to i386-pc if booted using EFI but -efi is missing
Colin Watson [Mon, 13 Jan 2014 12:13:05 +0000 (12:13 +0000)]
Fall back to i386-pc if booted using EFI but -efi is missing

It may be possible, particularly in recovery situations, to be booted
using EFI on x86 when only the i386-pc target is installed.  There's
nothing actually stopping us installing i386-pc from an EFI environment,
and it's better than returning a confusing error.

Forwarded: no
Last-Update: 2013-12-20

Patch-Name: install_efi_fallback.patch

Gbp-Pq: Name install_efi_fallback.patch

5 years agoBail out if trying to run grub-mkconfig during upgrade to 2.00
Colin Watson [Mon, 13 Jan 2014 12:13:03 +0000 (12:13 +0000)]
Bail out if trying to run grub-mkconfig during upgrade to 2.00

Since files in /etc/grub.d/ are conffiles, they are not put in place
until grub-common is configured, meaning that they may be out of sync
with the parts of grub-mkconfig that reside in /usr/.  In GRUB 1.99,
/etc/grub.d/00_header contained a reference to ${GRUB_PREFIX}/video.lst.
This and other code from 1.99 breaks with 2.00's grub-mkconfig.
Deferring this to when grub-PLATFORM.postinst eventually runs is safe
and avoids this problem.

Forwarded: no
Last-Update: 2013-12-25

Patch-Name: mkconfig_mid_upgrade.patch

Gbp-Pq: Name mkconfig_mid_upgrade.patch

5 years agoSilence error messages when translations are unavailable
Colin Watson [Mon, 13 Jan 2014 12:13:02 +0000 (12:13 +0000)]
Silence error messages when translations are unavailable

Bug: https://savannah.gnu.org/bugs/?35880
Forwarded: https://savannah.gnu.org/bugs/?35880
Last-Update: 2013-11-14

Patch-Name: gettext_quiet.patch

Gbp-Pq: Name gettext_quiet.patch

5 years agoRestore grub-mkdevicemap
Colin Watson [Mon, 13 Jan 2014 12:13:01 +0000 (12:13 +0000)]
Restore grub-mkdevicemap

This is kind of a mess, requiring lots of OS-specific code to iterate
over all possible devices.  However, we use it in a number of scripts to
discover devices and reimplementing those in terms of something else
would be very complicated.

Author: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
Forwarded: no
Last-Update: 2018-03-16

Patch-Name: restore_mkdevicemap.patch

Gbp-Pq: Name restore_mkdevicemap.patch

5 years agoHandle filesystems loop-mounted on file images
Colin Watson [Mon, 13 Jan 2014 12:13:00 +0000 (12:13 +0000)]
Handle filesystems loop-mounted on file images

Improve prepare_grub_to_access_device to emit appropriate commands for
such filesystems, and ignore them in Linux grub.d scripts.

This is needed for Ubuntu's Wubi installation method.

This patch isn't inherently Debian/Ubuntu-specific.  losetup and
/proc/mounts are Linux-specific, though, so we might need to refine this
before sending it upstream.  The changes to the Linux grub.d scripts
might be better handled by integrating 10_lupin properly instead.

Patch-Name: mkconfig_loopback.patch

Gbp-Pq: Name mkconfig_loopback.patch

5 years agoBuild vfat into EFI boot images
Mario Limonciello [Mon, 13 Jan 2014 12:12:59 +0000 (12:12 +0000)]
Build vfat into EFI boot images

Author: Colin Watson <cjwatson@ubuntu.com>
Bug-Ubuntu: https://bugs.launchpad.net/bugs/677758
Forwarded: http://lists.gnu.org/archive/html/grub-devel/2011-01/msg00028.html
Last-Update: 2016-09-18

Patch-Name: mkrescue_efi_modules.patch

Gbp-Pq: Name mkrescue_efi_modules.patch

5 years agoIf GRUB Legacy is still around, tell packaging to ignore it
Colin Watson [Mon, 13 Jan 2014 12:12:58 +0000 (12:12 +0000)]
If GRUB Legacy is still around, tell packaging to ignore it

Bug-Debian: http://bugs.debian.org/586143
Forwarded: not-needed
Last-Update: 2013-12-25

Patch-Name: install_stage2_confusion.patch

Gbp-Pq: Name install_stage2_confusion.patch

5 years agoDisable gfxpayload=keep by default
Colin Watson [Mon, 13 Jan 2014 12:12:57 +0000 (12:12 +0000)]
Disable gfxpayload=keep by default

Setting gfxpayload=keep has been known to cause efifb to be
inappropriately enabled.  In any case, with the current Linux kernel the
result of this option is that early kernelspace will be unable to print
anything to the console, so (for example) if boot fails and you end up
dumped to an initramfs prompt, you won't be able to see anything on the
screen.  As such it shouldn't be enabled by default in Debian, no matter
what kernel options are enabled.

gfxpayload=keep is a good idea but rather ahead of its time ...

Bug-Debian: http://bugs.debian.org/567245
Forwarded: no
Last-Update: 2013-12-25

Patch-Name: gfxpayload_keep_default.patch

Gbp-Pq: Name gfxpayload_keep_default.patch

5 years agoMake grub.cfg world-readable if it contains no passwords
Colin Watson [Mon, 13 Jan 2014 12:12:55 +0000 (12:12 +0000)]
Make grub.cfg world-readable if it contains no passwords

Patch-Name: grub.cfg_400.patch

Gbp-Pq: Name grub.cfg_400.patch

5 years agoDisable use of floppy devices
Colin Watson [Mon, 13 Jan 2014 12:12:54 +0000 (12:12 +0000)]
Disable use of floppy devices

An ugly kludge.  Should this be merged upstream?

Author: Robert Millan

Patch-Name: disable_floppies.patch

Gbp-Pq: Name disable_floppies.patch

5 years agoSupport running grub-probe in grub-legacy's update-grub
Robert Millan [Mon, 13 Jan 2014 12:12:53 +0000 (12:12 +0000)]
Support running grub-probe in grub-legacy's update-grub

Author: Colin Watson <cjwatson@debian.org>
Forwarded: not-needed
Last-Update: 2013-12-25

Patch-Name: grub_legacy_0_based_partitions.patch

Gbp-Pq: Name grub_legacy_0_based_partitions.patch

5 years agoImprove handling of Debian kernel version numbers
Robert Millan [Mon, 13 Jan 2014 12:12:52 +0000 (12:12 +0000)]
Improve handling of Debian kernel version numbers

Forwarded: not-needed
Last-Update: 2013-12-20

Patch-Name: dpkg_version_comparison.patch

Gbp-Pq: Name dpkg_version_comparison.patch

5 years agoWrite marker if core.img was written to filesystem
Colin Watson [Mon, 13 Jan 2014 12:12:51 +0000 (12:12 +0000)]
Write marker if core.img was written to filesystem

The Debian bug reporting script includes a warning in this case.

Patch-Name: core_in_fs.patch

Gbp-Pq: Name core_in_fs.patch

5 years agoHack prefix for OLPC
Colin Watson [Mon, 13 Jan 2014 12:12:50 +0000 (12:12 +0000)]
Hack prefix for OLPC

This sucks, but it's better than what OFW was giving us.

Patch-Name: olpc_prefix_hack.patch

Gbp-Pq: Name olpc_prefix_hack.patch

5 years agoImport replacement CRC operations from libgcrypt
Colin Watson [Fri, 16 Feb 2018 11:02:19 +0000 (11:02 +0000)]
Import replacement CRC operations from libgcrypt

Mostly backported from
https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commitdiff;h=06e122baa3321483a47bbf82fd2a4540becfa0c9,
but importing bufhelp.h from libgcrypt 1.7.0 as well.  We can drop this
once GRUB updates to a newer import of libgcrypt.

The new implementation is not encumbered by the restrictive Internet
Society licence on RFCs.

Bug-Debian: https://bugs.debian.org/745409
Last-Update: 2018-02-16

Patch-Name: replace-libgcrypt-crc.patch

Gbp-Pq: Name replace-libgcrypt-crc.patch

5 years agogrub2 (2.02+dfsg1-20) unstable; urgency=medium
Steve McIntyre [Tue, 25 Jun 2019 09:11:12 +0000 (10:11 +0100)]
grub2 (2.02+dfsg1-20) unstable; urgency=medium

  [ Steve McIntyre ]
  * Make all the signed EFI arches have a Recommends: from
    grub-efi-ARCH-signed to shim-signed, not just amd64.
Closes: #931038
  * Add myself to Uploaders

[dgit import unpatched grub2 2.02+dfsg1-20]

5 years agoImport grub2_2.02+dfsg1-20.debian.tar.xz
Steve McIntyre [Tue, 25 Jun 2019 09:11:12 +0000 (10:11 +0100)]
Import grub2_2.02+dfsg1-20.debian.tar.xz

[dgit import tarball grub2 2.02+dfsg1-20 grub2_2.02+dfsg1-20.debian.tar.xz]

6 years agoImport grub2_2.02+dfsg1.orig.tar.xz
Colin Watson [Sat, 17 Feb 2018 21:28:41 +0000 (21:28 +0000)]
Import grub2_2.02+dfsg1.orig.tar.xz

[dgit import orig grub2_2.02+dfsg1.orig.tar.xz]