diff --git a/0001-Bump-version-to-2.03.patch b/0001-Bump-version-to-2.03.patch index fb90090..99e5565 100644 --- a/0001-Bump-version-to-2.03.patch +++ b/0001-Bump-version-to-2.03.patch @@ -1,7 +1,7 @@ From b0bad6fd9449d3333fe1ab58953c0e6c1ce12c0d Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Wed, 3 May 2017 11:55:52 +0200 -Subject: [PATCH 001/194] Bump version to 2.03 +Subject: [PATCH 001/225] Bump version to 2.03 --- configure.ac | 2 +- @@ -226,5 +226,5 @@ index 68d8ce7c7..921e57ff4 100644 { "videotest", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0x7033079c, 0x7033079c, 0x7033079c, 0x7033079c, 0x7033079c, }, 5 }, { "videotest", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xff583fbf, 0xff583fbf, 0xff583fbf, 0xff583fbf, 0xff583fbf, }, 5 }, -- -2.13.5 +2.14.3 diff --git a/0002-Remove-bashisms-from-tests.patch b/0002-Remove-bashisms-from-tests.patch index 6cfeef8..aa1194e 100644 --- a/0002-Remove-bashisms-from-tests.patch +++ b/0002-Remove-bashisms-from-tests.patch @@ -1,7 +1,7 @@ From 5a0c548ba388b343b0bb6d2a38888e7eac5bbb96 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Mon, 23 Jan 2017 03:47:13 +0300 -Subject: [PATCH 002/194] Remove bashisms from tests. +Subject: [PATCH 002/225] Remove bashisms from tests. Those tests don't actually need bash. Just use common shebang. --- @@ -129,5 +129,5 @@ index d5ef7f9ea..80ebdc59f 100644 # create a randome file file="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1 -- -2.13.5 +2.14.3 diff --git a/0003-fs-tester-make-sh-compatible.patch b/0003-fs-tester-make-sh-compatible.patch index 133c87a..2b7ce5c 100644 --- a/0003-fs-tester-make-sh-compatible.patch +++ b/0003-fs-tester-make-sh-compatible.patch @@ -1,7 +1,7 @@ From 37865c2c4ad26cd5e947b08abf1fde8145699919 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Mon, 23 Jan 2017 14:35:59 +0300 -Subject: [PATCH 003/194] fs-tester: make sh-compatible +Subject: [PATCH 003/225] fs-tester: make sh-compatible --- tests/util/grub-fs-tester.in | 306 ++++++++++++++++++++++++------------------- @@ -742,5 +742,5 @@ index 2337771a1..4515d165e 100644 if [ x"$fs" = x"zfs" ]; then rmdir "$MNTPOINTRW"/"grub fs" || true -- -2.13.5 +2.14.3 diff --git a/0004-support-busybox-date.patch b/0004-support-busybox-date.patch index 90071f5..c162b74 100644 --- a/0004-support-busybox-date.patch +++ b/0004-support-busybox-date.patch @@ -1,7 +1,7 @@ From b43b8cacc813c2c15347de1e35cc88d9aa912d22 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Mon, 23 Jan 2017 14:31:36 +0300 -Subject: [PATCH 004/194] support busybox date. +Subject: [PATCH 004/225] support busybox date. Busybox date doesn't understand weekdays in -d input, so strip them beforehand. @@ -39,5 +39,5 @@ index 05b8f6b73..ac51d4209 100644 # Ignore QEMU bug if [ "${grub_modinfo_target_cpu}" = arm ] && [ $((dt2 - dt1)) -ge 15 ] && [ $((dt2 - dt1)) -le 17 ]; then -- -2.13.5 +2.14.3 diff --git a/0005-Don-t-retrieve-fstime-when-it-s-not-useful.patch b/0005-Don-t-retrieve-fstime-when-it-s-not-useful.patch index b4a5a39..e2bbf4d 100644 --- a/0005-Don-t-retrieve-fstime-when-it-s-not-useful.patch +++ b/0005-Don-t-retrieve-fstime-when-it-s-not-useful.patch @@ -1,7 +1,7 @@ From 6dec3a26b37e128ded5d912e08abc5cee1592499 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Mon, 23 Jan 2017 21:24:05 +0300 -Subject: [PATCH 005/194] Don't retrieve fstime when it's not useful. +Subject: [PATCH 005/225] Don't retrieve fstime when it's not useful. --- tests/util/grub-fs-tester.in | 48 ++++++++++++++++++++++---------------------- @@ -68,5 +68,5 @@ index 4515d165e..bf47305f3 100644 if [ x$NOHARDLINK != xy ]; then -- -2.13.5 +2.14.3 diff --git a/0006-Support-lseek64.patch b/0006-Support-lseek64.patch index 8151cdf..1d4e33e 100644 --- a/0006-Support-lseek64.patch +++ b/0006-Support-lseek64.patch @@ -1,7 +1,7 @@ From 608bec51128008afb81c9e3f297283e9f830a146 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Mon, 23 Jan 2017 20:21:05 +0300 -Subject: [PATCH 006/194] Support lseek64. +Subject: [PATCH 006/225] Support lseek64. Android doesn't have 64-bit off_t, so use off64_t instead. --- @@ -50,5 +50,5 @@ index 2a8c5882e..5450cf416 100644 } -- -2.13.5 +2.14.3 diff --git a/0007-Use-SHELL-rather-than-bin-sh.patch b/0007-Use-SHELL-rather-than-bin-sh.patch index 09cd145..ccd374b 100644 --- a/0007-Use-SHELL-rather-than-bin-sh.patch +++ b/0007-Use-SHELL-rather-than-bin-sh.patch @@ -1,7 +1,7 @@ From c2ea443446b7feea868e54f94a87781f69820375 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Mon, 23 Jan 2017 00:55:30 +0300 -Subject: [PATCH 007/194] Use $(SHELL) rather than /bin/sh. +Subject: [PATCH 007/225] Use $(SHELL) rather than /bin/sh. /bin/sh doesn't exist under termux. --- @@ -22,5 +22,5 @@ index 04e9395fd..809a8aa26 100644 CLEANFILES += symlist.c BUILT_SOURCES += symlist.c -- -2.13.5 +2.14.3 diff --git a/0008-po-Use-SHELL-rather-than-bin-sh.patch b/0008-po-Use-SHELL-rather-than-bin-sh.patch index 33c7e04..4076235 100644 --- a/0008-po-Use-SHELL-rather-than-bin-sh.patch +++ b/0008-po-Use-SHELL-rather-than-bin-sh.patch @@ -1,7 +1,7 @@ From 4341f82af0b61d3dfbe675670d4105dc759c0df3 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Mon, 23 Jan 2017 14:54:03 +0300 -Subject: [PATCH 008/194] po: Use @SHELL@ rather than /bin/sh. +Subject: [PATCH 008/225] po: Use @SHELL@ rather than /bin/sh. /bin/sh might not exist. --- @@ -22,5 +22,5 @@ index 3619458e8..e68e9da84 100644 srcdir = @srcdir@ -- -2.13.5 +2.14.3 diff --git a/0009-Add-termux-path-to-dict.patch b/0009-Add-termux-path-to-dict.patch index 07f4a6e..1d92d0d 100644 --- a/0009-Add-termux-path-to-dict.patch +++ b/0009-Add-termux-path-to-dict.patch @@ -1,7 +1,7 @@ From 1073ddb12078f3c8edbdb74bb8f5afc674983f40 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Mon, 23 Jan 2017 14:52:48 +0300 -Subject: [PATCH 009/194] Add termux path to dict. +Subject: [PATCH 009/225] Add termux path to dict. --- tests/util/grub-fs-tester.in | 2 +- @@ -21,5 +21,5 @@ index bf47305f3..468d9e785 100644 CFILESRC="$cand" break -- -2.13.5 +2.14.3 diff --git a/0010-Fix-shebang-for-termux.patch b/0010-Fix-shebang-for-termux.patch index 1f93e9d..5cc6a8f 100644 --- a/0010-Fix-shebang-for-termux.patch +++ b/0010-Fix-shebang-for-termux.patch @@ -1,7 +1,7 @@ From a827807a1330d5ad619faa103bc7f12d89fc8bee Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Sun, 22 Jan 2017 20:22:34 +0300 -Subject: [PATCH 010/194] Fix shebang for termux. +Subject: [PATCH 010/225] Fix shebang for termux. Termux doesn't have a /bin/sh. So we needto use $SHELL. Keep /bin/sh as much as possible. @@ -680,5 +680,5 @@ index 047120e47..eee62c10d 100644 set -e -- -2.13.5 +2.14.3 diff --git a/0011-Add-strtoull-test.patch b/0011-Add-strtoull-test.patch index dca6c19..94f9592 100644 --- a/0011-Add-strtoull-test.patch +++ b/0011-Add-strtoull-test.patch @@ -1,7 +1,7 @@ From ede6c9689395499f98a4c14d76b97151b4de5f54 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Wed, 3 May 2017 12:58:15 +0200 -Subject: [PATCH 011/194] Add strtoull test. +Subject: [PATCH 011/225] Add strtoull test. --- grub-core/Makefile.core.def | 5 +++++ @@ -11,18 +11,18 @@ diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def index 2dfa22a92..8dcd0e5a9 100644 --- a/grub-core/Makefile.core.def +++ b/grub-core/Makefile.core.def -@@ -1962,6 +1962,11 @@ module = { +@@ -1961,6 +1961,11 @@ module = { + common = tests/example_functional_test.c; }; - module = { ++module = { + name = strtoull_test; + common = tests/strtoull_test.c; +}; + -+module = { + module = { name = setjmp_test; common = tests/setjmp_test.c; - }; -- -2.13.5 +2.14.3 diff --git a/0012-strtoull-Fix-behaviour-on-chars-between-9-and-a.patch b/0012-strtoull-Fix-behaviour-on-chars-between-9-and-a.patch index 352f7ab..af2b3ac 100644 --- a/0012-strtoull-Fix-behaviour-on-chars-between-9-and-a.patch +++ b/0012-strtoull-Fix-behaviour-on-chars-between-9-and-a.patch @@ -1,7 +1,7 @@ From dc6e1b5af83eb1c4290baf97c2d221c0865127be Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Wed, 10 Aug 2016 17:49:42 +0200 -Subject: [PATCH 012/194] strtoull: Fix behaviour on chars between '9' and 'a'. +Subject: [PATCH 012/225] strtoull: Fix behaviour on chars between '9' and 'a'. Reported by: Aaron Miller --- @@ -64,5 +64,5 @@ index d4822a124..96781fb39 100644 ok = ok && !grub_test_run (test); grub_errno = 0; -- -2.13.5 +2.14.3 diff --git a/0013-Add-Virtual-LAN-support.patch b/0013-Add-Virtual-LAN-support.patch index 3a48d3a..d3cae9c 100644 --- a/0013-Add-Virtual-LAN-support.patch +++ b/0013-Add-Virtual-LAN-support.patch @@ -1,7 +1,7 @@ From d9f7de0ae3c0c09cff7257c55418450261f3e082 Mon Sep 17 00:00:00 2001 From: Paulo Flabiano Smorigo Date: Mon, 23 Dec 2013 12:32:02 -0200 -Subject: [PATCH 013/194] Add Virtual LAN support. +Subject: [PATCH 013/225] Add Virtual LAN support. This patch adds support for virtual LAN (VLAN) tagging. VLAN tagging allows multiple VLANs in a bridged network to share the same physical network link @@ -345,5 +345,5 @@ index dcceaa568..ab9d68f98 100644 grub_err_t grub_net_send_ip_packet (struct grub_net_network_level_interface *inf, -- -2.13.5 +2.14.3 diff --git a/0014-mkimage-Pass-layout-to-mkimage_generate_elfXX-rather.patch b/0014-mkimage-Pass-layout-to-mkimage_generate_elfXX-rather.patch index 20574b5..d720a81 100644 --- a/0014-mkimage-Pass-layout-to-mkimage_generate_elfXX-rather.patch +++ b/0014-mkimage-Pass-layout-to-mkimage_generate_elfXX-rather.patch @@ -1,7 +1,7 @@ From a35ac854308b0af7c86c2c7b199f6abdfa2110b0 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Mon, 8 May 2017 17:32:15 +0200 -Subject: [PATCH 014/194] mkimage: Pass layout to mkimage_generate_elfXX rather +Subject: [PATCH 014/225] mkimage: Pass layout to mkimage_generate_elfXX rather than some fields. This allows easier extension of this function without having too long of @@ -164,5 +164,5 @@ index 9ad4cfe42..528166c87 100644 break; } -- -2.13.5 +2.14.3 diff --git a/0015-Refactor-arm-uboot-code-to-make-it-genereic.patch b/0015-Refactor-arm-uboot-code-to-make-it-genereic.patch index 18b666b..99176b1 100644 --- a/0015-Refactor-arm-uboot-code-to-make-it-genereic.patch +++ b/0015-Refactor-arm-uboot-code-to-make-it-genereic.patch @@ -1,7 +1,7 @@ From d08c9685149e7788001ac9a209baa1d84c3628e0 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Mon, 8 May 2017 17:47:57 +0200 -Subject: [PATCH 015/194] Refactor arm-uboot code to make it genereic. +Subject: [PATCH 015/225] Refactor arm-uboot code to make it genereic. arm-coreboot startup code can be very similar to arm-uboot but current code has U-Boot specific references. So split U-Boot part from generic part. @@ -400,5 +400,5 @@ index 000000000..9afb6c57c + +#endif -- -2.13.5 +2.14.3 diff --git a/0016-coreboot-Split-parts-that-are-platform-independent.patch b/0016-coreboot-Split-parts-that-are-platform-independent.patch index 8b5dd40..ec29779 100644 --- a/0016-coreboot-Split-parts-that-are-platform-independent.patch +++ b/0016-coreboot-Split-parts-that-are-platform-independent.patch @@ -1,7 +1,7 @@ From 461bfab7b7e47fd0a76bf6076a438af1b7e2184a Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Mon, 8 May 2017 19:06:22 +0200 -Subject: [PATCH 016/194] coreboot: Split parts that are platform-independent. +Subject: [PATCH 016/225] coreboot: Split parts that are platform-independent. We currently assume that coreboot is always i386, it's no longer the case, so split i386-coreboot parts from generic coreboot code. @@ -340,5 +340,5 @@ index 1c3fa6f19..5076d36c7 100644 + #endif -- -2.13.5 +2.14.3 diff --git a/0017-Rename-uboot-halt.c-to-dummy-halt.c.patch b/0017-Rename-uboot-halt.c-to-dummy-halt.c.patch index 4d5ed38..5ce7915 100644 --- a/0017-Rename-uboot-halt.c-to-dummy-halt.c.patch +++ b/0017-Rename-uboot-halt.c-to-dummy-halt.c.patch @@ -1,7 +1,7 @@ From 1daa716c7017f1858de117a20a31da66815435c5 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Mon, 8 May 2017 19:31:55 +0200 -Subject: [PATCH 017/194] Rename uboot/halt.c to dummy/halt.c. +Subject: [PATCH 017/225] Rename uboot/halt.c to dummy/halt.c. It's not U-Boot specific and it's a stub. --- @@ -28,5 +28,5 @@ similarity index 100% rename from grub-core/lib/uboot/halt.c rename to grub-core/lib/dummy/halt.c -- -2.13.5 +2.14.3 diff --git a/0018-Rename-uboot-datetime-to-dummy-datetime.patch b/0018-Rename-uboot-datetime-to-dummy-datetime.patch index 2e93c36..12a02c0 100644 --- a/0018-Rename-uboot-datetime-to-dummy-datetime.patch +++ b/0018-Rename-uboot-datetime-to-dummy-datetime.patch @@ -1,7 +1,7 @@ From 9808c3ef956c6472a96790b60cf74f4eaa742010 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Mon, 8 May 2017 19:37:29 +0200 -Subject: [PATCH 018/194] Rename uboot/datetime to dummy/datetime. +Subject: [PATCH 018/225] Rename uboot/datetime to dummy/datetime. It's just a stub and is not UBoot-specific. --- @@ -54,5 +54,5 @@ index 4be716928..cf693fc6b 100644 + "can\'t set datetime on this machine"); } -- -2.13.5 +2.14.3 diff --git a/0019-arm-coreboot-Start-new-port.patch b/0019-arm-coreboot-Start-new-port.patch index 295504e..f846b96 100644 --- a/0019-arm-coreboot-Start-new-port.patch +++ b/0019-arm-coreboot-Start-new-port.patch @@ -1,7 +1,7 @@ From 24e37a885269bdec9b27babf1da0bba3692d55c0 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Mon, 8 May 2017 20:53:28 +0200 -Subject: [PATCH 019/194] arm-coreboot: Start new port. +Subject: [PATCH 019/225] arm-coreboot: Start new port. --- configure.ac | 2 + @@ -823,5 +823,5 @@ index 528166c87..6aa77ed73 100644 (unsigned) layout.kernel_size + (unsigned) layout.bss_size + GRUB_KERNEL_I386_PC_LINK_ADDR, -- -2.13.5 +2.14.3 diff --git a/0020-Add-support-for-device-tree-based-drivers.patch b/0020-Add-support-for-device-tree-based-drivers.patch index 5ee0abf..2aaea40 100644 --- a/0020-Add-support-for-device-tree-based-drivers.patch +++ b/0020-Add-support-for-device-tree-based-drivers.patch @@ -1,7 +1,7 @@ From fcbb723d4b1f7ad4687191562621dd0eb25f4d9e Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Mon, 8 May 2017 21:19:59 +0200 -Subject: [PATCH 020/194] Add support for device-tree-based drivers. +Subject: [PATCH 020/225] Add support for device-tree-based drivers. --- conf/Makefile.common | 4 +- @@ -847,5 +847,5 @@ index 6aa77ed73..e22d82afa 100644 { struct grub_module_header *header; -- -2.13.5 +2.14.3 diff --git a/0021-arm-coreboot-Support-for-vexpress-timer.patch b/0021-arm-coreboot-Support-for-vexpress-timer.patch index d68cc32..5c253d6 100644 --- a/0021-arm-coreboot-Support-for-vexpress-timer.patch +++ b/0021-arm-coreboot-Support-for-vexpress-timer.patch @@ -1,7 +1,7 @@ From 5a865b37866ee8cd64c080bc6fb1e537f8e2b3c6 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Mon, 8 May 2017 21:26:36 +0200 -Subject: [PATCH 021/194] arm-coreboot: Support for vexpress timer. +Subject: [PATCH 021/225] arm-coreboot: Support for vexpress timer. --- grub-core/kern/arm/coreboot/timer.c | 36 ++++++++++++++++++++++++++++++++++++ @@ -69,5 +69,5 @@ index ebefb99d5..d97b844f8 100644 try_generic_timer (); if (!have_timer) -- -2.13.5 +2.14.3 diff --git a/0022-arm-coreboot-Export-FDT-routines.patch b/0022-arm-coreboot-Export-FDT-routines.patch index 063a1e9..67c4671 100644 --- a/0022-arm-coreboot-Export-FDT-routines.patch +++ b/0022-arm-coreboot-Export-FDT-routines.patch @@ -1,7 +1,7 @@ From ac6b41b89fbb82a3ba843a7ed19115d81432b604 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Mon, 8 May 2017 21:29:48 +0200 -Subject: [PATCH 022/194] arm-coreboot: Export FDT routines. +Subject: [PATCH 022/225] arm-coreboot: Export FDT routines. We need to use them from modules as well. --- @@ -23,5 +23,5 @@ index fc6ca3051..147e6959c 100644 if COND_arm_efi -- -2.13.5 +2.14.3 diff --git a/0023-at_keyboard-Split-protocol-from-controller-code.patch b/0023-at_keyboard-Split-protocol-from-controller-code.patch index 6091c61..2ae6457 100644 --- a/0023-at_keyboard-Split-protocol-from-controller-code.patch +++ b/0023-at_keyboard-Split-protocol-from-controller-code.patch @@ -1,7 +1,7 @@ From 216950a4eea1a1ead1c28eaca94e34ea2ef2ad19 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Mon, 8 May 2017 21:41:22 +0200 -Subject: [PATCH 023/194] at_keyboard: Split protocol from controller code. +Subject: [PATCH 023/225] at_keyboard: Split protocol from controller code. On vexpress controller is different but protocol is the same, so reuse the code. @@ -1023,5 +1023,5 @@ index 000000000..4f2e527e4 + +#endif -- -2.13.5 +2.14.3 diff --git a/0024-arm_coreboot-Support-keyboard-for-vexpress.patch b/0024-arm_coreboot-Support-keyboard-for-vexpress.patch index 2cad8da..82351f3 100644 --- a/0024-arm_coreboot-Support-keyboard-for-vexpress.patch +++ b/0024-arm_coreboot-Support-keyboard-for-vexpress.patch @@ -1,7 +1,7 @@ From 848bed9d92cf20e9f25db4c69a20efad23996ca0 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Mon, 8 May 2017 21:42:37 +0200 -Subject: [PATCH 024/194] arm_coreboot: Support keyboard for vexpress. +Subject: [PATCH 024/225] arm_coreboot: Support keyboard for vexpress. --- grub-core/Makefile.am | 1 + @@ -245,5 +245,5 @@ index 000000000..e4cda3056 + grub_fdtbus_register (&pl050); +} -- -2.13.5 +2.14.3 diff --git a/0025-arm_coreboot-Support-grub-mkstandalone.patch b/0025-arm_coreboot-Support-grub-mkstandalone.patch index b36403b..c94a550 100644 --- a/0025-arm_coreboot-Support-grub-mkstandalone.patch +++ b/0025-arm_coreboot-Support-grub-mkstandalone.patch @@ -1,7 +1,7 @@ From 3edabad8fefb112cc4b2d43be6e97d43c909ceee Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Mon, 8 May 2017 21:59:48 +0200 -Subject: [PATCH 025/194] arm_coreboot: Support grub-mkstandalone. +Subject: [PATCH 025/225] arm_coreboot: Support grub-mkstandalone. --- include/grub/util/install.h | 6 +++++- @@ -154,5 +154,5 @@ index 9074d3e9e..75e3e5ba6 100644 case GRUB_INSTALL_PLATFORM_MIPSEL_ARC: case GRUB_INSTALL_PLATFORM_ARM_UBOOT: -- -2.13.5 +2.14.3 diff --git a/0026-arm_coreboot-Support-loading-linux-images.patch b/0026-arm_coreboot-Support-loading-linux-images.patch index d503a7f..385305e 100644 --- a/0026-arm_coreboot-Support-loading-linux-images.patch +++ b/0026-arm_coreboot-Support-loading-linux-images.patch @@ -1,7 +1,7 @@ From 656c3b0d7fbe23f0e1ab561c8faa4ac4a37364d1 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Mon, 8 May 2017 22:00:06 +0200 -Subject: [PATCH 026/194] arm_coreboot: Support loading linux images. +Subject: [PATCH 026/225] arm_coreboot: Support loading linux images. --- grub-core/loader/arm/linux.c | 132 ++++++++++++++++++++++--------------------- @@ -298,5 +298,5 @@ index a66caad13..f217f8281 100644 #define FDT_ADDITIONAL_ENTRIES_SIZE 0x300 -- -2.13.5 +2.14.3 diff --git a/0027-arm_coreboot-Support-DMA.patch b/0027-arm_coreboot-Support-DMA.patch index c8725a4..163f03c 100644 --- a/0027-arm_coreboot-Support-DMA.patch +++ b/0027-arm_coreboot-Support-DMA.patch @@ -1,7 +1,7 @@ From 265292f2b0da0eb414c409871ba0f94a99ec33c1 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Mon, 8 May 2017 22:06:04 +0200 -Subject: [PATCH 027/194] arm_coreboot: Support DMA. +Subject: [PATCH 027/225] arm_coreboot: Support DMA. This is needed to support USB and some other busses. --- @@ -54,10 +54,11 @@ index 34154ccdb..af1c4bbf5 100644 void grub_arm_invalidate_icache_range_armv6 (grub_addr_t start, grub_addr_t end, grub_addr_t dlinesz); void grub_arm_invalidate_icache_range_armv7 (grub_addr_t start, grub_addr_t end, -@@ -253,6 +255,38 @@ grub_arch_sync_caches (void *address, grub_size_t len) +@@ -252,6 +254,38 @@ grub_arch_sync_caches (void *address, grub_size_t len) + } } - void ++void +grub_arch_sync_dma_caches (volatile void *address, grub_size_t len) +{ + grub_addr_t start = (grub_addr_t) address; @@ -89,10 +90,9 @@ index 34154ccdb..af1c4bbf5 100644 + } +} + -+void + void grub_arm_disable_caches_mmu (void) { - if (type == ARCH_UNKNOWN) diff --git a/grub-core/kern/arm/cache_armv7.S b/grub-core/kern/arm/cache_armv7.S index 1ef2754af..5ae76a3d8 100644 --- a/grub-core/kern/arm/cache_armv7.S @@ -288,5 +288,5 @@ index 70d9a0513..262c89b74 100644 grub_uint8_t EXPORT_FUNC (grub_pci_find_capability) (grub_pci_device_t dev, grub_uint8_t cap); -- -2.13.5 +2.14.3 diff --git a/0028-ehci-Split-core-code-from-PCI-part.patch b/0028-ehci-Split-core-code-from-PCI-part.patch index cb6d172..b7d3289 100644 --- a/0028-ehci-Split-core-code-from-PCI-part.patch +++ b/0028-ehci-Split-core-code-from-PCI-part.patch @@ -1,7 +1,7 @@ From 058df7b5a9cc7aaa9872eaa916b715544a8f9840 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Mon, 8 May 2017 22:10:26 +0200 -Subject: [PATCH 028/194] ehci: Split core code from PCI part. +Subject: [PATCH 028/225] ehci: Split core code from PCI part. On ARM often EHCI is present without PCI and just declared in device tree. So splitcore from PCI part. @@ -567,5 +567,5 @@ index 5f4297bb2..c772e7654 100644 grub_usb_controller_dev_register (&usb_controller); grub_boot_time ("EHCI driver registered"); -- -2.13.5 +2.14.3 diff --git a/0029-arm_coreboot-Support-EHCI.patch b/0029-arm_coreboot-Support-EHCI.patch index 2b2a984..4eea1b8 100644 --- a/0029-arm_coreboot-Support-EHCI.patch +++ b/0029-arm_coreboot-Support-EHCI.patch @@ -1,7 +1,7 @@ From d11ced1e1fb93676942e51618eb53c140f541890 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Mon, 8 May 2017 22:14:28 +0200 -Subject: [PATCH 029/194] arm_coreboot: Support EHCI. +Subject: [PATCH 029/225] arm_coreboot: Support EHCI. --- gentpl.py | 2 +- @@ -119,5 +119,5 @@ index 11d96481f..512ae1dd0 100644 #endif /* GRUB_USB_H */ -- -2.13.5 +2.14.3 diff --git a/0030-Fix-bug-on-FDT-nodes-with-compatible-property.patch b/0030-Fix-bug-on-FDT-nodes-with-compatible-property.patch index dc40a0c..eb6f4bf 100644 --- a/0030-Fix-bug-on-FDT-nodes-with-compatible-property.patch +++ b/0030-Fix-bug-on-FDT-nodes-with-compatible-property.patch @@ -1,7 +1,7 @@ From 4f8471532d454b2db96434c28bf7105ed69e0f4d Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Tue, 9 May 2017 08:39:40 +0200 -Subject: [PATCH 030/194] Fix bug on FDT nodes with compatible property +Subject: [PATCH 030/225] Fix bug on FDT nodes with compatible property --- grub-core/bus/fdt.c | 2 ++ @@ -21,5 +21,5 @@ index 6fb077000..34d535457 100644 while (compatible < compatible_end) { -- -2.13.5 +2.14.3 diff --git a/0031-fdtbus-Add-ability-to-send-receive-messages-on-paren.patch b/0031-fdtbus-Add-ability-to-send-receive-messages-on-paren.patch index 01fae85..a9ed143 100644 --- a/0031-fdtbus-Add-ability-to-send-receive-messages-on-paren.patch +++ b/0031-fdtbus-Add-ability-to-send-receive-messages-on-paren.patch @@ -1,7 +1,7 @@ From c4313c812dc14e82a774b580b5e34d40e7f3fae6 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Tue, 9 May 2017 08:40:29 +0200 -Subject: [PATCH 031/194] fdtbus: Add ability to send/receive messages on +Subject: [PATCH 031/225] fdtbus: Add ability to send/receive messages on parent busses. --- @@ -130,5 +130,5 @@ index 985837e55..f519c40ec 100644 /* dtb is assumed to be unfreeable and must remain valid for lifetime of GRUB. -- -2.13.5 +2.14.3 diff --git a/0032-rk3288_spi-Add-SPI-driver.patch b/0032-rk3288_spi-Add-SPI-driver.patch index 7190ac8..ae0520b 100644 --- a/0032-rk3288_spi-Add-SPI-driver.patch +++ b/0032-rk3288_spi-Add-SPI-driver.patch @@ -1,7 +1,7 @@ From b0b1b81a11f8bae8ab9e8edd87ac3f4f7949d03b Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Tue, 9 May 2017 08:42:14 +0200 -Subject: [PATCH 032/194] rk3288_spi: Add SPI driver +Subject: [PATCH 032/225] rk3288_spi: Add SPI driver --- grub-core/Makefile.core.def | 1 + @@ -161,5 +161,5 @@ index 09cd7fe32..269505342 100644 #endif /* ! ASM_FILE */ -- -2.13.5 +2.14.3 diff --git a/0033-arm_coreboot-Add-Chromebook-keyboard-driver.patch b/0033-arm_coreboot-Add-Chromebook-keyboard-driver.patch index e7ea0f4..23cef6c 100644 --- a/0033-arm_coreboot-Add-Chromebook-keyboard-driver.patch +++ b/0033-arm_coreboot-Add-Chromebook-keyboard-driver.patch @@ -1,7 +1,7 @@ From 5c3fd1b135bd73c8e3467b9b635b25ca4d360a19 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Tue, 9 May 2017 08:47:34 +0200 -Subject: [PATCH 033/194] arm_coreboot: Add Chromebook keyboard driver. +Subject: [PATCH 033/225] arm_coreboot: Add Chromebook keyboard driver. --- grub-core/term/arm/cros.c | 125 +++++++++++++++++++++++ @@ -415,5 +415,5 @@ index 000000000..45a372572 + +#endif -- -2.13.5 +2.14.3 diff --git a/0034-Missing-parts-of-previous-commit.patch b/0034-Missing-parts-of-previous-commit.patch index 6278e35..ed01b2f 100644 --- a/0034-Missing-parts-of-previous-commit.patch +++ b/0034-Missing-parts-of-previous-commit.patch @@ -1,7 +1,7 @@ From c6eaa982d12e3cfc5465dda5ea372774188b6b81 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Tue, 9 May 2017 09:02:15 +0200 -Subject: [PATCH 034/194] Missing parts of previous commit +Subject: [PATCH 034/225] Missing parts of previous commit --- grub-core/Makefile.core.def | 2 ++ @@ -34,5 +34,5 @@ index 0126ff638..8d8c5b829 100644 } -- -2.13.5 +2.14.3 diff --git a/0035-coreboot-Changed-cbmemc-to-support-updated-console-f.patch b/0035-coreboot-Changed-cbmemc-to-support-updated-console-f.patch index 5594081..1de1ee2 100644 --- a/0035-coreboot-Changed-cbmemc-to-support-updated-console-f.patch +++ b/0035-coreboot-Changed-cbmemc-to-support-updated-console-f.patch @@ -1,7 +1,7 @@ From 70b555a52a065b2beb91e6fc97a6b358c931b303 Mon Sep 17 00:00:00 2001 From: Julius Werner Date: Tue, 9 May 2017 09:03:02 +0200 -Subject: [PATCH 035/194] coreboot: Changed cbmemc to support updated console +Subject: [PATCH 035/225] coreboot: Changed cbmemc to support updated console format from coreboot. --- @@ -94,5 +94,5 @@ index 129248c7f..cea9b8431 100644 } -- -2.13.5 +2.14.3 diff --git a/0036-at_keyboard-Fix-falco-chromebook-case.patch b/0036-at_keyboard-Fix-falco-chromebook-case.patch index 4d229e9..c632b6b 100644 --- a/0036-at_keyboard-Fix-falco-chromebook-case.patch +++ b/0036-at_keyboard-Fix-falco-chromebook-case.patch @@ -1,7 +1,7 @@ From c4b8bec5fee4e30a165fd14a188cf3ab8eccd095 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Tue, 9 May 2017 14:27:52 +0200 -Subject: [PATCH 036/194] at_keyboard: Fix falco chromebook case. +Subject: [PATCH 036/225] at_keyboard: Fix falco chromebook case. EC is slow, so we need few delays for it to toggle the bits correctly. @@ -85,5 +85,5 @@ index b031523eb..bcb4d9ba7 100644 #define KEYBOARD_ISMAKE(x) !((x) & 0x80) #define KEYBOARD_ISREADY(x) ((x) & 0x01) -- -2.13.5 +2.14.3 diff --git a/0037-sparc64-Close-cdboot-ihandle.patch b/0037-sparc64-Close-cdboot-ihandle.patch index 15b5b6e..0173deb 100644 --- a/0037-sparc64-Close-cdboot-ihandle.patch +++ b/0037-sparc64-Close-cdboot-ihandle.patch @@ -1,7 +1,7 @@ From bd4e40aadded7093908d786d03b4acf60b7b1707 Mon Sep 17 00:00:00 2001 From: Eric Snowberg Date: Thu, 11 May 2017 18:42:23 -0700 -Subject: [PATCH 037/194] sparc64: Close cdboot ihandle +Subject: [PATCH 037/225] sparc64: Close cdboot ihandle The ihandle is left open with a cd-core image. This will cause a delay booting grub from a virtual cdrom in a LDOM. It will also cause problems @@ -44,5 +44,5 @@ index 586efb401..9ea9b4e06 100644 mov 512, %o3 #endif -- -2.13.5 +2.14.3 diff --git a/0038-arm64-xen_boot-Fix-Xen-boot-using-GRUB2-on-AARCH64.patch b/0038-arm64-xen_boot-Fix-Xen-boot-using-GRUB2-on-AARCH64.patch index f7e83c7..7f4e280 100644 --- a/0038-arm64-xen_boot-Fix-Xen-boot-using-GRUB2-on-AARCH64.patch +++ b/0038-arm64-xen_boot-Fix-Xen-boot-using-GRUB2-on-AARCH64.patch @@ -1,7 +1,7 @@ From ae5817f1dcbf0b99f7a849f56afe442165317840 Mon Sep 17 00:00:00 2001 From: Julien Grall Date: Fri, 19 Feb 2016 16:28:52 +0000 -Subject: [PATCH 038/194] arm64/xen_boot: Fix Xen boot using GRUB2 on AARCH64 +Subject: [PATCH 038/225] arm64/xen_boot: Fix Xen boot using GRUB2 on AARCH64 Xen is currently crashing because of malformed compatible property for the boot module. This is because the property string is not @@ -28,5 +28,5 @@ index a914eb8e2..8ae43d7e8 100644 return grub_error (GRUB_ERR_IO, "failed to update FDT"); -- -2.13.5 +2.14.3 diff --git a/0039-arm64-Add-nounzip-option-support-in-xen_module-comma.patch b/0039-arm64-Add-nounzip-option-support-in-xen_module-comma.patch index d4e02fe..fad4e9c 100644 --- a/0039-arm64-Add-nounzip-option-support-in-xen_module-comma.patch +++ b/0039-arm64-Add-nounzip-option-support-in-xen_module-comma.patch @@ -1,7 +1,7 @@ From 8eed7be8a61c295df700e918744a984162378ca9 Mon Sep 17 00:00:00 2001 From: Fu Wei Date: Sun, 14 May 2017 15:43:45 +0800 -Subject: [PATCH 039/194] arm64: Add "--nounzip" option support in xen_module +Subject: [PATCH 039/225] arm64: Add "--nounzip" option support in xen_module command This patch adds "--nounzip" option support in order to @@ -52,5 +52,5 @@ index 8ae43d7e8..27ede46ca 100644 if (!file) goto fail; -- -2.13.5 +2.14.3 diff --git a/0040-util-grub.d-20_linux_xen.in-Add-xen_boot-command-sup.patch b/0040-util-grub.d-20_linux_xen.in-Add-xen_boot-command-sup.patch index 09297ad..701499b 100644 --- a/0040-util-grub.d-20_linux_xen.in-Add-xen_boot-command-sup.patch +++ b/0040-util-grub.d-20_linux_xen.in-Add-xen_boot-command-sup.patch @@ -1,7 +1,7 @@ From d33045ce7ffcb7c1e4a60c14d5ca64b36e3c5abe Mon Sep 17 00:00:00 2001 From: Fu Wei Date: Sun, 14 May 2017 15:43:46 +0800 -Subject: [PATCH 040/194] util/grub.d/20_linux_xen.in: Add xen_boot command +Subject: [PATCH 040/225] util/grub.d/20_linux_xen.in: Add xen_boot command support for aarch64 This patch adds the support of xen_boot command for aarch64: @@ -59,5 +59,5 @@ index c48af948d..c002fc9f9 100644 linux=`version_find_latest $list` gettext_printf "Found linux image: %s\n" "$linux" >&2 -- -2.13.5 +2.14.3 diff --git a/0041-arm64-Update-the-introduction-of-Xen-boot-commands-i.patch b/0041-arm64-Update-the-introduction-of-Xen-boot-commands-i.patch index 1c8d209..c38f5a2 100644 --- a/0041-arm64-Update-the-introduction-of-Xen-boot-commands-i.patch +++ b/0041-arm64-Update-the-introduction-of-Xen-boot-commands-i.patch @@ -1,7 +1,7 @@ From 26c2f306fd425d2c0348023b8dcb7eb40a01851a Mon Sep 17 00:00:00 2001 From: Fu Wei Date: Sun, 14 May 2017 15:43:47 +0800 -Subject: [PATCH 041/194] arm64: Update the introduction of Xen boot commands +Subject: [PATCH 041/225] arm64: Update the introduction of Xen boot commands in docs/grub.texi delete: xen_linux, xen_initrd, xen_xsm @@ -89,5 +89,5 @@ index e935af33e..a0c4b9e4e 100644 @section The list of networking commands -- -2.13.5 +2.14.3 diff --git a/0042-sparc64-Don-t-use-devspec-to-determine-the-OBP-path.patch b/0042-sparc64-Don-t-use-devspec-to-determine-the-OBP-path.patch index 4521955..5d103e7 100644 --- a/0042-sparc64-Don-t-use-devspec-to-determine-the-OBP-path.patch +++ b/0042-sparc64-Don-t-use-devspec-to-determine-the-OBP-path.patch @@ -1,7 +1,7 @@ From f8679cedff703b437171f4708d46adbfcff80a65 Mon Sep 17 00:00:00 2001 From: Eric Snowberg Date: Thu, 18 May 2017 17:10:22 -0600 -Subject: [PATCH 042/194] sparc64: Don't use devspec to determine the OBP path +Subject: [PATCH 042/225] sparc64: Don't use devspec to determine the OBP path Don't use devspec to determine the OBP path on SPARC hardware. Within all versions of Linux on SPARC, the devspec returns one of three values: @@ -49,5 +49,5 @@ index a79682a5e..dce4e59d0 100644 if (fd < 0 || fstat (fd, &st) < 0) { -- -2.13.5 +2.14.3 diff --git a/0043-Allow-GRUB-to-mount-ext2-3-4-filesystems-that-have-t.patch b/0043-Allow-GRUB-to-mount-ext2-3-4-filesystems-that-have-t.patch index 4565505..2d49b5b 100644 --- a/0043-Allow-GRUB-to-mount-ext2-3-4-filesystems-that-have-t.patch +++ b/0043-Allow-GRUB-to-mount-ext2-3-4-filesystems-that-have-t.patch @@ -1,7 +1,7 @@ From 734668238fcc0ef691a080839e04f33854fa133a Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Thu, 29 Jun 2017 13:27:49 +0000 -Subject: [PATCH 043/194] Allow GRUB to mount ext2/3/4 filesystems that have +Subject: [PATCH 043/225] Allow GRUB to mount ext2/3/4 filesystems that have the encryption feature. On such a filesystem, inodes may have EXT4_ENCRYPT_FLAG set. @@ -136,5 +136,5 @@ index 88cbe7365..fd7e0f14b 100644 MKE2FS_DEVICE_SECTSIZE=$SECSIZE "mkfs.$fs" -b $BLKSIZE -L "$FSLABEL" -q "${MOUNTDEVICE}" ;; xxfs) -- -2.13.5 +2.14.3 diff --git a/0044-ehci-Fix-compilation-for-amd64.patch b/0044-ehci-Fix-compilation-for-amd64.patch index accd423..0b03b19 100644 --- a/0044-ehci-Fix-compilation-for-amd64.patch +++ b/0044-ehci-Fix-compilation-for-amd64.patch @@ -1,7 +1,7 @@ From edb37fb30bbc8a3b6bec67911c7200e4eb071127 Mon Sep 17 00:00:00 2001 From: phcoder Date: Sun, 9 Jul 2017 20:58:31 +0200 -Subject: [PATCH 044/194] ehci: Fix compilation for amd64 +Subject: [PATCH 044/225] ehci: Fix compilation for amd64 --- grub-core/bus/usb/ehci.c | 8 ++++---- @@ -34,5 +34,5 @@ index c772e7654..7b7061f53 100644 grub_ehci_oper_read32 (e, GRUB_EHCI_COMMAND)); grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: STATUS: %08x\n", -- -2.13.5 +2.14.3 diff --git a/0045-cache-Fix-compilation-for-ppc-sparc-and-arm64.patch b/0045-cache-Fix-compilation-for-ppc-sparc-and-arm64.patch index cd1f508..bed1e25 100644 --- a/0045-cache-Fix-compilation-for-ppc-sparc-and-arm64.patch +++ b/0045-cache-Fix-compilation-for-ppc-sparc-and-arm64.patch @@ -1,7 +1,7 @@ From d8901e3ba115d705c9c08ecedd201aca8b4867b8 Mon Sep 17 00:00:00 2001 From: phcoder Date: Sun, 9 Jul 2017 20:59:15 +0200 -Subject: [PATCH 045/194] cache: Fix compilation for ppc, sparc and arm64 +Subject: [PATCH 045/225] cache: Fix compilation for ppc, sparc and arm64 --- include/grub/cache.h | 4 +++- @@ -23,5 +23,5 @@ index 1c98ce270..ccfa717e6 100644 grub_arch_sync_dma_caches (volatile void *address __attribute__ ((unused)), grub_size_t len __attribute__ ((unused))) -- -2.13.5 +2.14.3 diff --git a/0046-ehci-Fix-compilation-on-i386.patch b/0046-ehci-Fix-compilation-on-i386.patch index 52f4468..ebd7a93 100644 --- a/0046-ehci-Fix-compilation-on-i386.patch +++ b/0046-ehci-Fix-compilation-on-i386.patch @@ -1,7 +1,7 @@ From 284afab081ef7ed7db2c59151853aa3c92d988f2 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Sun, 9 Jul 2017 21:31:19 +0200 -Subject: [PATCH 046/194] ehci: Fix compilation on i386 +Subject: [PATCH 046/225] ehci: Fix compilation on i386 --- grub-core/bus/usb/ehci.c | 4 ++-- @@ -30,5 +30,5 @@ index 7b7061f53..d966fc210 100644 grub_ehci_oper_read32 (e, GRUB_EHCI_COMMAND)); grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: STATUS: %08x\n", -- -2.13.5 +2.14.3 diff --git a/0047-crypto-Fix-use-after-free.patch b/0047-crypto-Fix-use-after-free.patch index b9a8940..0e71cbf 100644 --- a/0047-crypto-Fix-use-after-free.patch +++ b/0047-crypto-Fix-use-after-free.patch @@ -1,7 +1,7 @@ From a0fe0c26aa8a1c0ad66d9527611bd726b849c623 Mon Sep 17 00:00:00 2001 From: AppChecker Date: Sun, 9 Jul 2017 21:57:35 +0200 -Subject: [PATCH 047/194] crypto: Fix use after free. +Subject: [PATCH 047/225] crypto: Fix use after free. Reported by: AppChecker Transformed to patch by: Satish Govindarajan @@ -24,5 +24,5 @@ index 2bfd67c8e..e6d345f33 100644 } cur->next = crypto_specs; -- -2.13.5 +2.14.3 diff --git a/0048-arm-efi-Fix-compilation.patch b/0048-arm-efi-Fix-compilation.patch index 2b37e39..2db0029 100644 --- a/0048-arm-efi-Fix-compilation.patch +++ b/0048-arm-efi-Fix-compilation.patch @@ -1,7 +1,7 @@ From cb8b7e4e36bf32dccbbba8252aa44ad3ada4fbc1 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Sun, 9 Jul 2017 21:48:37 +0000 -Subject: [PATCH 048/194] arm-efi: Fix compilation +Subject: [PATCH 048/225] arm-efi: Fix compilation --- grub-core/loader/arm/linux.c | 8 ++++---- @@ -37,5 +37,5 @@ index 260cbf068..e64c79a95 100644 } -- -2.13.5 +2.14.3 diff --git a/0049-fdt-silence-clang-warning.patch b/0049-fdt-silence-clang-warning.patch index fc1f552..69e5cad 100644 --- a/0049-fdt-silence-clang-warning.patch +++ b/0049-fdt-silence-clang-warning.patch @@ -1,7 +1,7 @@ From 68d54b55f49249c5e0517bf189f0f3df7ee6a36f Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Mon, 10 Jul 2017 01:34:22 +0000 -Subject: [PATCH 049/194] fdt: silence clang warning. +Subject: [PATCH 049/225] fdt: silence clang warning. --- grub-core/lib/fdt.c | 3 ++- @@ -22,5 +22,5 @@ index bdc630244..2705f2629 100644 return 0; return token; -- -2.13.5 +2.14.3 diff --git a/0050-Fix-a-segfault-in-lsefi.patch b/0050-Fix-a-segfault-in-lsefi.patch index 348bb1a..9d9996c 100644 --- a/0050-Fix-a-segfault-in-lsefi.patch +++ b/0050-Fix-a-segfault-in-lsefi.patch @@ -1,7 +1,7 @@ From e8ab5a1a9e2889eb59d1fa494ba441a53698dcd2 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Wed, 19 Jul 2017 15:47:41 -0400 -Subject: [PATCH 050/194] Fix a segfault in lsefi +Subject: [PATCH 050/225] Fix a segfault in lsefi when protocols_per_handle returns error, we can't use the pointers we passed to it, and that includes trusting num_protocols. @@ -29,5 +29,5 @@ index d901c3892..d1ce99af4 100644 { for (k = 0; k < ARRAY_SIZE (known_protocols); k++) -- -2.13.5 +2.14.3 diff --git a/0051-zfs-remove-size_t-typedef-and-use-grub_size_t-instea.patch b/0051-zfs-remove-size_t-typedef-and-use-grub_size_t-instea.patch index b7ab69c..eb153a4 100644 --- a/0051-zfs-remove-size_t-typedef-and-use-grub_size_t-instea.patch +++ b/0051-zfs-remove-size_t-typedef-and-use-grub_size_t-instea.patch @@ -1,7 +1,7 @@ From fa42786264cef98c56e972b3bb6b8448000e1c70 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Thu, 3 Aug 2017 15:46:15 +0100 -Subject: [PATCH 051/194] zfs: remove size_t typedef and use grub_size_t +Subject: [PATCH 051/225] zfs: remove size_t typedef and use grub_size_t instead * Prevents some toolchains from issuing a warning on size_t redef. @@ -55,5 +55,5 @@ index 2f73449f0..5453822d0 100644 const int dec2 = 0; #endif -- -2.13.5 +2.14.3 diff --git a/0052-udf-Fix-reading-label-lvd.ident-is-dstring.patch b/0052-udf-Fix-reading-label-lvd.ident-is-dstring.patch index 2174ca7..853fb19 100644 --- a/0052-udf-Fix-reading-label-lvd.ident-is-dstring.patch +++ b/0052-udf-Fix-reading-label-lvd.ident-is-dstring.patch @@ -1,7 +1,7 @@ From 76188809d5ca40c5285b0ab202b5edea7be3f04d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pali=20Roh=C3=A1r?= Date: Thu, 22 Jun 2017 14:33:17 +0200 -Subject: [PATCH 052/194] udf: Fix reading label, lvd.ident is dstring +Subject: [PATCH 052/225] udf: Fix reading label, lvd.ident is dstring UDF dstring has stored length in the last byte of buffer. Therefore last byte is not part of recorded characters. And empty string in dstring is @@ -50,5 +50,5 @@ index 839bff889..258745633 100644 } else -- -2.13.5 +2.14.3 diff --git a/0053-grub-core-fs-udf.c-Add-support-for-UUID.patch b/0053-grub-core-fs-udf.c-Add-support-for-UUID.patch index 5be7e28..58389b0 100644 --- a/0053-grub-core-fs-udf.c-Add-support-for-UUID.patch +++ b/0053-grub-core-fs-udf.c-Add-support-for-UUID.patch @@ -1,7 +1,7 @@ From 435fa75e01ef40917239c7f775e505e86f70d202 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pali=20Roh=C3=A1r?= Date: Thu, 22 Jun 2017 14:42:16 +0200 -Subject: [PATCH 053/194] * grub-core/fs/udf.c: Add support for UUID +Subject: [PATCH 053/225] * grub-core/fs/udf.c: Add support for UUID Use same algorithm as in libblkid from util-linux v2.30. @@ -187,5 +187,5 @@ index 258745633..00a16098b 100644 .reserved_first_sector = 1, .blocklist_install = 1, -- -2.13.5 +2.14.3 diff --git a/0054-mkrescue-Check-xorriso-presence-before-doing-anythin.patch b/0054-mkrescue-Check-xorriso-presence-before-doing-anythin.patch index 163c96a..1bff649 100644 --- a/0054-mkrescue-Check-xorriso-presence-before-doing-anythin.patch +++ b/0054-mkrescue-Check-xorriso-presence-before-doing-anythin.patch @@ -1,7 +1,7 @@ From 9e962fd3c42081e2eef1f99a0eaab38fd04d2620 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Mon, 7 Aug 2017 18:05:17 +0200 -Subject: [PATCH 054/194] mkrescue: Check xorriso presence before doing +Subject: [PATCH 054/225] mkrescue: Check xorriso presence before doing anything else. mkrescue can't do anything useful without xorriso, so abort early if it's @@ -46,5 +46,5 @@ index 238d4840e..38f154397 100644 grub_hostfs_init (); grub_host_init (); -- -2.13.5 +2.14.3 diff --git a/0055-Fail-if-xorriso-failed.patch b/0055-Fail-if-xorriso-failed.patch index 1038231..93739e5 100644 --- a/0055-Fail-if-xorriso-failed.patch +++ b/0055-Fail-if-xorriso-failed.patch @@ -1,7 +1,7 @@ From e66dc5d71ebfc9763420a76c274e6980d54641c3 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Mon, 7 Aug 2017 18:08:39 +0200 -Subject: [PATCH 055/194] Fail if xorriso failed. +Subject: [PATCH 055/225] Fail if xorriso failed. If xorriso failed most likely we didn't generate a meaningful image. --- @@ -40,5 +40,5 @@ index 38f154397..9545945d8 100644 grub_util_unlink_recursive (iso9660_dir); -- -2.13.5 +2.14.3 diff --git a/0056-efi-refactor-grub_efi_allocate_pages.patch b/0056-efi-refactor-grub_efi_allocate_pages.patch index 48b553f..516a439 100644 --- a/0056-efi-refactor-grub_efi_allocate_pages.patch +++ b/0056-efi-refactor-grub_efi_allocate_pages.patch @@ -1,7 +1,7 @@ From dd5fde2df83c5c03b7ba04d2cc5b7be96de8da7b Mon Sep 17 00:00:00 2001 From: Leif Lindholm Date: Thu, 3 Aug 2017 11:04:23 +0100 -Subject: [PATCH 056/194] efi: refactor grub_efi_allocate_pages +Subject: [PATCH 056/225] 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 @@ -116,5 +116,5 @@ index e9c601f34..b4cbebf38 100644 grub_efi_uintn_t pages); void EXPORT_FUNC(grub_efi_free_pages) (grub_efi_physical_address_t address, -- -2.13.5 +2.14.3 diff --git a/0057-Remove-grub_efi_allocate_pages.patch b/0057-Remove-grub_efi_allocate_pages.patch index a820211..9e40715 100644 --- a/0057-Remove-grub_efi_allocate_pages.patch +++ b/0057-Remove-grub_efi_allocate_pages.patch @@ -1,7 +1,7 @@ From 4bc909bf89f5b4ff86c9e4e609d4fe0c11a66b0c Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Mon, 7 Aug 2017 18:33:29 +0200 -Subject: [PATCH 057/194] Remove grub_efi_allocate_pages. +Subject: [PATCH 057/225] Remove grub_efi_allocate_pages. grub_efi_allocate_pages Essentially does 2 unrelated things: * Allocate at fixed address. @@ -248,5 +248,5 @@ index b4cbebf38..3fa082816 100644 grub_efi_uintn_t pages); int -- -2.13.5 +2.14.3 diff --git a/0058-efi-move-fdt-helper-library.patch b/0058-efi-move-fdt-helper-library.patch index b4b8b8d..ab64b05 100644 --- a/0058-efi-move-fdt-helper-library.patch +++ b/0058-efi-move-fdt-helper-library.patch @@ -1,7 +1,7 @@ From 8c9465fac901caac6802d6872a1374518b001517 Mon Sep 17 00:00:00 2001 From: Leif Lindholm Date: Thu, 3 Aug 2017 11:04:24 +0100 -Subject: [PATCH 058/194] efi: move fdt helper library +Subject: [PATCH 058/225] 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 @@ -89,5 +89,5 @@ similarity index 100% rename from include/grub/arm64/fdtload.h rename to include/grub/efi/fdtload.h -- -2.13.5 +2.14.3 diff --git a/0059-efi-Add-GRUB_PE32_MAGIC-definition.patch b/0059-efi-Add-GRUB_PE32_MAGIC-definition.patch index f584828..41070c9 100644 --- a/0059-efi-Add-GRUB_PE32_MAGIC-definition.patch +++ b/0059-efi-Add-GRUB_PE32_MAGIC-definition.patch @@ -1,7 +1,7 @@ From c5841ba7f0d14c193f20854e7e55b4f7ce9207d5 Mon Sep 17 00:00:00 2001 From: Leif Lindholm Date: Thu, 3 Aug 2017 11:04:25 +0100 -Subject: [PATCH 059/194] efi: Add GRUB_PE32_MAGIC definition +Subject: [PATCH 059/225] 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. @@ -55,5 +55,5 @@ index f79c36c02..7d44732d2 100644 But some examples (such as EFI drivers in the Intel Sample Implementation) use 32 bytes (0x20) instead, and it seems -- -2.13.5 +2.14.3 diff --git a/0060-arm64-linux-loader-improve-type-portability.patch b/0060-arm64-linux-loader-improve-type-portability.patch index e34dbd0..8da4779 100644 --- a/0060-arm64-linux-loader-improve-type-portability.patch +++ b/0060-arm64-linux-loader-improve-type-portability.patch @@ -1,7 +1,7 @@ From 91212e0aa07e704a61e4540c18a27f149f5e51c3 Mon Sep 17 00:00:00 2001 From: Leif Lindholm Date: Thu, 3 Aug 2017 11:04:26 +0100 -Subject: [PATCH 060/194] arm64 linux loader: improve type portability +Subject: [PATCH 060/225] 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. @@ -111,5 +111,5 @@ index 091e9ddf4..17212c38d 100644 fdt = NULL; } -- -2.13.5 +2.14.3 diff --git a/0061-efi-change-heap-allocation-type-to-GRUB_EFI_LOADER_C.patch b/0061-efi-change-heap-allocation-type-to-GRUB_EFI_LOADER_C.patch index c0c7207..b864eb3 100644 --- a/0061-efi-change-heap-allocation-type-to-GRUB_EFI_LOADER_C.patch +++ b/0061-efi-change-heap-allocation-type-to-GRUB_EFI_LOADER_C.patch @@ -1,7 +1,7 @@ From f826330683675f0deb55b58fd229afd7d65fb053 Mon Sep 17 00:00:00 2001 From: Leif Lindholm Date: Thu, 3 Aug 2017 11:04:32 +0100 -Subject: [PATCH 061/194] efi: change heap allocation type to +Subject: [PATCH 061/225] efi: change heap allocation type to GRUB_EFI_LOADER_CODE With upcoming changes to EDK2, allocations of type EFI_LOADER_DATA may @@ -32,5 +32,5 @@ index b97b05fe8..ac2a4c556 100644 grub_fatal ("cannot allocate conventional memory %p with %u pages", (void *) ((grub_addr_t) start), -- -2.13.5 +2.14.3 diff --git a/0062-core-use-GRUB_TERM_-definitions-when-handling-term-c.patch b/0062-core-use-GRUB_TERM_-definitions-when-handling-term-c.patch index 74fb5f6..81674a3 100644 --- a/0062-core-use-GRUB_TERM_-definitions-when-handling-term-c.patch +++ b/0062-core-use-GRUB_TERM_-definitions-when-handling-term-c.patch @@ -1,7 +1,7 @@ From bdd89d239cd9b4089630bfb5ec862aab8086dca2 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Mon, 7 Aug 2017 16:20:30 +0100 -Subject: [PATCH 062/194] core: use GRUB_TERM_ definitions when handling term +Subject: [PATCH 062/225] core: use GRUB_TERM_ definitions when handling term characters * Also use hex value for GRUB_TERM_ESC as '\e' is not in the C standard and is not understood by some compilers @@ -261,5 +261,5 @@ index 5ffb38f69..8117e2a24 100644 #define GRUB_TERM_BACKSPACE '\b' -- -2.13.5 +2.14.3 diff --git a/0063-io-add-a-GRUB_GZ-prefix-to-gzio-specific-defines.patch b/0063-io-add-a-GRUB_GZ-prefix-to-gzio-specific-defines.patch index b2d4ab6..5cc4e15 100644 --- a/0063-io-add-a-GRUB_GZ-prefix-to-gzio-specific-defines.patch +++ b/0063-io-add-a-GRUB_GZ-prefix-to-gzio-specific-defines.patch @@ -1,7 +1,7 @@ From 1deebd85ef87cc581e995ce0a51dc0802ac9c367 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Mon, 7 Aug 2017 16:23:12 +0100 -Subject: [PATCH 063/194] io: add a GRUB_GZ prefix to gzio specific defines +Subject: [PATCH 063/225] io: add a GRUB_GZ prefix to gzio specific defines * This is done to avoid a conflict with a PACKED define in the EDK2 --- @@ -81,5 +81,5 @@ index 0f2ea6bd8..a8e33033b 100644 /* TRANSLATORS: It's about given file having some strange format, not complete lack of gzip support. */ -- -2.13.5 +2.14.3 diff --git a/0064-grub.texi-Fix-typo.patch b/0064-grub.texi-Fix-typo.patch new file mode 100644 index 0000000..8b535e7 --- /dev/null +++ b/0064-grub.texi-Fix-typo.patch @@ -0,0 +1,26 @@ +From 7108c0c86ea26f75dfba4e21e78bf8464c433143 Mon Sep 17 00:00:00 2001 +From: Vladimir Serbinenko +Date: Mon, 14 Aug 2017 11:36:50 +0200 +Subject: [PATCH 064/225] grub.texi: Fix typo + +Reported by: Ori Avtalion +--- + docs/grub.texi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/docs/grub.texi b/docs/grub.texi +index a0c4b9e4e..137b894fa 100644 +--- a/docs/grub.texi ++++ b/docs/grub.texi +@@ -4643,7 +4643,7 @@ range 0-0xFF (prefix with @samp{0x} to enter it in hexadecimal). + When enabled, this hides the selected partition by setting the @dfn{hidden} + bit in its partition type code; when disabled, unhides the selected + partition by clearing this bit. This is useful only when booting DOS or +-Wwindows and multiple primary FAT partitions exist in one disk. See also ++Windows and multiple primary FAT partitions exist in one disk. See also + @ref{DOS/Windows}. + @end table + @end deffn +-- +2.14.3 + diff --git a/0065-hdparm-Depend-on-hexdump-rather-than-having-a-second.patch b/0065-hdparm-Depend-on-hexdump-rather-than-having-a-second.patch new file mode 100644 index 0000000..747398f --- /dev/null +++ b/0065-hdparm-Depend-on-hexdump-rather-than-having-a-second.patch @@ -0,0 +1,25 @@ +From 6662372053bb7f580cf1b6a56b11e1190d81a40c Mon Sep 17 00:00:00 2001 +From: Vladimir Serbinenko +Date: Mon, 14 Aug 2017 12:48:58 +0200 +Subject: [PATCH 065/225] hdparm: Depend on hexdump rather than having a second + copy of hexdump. + +--- + grub-core/Makefile.core.def | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def +index a65c27f7f..8d57a59a0 100644 +--- a/grub-core/Makefile.core.def ++++ b/grub-core/Makefile.core.def +@@ -902,7 +902,6 @@ module = { + module = { + name = hdparm; + common = commands/hdparm.c; +- common = lib/hexdump.c; + enable = pci; + enable = mips_qemu_mips; + }; +-- +2.14.3 + diff --git a/0066-multiboot-disentangle-multiboot-and-multiboot2.patch b/0066-multiboot-disentangle-multiboot-and-multiboot2.patch new file mode 100644 index 0000000..176b8ab --- /dev/null +++ b/0066-multiboot-disentangle-multiboot-and-multiboot2.patch @@ -0,0 +1,620 @@ +From 21e4a6fa039bb7dc6be42e1e4c171ddc398b8431 Mon Sep 17 00:00:00 2001 +From: Vladimir Serbinenko +Date: Mon, 14 Aug 2017 12:51:26 +0200 +Subject: [PATCH 066/225] multiboot: disentangle multiboot and multiboot2. + +Previously we had multiboot and multiboot2 declaring the same symbols. +This can potentially lead to aliasing and strange behaviours when e.g. +module instead of module2 is used with multiboot2. + +Bug: #51137 +--- + grub-core/loader/i386/multiboot_mbi.c | 4 +-- + grub-core/loader/multiboot.c | 66 ++++++++++++++++++++-------------- + grub-core/loader/multiboot_elfxx.c | 14 ++++---- + grub-core/loader/multiboot_mbi2.c | 68 +++++++++++++++++------------------ + include/grub/i386/multiboot.h | 9 ++++- + include/grub/mips/multiboot.h | 4 +-- + include/grub/multiboot.h | 11 +----- + include/multiboot2.h | 4 +-- + 8 files changed, 95 insertions(+), 85 deletions(-) + +diff --git a/grub-core/loader/i386/multiboot_mbi.c b/grub-core/loader/i386/multiboot_mbi.c +index fd7b41b0c..dc98dbcae 100644 +--- a/grub-core/loader/i386/multiboot_mbi.c ++++ b/grub-core/loader/i386/multiboot_mbi.c +@@ -239,7 +239,7 @@ grub_multiboot_get_mbi_size (void) + ret = sizeof (struct multiboot_info) + ALIGN_UP (cmdline_size, 4) + + modcnt * sizeof (struct multiboot_mod_list) + total_modcmd + + ALIGN_UP (sizeof(PACKAGE_STRING), 4) +- + grub_get_multiboot_mmap_count () * sizeof (struct multiboot_mmap_entry) ++ + grub_multiboot_get_mmap_count () * sizeof (struct multiboot_mmap_entry) + + elf_sec_entsize * elf_sec_num + + 256 * sizeof (struct multiboot_color) + #if GRUB_MACHINE_HAS_VBE || GRUB_MACHINE_HAS_VGA_TEXT +@@ -542,7 +542,7 @@ grub_multiboot_make_mbi (grub_uint32_t *target) + mbi->mods_count = 0; + } + +- mmap_size = grub_get_multiboot_mmap_count () ++ mmap_size = grub_multiboot_get_mmap_count () + * sizeof (struct multiboot_mmap_entry); + grub_fill_multiboot_mmap ((struct multiboot_mmap_entry *) ptrorig); + mbi->mmap_length = mmap_size; +diff --git a/grub-core/loader/multiboot.c b/grub-core/loader/multiboot.c +index bd9d5b3e6..bd3dc1990 100644 +--- a/grub-core/loader/multiboot.c ++++ b/grub-core/loader/multiboot.c +@@ -28,7 +28,15 @@ + + #include + #include ++#ifdef GRUB_USE_MULTIBOOT2 ++#include ++#define GRUB_MULTIBOOT_CONSOLE_FRAMEBUFFER GRUB_MULTIBOOT2_CONSOLE_FRAMEBUFFER ++#define GRUB_MULTIBOOT_CONSOLE_EGA_TEXT GRUB_MULTIBOOT2_CONSOLE_EGA_TEXT ++#define GRUB_MULTIBOOT(x) grub_multiboot2_ ## x ++#else + #include ++#define GRUB_MULTIBOOT(x) grub_multiboot_ ## x ++#endif + #include + #include + #include +@@ -49,8 +57,8 @@ GRUB_MOD_LICENSE ("GPLv3+"); + #include + #endif + +-struct grub_relocator *grub_multiboot_relocator = NULL; +-grub_uint32_t grub_multiboot_payload_eip; ++struct grub_relocator *GRUB_MULTIBOOT (relocator) = NULL; ++grub_uint32_t GRUB_MULTIBOOT (payload_eip); + #if defined (GRUB_MACHINE_PCBIOS) || defined (GRUB_MACHINE_MULTIBOOT) || defined (GRUB_MACHINE_COREBOOT) || defined (GRUB_MACHINE_QEMU) + #define DEFAULT_VIDEO_MODE "text" + #else +@@ -78,7 +86,7 @@ count_hook (grub_uint64_t addr __attribute__ ((unused)), + /* Return the length of the Multiboot mmap that will be needed to allocate + our platform's map. */ + grub_uint32_t +-grub_get_multiboot_mmap_count (void) ++GRUB_MULTIBOOT (get_mmap_count) (void) + { + grub_size_t count = 0; + +@@ -88,7 +96,7 @@ grub_get_multiboot_mmap_count (void) + } + + grub_err_t +-grub_multiboot_set_video_mode (void) ++GRUB_MULTIBOOT (set_video_mode) (void) + { + grub_err_t err; + const char *modevar; +@@ -164,19 +172,23 @@ static grub_err_t + grub_multiboot_boot (void) + { + grub_err_t err; +- struct grub_relocator32_state state = MULTIBOOT_INITIAL_STATE; + +- state.MULTIBOOT_ENTRY_REGISTER = grub_multiboot_payload_eip; ++#ifdef GRUB_USE_MULTIBOOT2 ++ struct grub_relocator32_state state = MULTIBOOT2_INITIAL_STATE; ++#else ++ struct grub_relocator32_state state = MULTIBOOT_INITIAL_STATE; ++#endif ++ state.MULTIBOOT_ENTRY_REGISTER = GRUB_MULTIBOOT (payload_eip); + +- err = grub_multiboot_make_mbi (&state.MULTIBOOT_MBI_REGISTER); ++ err = GRUB_MULTIBOOT (make_mbi) (&state.MULTIBOOT_MBI_REGISTER); + + if (err) + return err; + + if (grub_efi_is_finished) +- normal_boot (grub_multiboot_relocator, state); ++ normal_boot (GRUB_MULTIBOOT (relocator), state); + else +- efi_boot (grub_multiboot_relocator, state.MULTIBOOT_MBI_REGISTER); ++ efi_boot (GRUB_MULTIBOOT (relocator), state.MULTIBOOT_MBI_REGISTER); + + /* Not reached. */ + return GRUB_ERR_NONE; +@@ -185,10 +197,10 @@ grub_multiboot_boot (void) + static grub_err_t + grub_multiboot_unload (void) + { +- grub_multiboot_free_mbi (); ++ GRUB_MULTIBOOT (free_mbi) (); + +- grub_relocator_unload (grub_multiboot_relocator); +- grub_multiboot_relocator = NULL; ++ grub_relocator_unload (GRUB_MULTIBOOT (relocator)); ++ GRUB_MULTIBOOT (relocator) = NULL; + + grub_dl_unref (my_mod); + +@@ -207,7 +219,7 @@ static grub_uint64_t highest_load; + + /* Load ELF32 or ELF64. */ + grub_err_t +-grub_multiboot_load_elf (mbi_load_data_t *mld) ++GRUB_MULTIBOOT (load_elf) (mbi_load_data_t *mld) + { + if (grub_multiboot_is_elf32 (mld->buffer)) + return grub_multiboot_load_elf32 (mld); +@@ -218,9 +230,9 @@ grub_multiboot_load_elf (mbi_load_data_t *mld) + } + + grub_err_t +-grub_multiboot_set_console (int console_type, int accepted_consoles, +- int width, int height, int depth, +- int console_req) ++GRUB_MULTIBOOT (set_console) (int console_type, int accepted_consoles, ++ int width, int height, int depth, ++ int console_req) + { + console_required = console_req; + if (!(accepted_consoles +@@ -313,19 +325,19 @@ grub_cmd_multiboot (grub_command_t cmd __attribute__ ((unused)), + grub_dl_ref (my_mod); + + /* Skip filename. */ +- grub_multiboot_init_mbi (argc - 1, argv + 1); ++ GRUB_MULTIBOOT (init_mbi) (argc - 1, argv + 1); + +- grub_relocator_unload (grub_multiboot_relocator); +- grub_multiboot_relocator = grub_relocator_new (); ++ grub_relocator_unload (GRUB_MULTIBOOT (relocator)); ++ GRUB_MULTIBOOT (relocator) = grub_relocator_new (); + +- if (!grub_multiboot_relocator) ++ if (!GRUB_MULTIBOOT (relocator)) + goto fail; + +- err = grub_multiboot_load (file, argv[0]); ++ err = GRUB_MULTIBOOT (load) (file, argv[0]); + if (err) + goto fail; + +- grub_multiboot_set_bootdev (); ++ GRUB_MULTIBOOT (set_bootdev) (); + + grub_loader_set (grub_multiboot_boot, grub_multiboot_unload, 0); + +@@ -335,8 +347,8 @@ grub_cmd_multiboot (grub_command_t cmd __attribute__ ((unused)), + + if (grub_errno != GRUB_ERR_NONE) + { +- grub_relocator_unload (grub_multiboot_relocator); +- grub_multiboot_relocator = NULL; ++ grub_relocator_unload (GRUB_MULTIBOOT (relocator)); ++ GRUB_MULTIBOOT (relocator) = NULL; + grub_dl_unref (my_mod); + } + +@@ -368,7 +380,7 @@ grub_cmd_module (grub_command_t cmd __attribute__ ((unused)), + if (argc == 0) + return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected")); + +- if (!grub_multiboot_relocator) ++ if (!GRUB_MULTIBOOT (relocator)) + return grub_error (GRUB_ERR_BAD_ARGUMENT, + N_("you need to load the kernel first")); + +@@ -389,7 +401,7 @@ grub_cmd_module (grub_command_t cmd __attribute__ ((unused)), + if (size) + { + grub_relocator_chunk_t ch; +- err = grub_relocator_alloc_chunk_align (grub_multiboot_relocator, &ch, ++ err = grub_relocator_alloc_chunk_align (GRUB_MULTIBOOT (relocator), &ch, + lowest_addr, (0xffffffff - size) + 1, + size, MULTIBOOT_MOD_ALIGN, + GRUB_RELOCATOR_PREFERENCE_NONE, 1); +@@ -407,7 +419,7 @@ grub_cmd_module (grub_command_t cmd __attribute__ ((unused)), + target = 0; + } + +- err = grub_multiboot_add_module (target, size, argc - 1, argv + 1); ++ err = GRUB_MULTIBOOT (add_module) (target, size, argc - 1, argv + 1); + if (err) + { + grub_file_close (file); +diff --git a/grub-core/loader/multiboot_elfxx.c b/grub-core/loader/multiboot_elfxx.c +index 5e649ed25..67daf5944 100644 +--- a/grub-core/loader/multiboot_elfxx.c ++++ b/grub-core/loader/multiboot_elfxx.c +@@ -104,13 +104,13 @@ CONCAT(grub_multiboot_load_elf, XX) (mbi_load_data_t *mld) + if (load_size > mld->max_addr || mld->min_addr > mld->max_addr - load_size) + return grub_error (GRUB_ERR_BAD_OS, "invalid min/max address and/or load size"); + +- err = grub_relocator_alloc_chunk_align (grub_multiboot_relocator, &ch, ++ err = grub_relocator_alloc_chunk_align (GRUB_MULTIBOOT (relocator), &ch, + mld->min_addr, mld->max_addr - load_size, + load_size, mld->align ? mld->align : 1, + mld->preference, mld->avoid_efi_boot_services); + } + else +- err = grub_relocator_alloc_chunk_addr (grub_multiboot_relocator, &ch, ++ err = grub_relocator_alloc_chunk_addr (GRUB_MULTIBOOT (relocator), &ch, + mld->link_base_addr, load_size); + + if (err) +@@ -167,7 +167,7 @@ CONCAT(grub_multiboot_load_elf, XX) (mbi_load_data_t *mld) + if (phdr(i)->p_vaddr <= ehdr->e_entry + && phdr(i)->p_vaddr + phdr(i)->p_memsz > ehdr->e_entry) + { +- grub_multiboot_payload_eip = (ehdr->e_entry - phdr(i)->p_vaddr) ++ GRUB_MULTIBOOT (payload_eip) = (ehdr->e_entry - phdr(i)->p_vaddr) + + phdr(i)->p_paddr; + #ifdef MULTIBOOT_LOAD_ELF64 + # ifdef __mips +@@ -191,7 +191,7 @@ CONCAT(grub_multiboot_load_elf, XX) (mbi_load_data_t *mld) + #if defined (__i386__) || defined (__x86_64__) + + #elif defined (__mips) +- grub_multiboot_payload_eip |= 0x80000000; ++ GRUB_MULTIBOOT (payload_eip) |= 0x80000000; + #else + #error Please complete this + #endif +@@ -238,7 +238,7 @@ CONCAT(grub_multiboot_load_elf, XX) (mbi_load_data_t *mld) + if (sh->sh_size == 0) + continue; + +- err = grub_relocator_alloc_chunk_align (grub_multiboot_relocator, &ch, 0, ++ err = grub_relocator_alloc_chunk_align (GRUB_MULTIBOOT (relocator), &ch, 0, + (0xffffffff - sh->sh_size) + 1, + sh->sh_size, sh->sh_addralign, + GRUB_RELOCATOR_PREFERENCE_NONE, +@@ -264,8 +264,8 @@ CONCAT(grub_multiboot_load_elf, XX) (mbi_load_data_t *mld) + } + sh->sh_addr = target; + } +- grub_multiboot_add_elfsyms (ehdr->e_shnum, ehdr->e_shentsize, +- ehdr->e_shstrndx, shdr); ++ GRUB_MULTIBOOT (add_elfsyms) (ehdr->e_shnum, ehdr->e_shentsize, ++ ehdr->e_shstrndx, shdr); + } + + #undef phdr +diff --git a/grub-core/loader/multiboot_mbi2.c b/grub-core/loader/multiboot_mbi2.c +index b0679a9f6..4df659595 100644 +--- a/grub-core/loader/multiboot_mbi2.c ++++ b/grub-core/loader/multiboot_mbi2.c +@@ -22,7 +22,7 @@ + #include + #include + #endif +-#include ++#include + #include + #include + #include +@@ -71,7 +71,7 @@ static int keep_bs = 0; + static grub_uint32_t load_base_addr; + + void +-grub_multiboot_add_elfsyms (grub_size_t num, grub_size_t entsize, ++grub_multiboot2_add_elfsyms (grub_size_t num, grub_size_t entsize, + unsigned shndx, void *data) + { + elf_sec_num = num; +@@ -90,17 +90,17 @@ find_header (grub_properly_aligned_t *buffer, grub_ssize_t len) + ((char *) header <= (char *) buffer + len - 12); + header = (struct multiboot_header *) ((grub_uint32_t *) header + MULTIBOOT_HEADER_ALIGN / 4)) + { +- if (header->magic == MULTIBOOT_HEADER_MAGIC ++ if (header->magic == MULTIBOOT2_HEADER_MAGIC + && !(header->magic + header->architecture + + header->header_length + header->checksum) +- && header->architecture == MULTIBOOT_ARCHITECTURE_CURRENT) ++ && header->architecture == MULTIBOOT2_ARCHITECTURE_CURRENT) + return header; + } + return NULL; + } + + grub_err_t +-grub_multiboot_load (grub_file_t file, const char *filename) ++grub_multiboot2_load (grub_file_t file, const char *filename) + { + grub_ssize_t len; + struct multiboot_header *header; +@@ -112,7 +112,7 @@ grub_multiboot_load (grub_file_t file, const char *filename) + grub_addr_t entry = 0, efi_entry = 0; + grub_uint32_t console_required = 0; + struct multiboot_header_tag_framebuffer *fbtag = NULL; +- int accepted_consoles = GRUB_MULTIBOOT_CONSOLE_EGA_TEXT; ++ int accepted_consoles = GRUB_MULTIBOOT2_CONSOLE_EGA_TEXT; + mbi_load_data_t mld; + + mld.mbi_ver = 2; +@@ -210,7 +210,7 @@ grub_multiboot_load (grub_file_t file, const char *filename) + case MULTIBOOT_HEADER_TAG_CONSOLE_FLAGS: + if (!(((struct multiboot_header_tag_console_flags *) tag)->console_flags + & MULTIBOOT_CONSOLE_FLAGS_EGA_TEXT_SUPPORTED)) +- accepted_consoles &= ~GRUB_MULTIBOOT_CONSOLE_EGA_TEXT; ++ accepted_consoles &= ~GRUB_MULTIBOOT2_CONSOLE_EGA_TEXT; + if (((struct multiboot_header_tag_console_flags *) tag)->console_flags + & MULTIBOOT_CONSOLE_FLAGS_CONSOLE_REQUIRED) + console_required = 1; +@@ -218,7 +218,7 @@ grub_multiboot_load (grub_file_t file, const char *filename) + + case MULTIBOOT_HEADER_TAG_FRAMEBUFFER: + fbtag = (struct multiboot_header_tag_framebuffer *) tag; +- accepted_consoles |= GRUB_MULTIBOOT_CONSOLE_FRAMEBUFFER; ++ accepted_consoles |= GRUB_MULTIBOOT2_CONSOLE_FRAMEBUFFER; + break; + + case MULTIBOOT_HEADER_TAG_RELOCATABLE: +@@ -295,13 +295,13 @@ grub_multiboot_load (grub_file_t file, const char *filename) + return grub_error (GRUB_ERR_BAD_OS, "invalid min/max address and/or load size"); + } + +- err = grub_relocator_alloc_chunk_align (grub_multiboot_relocator, &ch, ++ err = grub_relocator_alloc_chunk_align (grub_multiboot2_relocator, &ch, + mld.min_addr, mld.max_addr - code_size, + code_size, mld.align ? mld.align : 1, + mld.preference, keep_bs); + } + else +- err = grub_relocator_alloc_chunk_addr (grub_multiboot_relocator, ++ err = grub_relocator_alloc_chunk_addr (grub_multiboot2_relocator, + &ch, load_addr, code_size); + if (err) + { +@@ -343,7 +343,7 @@ grub_multiboot_load (grub_file_t file, const char *filename) + mld.file = file; + mld.filename = filename; + mld.avoid_efi_boot_services = keep_bs; +- err = grub_multiboot_load_elf (&mld); ++ err = grub_multiboot2_load_elf (&mld); + if (err) + { + grub_free (mld.buffer); +@@ -354,9 +354,9 @@ grub_multiboot_load (grub_file_t file, const char *filename) + load_base_addr = mld.load_base_addr; + + if (keep_bs && efi_entry_specified) +- grub_multiboot_payload_eip = efi_entry; ++ grub_multiboot2_payload_eip = efi_entry; + else if (entry_specified) +- grub_multiboot_payload_eip = entry; ++ grub_multiboot2_payload_eip = entry; + + if (mld.relocatable) + { +@@ -370,20 +370,20 @@ grub_multiboot_load (grub_file_t file, const char *filename) + * 64-bit int here. + */ + if (mld.load_base_addr >= mld.link_base_addr) +- grub_multiboot_payload_eip += mld.load_base_addr - mld.link_base_addr; ++ grub_multiboot2_payload_eip += mld.load_base_addr - mld.link_base_addr; + else +- grub_multiboot_payload_eip -= mld.link_base_addr - mld.load_base_addr; ++ grub_multiboot2_payload_eip -= mld.link_base_addr - mld.load_base_addr; + } + + if (fbtag) +- err = grub_multiboot_set_console (GRUB_MULTIBOOT_CONSOLE_FRAMEBUFFER, +- accepted_consoles, +- fbtag->width, fbtag->height, +- fbtag->depth, console_required); ++ err = grub_multiboot2_set_console (GRUB_MULTIBOOT2_CONSOLE_FRAMEBUFFER, ++ accepted_consoles, ++ fbtag->width, fbtag->height, ++ fbtag->depth, console_required); + else +- err = grub_multiboot_set_console (GRUB_MULTIBOOT_CONSOLE_EGA_TEXT, +- accepted_consoles, +- 0, 0, 0, console_required); ++ err = grub_multiboot2_set_console (GRUB_MULTIBOOT2_CONSOLE_EGA_TEXT, ++ accepted_consoles, ++ 0, 0, 0, console_required); + return err; + } + +@@ -459,7 +459,7 @@ net_size (void) + } + + static grub_size_t +-grub_multiboot_get_mbi_size (void) ++grub_multiboot2_get_mbi_size (void) + { + #ifdef GRUB_MACHINE_EFI + if (!keep_bs && !efi_mmap_size) +@@ -478,7 +478,7 @@ grub_multiboot_get_mbi_size (void) + + ALIGN_UP (sizeof (struct multiboot_tag_elf_sections), MULTIBOOT_TAG_ALIGN) + + ALIGN_UP (elf_sec_entsize * elf_sec_num, MULTIBOOT_TAG_ALIGN) + + ALIGN_UP ((sizeof (struct multiboot_tag_mmap) +- + grub_get_multiboot_mmap_count () ++ + grub_multiboot2_get_mmap_count () + * sizeof (struct multiboot_mmap_entry)), MULTIBOOT_TAG_ALIGN) + + ALIGN_UP (sizeof (struct multiboot_tag_framebuffer), MULTIBOOT_TAG_ALIGN) + + ALIGN_UP (sizeof (struct multiboot_tag_old_acpi) +@@ -522,7 +522,7 @@ grub_fill_multiboot_mmap (struct multiboot_tag_mmap *tag) + + tag->type = MULTIBOOT_TAG_TYPE_MMAP; + tag->size = sizeof (struct multiboot_tag_mmap) +- + sizeof (struct multiboot_mmap_entry) * grub_get_multiboot_mmap_count (); ++ + sizeof (struct multiboot_mmap_entry) * grub_multiboot2_get_mmap_count (); + tag->entry_size = sizeof (struct multiboot_mmap_entry); + tag->entry_version = 0; + +@@ -588,7 +588,7 @@ retrieve_video_parameters (grub_properly_aligned_t **ptrorig) + struct multiboot_tag_framebuffer *tag + = (struct multiboot_tag_framebuffer *) *ptrorig; + +- err = grub_multiboot_set_video_mode (); ++ err = grub_multiboot2_set_video_mode (); + if (err) + { + grub_print_error (); +@@ -731,7 +731,7 @@ retrieve_video_parameters (grub_properly_aligned_t **ptrorig) + } + + grub_err_t +-grub_multiboot_make_mbi (grub_uint32_t *target) ++grub_multiboot2_make_mbi (grub_uint32_t *target) + { + grub_properly_aligned_t *ptrorig; + grub_properly_aligned_t *mbistart; +@@ -739,11 +739,11 @@ grub_multiboot_make_mbi (grub_uint32_t *target) + grub_size_t bufsize; + grub_relocator_chunk_t ch; + +- bufsize = grub_multiboot_get_mbi_size (); ++ bufsize = grub_multiboot2_get_mbi_size (); + + COMPILE_TIME_ASSERT (MULTIBOOT_TAG_ALIGN % sizeof (grub_properly_aligned_t) == 0); + +- err = grub_relocator_alloc_chunk_align (grub_multiboot_relocator, &ch, ++ err = grub_relocator_alloc_chunk_align (grub_multiboot2_relocator, &ch, + 0, 0xffffffff - bufsize, + bufsize, MULTIBOOT_TAG_ALIGN, + GRUB_RELOCATOR_PREFERENCE_NONE, 1); +@@ -1039,7 +1039,7 @@ grub_multiboot_make_mbi (grub_uint32_t *target) + } + + void +-grub_multiboot_free_mbi (void) ++grub_multiboot2_free_mbi (void) + { + struct module *cur, *next; + +@@ -1061,11 +1061,11 @@ grub_multiboot_free_mbi (void) + } + + grub_err_t +-grub_multiboot_init_mbi (int argc, char *argv[]) ++grub_multiboot2_init_mbi (int argc, char *argv[]) + { + grub_ssize_t len = 0; + +- grub_multiboot_free_mbi (); ++ grub_multiboot2_free_mbi (); + + len = grub_loader_cmdline_size (argc, argv); + +@@ -1081,7 +1081,7 @@ grub_multiboot_init_mbi (int argc, char *argv[]) + } + + grub_err_t +-grub_multiboot_add_module (grub_addr_t start, grub_size_t size, ++grub_multiboot2_add_module (grub_addr_t start, grub_size_t size, + int argc, char *argv[]) + { + struct module *newmod; +@@ -1119,7 +1119,7 @@ grub_multiboot_add_module (grub_addr_t start, grub_size_t size, + } + + void +-grub_multiboot_set_bootdev (void) ++grub_multiboot2_set_bootdev (void) + { + grub_device_t dev; + +diff --git a/include/grub/i386/multiboot.h b/include/grub/i386/multiboot.h +index 807a1de27..9cd97dfce 100644 +--- a/include/grub/i386/multiboot.h ++++ b/include/grub/i386/multiboot.h +@@ -19,6 +19,13 @@ + #ifndef GRUB_MULTIBOOT_CPU_HEADER + #define GRUB_MULTIBOOT_CPU_HEADER 1 + ++#define MULTIBOOT2_INITIAL_STATE { .eax = MULTIBOOT2_BOOTLOADER_MAGIC, \ ++ .ecx = 0, \ ++ .edx = 0, \ ++ /* Set esp to some random location in low memory to avoid breaking */ \ ++ /* non-compliant kernels. */ \ ++ .esp = 0x7ff00 \ ++ } + #define MULTIBOOT_INITIAL_STATE { .eax = MULTIBOOT_BOOTLOADER_MAGIC, \ + .ecx = 0, \ + .edx = 0, \ +@@ -28,7 +35,7 @@ + } + #define MULTIBOOT_ENTRY_REGISTER eip + #define MULTIBOOT_MBI_REGISTER ebx +-#define MULTIBOOT_ARCHITECTURE_CURRENT MULTIBOOT_ARCHITECTURE_I386 ++#define MULTIBOOT2_ARCHITECTURE_CURRENT MULTIBOOT2_ARCHITECTURE_I386 + + #ifdef GRUB_MACHINE_EFI + #ifdef __x86_64__ +diff --git a/include/grub/mips/multiboot.h b/include/grub/mips/multiboot.h +index 4aebf29e7..c4eee2dd0 100644 +--- a/include/grub/mips/multiboot.h ++++ b/include/grub/mips/multiboot.h +@@ -19,11 +19,11 @@ + #ifndef GRUB_MULTIBOOT_CPU_HEADER + #define GRUB_MULTIBOOT_CPU_HEADER 1 + +-#define MULTIBOOT_INITIAL_STATE { .gpr[4] = MULTIBOOT_BOOTLOADER_MAGIC, \ ++#define MULTIBOOT2_INITIAL_STATE { .gpr[4] = MULTIBOOT2_BOOTLOADER_MAGIC, \ + .jumpreg = 1 } + #define MULTIBOOT_ENTRY_REGISTER gpr[1] + #define MULTIBOOT_MBI_REGISTER gpr[5] +-#define MULTIBOOT_ARCHITECTURE_CURRENT MULTIBOOT_ARCHITECTURE_MIPS32 ++#define MULTIBOOT2_ARCHITECTURE_CURRENT MULTIBOOT_ARCHITECTURE_MIPS32 + + #define MULTIBOOT_ELF32_MACHINE EM_MIPS + #define MULTIBOOT_ELF64_MACHINE EM_MIPS +diff --git a/include/grub/multiboot.h b/include/grub/multiboot.h +index c96492bb5..bd0a9873e 100644 +--- a/include/grub/multiboot.h ++++ b/include/grub/multiboot.h +@@ -22,19 +22,11 @@ + + #include + +-#ifdef GRUB_USE_MULTIBOOT2 +-#include +-/* Same thing as far as our loader is concerned. */ +-#define MULTIBOOT_BOOTLOADER_MAGIC MULTIBOOT2_BOOTLOADER_MAGIC +-#define MULTIBOOT_HEADER_MAGIC MULTIBOOT2_HEADER_MAGIC +-#else + #include +-#endif + + #include + #include + +-#ifndef GRUB_USE_MULTIBOOT2 + typedef enum + { + GRUB_MULTIBOOT_QUIRKS_NONE = 0, +@@ -42,7 +34,6 @@ typedef enum + GRUB_MULTIBOOT_QUIRK_MODULES_AFTER_KERNEL = 2 + } grub_multiboot_quirks_t; + extern grub_multiboot_quirks_t grub_multiboot_quirks; +-#endif + + extern struct grub_relocator *grub_multiboot_relocator; + +@@ -60,7 +51,7 @@ void + grub_multiboot_add_elfsyms (grub_size_t num, grub_size_t entsize, + unsigned shndx, void *data); + +-grub_uint32_t grub_get_multiboot_mmap_count (void); ++grub_uint32_t grub_multiboot_get_mmap_count (void); + grub_err_t grub_multiboot_set_video_mode (void); + + /* FIXME: support coreboot as well. */ +diff --git a/include/multiboot2.h b/include/multiboot2.h +index 5a3db5a7c..5693923c0 100644 +--- a/include/multiboot2.h ++++ b/include/multiboot2.h +@@ -75,8 +75,8 @@ + #define MULTIBOOT_HEADER_TAG_ENTRY_ADDRESS_EFI64 9 + #define MULTIBOOT_HEADER_TAG_RELOCATABLE 10 + +-#define MULTIBOOT_ARCHITECTURE_I386 0 +-#define MULTIBOOT_ARCHITECTURE_MIPS32 4 ++#define MULTIBOOT2_ARCHITECTURE_I386 0 ++#define MULTIBOOT2_ARCHITECTURE_MIPS32 4 + #define MULTIBOOT_HEADER_TAG_OPTIONAL 1 + + #define MULTIBOOT_LOAD_PREFERENCE_NONE 0 +-- +2.14.3 + diff --git a/0067-Fix-symbols-appearing-in-several-modules-in-linux.patch b/0067-Fix-symbols-appearing-in-several-modules-in-linux.patch new file mode 100644 index 0000000..85773f1 --- /dev/null +++ b/0067-Fix-symbols-appearing-in-several-modules-in-linux.patch @@ -0,0 +1,67 @@ +From 26e5aea9418aab83df0debd0c672086fa9f2d9c8 Mon Sep 17 00:00:00 2001 +From: Vladimir Serbinenko +Date: Mon, 14 Aug 2017 14:09:30 +0200 +Subject: [PATCH 067/225] Fix symbols appearing in several modules in linux*. + +If same symbol is provided by 2 modules its semantics are undefined. +Avoid this by depending rather than double-including files. +--- + grub-core/Makefile.core.def | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) + +diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def +index 8d57a59a0..66144222c 100644 +--- a/grub-core/Makefile.core.def ++++ b/grub-core/Makefile.core.def +@@ -770,6 +770,7 @@ module = { + module = { + name = boot; + common = commands/boot.c; ++ common = lib/cmdline.c; + i386_pc = lib/i386/pc/biosnum.c; + enable = x86; + enable = emu; +@@ -1630,8 +1631,6 @@ module = { + module = { + name = linux16; + common = loader/i386/pc/linux.c; +- common = loader/linux.c; +- common = lib/cmdline.c; + enable = x86; + }; + +@@ -1666,7 +1665,6 @@ module = { + cppflags = "-DGRUB_USE_MULTIBOOT2"; + + common = loader/multiboot.c; +- common = lib/cmdline.c; + common = loader/multiboot_mbi2.c; + enable = x86; + enable = mips; +@@ -1675,7 +1673,6 @@ module = { + module = { + name = multiboot; + common = loader/multiboot.c; +- common = lib/cmdline.c; + x86 = loader/i386/multiboot_mbi.c; + extra_dist = loader/multiboot_elfxx.c; + enable = x86; +@@ -1683,7 +1680,6 @@ module = { + + module = { + name = xen_boot; +- common = lib/cmdline.c; + arm64 = loader/arm64/xen_boot.c; + enable = arm64; + }; +@@ -1700,7 +1696,6 @@ module = { + arm = loader/arm/linux.c; + arm64 = loader/arm64/linux.c; + common = loader/linux.c; +- common = lib/cmdline.c; + enable = noemu; + }; + +-- +2.14.3 + diff --git a/0068-genmoddep-Check-that-no-modules-provide-the-same-sym.patch b/0068-genmoddep-Check-that-no-modules-provide-the-same-sym.patch new file mode 100644 index 0000000..d86693f --- /dev/null +++ b/0068-genmoddep-Check-that-no-modules-provide-the-same-sym.patch @@ -0,0 +1,30 @@ +From 3732816bc08ef605ed3b6c016ff0ed562829f243 Mon Sep 17 00:00:00 2001 +From: Vladimir Serbinenko +Date: Mon, 14 Aug 2017 14:10:48 +0200 +Subject: [PATCH 068/225] genmoddep: Check that no modules provide the same + symbol. + +The semantics of 2 modules providing the same symbol are undefined. So +ensure that it doesn't happen. +--- + grub-core/genmoddep.awk | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/grub-core/genmoddep.awk b/grub-core/genmoddep.awk +index bd98d84cd..8976beb91 100644 +--- a/grub-core/genmoddep.awk ++++ b/grub-core/genmoddep.awk +@@ -18,6 +18,10 @@ BEGIN { + + { + if ($1 == "defined") { ++ if ($3 in symtab) { ++ printf "%s in %s is duplicated in %s\n", $3, $2, symtab[$3] >"/dev/stderr"; ++ error++; ++ } + symtab[$3] = $2; + modtab[$2] = "" modtab[$2] + } else if ($1 == "undefined") { +-- +2.14.3 + diff --git a/0069-yylex-Explicilty-cast-fprintf-to-void.patch b/0069-yylex-Explicilty-cast-fprintf-to-void.patch new file mode 100644 index 0000000..6da6cbb --- /dev/null +++ b/0069-yylex-Explicilty-cast-fprintf-to-void.patch @@ -0,0 +1,26 @@ +From c36c2a86404f373100775305f532c09d46f3c6ce Mon Sep 17 00:00:00 2001 +From: Vladimir Serbinenko +Date: Mon, 14 Aug 2017 14:11:43 +0200 +Subject: [PATCH 069/225] yylex: Explicilty cast fprintf to void. + +It's needed to avoid warning on recent GCC. +--- + grub-core/script/yylex.l | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/grub-core/script/yylex.l b/grub-core/script/yylex.l +index 95b219170..7b44c37b7 100644 +--- a/grub-core/script/yylex.l ++++ b/grub-core/script/yylex.l +@@ -91,7 +91,7 @@ typedef size_t yy_size_t; + #define stdin 0 + #define stdout 0 + +-#define fprintf(...) 0 ++#define fprintf(...) (void)0 + #define exit(...) grub_fatal("fatal error in lexer") + #endif + +-- +2.14.3 + diff --git a/0070-linux-fixup.patch b/0070-linux-fixup.patch new file mode 100644 index 0000000..1d3599d --- /dev/null +++ b/0070-linux-fixup.patch @@ -0,0 +1,32 @@ +From 6cc79ec10ccafc5935d776e4a396193b93d7e842 Mon Sep 17 00:00:00 2001 +From: Vladimir Serbinenko +Date: Mon, 14 Aug 2017 16:23:52 +0200 +Subject: [PATCH 070/225] linux fixup + +--- + grub-core/Makefile.core.def | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def +index 66144222c..6edf68286 100644 +--- a/grub-core/Makefile.core.def ++++ b/grub-core/Makefile.core.def +@@ -770,7 +770,6 @@ module = { + module = { + name = boot; + common = commands/boot.c; +- common = lib/cmdline.c; + i386_pc = lib/i386/pc/biosnum.c; + enable = x86; + enable = emu; +@@ -1696,6 +1695,7 @@ module = { + arm = loader/arm/linux.c; + arm64 = loader/arm64/linux.c; + common = loader/linux.c; ++ common = lib/cmdline.c; + enable = noemu; + }; + +-- +2.14.3 + diff --git a/0071-multiboot-fixup.patch b/0071-multiboot-fixup.patch new file mode 100644 index 0000000..f4b7637 --- /dev/null +++ b/0071-multiboot-fixup.patch @@ -0,0 +1,43 @@ +From 4bfd26623f590c8f19c516f4edd342ff18f07bc1 Mon Sep 17 00:00:00 2001 +From: Vladimir Serbinenko +Date: Mon, 14 Aug 2017 16:24:05 +0200 +Subject: [PATCH 071/225] multiboot fixup + +--- + grub-core/loader/multiboot.c | 5 ++++- + include/grub/mips/multiboot.h | 2 +- + 2 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/grub-core/loader/multiboot.c b/grub-core/loader/multiboot.c +index bd3dc1990..3b57cb132 100644 +--- a/grub-core/loader/multiboot.c ++++ b/grub-core/loader/multiboot.c +@@ -138,8 +138,11 @@ static void + efi_boot (struct grub_relocator *rel, + grub_uint32_t target) + { ++#ifdef GRUB_USE_MULTIBOOT2 ++ struct grub_relocator_efi_state state_efi = MULTIBOOT2_EFI_INITIAL_STATE; ++#else + struct grub_relocator_efi_state state_efi = MULTIBOOT_EFI_INITIAL_STATE; +- ++#endif + state_efi.MULTIBOOT_EFI_ENTRY_REGISTER = grub_multiboot_payload_eip; + state_efi.MULTIBOOT_EFI_MBI_REGISTER = target; + +diff --git a/include/grub/mips/multiboot.h b/include/grub/mips/multiboot.h +index c4eee2dd0..cdfb41e31 100644 +--- a/include/grub/mips/multiboot.h ++++ b/include/grub/mips/multiboot.h +@@ -23,7 +23,7 @@ + .jumpreg = 1 } + #define MULTIBOOT_ENTRY_REGISTER gpr[1] + #define MULTIBOOT_MBI_REGISTER gpr[5] +-#define MULTIBOOT2_ARCHITECTURE_CURRENT MULTIBOOT_ARCHITECTURE_MIPS32 ++#define MULTIBOOT2_ARCHITECTURE_CURRENT MULTIBOOT2_ARCHITECTURE_MIPS32 + + #define MULTIBOOT_ELF32_MACHINE EM_MIPS + #define MULTIBOOT_ELF64_MACHINE EM_MIPS +-- +2.14.3 + diff --git a/0072-enforcing-fixup.patch b/0072-enforcing-fixup.patch new file mode 100644 index 0000000..824339a --- /dev/null +++ b/0072-enforcing-fixup.patch @@ -0,0 +1,25 @@ +From 6ccb2d54bce2eef8e71b93b467c0f49253835c74 Mon Sep 17 00:00:00 2001 +From: Vladimir Serbinenko +Date: Mon, 14 Aug 2017 16:27:10 +0200 +Subject: [PATCH 072/225] enforcing fixup + +--- + grub-core/genmoddep.awk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/grub-core/genmoddep.awk b/grub-core/genmoddep.awk +index 8976beb91..04c2863e5 100644 +--- a/grub-core/genmoddep.awk ++++ b/grub-core/genmoddep.awk +@@ -18,7 +18,7 @@ BEGIN { + + { + if ($1 == "defined") { +- if ($3 in symtab) { ++ if ($3 !~ /^\.refptr\./ && $3 in symtab) { + printf "%s in %s is duplicated in %s\n", $3, $2, symtab[$3] >"/dev/stderr"; + error++; + } +-- +2.14.3 + diff --git a/0073-Set-have_exec-to-y-on-cygwin-so-we-have-grub_mkrescu.patch b/0073-Set-have_exec-to-y-on-cygwin-so-we-have-grub_mkrescu.patch new file mode 100644 index 0000000..38385ab --- /dev/null +++ b/0073-Set-have_exec-to-y-on-cygwin-so-we-have-grub_mkrescu.patch @@ -0,0 +1,27 @@ +From 5435aaac3c8bfb14bb01a826ec747b783947c86f Mon Sep 17 00:00:00 2001 +From: Xuan Guo +Date: Mon, 14 Aug 2017 16:27:53 +0200 +Subject: [PATCH 073/225] Set have_exec to y on cygwin so we have + grub_mkrescue. + +--- + configure.ac | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 571f7a0b5..c7888e40f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -204,7 +204,8 @@ case "$host_os" in + esac + + case "$host_os" in +- cygwin | windows* | mingw32*) have_exec=n ;; ++ cygwin) have_exec=y ;; ++ windows* | mingw32*) have_exec=n ;; + aros*) have_exec=n ;; + *) have_exec=y;; + esac +-- +2.14.3 + diff --git a/0074-arc-Do-not-create-spurious-variable-grub_arc_memory_.patch b/0074-arc-Do-not-create-spurious-variable-grub_arc_memory_.patch new file mode 100644 index 0000000..388524b --- /dev/null +++ b/0074-arc-Do-not-create-spurious-variable-grub_arc_memory_.patch @@ -0,0 +1,26 @@ +From 3d86efda0074285fb86aa6ffe5d97327ebd134a4 Mon Sep 17 00:00:00 2001 +From: Vladimir Serbinenko +Date: Wed, 30 Aug 2017 15:18:24 +0200 +Subject: [PATCH 074/225] arc: Do not create spurious variable + grub_arc_memory_type_t. + +--- + include/grub/arc/arc.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/grub/arc/arc.h b/include/grub/arc/arc.h +index 7615a49a9..999de7196 100644 +--- a/include/grub/arc/arc.h ++++ b/include/grub/arc/arc.h +@@ -53,7 +53,7 @@ enum grub_arc_memory_type + #ifndef GRUB_CPU_WORDS_BIGENDIAN + GRUB_ARC_MEMORY_FREE_CONTIGUOUS, + #endif +- } grub_arc_memory_type_t; ++ }; + + struct grub_arc_timeinfo + { +-- +2.14.3 + diff --git a/0075-unix-exec-avoid-atexit-handlers-when-child-exits.patch b/0075-unix-exec-avoid-atexit-handlers-when-child-exits.patch new file mode 100644 index 0000000..38fbbc1 --- /dev/null +++ b/0075-unix-exec-avoid-atexit-handlers-when-child-exits.patch @@ -0,0 +1,73 @@ +From e75cf4a58b5eaf482804e5e1b2cc7d4399df350e Mon Sep 17 00:00:00 2001 +From: Patrick Steinhardt +Date: Mon, 28 Aug 2017 20:57:19 +0200 +Subject: [PATCH 075/225] unix exec: avoid atexit handlers when child exits + +The `grub_util_exec_redirect_all` helper function can be used to +spawn an executable and redirect its output to some files. After calling +`fork()`, the parent will wait for the child to terminate with +`waitpid()` while the child prepares its file descriptors, environment +and finally calls `execvp()`. If something in the children's setup +fails, it will stop by calling `exit(127)`. + +Calling `exit()` will cause any function registered via `atexit()` to be +executed, which is usually the wrong thing to do in a child. And +actually, one can easily observe faulty behaviour on musl-based systems +without modprobe(8) installed: executing `grub-install --help` will call +`grub_util_exec_redirect_all` with "modprobe", which obviously fails if +modprobe(8) is not installed. Due to the child now exiting and invoking +the `atexit()` handlers, it will clean up some data structures of the +parent and cause it to be deadlocked in the `waitpid()` syscall. + +The issue can easily be fixed by calling `_exit(127)` instead, which is +especially designed to be called when the atexit-handlers should not be +executed. + +Signed-off-by: Patrick Steinhardt +--- + grub-core/osdep/unix/exec.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/grub-core/osdep/unix/exec.c b/grub-core/osdep/unix/exec.c +index 935ff120e..db3259f65 100644 +--- a/grub-core/osdep/unix/exec.c ++++ b/grub-core/osdep/unix/exec.c +@@ -99,7 +99,7 @@ grub_util_exec_redirect_all (const char *const *argv, const char *stdin_file, + { + fd = open (stdin_file, O_RDONLY); + if (fd < 0) +- exit (127); ++ _exit (127); + dup2 (fd, STDIN_FILENO); + close (fd); + } +@@ -108,7 +108,7 @@ grub_util_exec_redirect_all (const char *const *argv, const char *stdin_file, + { + fd = open (stdout_file, O_WRONLY | O_CREAT, 0700); + if (fd < 0) +- exit (127); ++ _exit (127); + dup2 (fd, STDOUT_FILENO); + close (fd); + } +@@ -117,7 +117,7 @@ grub_util_exec_redirect_all (const char *const *argv, const char *stdin_file, + { + fd = open (stderr_file, O_WRONLY | O_CREAT, 0700); + if (fd < 0) +- exit (127); ++ _exit (127); + dup2 (fd, STDERR_FILENO); + close (fd); + } +@@ -126,7 +126,7 @@ grub_util_exec_redirect_all (const char *const *argv, const char *stdin_file, + setenv ("LC_ALL", "C", 1); + + execvp ((char *) argv[0], (char **) argv); +- exit (127); ++ _exit (127); + } + waitpid (pid, &status, 0); + if (!WIFEXITED (status)) +-- +2.14.3 + diff --git a/0076-xfs-Don-t-attempt-to-iterate-over-empty-directory.patch b/0076-xfs-Don-t-attempt-to-iterate-over-empty-directory.patch new file mode 100644 index 0000000..6d7b05c --- /dev/null +++ b/0076-xfs-Don-t-attempt-to-iterate-over-empty-directory.patch @@ -0,0 +1,27 @@ +From c42acc23ff91ea0170eab5f1e10499dcfc4e0c92 Mon Sep 17 00:00:00 2001 +From: Vladimir Serbinenko +Date: Wed, 30 Aug 2017 15:56:19 +0200 +Subject: [PATCH 076/225] xfs: Don't attempt to iterate over empty directory. + +Reported by: Tuomas Tynkkynen +--- + grub-core/fs/xfs.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/grub-core/fs/xfs.c b/grub-core/fs/xfs.c +index 9f66dd6e4..c6031bd3f 100644 +--- a/grub-core/fs/xfs.c ++++ b/grub-core/fs/xfs.c +@@ -828,6 +828,9 @@ grub_xfs_iterate_dir (grub_fshelp_node_t dir, + entries = (grub_be_to_cpu32 (tail->leaf_count) + - grub_be_to_cpu32 (tail->leaf_stale)); + ++ if (!entries) ++ continue; ++ + /* Iterate over all entries within this block. */ + while ((char *)direntry < (char *)tail) + { +-- +2.14.3 + diff --git a/0077-Implement-checksum-verification-for-gunzip.patch b/0077-Implement-checksum-verification-for-gunzip.patch new file mode 100644 index 0000000..2a14cd7 --- /dev/null +++ b/0077-Implement-checksum-verification-for-gunzip.patch @@ -0,0 +1,130 @@ +From b18ce97c672615bb5ac44883676b37a9ec758d83 Mon Sep 17 00:00:00 2001 +From: Stefan Fritsch +Date: Sun, 1 May 2016 14:32:30 +0200 +Subject: [PATCH 077/225] Implement checksum verification for gunzip + +This implements the crc32 check for the gzip format. Support for zlib's +adler checksum is not included, yet. +--- + grub-core/io/gzio.c | 46 +++++++++++++++++++++++++++++++++++++++++----- + 1 file changed, 41 insertions(+), 5 deletions(-) + +diff --git a/grub-core/io/gzio.c b/grub-core/io/gzio.c +index a8e33033b..dcf3a8701 100644 +--- a/grub-core/io/gzio.c ++++ b/grub-core/io/gzio.c +@@ -43,6 +43,7 @@ + #include + #include + #include ++#include + + GRUB_MOD_LICENSE ("GPLv3+"); + +@@ -94,6 +95,14 @@ struct grub_gzio + struct huft *tl; + /* The distance code table. */ + struct huft *td; ++ /* The checksum algorithm */ ++ const gcry_md_spec_t *hdesc; ++ /* The wanted checksum */ ++ grub_uint32_t orig_checksum; ++ /* The uncompressed length */ ++ grub_size_t orig_len; ++ /* Context for checksum calculation */ ++ grub_uint8_t *hcontext; + /* The lookup bits for the literal/length code table. */ + int bl; + /* The lookup bits for the distance code table. */ +@@ -180,7 +189,7 @@ test_gzip_header (grub_file_t file) + grub_uint8_t os_type; + } hdr; + grub_uint16_t extra_len; +- grub_uint32_t orig_len; ++ grub_uint32_t crc32; + grub_gzio_t gzio = file->data; + + if (grub_file_tell (gzio->file) != 0) +@@ -215,12 +224,15 @@ test_gzip_header (grub_file_t file) + + /* FIXME: don't do this on not easily seekable files. */ + { +- grub_file_seek (gzio->file, grub_file_size (gzio->file) - 4); +- if (grub_file_read (gzio->file, &orig_len, 4) != 4) ++ grub_file_seek (gzio->file, grub_file_size (gzio->file) - 8); ++ if (grub_file_read (gzio->file, &crc32, 4) != 4) ++ return 0; ++ gzio->orig_checksum = grub_le_to_cpu32 (crc32); ++ if (grub_file_read (gzio->file, &gzio->orig_len, 4) != 4) + return 0; + /* FIXME: this does not handle files whose original size is over 4GB. + But how can we know the real original size? */ +- file->size = grub_le_to_cpu32 (orig_len); ++ file->size = grub_le_to_cpu32 (gzio->orig_len); + } + + initialize_tables (gzio); +@@ -1095,7 +1107,23 @@ inflate_window (grub_gzio_t gzio) + + gzio->saved_offset += gzio->wp; + +- /* XXX do CRC calculation here! */ ++ if (gzio->hcontext) ++ { ++ gzio->hdesc->write (gzio->hcontext, gzio->slide, gzio->wp); ++ ++ if (gzio->saved_offset == gzio->orig_len) ++ { ++ grub_uint32_t csum; ++ ++ gzio->hdesc->final (gzio->hcontext); ++ csum = *(grub_uint32_t *)gzio->hdesc->read (gzio->hcontext); ++ csum = grub_be_to_cpu32 (csum); ++ if (csum != gzio->orig_checksum) ++ grub_error (GRUB_ERR_BAD_COMPRESSED_DATA, ++ "checksum mismatch %08x/%08x", ++ gzio->orig_checksum, csum); ++ } ++ } + } + + +@@ -1118,6 +1146,9 @@ initialize_tables (grub_gzio_t gzio) + huft_free (gzio->td); + gzio->tl = NULL; + gzio->td = NULL; ++ ++ if (gzio->hcontext) ++ gzio->hdesc->init(gzio->hcontext); + } + + +@@ -1143,6 +1174,9 @@ grub_gzio_open (grub_file_t io, const char *name __attribute__ ((unused))) + + gzio->file = io; + ++ gzio->hdesc = GRUB_MD_CRC32; ++ gzio->hcontext = grub_malloc(gzio->hdesc->contextsize); ++ + file->device = io->device; + file->data = gzio; + file->fs = &grub_gzio_fs; +@@ -1151,6 +1185,7 @@ grub_gzio_open (grub_file_t io, const char *name __attribute__ ((unused))) + if (! test_gzip_header (file)) + { + grub_errno = GRUB_ERR_NONE; ++ grub_free (gzio->hcontext); + grub_free (gzio); + grub_free (file); + grub_file_seek (io, 0); +@@ -1287,6 +1322,7 @@ grub_gzio_close (grub_file_t file) + grub_file_close (gzio->file); + huft_free (gzio->tl); + huft_free (gzio->td); ++ grub_free (gzio->hcontext); + grub_free (gzio); + + /* No need to close the same device twice. */ +-- +2.14.3 + diff --git a/0078-qemu-coreboot-multiboot-Change-linking-address-to-0x.patch b/0078-qemu-coreboot-multiboot-Change-linking-address-to-0x.patch new file mode 100644 index 0000000..fb69c03 --- /dev/null +++ b/0078-qemu-coreboot-multiboot-Change-linking-address-to-0x.patch @@ -0,0 +1,57 @@ +From ec763ed00ac55deb1c429bda5057bd5a147183d1 Mon Sep 17 00:00:00 2001 +From: Vladimir Serbinenko +Date: Wed, 30 Aug 2017 16:29:59 +0200 +Subject: [PATCH 078/225] qemu, coreboot, multiboot: Change linking address to + 0x9000. + +It's common for distros to use a defective ld which links at 0x9000. Instead +of fighting it, just move link target to 0x9000. +--- + grub-core/Makefile.core.def | 6 +++--- + include/grub/offsets.h | 4 ++-- + 2 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def +index 6edf68286..d90ad6220 100644 +--- a/grub-core/Makefile.core.def ++++ b/grub-core/Makefile.core.def +@@ -68,11 +68,11 @@ kernel = { + i386_pc_ldflags = '$(TARGET_IMG_LDFLAGS)'; + i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x9000'; + i386_qemu_ldflags = '$(TARGET_IMG_LDFLAGS)'; +- i386_qemu_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x8200'; ++ i386_qemu_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x9000'; + i386_coreboot_ldflags = '$(TARGET_IMG_LDFLAGS)'; +- i386_coreboot_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x8200'; ++ i386_coreboot_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x9000'; + i386_multiboot_ldflags = '$(TARGET_IMG_LDFLAGS)'; +- i386_multiboot_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x8200'; ++ i386_multiboot_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x9000'; + i386_ieee1275_ldflags = '$(TARGET_IMG_LDFLAGS)'; + i386_ieee1275_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x10000'; + i386_xen_ldflags = '$(TARGET_IMG_LDFLAGS)'; +diff --git a/include/grub/offsets.h b/include/grub/offsets.h +index bf0689fc9..330e4c707 100644 +--- a/include/grub/offsets.h ++++ b/include/grub/offsets.h +@@ -50,7 +50,7 @@ + /* The offset of GRUB_CORE_ENTRY_ADDR. */ + #define GRUB_KERNEL_I386_QEMU_CORE_ENTRY_ADDR 0x8 + +-#define GRUB_KERNEL_I386_QEMU_LINK_ADDR 0x8200 ++#define GRUB_KERNEL_I386_QEMU_LINK_ADDR 0x9000 + + /* The offset of GRUB_TOTAL_MODULE_SIZE. */ + #define GRUB_KERNEL_SPARC64_IEEE1275_TOTAL_MODULE_SIZE 0x8 +@@ -91,7 +91,7 @@ + + #define GRUB_KERNEL_MIPS_ARC_TOTAL_MODULE_SIZE 0x08 + +-#define GRUB_KERNEL_I386_COREBOOT_LINK_ADDR 0x8200 ++#define GRUB_KERNEL_I386_COREBOOT_LINK_ADDR 0x9000 + #define GRUB_KERNEL_I386_COREBOOT_MODULES_ADDR 0x100000 + + #define GRUB_KERNEL_I386_IEEE1275_LINK_ADDR 0x10000 +-- +2.14.3 + diff --git a/0079-printf_unit_test-Disable-Wformat-truncation-on-GCC-7.patch b/0079-printf_unit_test-Disable-Wformat-truncation-on-GCC-7.patch new file mode 100644 index 0000000..828e011 --- /dev/null +++ b/0079-printf_unit_test-Disable-Wformat-truncation-on-GCC-7.patch @@ -0,0 +1,29 @@ +From 32099228e6ccf209f64d509cd7e13413ea10778e Mon Sep 17 00:00:00 2001 +From: Vladimir Serbinenko +Date: Wed, 30 Aug 2017 16:59:25 +0200 +Subject: [PATCH 079/225] printf_unit_test: Disable Wformat-truncation on GCC + >= 7 + +We intentionally pass NULL as argument to format, hence disable the warning. +--- + tests/printf_unit_test.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/tests/printf_unit_test.c b/tests/printf_unit_test.c +index d7b12c6db..098c29fd9 100644 +--- a/tests/printf_unit_test.c ++++ b/tests/printf_unit_test.c +@@ -23,6 +23,10 @@ + + #define MSG "printf test failed: %s, %s", real, expected + ++#if defined(__GNUC__) && __GNUC__ >= 7 ++#pragma GCC diagnostic ignored "-Wformat-truncation=" ++#endif ++ + static void + printf_test (void) + { +-- +2.14.3 + diff --git a/0080-Regenerate-checksum.h-with-newer-unifont.patch b/0080-Regenerate-checksum.h-with-newer-unifont.patch new file mode 100644 index 0000000..1ae8631 --- /dev/null +++ b/0080-Regenerate-checksum.h-with-newer-unifont.patch @@ -0,0 +1,277 @@ +From 061258a05edd7077f3cb15f51bda2823f513d261 Mon Sep 17 00:00:00 2001 +From: Vladimir Serbinenko +Date: Wed, 30 Aug 2017 17:12:04 +0200 +Subject: [PATCH 080/225] Regenerate checksum.h with newer unifont. + +Old link is broken. New unifont is +http://ftp.de.debian.org/debian/pool/main/u/unifont/xfonts-unifont_9.0.06-2_all.deb +--- + grub-core/tests/checksums.h | 258 ++++++++++++++++++++++---------------------- + 1 file changed, 129 insertions(+), 129 deletions(-) + +diff --git a/grub-core/tests/checksums.h b/grub-core/tests/checksums.h +index 921e57ff4..8273bd105 100644 +--- a/grub-core/tests/checksums.h ++++ b/grub-core/tests/checksums.h +@@ -1,129 +1,129 @@ +- { "cmdline_cat", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x8851b0ee, 0x8851b0ee, 0xafb59f0b, 0xafb59f0b, 0x8c9b72f1, 0x8c9b72f1, 0x6eec5116, 0x6eec5116, 0xad82053e, 0xad82053e, 0x2eeae2ae, 0x2eeae2ae, 0x58cf8def, 0x58cf8def, 0x926f4d2f, 0x926f4d2f, 0xbd1c3236, 0xbd1c3236, 0x56012a95, 0x56012a95, 0x6d7c40ae, 0x6d7c40ae, 0xef750bc8, 0xef750bc8, 0x1080dd4a, 0x1080dd4a, 0xd7f9e5af, 0xd7f9e5af, 0x80b1b4a9, 0x80b1b4a9, 0x2c99415e, 0x2c99415e, 0x8d5761ff, 0x8d5761ff, 0xb964b489, 0xb964b489, 0x88a51f74, 0x88a51f74, 0x1da6c458, 0x1da6c458, 0x85e94025, 0x206ea54f, 0x7ee6c8fd, 0x7ee6c8fd, }, 45 }, +- { "cmdline_cat", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x834b70a0, 0x834b70a0, 0xe7cc129f, 0xe7cc129f, 0x5ee2edc, 0x5ee2edc, 0xa1135cd7, 0xa1135cd7, 0xf7ce1f26, 0xf7ce1f26, 0xe9f803e8, 0xe9f803e8, 0x4b8f9724, 0x4b8f9724, 0x3fe3771a, 0x3fe3771a, 0x5584ee63, 0x5584ee63, 0xac193250, 0xac193250, 0x801f25f4, 0x801f25f4, 0x8d33aece, 0x8d33aece, 0xc6d95edc, 0xc6d95edc, 0xf121dee2, 0xf121dee2, 0x6ab10812, 0x6ab10812, 0x41a5b112, 0x41a5b112, 0xac6f712b, 0xac6f712b, 0x8aee7a19, 0x8aee7a19, 0xfe37c0ad, 0xfe37c0ad, 0x99c6a336, 0x99c6a336, 0x53b844c6, 0x73015447, 0x7a1a2254, 0x7a1a2254, }, 45 }, +- { "cmdline_cat", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xb121c912, 0xb121c912, 0x635a8739, 0x635a8739, 0x8288cba6, 0x8288cba6, 0xf5589d0, 0xf5589d0, 0x471642b3, 0x471642b3, 0xfb4826cf, 0xfb4826cf, 0x8b1083cf, 0x8b1083cf, 0x738b0c94, 0x738b0c94, 0x859c41b0, 0x859c41b0, 0x7c8d1be9, 0x7c8d1be9, 0x5b685e40, 0x5b685e40, 0x9cf80d95, 0x9cf80d95, 0x3541f915, 0x3541f915, 0x582b8557, 0x582b8557, 0x24cf88f7, 0x24cf88f7, 0x9e0af23, 0x9e0af23, 0x1033164b, 0x1033164b, 0x70ba51e2, 0x70ba51e2, 0xb051585c, 0xb051585c, 0xe1389f04, 0xe1389f04, 0x308bbb74, 0xdc9e6805, 0x4ddcff9f, 0x4ddcff9f, }, 45 }, +- { "cmdline_cat", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0xac16e832, 0xac16e832, 0xbf6ab9c6, 0xbf6ab9c6, 0x1063e15a, 0x1063e15a, 0xf908e3ff, 0xf908e3ff, 0xcb37d841, 0xcb37d841, 0x9b8ffa7d, 0x9b8ffa7d, 0x38d2a26c, 0x38d2a26c, 0x6989f09b, 0x6989f09b, 0x481451e, 0x481451e, 0x17b3177, 0x17b3177, 0x3ea52aeb, 0x3ea52aeb, 0xc24de674, 0xc24de674, 0x4ab163cc, 0x4ab163cc, 0xc482b092, 0xc482b092, 0x55ffc7e2, 0x55ffc7e2, 0x3b4b34dd, 0x3b4b34dd, 0x9b1f047f, 0x9b1f047f, 0x3d42e414, 0x3d42e414, 0x35b2fb06, 0x35b2fb06, 0xb813b35f, 0xb813b35f, 0xc3ede6e0, 0xc35214c3, 0x340f0107, 0x340f0107, }, 45 }, +- { "cmdline_cat", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x9c47caee, 0x9c47caee, 0x6c9c4f38, 0x6c9c4f38, 0x79c49615, 0x79c49615, 0x70fe9708, 0x70fe9708, 0x8e90c077, 0x8e90c077, 0xd8205b47, 0xd8205b47, 0xa34337e2, 0xa34337e2, 0xf4dffa53, 0xf4dffa53, 0x90a0779c, 0x90a0779c, 0x322820bb, 0x322820bb, 0x50e3383f, 0x50e3383f, 0x4a976e3e, 0x4a976e3e, 0x90b6f8d9, 0x90b6f8d9, 0x4058c301, 0x4058c301, 0x221a6810, 0x221a6810, 0x1f78a00e, 0x1f78a00e, 0x6a633d2c, 0x6a633d2c, 0xca177c65, 0xca177c65, 0xabb6c7f9, 0xabb6c7f9, 0x635a35e8, 0x635a35e8, 0x6da78f10, 0x53467ff8, 0xd037fdfa, 0xd037fdfa, }, 45 }, +- { "cmdline_cat", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0x2b6b8225, 0x2b6b8225, 0x83df9995, 0x83df9995, 0x5165ad0b, 0x5165ad0b, 0xe5a6f96d, 0xe5a6f96d, 0x798df957, 0x798df957, 0x8c0567e2, 0x8c0567e2, 0x5e5d7389, 0x5e5d7389, 0x47a39dd, 0x47a39dd, 0x894f44af, 0x894f44af, 0x1dff0a6, 0x1dff0a6, 0xf496e67b, 0xf496e67b, 0x29cb5702, 0x29cb5702, 0xeaf1387d, 0xeaf1387d, 0x4a9bf7, 0x4a9bf7, 0x11d20bee, 0x11d20bee, 0xa103dc2d, 0xa103dc2d, 0xd0265db9, 0xd0265db9, 0x42267334, 0x42267334, 0x96f85e8c, 0x96f85e8c, 0xa28eac49, 0xa28eac49, 0x4e660ae7, 0x70741b3, 0x183f2f2e, 0x183f2f2e, }, 45 }, +- { "cmdline_cat", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x77b51f44, 0x77b51f44, 0xc8097569, 0xc8097569, 0x769aee5f, 0x769aee5f, 0xa35e159, 0xa35e159, 0x87a6341f, 0x87a6341f, 0xb61d944b, 0xb61d944b, 0x8b109cb3, 0x8b109cb3, 0xed3fb3e, 0xed3fb3e, 0xd7cc6c3, 0xd7cc6c3, 0x52077f0d, 0x52077f0d, 0x9d86d17e, 0x9d86d17e, 0x5e487bb, 0x5e487bb, 0x3a00041b, 0x3a00041b, 0xcfdeaf9e, 0xcfdeaf9e, 0x3e40af89, 0x3e40af89, 0x5ec41ea9, 0x5ec41ea9, 0x6298e4e7, 0x6298e4e7, 0xfd67f90e, 0xfd67f90e, 0x5ab5dc32, 0x5ab5dc32, 0xdd3ad694, 0xdd3ad694, 0x391222b4, 0xd4a98b43, 0xeaa2f62, 0xeaa2f62, }, 45 }, +- { "gfxterm_menu", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x45b0713c, 0x237f9dbf, 0x45b0713c, 0x646bc7b, 0x59c36f00, 0x59c36f00, 0x7fd94135, 0x7fd94135, 0x7fd94135, 0x1592c53, 0x1592c53, 0x1592c53, 0x63af3981, 0x63af3981, 0x63af3981, 0x59c36f00, 0x646bc7b, 0x646bc7b, 0x59c36f00, }, 20 }, +- { "gfxterm_menu", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x84abc7db, 0x20814063, 0x84abc7db, 0xaaae42a4, 0xaa4593fe, 0xaa4593fe, 0x2e88732f, 0x2e88732f, 0x2e88732f, 0x887d7e48, 0x887d7e48, 0x887d7e48, 0xa545d530, 0xa545d530, 0xa545d530, 0xaa4593fe, 0xaaae42a4, 0xaaae42a4, 0xaa4593fe, }, 20 }, +- { "gfxterm_menu", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0x5b85371a, 0xe10968c2, 0x5b85371a, 0x6925a9e, 0xc9cbf769, 0xc9cbf769, 0xda1c9f17, 0xda1c9f17, 0xda1c9f17, 0x24c45edb, 0x24c45edb, 0x24c45edb, 0xcd8ee1d3, 0xcd8ee1d3, 0xcd8ee1d3, 0xc9cbf769, 0x6925a9e, 0x6925a9e, 0xc9cbf769, }, 20 }, +- { "gfxterm_menu", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x9130464d, 0x22904f7a, 0x9130464d, 0x3f660f95, 0x9813a416, 0x9813a416, 0xfb08d7cf, 0xfb08d7cf, 0xfb08d7cf, 0x6ad351fc, 0x6ad351fc, 0x6ad351fc, 0x73696c2c, 0x73696c2c, 0x73696c2c, 0x9813a416, 0x3f660f95, 0x3f660f95, 0x9813a416, }, 20 }, +- { "gfxterm_menu", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x5185b14e, 0x4173aa2f, 0x5185b14e, 0x272384fd, 0x5fcf013d, 0x5fcf013d, 0x9e56a9e0, 0x9e56a9e0, 0x9e56a9e0, 0x4c46b196, 0x4c46b196, 0x4c46b196, 0x5a358e09, 0x5a358e09, 0x5a358e09, 0x5fcf013d, 0x272384fd, 0x272384fd, 0x5fcf013d, }, 20 }, +- { "gfxterm_menu", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0x5cc0d3ef, 0x8b87731, 0x5cc0d3ef, 0x47c509e8, 0xdd28f52b, 0xdd28f52b, 0xe1579057, 0xe1579057, 0xe1579057, 0xc06b69b3, 0xc06b69b3, 0xc06b69b3, 0xbdd3a23f, 0xbdd3a23f, 0xbdd3a23f, 0xdd28f52b, 0x47c509e8, 0x47c509e8, 0xdd28f52b, }, 20 }, +- { "gfxterm_menu", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0xd1338a02, 0x7aa25dbf, 0xd1338a02, 0x2e8c9182, 0x43d1f34, 0x43d1f34, 0x6486f7c4, 0x6486f7c4, 0x6486f7c4, 0x1b8c5e6c, 0x1b8c5e6c, 0x1b8c5e6c, 0x82dd5bea, 0x82dd5bea, 0x82dd5bea, 0x43d1f34, 0x2e8c9182, 0x2e8c9182, 0x43d1f34, }, 20 }, +- { "gfxmenu", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x1027210c, 0x64e51c81, 0x1027210c, 0x45ca4a8a, 0x9a2e0d26, 0x2b88b6ce, 0x2b88b6ce, 0x2b88b6ce, 0x7750400e, 0x7750400e, 0x7750400e, 0x5ec88e9c, 0x5ec88e9c, 0x5ec88e9c, 0x59c36f00, 0x45ca4a8a, 0x45ca4a8a, }, 18 }, +- { "gfxmenu", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x8d12f697, 0xc5b32248, 0x8d12f697, 0x56720aa4, 0xa9d58ccd, 0xa1b1a1b5, 0xa1b1a1b5, 0xa1b1a1b5, 0xf4ee0bbf, 0xf4ee0bbf, 0xf4ee0bbf, 0x9dddc3f6, 0x9dddc3f6, 0x9dddc3f6, 0xaa4593fe, 0x56720aa4, 0x56720aa4, }, 18 }, +- { "gfxmenu", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xa5ec9f45, 0xdb7085d8, 0xa5ec9f45, 0x9caf1d3f, 0x5411be8b, 0xa07e74d3, 0xa07e74d3, 0xa07e74d3, 0xdfc0d247, 0xdfc0d247, 0xdfc0d247, 0x9db4b23f, 0x9db4b23f, 0x9db4b23f, 0xc9cbf769, 0x9caf1d3f, 0x9caf1d3f, }, 18 }, +- { "gfxmenu", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x1c3742c9, 0xce8e83bf, 0xeb96c838, 0xce8e83bf, 0x73cb3bc1, 0x740d78cf, 0x84312594, 0x84312594, 0x84312594, 0x6f94cfe8, 0x6f94cfe8, 0x6f94cfe8, 0x69dfcf18, 0x69dfcf18, 0x69dfcf18, 0x1c3742c9, 0x73cb3bc1, 0x73cb3bc1, }, 18 }, +- { "gfxmenu", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0xcc5a7bed, 0x56a03e51, 0xee7d8d4b, 0x56a03e51, 0x5bdf9413, 0xbcda144c, 0x131c0760, 0x131c0760, 0x131c0760, 0x7c55db71, 0x7c55db71, 0x7c55db71, 0x71a34572, 0x71a34572, 0x71a34572, 0xcc5a7bed, 0x5bdf9413, 0x5bdf9413, }, 18 }, +- { "gfxmenu", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xef4a3312, 0xea8a9cf0, 0x8929e522, 0xea8a9cf0, 0x78f3dfbc, 0x5d55a141, 0xb9092e0b, 0xb9092e0b, 0xb9092e0b, 0x7fbb6a15, 0x7fbb6a15, 0x7fbb6a15, 0x6bdebaaa, 0x6bdebaaa, 0x6bdebaaa, 0xef4a3312, 0x78f3dfbc, 0x78f3dfbc, }, 18 }, +- { "gfxmenu", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x54e48d80, 0x6dcf1d57, 0x925a4c8f, 0x6dcf1d57, 0x69005b38, 0x6d6bb4bc, 0x14f7c6b1, 0x14f7c6b1, 0x14f7c6b1, 0x95043060, 0x95043060, 0x95043060, 0x3a0890f, 0x3a0890f, 0x3a0890f, 0x54e48d80, 0x69005b38, 0x69005b38, }, 18 }, +- { "gfxterm_ar", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x77ff5efc, 0x791fe364, 0x77ff5efc, 0x340993bb, 0x59c36f00, 0x59c36f00, 0x3908ca1e, 0x3908ca1e, 0x3908ca1e, 0x4788a778, 0x4788a778, 0x4788a778, 0x257eb2aa, 0x257eb2aa, 0x257eb2aa, 0x59c36f00, 0x340993bb, 0x340993bb, 0x59c36f00, }, 20 }, +- { "gfxterm_ar", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0xb2d04b0f, 0x46cdbc23, 0xb2d04b0f, 0x9cd5ce70, 0xaa4593fe, 0xaa4593fe, 0x44bf6b37, 0x44bf6b37, 0x44bf6b37, 0xe24a6650, 0xe24a6650, 0xe24a6650, 0xcf72cd28, 0xcf72cd28, 0xcf72cd28, 0xaa4593fe, 0x9cd5ce70, 0x9cd5ce70, 0xaa4593fe, }, 20 }, +- { "gfxterm_ar", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0x4bb823b8, 0x59349835, 0x4bb823b8, 0x16af4e3c, 0xc9cbf769, 0xc9cbf769, 0x2784b68e, 0x2784b68e, 0x2784b68e, 0xd95c7742, 0xd95c7742, 0xd95c7742, 0x3016c84a, 0x3016c84a, 0x3016c84a, 0xc9cbf769, 0x16af4e3c, 0x16af4e3c, 0xc9cbf769, }, 20 }, +- { "gfxterm_ar", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0xb821e44, 0x16b3ac05, 0xb821e44, 0xa5d4579c, 0x9813a416, 0x9813a416, 0xca80d730, 0xca80d730, 0xca80d730, 0x5b5b5103, 0x5b5b5103, 0x5b5b5103, 0x42e16cd3, 0x42e16cd3, 0x42e16cd3, 0x9813a416, 0xa5d4579c, 0xa5d4579c, 0x9813a416, }, 20 }, +- { "gfxterm_ar", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0xbe0b9671, 0x7f6e98d0, 0xbe0b9671, 0xc8ada3c2, 0x5fcf013d, 0x5fcf013d, 0x57a0c67d, 0x57a0c67d, 0x57a0c67d, 0x85b0de0b, 0x85b0de0b, 0x85b0de0b, 0x93c3e194, 0x93c3e194, 0x93c3e194, 0x5fcf013d, 0xc8ada3c2, 0xc8ada3c2, 0x5fcf013d, }, 20 }, +- { "gfxterm_ar", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0x9f18b29e, 0x50e7d383, 0x9f18b29e, 0x841d6899, 0xdd28f52b, 0xdd28f52b, 0xd12092dc, 0xd12092dc, 0xd12092dc, 0xf01c6b38, 0xf01c6b38, 0xf01c6b38, 0x8da4a0b4, 0x8da4a0b4, 0x8da4a0b4, 0xdd28f52b, 0x841d6899, 0x841d6899, 0xdd28f52b, }, 20 }, +- { "gfxterm_ar", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x4e8d4d8c, 0x3f32cb90, 0x4e8d4d8c, 0xb132560c, 0x43d1f34, 0x43d1f34, 0x1e7f303c, 0x1e7f303c, 0x1e7f303c, 0x61759994, 0x61759994, 0x61759994, 0xf8249c12, 0xf8249c12, 0xf8249c12, 0x43d1f34, 0xb132560c, 0xb132560c, 0x43d1f34, }, 20 }, +- { "gfxterm_cyr", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x4f39b2c5, 0x37084023, 0x4f39b2c5, 0xccf7f82, 0x59c36f00, 0x59c36f00, 0xb5dad2e, 0xb5dad2e, 0xb5dad2e, 0x75ddc048, 0x75ddc048, 0x75ddc048, 0x172bd59a, 0x172bd59a, 0x172bd59a, 0x59c36f00, 0xccf7f82, 0xccf7f82, 0x59c36f00, }, 20 }, +- { "gfxterm_cyr", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0xd5f24f8e, 0x76463f82, 0xd5f24f8e, 0xfbf7caf1, 0xaa4593fe, 0xaa4593fe, 0xb897c475, 0xb897c475, 0xb897c475, 0x1e62c912, 0x1e62c912, 0x1e62c912, 0x335a626a, 0x335a626a, 0x335a626a, 0xaa4593fe, 0xfbf7caf1, 0xfbf7caf1, 0xaa4593fe, }, 20 }, +- { "gfxterm_cyr", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0x8aa7c8c3, 0x28620e7e, 0x8aa7c8c3, 0xd7b0a547, 0xc9cbf769, 0xc9cbf769, 0x860f1899, 0x860f1899, 0x860f1899, 0x78d7d955, 0x78d7d955, 0x78d7d955, 0x919d665d, 0x919d665d, 0x919d665d, 0xc9cbf769, 0xd7b0a547, 0xd7b0a547, 0xc9cbf769, }, 20 }, +- { "gfxterm_cyr", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x89654b6, 0x26bab4dd, 0x89654b6, 0xa6c01d6e, 0x9813a416, 0x9813a416, 0xc67652d9, 0xc67652d9, 0xc67652d9, 0x57add4ea, 0x57add4ea, 0x57add4ea, 0x4e17e93a, 0x4e17e93a, 0x4e17e93a, 0x9813a416, 0xa6c01d6e, 0xa6c01d6e, 0x9813a416, }, 20 }, +- { "gfxterm_cyr", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x77945f28, 0xec3ce845, 0x77945f28, 0x1326a9b, 0x5fcf013d, 0x5fcf013d, 0xc8e6e12c, 0xc8e6e12c, 0xc8e6e12c, 0x1af6f95a, 0x1af6f95a, 0x1af6f95a, 0xc85c6c5, 0xc85c6c5, 0xc85c6c5, 0x5fcf013d, 0x1326a9b, 0x1326a9b, 0x5fcf013d, }, 20 }, +- { "gfxterm_cyr", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0x4450a5dc, 0xda479f49, 0x4450a5dc, 0x5f557fdb, 0xdd28f52b, 0xdd28f52b, 0xddfe9197, 0xddfe9197, 0xddfe9197, 0xfcc26873, 0xfcc26873, 0xfcc26873, 0x817aa3ff, 0x817aa3ff, 0x817aa3ff, 0xdd28f52b, 0x5f557fdb, 0x5f557fdb, 0xdd28f52b, }, 20 }, +- { "gfxterm_cyr", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x409098da, 0x2e0890e, 0x409098da, 0xbf2f835a, 0x43d1f34, 0x43d1f34, 0x253d050e, 0x253d050e, 0x253d050e, 0x5a37aca6, 0x5a37aca6, 0x5a37aca6, 0xc366a920, 0xc366a920, 0xc366a920, 0x43d1f34, 0xbf2f835a, 0xbf2f835a, 0x43d1f34, }, 20 }, +- { "gfxterm_heb", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x546aa9f1, 0x56bf26d0, 0x546aa9f1, 0x179c64b6, 0x59c36f00, 0x59c36f00, 0xa98ad4a1, 0xa98ad4a1, 0xa98ad4a1, 0xd70ab9c7, 0xd70ab9c7, 0xd70ab9c7, 0xb5fcac15, 0xb5fcac15, 0xb5fcac15, 0x59c36f00, 0x179c64b6, 0x179c64b6, 0x59c36f00, }, 20 }, +- { "gfxterm_heb", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x12592c97, 0xa10f7034, 0x12592c97, 0x3c5ca9e8, 0xaa4593fe, 0xaa4593fe, 0x2c3e194, 0x2c3e194, 0x2c3e194, 0xa436ecf3, 0xa436ecf3, 0xa436ecf3, 0x890e478b, 0x890e478b, 0x890e478b, 0xaa4593fe, 0x3c5ca9e8, 0x3c5ca9e8, 0xaa4593fe, }, 20 }, +- { "gfxterm_heb", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xed5de42a, 0x5cf94e51, 0xed5de42a, 0xb04a89ae, 0xc9cbf769, 0xc9cbf769, 0xdd578210, 0xdd578210, 0xdd578210, 0x238f43dc, 0x238f43dc, 0x238f43dc, 0xcac5fcd4, 0xcac5fcd4, 0xcac5fcd4, 0xc9cbf769, 0xb04a89ae, 0xb04a89ae, 0xc9cbf769, }, 20 }, +- { "gfxterm_heb", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0xbbc56f90, 0x4f643bbb, 0xbbc56f90, 0x15932648, 0x9813a416, 0x9813a416, 0x28aba4d1, 0x28aba4d1, 0x28aba4d1, 0xb97022e2, 0xb97022e2, 0xb97022e2, 0xa0ca1f32, 0xa0ca1f32, 0xa0ca1f32, 0x9813a416, 0x15932648, 0x15932648, 0x9813a416, }, 20 }, +- { "gfxterm_heb", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x43465d8c, 0x6399888a, 0x43465d8c, 0x35e0683f, 0x5fcf013d, 0x5fcf013d, 0x4895c207, 0x4895c207, 0x4895c207, 0x9a85da71, 0x9a85da71, 0x9a85da71, 0x8cf6e5ee, 0x8cf6e5ee, 0x8cf6e5ee, 0x5fcf013d, 0x35e0683f, 0x35e0683f, 0x5fcf013d, }, 20 }, +- { "gfxterm_heb", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0xd1e7f231, 0xe67e195e, 0xd1e7f231, 0xcae22836, 0xdd28f52b, 0xdd28f52b, 0xe7ae9f08, 0xe7ae9f08, 0xe7ae9f08, 0xc69266ec, 0xc69266ec, 0xc69266ec, 0xbb2aad60, 0xbb2aad60, 0xbb2aad60, 0xdd28f52b, 0xcae22836, 0xcae22836, 0xdd28f52b, }, 20 }, +- { "gfxterm_heb", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x793e58f4, 0x5f939386, 0x793e58f4, 0x86814374, 0x43d1f34, 0x43d1f34, 0x12b2b9c1, 0x12b2b9c1, 0x12b2b9c1, 0x6db81069, 0x6db81069, 0x6db81069, 0xf4e915ef, 0xf4e915ef, 0xf4e915ef, 0x43d1f34, 0x86814374, 0x86814374, 0x43d1f34, }, 20 }, +- { "gfxterm_gre", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x226c0d75, 0x9e291f4f, 0x226c0d75, 0x619ac032, 0x59c36f00, 0x59c36f00, 0x6fb6253, 0x6fb6253, 0x6fb6253, 0x787b0f35, 0x787b0f35, 0x787b0f35, 0x1a8d1ae7, 0x1a8d1ae7, 0x1a8d1ae7, 0x59c36f00, 0x619ac032, 0x619ac032, 0x59c36f00, }, 20 }, +- { "gfxterm_gre", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x8355045, 0xfe058b68, 0x8355045, 0x2630d53a, 0xaa4593fe, 0xaa4593fe, 0x290a3822, 0x290a3822, 0x290a3822, 0x8fff3545, 0x8fff3545, 0x8fff3545, 0xa2c79e3d, 0xa2c79e3d, 0xa2c79e3d, 0xaa4593fe, 0x2630d53a, 0x2630d53a, 0xaa4593fe, }, 20 }, +- { "gfxterm_gre", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xc702fa59, 0x74086887, 0xc702fa59, 0x9a1597dd, 0xc9cbf769, 0xc9cbf769, 0x60295baa, 0x60295baa, 0x60295baa, 0x9ef19a66, 0x9ef19a66, 0x9ef19a66, 0x77bb256e, 0x77bb256e, 0x77bb256e, 0xc9cbf769, 0x9a1597dd, 0x9a1597dd, 0xc9cbf769, }, 20 }, +- { "gfxterm_gre", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x82385331, 0xf77eda42, 0x82385331, 0x2c6e1ae9, 0x9813a416, 0x9813a416, 0x140c0d1f, 0x140c0d1f, 0x140c0d1f, 0x85d78b2c, 0x85d78b2c, 0x85d78b2c, 0x9c6db6fc, 0x9c6db6fc, 0x9c6db6fc, 0x9813a416, 0x2c6e1ae9, 0x2c6e1ae9, 0x9813a416, }, 20 }, +- { "gfxterm_gre", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x565d2d38, 0x34f757ec, 0x565d2d38, 0x20fb188b, 0x5fcf013d, 0x5fcf013d, 0x230bf123, 0x230bf123, 0x230bf123, 0xf11be955, 0xf11be955, 0xf11be955, 0xe768d6ca, 0xe768d6ca, 0xe768d6ca, 0x5fcf013d, 0x20fb188b, 0x20fb188b, 0x5fcf013d, }, 20 }, +- { "gfxterm_gre", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0x632132a4, 0x4a8c90b2, 0x632132a4, 0x7824e8a3, 0xdd28f52b, 0xdd28f52b, 0xef2bffce, 0xef2bffce, 0xef2bffce, 0xce17062a, 0xce17062a, 0xce17062a, 0xb3afcda6, 0xb3afcda6, 0xb3afcda6, 0xdd28f52b, 0x7824e8a3, 0x7824e8a3, 0xdd28f52b, }, 20 }, +- { "gfxterm_gre", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x461d4cfa, 0xfd3492c2, 0x461d4cfa, 0xb9a2577a, 0x43d1f34, 0x43d1f34, 0xfb72301f, 0xfb72301f, 0xfb72301f, 0x847899b7, 0x847899b7, 0x847899b7, 0x1d299c31, 0x1d299c31, 0x1d299c31, 0x43d1f34, 0xb9a2577a, 0xb9a2577a, 0x43d1f34, }, 20 }, +- { "gfxterm_ru", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x82758f66, 0xbac387fd, 0x82758f66, 0xc1834221, 0x59c36f00, 0x59c36f00, 0x4877befe, 0x4877befe, 0x4877befe, 0x36f7d398, 0x36f7d398, 0x36f7d398, 0x5401c64a, 0x5401c64a, 0x5401c64a, 0x59c36f00, 0xc1834221, 0xc1834221, 0x59c36f00, }, 20 }, +- { "gfxterm_ru", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x4500a591, 0x9a40cbd8, 0x4500a591, 0x6b0520ee, 0xaa4593fe, 0xaa4593fe, 0x16db2902, 0x16db2902, 0x16db2902, 0xb02e2465, 0xb02e2465, 0xb02e2465, 0x9d168f1d, 0x9d168f1d, 0x9d168f1d, 0xaa4593fe, 0x6b0520ee, 0x6b0520ee, 0xaa4593fe, }, 20 }, +- { "gfxterm_ru", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0x3cd9ea11, 0x1244c852, 0x3cd9ea11, 0x61ce8795, 0xc9cbf769, 0xc9cbf769, 0x6b15d6f0, 0x6b15d6f0, 0x6b15d6f0, 0x95cd173c, 0x95cd173c, 0x95cd173c, 0x7c87a834, 0x7c87a834, 0x7c87a834, 0xc9cbf769, 0x61ce8795, 0x61ce8795, 0xc9cbf769, }, 20 }, +- { "gfxterm_ru", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0xc818f15f, 0xbaf13382, 0xc818f15f, 0x664eb887, 0x9813a416, 0x9813a416, 0x350fe990, 0x350fe990, 0x350fe990, 0xa4d46fa3, 0xa4d46fa3, 0xa4d46fa3, 0xbd6e5273, 0xbd6e5273, 0xbd6e5273, 0x9813a416, 0x664eb887, 0x664eb887, 0x9813a416, }, 20 }, +- { "gfxterm_ru", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0xaa1dc81, 0x234341dd, 0xaa1dc81, 0x7c07e932, 0x5fcf013d, 0x5fcf013d, 0x969354c5, 0x969354c5, 0x969354c5, 0x44834cb3, 0x44834cb3, 0x44834cb3, 0x52f0732c, 0x52f0732c, 0x52f0732c, 0x5fcf013d, 0x7c07e932, 0x7c07e932, 0x5fcf013d, }, 20 }, +- { "gfxterm_ru", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0xd9aa4b29, 0x555fdda0, 0xd9aa4b29, 0xc2af912e, 0xdd28f52b, 0xdd28f52b, 0xe82cbfd, 0xe82cbfd, 0xe82cbfd, 0x2fbe3219, 0x2fbe3219, 0x2fbe3219, 0x5206f995, 0x5206f995, 0x5206f995, 0xdd28f52b, 0xc2af912e, 0xc2af912e, 0xdd28f52b, }, 20 }, +- { "gfxterm_ru", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0xfd4e19ff, 0x42807b86, 0xfd4e19ff, 0x2f1027f, 0x43d1f34, 0x43d1f34, 0x924dc5be, 0x924dc5be, 0x924dc5be, 0xed476c16, 0xed476c16, 0xed476c16, 0x74166990, 0x74166990, 0x74166990, 0x43d1f34, 0x2f1027f, 0x2f1027f, 0x43d1f34, }, 20 }, +- { "gfxterm_fr", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x3a63a2e6, 0x118487d4, 0x3a63a2e6, 0x79956fa1, 0x59c36f00, 0x59c36f00, 0x389f4d2d, 0x389f4d2d, 0x389f4d2d, 0x461f204b, 0x461f204b, 0x461f204b, 0x24e93599, 0x24e93599, 0x24e93599, 0x59c36f00, 0x79956fa1, 0x79956fa1, 0x59c36f00, }, 20 }, +- { "gfxterm_fr", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x62d33f4d, 0x9544a8f4, 0x62d33f4d, 0x4cd6ba32, 0xaa4593fe, 0xaa4593fe, 0xfb86a3a4, 0xfb86a3a4, 0xfb86a3a4, 0x5d73aec3, 0x5d73aec3, 0x5d73aec3, 0x704b05bb, 0x704b05bb, 0x704b05bb, 0xaa4593fe, 0x4cd6ba32, 0x4cd6ba32, 0xaa4593fe, }, 20 }, +- { "gfxterm_fr", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0x8cc4b6dc, 0x1042c383, 0x8cc4b6dc, 0xd1d3db58, 0xc9cbf769, 0xc9cbf769, 0xeba8a32b, 0xeba8a32b, 0xeba8a32b, 0x157062e7, 0x157062e7, 0x157062e7, 0xfc3addef, 0xfc3addef, 0xfc3addef, 0xc9cbf769, 0xd1d3db58, 0xd1d3db58, 0xc9cbf769, }, 20 }, +- { "gfxterm_fr", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x23f9afd, 0x465f5ecc, 0x23f9afd, 0xac69d325, 0x9813a416, 0x9813a416, 0xccf7a1e3, 0xccf7a1e3, 0xccf7a1e3, 0x5d2c27d0, 0x5d2c27d0, 0x5d2c27d0, 0x44961a00, 0x44961a00, 0x44961a00, 0x9813a416, 0xac69d325, 0xac69d325, 0x9813a416, }, 20 }, +- { "gfxterm_fr", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0xed796a26, 0x3132d083, 0xed796a26, 0x9bdf5f95, 0x5fcf013d, 0x5fcf013d, 0x42f66a49, 0x42f66a49, 0x42f66a49, 0x90e6723f, 0x90e6723f, 0x90e6723f, 0x86954da0, 0x86954da0, 0x86954da0, 0x5fcf013d, 0x9bdf5f95, 0x9bdf5f95, 0x5fcf013d, }, 20 }, +- { "gfxterm_fr", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0x54b28785, 0x7fbbe762, 0x54b28785, 0x4fb75d82, 0xdd28f52b, 0xdd28f52b, 0x14b1cf29, 0x14b1cf29, 0x14b1cf29, 0x358d36cd, 0x358d36cd, 0x358d36cd, 0x4835fd41, 0x4835fd41, 0x4835fd41, 0xdd28f52b, 0x4fb75d82, 0x4fb75d82, 0xdd28f52b, }, 20 }, +- { "gfxterm_fr", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x7acc2669, 0xbf1a1d96, 0x7acc2669, 0x85733de9, 0x43d1f34, 0x43d1f34, 0x2cc1e8f4, 0x2cc1e8f4, 0x2cc1e8f4, 0x53cb415c, 0x53cb415c, 0x53cb415c, 0xca9a44da, 0xca9a44da, 0xca9a44da, 0x43d1f34, 0x85733de9, 0x85733de9, 0x43d1f34, }, 20 }, +- { "gfxterm_quot", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0xf9511593, 0x9f9ef910, 0xf9511593, 0xbaa7d8d4, 0x59c36f00, 0x59c36f00, 0x7fd94135, 0x7fd94135, 0x7fd94135, 0x1592c53, 0x1592c53, 0x1592c53, 0x63af3981, 0x63af3981, 0x63af3981, 0x59c36f00, 0xbaa7d8d4, 0xbaa7d8d4, 0x59c36f00, }, 20 }, +- { "gfxterm_quot", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x3dcbe25f, 0x99e165e7, 0x3dcbe25f, 0x13ce6720, 0xaa4593fe, 0xaa4593fe, 0x2e88732f, 0x2e88732f, 0x2e88732f, 0x887d7e48, 0x887d7e48, 0x887d7e48, 0xa545d530, 0xa545d530, 0xa545d530, 0xaa4593fe, 0x13ce6720, 0x13ce6720, 0xaa4593fe, }, 20 }, +- { "gfxterm_quot", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xdbedc74c, 0x61619894, 0xdbedc74c, 0x86faaac8, 0xc9cbf769, 0xc9cbf769, 0xda1c9f17, 0xda1c9f17, 0xda1c9f17, 0x24c45edb, 0x24c45edb, 0x24c45edb, 0xcd8ee1d3, 0xcd8ee1d3, 0xcd8ee1d3, 0xc9cbf769, 0x86faaac8, 0x86faaac8, 0xc9cbf769, }, 20 }, +- { "gfxterm_quot", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x2411f56f, 0x97b1fc58, 0x2411f56f, 0x8a47bcb7, 0x9813a416, 0x9813a416, 0xfb08d7cf, 0xfb08d7cf, 0xfb08d7cf, 0x6ad351fc, 0x6ad351fc, 0x6ad351fc, 0x73696c2c, 0x73696c2c, 0x73696c2c, 0x9813a416, 0x8a47bcb7, 0x8a47bcb7, 0x9813a416, }, 20 }, +- { "gfxterm_quot", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x13a65fb6, 0x35044d7, 0x13a65fb6, 0x65006a05, 0x5fcf013d, 0x5fcf013d, 0x9e56a9e0, 0x9e56a9e0, 0x9e56a9e0, 0x4c46b196, 0x4c46b196, 0x4c46b196, 0x5a358e09, 0x5a358e09, 0x5a358e09, 0x5fcf013d, 0x65006a05, 0x65006a05, 0x5fcf013d, }, 20 }, +- { "gfxterm_quot", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0xc8f05290, 0x9c88f64e, 0xc8f05290, 0xd3f58897, 0xdd28f52b, 0xdd28f52b, 0xe1579057, 0xe1579057, 0xe1579057, 0xc06b69b3, 0xc06b69b3, 0xc06b69b3, 0xbdd3a23f, 0xbdd3a23f, 0xbdd3a23f, 0xdd28f52b, 0xd3f58897, 0xd3f58897, 0xdd28f52b, }, 20 }, +- { "gfxterm_quot", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x9cfbc80f, 0x376a1fb2, 0x9cfbc80f, 0x6344d38f, 0x43d1f34, 0x43d1f34, 0x6486f7c4, 0x6486f7c4, 0x6486f7c4, 0x1b8c5e6c, 0x1b8c5e6c, 0x1b8c5e6c, 0x82dd5bea, 0x82dd5bea, 0x82dd5bea, 0x43d1f34, 0x6344d38f, 0x6344d38f, 0x43d1f34, }, 20 }, +- { "gfxterm_piglatin", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0xd327ca68, 0x9c977e8c, 0xd327ca68, 0x90d1072f, 0x59c36f00, 0x59c36f00, 0x71c9d9, 0x71c9d9, 0x71c9d9, 0x7ef1a4bf, 0x7ef1a4bf, 0x7ef1a4bf, 0x1c07b16d, 0x1c07b16d, 0x1c07b16d, 0x59c36f00, 0x90d1072f, 0x90d1072f, 0x59c36f00, }, 20 }, +- { "gfxterm_piglatin", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x2da3855b, 0x24c7b138, 0x2da3855b, 0x3a60024, 0xaa4593fe, 0xaa4593fe, 0x147ff249, 0x147ff249, 0x147ff249, 0xb28aff2e, 0xb28aff2e, 0xb28aff2e, 0x9fb25456, 0x9fb25456, 0x9fb25456, 0xaa4593fe, 0x3a60024, 0x3a60024, 0xaa4593fe, }, 20 }, +- { "gfxterm_piglatin", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0x660ab3d9, 0xa75b45c4, 0x660ab3d9, 0x3b1dde5d, 0xc9cbf769, 0xc9cbf769, 0x5ff884f5, 0x5ff884f5, 0x5ff884f5, 0xa1204539, 0xa1204539, 0xa1204539, 0x486afa31, 0x486afa31, 0x486afa31, 0xc9cbf769, 0x3b1dde5d, 0x3b1dde5d, 0xc9cbf769, }, 20 }, +- { "gfxterm_piglatin", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x920957ee, 0xceebfd42, 0x920957ee, 0x3c5f1e36, 0x9813a416, 0x9813a416, 0xa917dbef, 0xa917dbef, 0xa917dbef, 0x38cc5ddc, 0x38cc5ddc, 0x38cc5ddc, 0x2176600c, 0x2176600c, 0x2176600c, 0x9813a416, 0x3c5f1e36, 0x3c5f1e36, 0x9813a416, }, 20 }, +- { "gfxterm_piglatin", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x8298cd03, 0xfb88293a, 0x8298cd03, 0xf43ef8b0, 0x5fcf013d, 0x5fcf013d, 0x8f57f36b, 0x8f57f36b, 0x8f57f36b, 0x5d47eb1d, 0x5d47eb1d, 0x5d47eb1d, 0x4b34d482, 0x4b34d482, 0x4b34d482, 0x5fcf013d, 0xf43ef8b0, 0xf43ef8b0, 0x5fcf013d, }, 20 }, +- { "gfxterm_piglatin", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0xd8bbc577, 0xb2c37549, 0xd8bbc577, 0xc3be1f70, 0xdd28f52b, 0xdd28f52b, 0xd8b598e, 0xd8b598e, 0xd8b598e, 0x2cb7a06a, 0x2cb7a06a, 0x2cb7a06a, 0x510f6be6, 0x510f6be6, 0x510f6be6, 0xdd28f52b, 0xc3be1f70, 0xc3be1f70, 0xdd28f52b, }, 20 }, +- { "gfxterm_piglatin", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x4d7993a1, 0xbeefcd88, 0x4d7993a1, 0xb2c68821, 0x43d1f34, 0x43d1f34, 0x1dbc7020, 0x1dbc7020, 0x1dbc7020, 0x62b6d988, 0x62b6d988, 0x62b6d988, 0xfbe7dc0e, 0xfbe7dc0e, 0xfbe7dc0e, 0x43d1f34, 0xb2c68821, 0xb2c68821, 0x43d1f34, }, 20 }, +- { "gfxterm_ch", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x628b6f61, 0x50f94215, 0x628b6f61, 0x217da226, 0x59c36f00, 0x59c36f00, 0x5755be7f, 0x5755be7f, 0x5755be7f, 0x29d5d319, 0x29d5d319, 0x29d5d319, 0x4b23c6cb, 0x4b23c6cb, 0x4b23c6cb, 0x59c36f00, 0x217da226, 0x217da226, 0x59c36f00, }, 20 }, +- { "gfxterm_ch", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x9f82cd08, 0xbc67f78d, 0x9f82cd08, 0xb1874877, 0xaa4593fe, 0xaa4593fe, 0x4749512e, 0x4749512e, 0x4749512e, 0xe1bc5c49, 0xe1bc5c49, 0xe1bc5c49, 0xcc84f731, 0xcc84f731, 0xcc84f731, 0xaa4593fe, 0xb1874877, 0xb1874877, 0xaa4593fe, }, 20 }, +- { "gfxterm_ch", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xbee47cfb, 0x88e98534, 0xbee47cfb, 0xe3f3117f, 0xc9cbf769, 0xc9cbf769, 0xe2396b15, 0xe2396b15, 0xe2396b15, 0x1ce1aad9, 0x1ce1aad9, 0x1ce1aad9, 0xf5ab15d1, 0xf5ab15d1, 0xf5ab15d1, 0xc9cbf769, 0xe3f3117f, 0xe3f3117f, 0xc9cbf769, }, 20 }, +- { "gfxterm_ch", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x2bfd5a83, 0xbe3c6f2f, 0x2bfd5a83, 0x85ab135b, 0x9813a416, 0x9813a416, 0xce30693b, 0xce30693b, 0xce30693b, 0x5febef08, 0x5febef08, 0x5febef08, 0x4651d2d8, 0x4651d2d8, 0x4651d2d8, 0x9813a416, 0x85ab135b, 0x85ab135b, 0x9813a416, }, 20 }, +- { "gfxterm_ch", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x1456f321, 0xc3a55992, 0x1456f321, 0x62f0c692, 0x5fcf013d, 0x5fcf013d, 0xbe3d534a, 0xbe3d534a, 0xbe3d534a, 0x6c2d4b3c, 0x6c2d4b3c, 0x6c2d4b3c, 0x7a5e74a3, 0x7a5e74a3, 0x7a5e74a3, 0x5fcf013d, 0x62f0c692, 0x62f0c692, 0x5fcf013d, }, 20 }, +- { "gfxterm_ch", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0xdcac6945, 0x43fbdf5a, 0xdcac6945, 0xc7a9b342, 0xdd28f52b, 0xdd28f52b, 0x274da20b, 0x274da20b, 0x274da20b, 0x6715bef, 0x6715bef, 0x6715bef, 0x7bc99063, 0x7bc99063, 0x7bc99063, 0xdd28f52b, 0xc7a9b342, 0xc7a9b342, 0xdd28f52b, }, 20 }, +- { "gfxterm_ch", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x571e16b1, 0xb9f25c2, 0x571e16b1, 0xa8a10d31, 0x43d1f34, 0x43d1f34, 0x25dfb69d, 0x25dfb69d, 0x25dfb69d, 0x5ad51f35, 0x5ad51f35, 0x5ad51f35, 0xc3841ab3, 0xc3841ab3, 0xc3841ab3, 0x43d1f34, 0xa8a10d31, 0xa8a10d31, 0x43d1f34, }, 20 }, +- { "gfxterm_red", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0xec987771, 0x8a579bf2, 0xec987771, 0xbbb5c9af, 0x59c36f00, 0x59c36f00, 0x16780f43, 0x16780f43, 0x16780f43, 0x68f86225, 0x68f86225, 0x68f86225, 0xa0e77f7, 0xa0e77f7, 0xa0e77f7, 0x59c36f00, 0xbbb5c9af, 0xbbb5c9af, 0x59c36f00, }, 20 }, +- { "gfxterm_red", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x97994d2c, 0x33b3ca94, 0x97994d2c, 0x273e977a, 0xaa4593fe, 0xaa4593fe, 0xa592c9d5, 0xa592c9d5, 0xa592c9d5, 0x367c4b2, 0x367c4b2, 0x367c4b2, 0x2e5f6fca, 0x2e5f6fca, 0x2e5f6fca, 0xaa4593fe, 0x273e977a, 0x273e977a, 0xaa4593fe, }, 20 }, +- { "gfxterm_red", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0x5d2416aa, 0xe7a84972, 0x5d2416aa, 0x4d010804, 0xc9cbf769, 0xc9cbf769, 0x4e3a88a0, 0x4e3a88a0, 0x4e3a88a0, 0xb0e2496c, 0xb0e2496c, 0xb0e2496c, 0x59a8f664, 0x59a8f664, 0x59a8f664, 0xc9cbf769, 0x4d010804, 0x4d010804, 0xc9cbf769, }, 20 }, +- { "gfxterm_red", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x1da65b43, 0xae065274, 0x1da65b43, 0x2dd7a76c, 0x9813a416, 0x9813a416, 0xf81d19f, 0xf81d19f, 0xf81d19f, 0x9e5a57ac, 0x9e5a57ac, 0x9e5a57ac, 0x87e06a7c, 0x87e06a7c, 0x87e06a7c, 0x9813a416, 0x2dd7a76c, 0x2dd7a76c, 0x9813a416, }, 20 }, +- { "gfxterm_red", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0xea8a940e, 0xfa7c8f6f, 0xea8a940e, 0x448d7bfb, 0x5fcf013d, 0x5fcf013d, 0x47c22fa0, 0x47c22fa0, 0x47c22fa0, 0x95d237d6, 0x95d237d6, 0x95d237d6, 0x83a10849, 0x83a10849, 0x83a10849, 0x5fcf013d, 0x448d7bfb, 0x448d7bfb, 0x5fcf013d, }, 20 }, +- { "gfxterm_red", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0xc0ac44fa, 0x94d4e024, 0xc0ac44fa, 0x4ec88f20, 0xdd28f52b, 0xdd28f52b, 0x2422f542, 0x2422f542, 0x2422f542, 0x51e0ca6, 0x51e0ca6, 0x51e0ca6, 0x78a6c72a, 0x78a6c72a, 0x78a6c72a, 0xdd28f52b, 0x4ec88f20, 0x4ec88f20, 0xdd28f52b, }, 20 }, +- { "gfxterm_red", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x248f7655, 0x8f1ea1e8, 0x248f7655, 0xb3d7f0f5, 0x43d1f34, 0x43d1f34, 0x8c408c04, 0x8c408c04, 0x8c408c04, 0xf34a25ac, 0xf34a25ac, 0xf34a25ac, 0x6a1b202a, 0x6a1b202a, 0x6a1b202a, 0x43d1f34, 0xb3d7f0f5, 0xb3d7f0f5, 0x43d1f34, }, 20 }, +- { "gfxterm_high", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0xd6ba8f78, 0xb07563fb, 0xd6ba8f78, 0x6ef020b2, 0x59c36f00, 0x59c36f00, 0x7fd94135, 0x7fd94135, 0x7fd94135, 0x1592c53, 0x1592c53, 0x1592c53, 0x63af3981, 0x63af3981, 0x63af3981, 0x59c36f00, 0x6ef020b2, 0x6ef020b2, 0x59c36f00, }, 20 }, +- { "gfxterm_high", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0xf5257f70, 0x510ff8c8, 0xf5257f70, 0x36a3b7ff, 0xaa4593fe, 0xaa4593fe, 0x2e88732f, 0x2e88732f, 0x2e88732f, 0x887d7e48, 0x887d7e48, 0x887d7e48, 0xa545d530, 0xa545d530, 0xa545d530, 0xaa4593fe, 0x36a3b7ff, 0x36a3b7ff, 0xaa4593fe, }, 20 }, +- { "gfxterm_high", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0x9f8effb3, 0x2502a06b, 0x9f8effb3, 0xddeb038e, 0xc9cbf769, 0xc9cbf769, 0xda1c9f17, 0xda1c9f17, 0xda1c9f17, 0x24c45edb, 0x24c45edb, 0x24c45edb, 0xcd8ee1d3, 0xcd8ee1d3, 0xcd8ee1d3, 0xc9cbf769, 0xddeb038e, 0xddeb038e, 0xc9cbf769, }, 20 }, +- { "gfxterm_high", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x6aa72774, 0xd9072e43, 0x6aa72774, 0x24b4853d, 0x9813a416, 0x9813a416, 0xfb08d7cf, 0xfb08d7cf, 0xfb08d7cf, 0x6ad351fc, 0x6ad351fc, 0x6ad351fc, 0x73696c2c, 0x73696c2c, 0x73696c2c, 0x9813a416, 0x24b4853d, 0x24b4853d, 0x9813a416, }, 20 }, +- { "gfxterm_high", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x936eb1d8, 0x8398aab9, 0x936eb1d8, 0x8beef, 0x5fcf013d, 0x5fcf013d, 0x9e56a9e0, 0x9e56a9e0, 0x9e56a9e0, 0x4c46b196, 0x4c46b196, 0x4c46b196, 0x5a358e09, 0x5a358e09, 0x5a358e09, 0x5fcf013d, 0x8beef, 0x8beef, 0x5fcf013d, }, 20 }, +- { "gfxterm_high", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0xdd4b9ec3, 0x89333a1d, 0xdd4b9ec3, 0x3acd5a9d, 0xdd28f52b, 0xdd28f52b, 0xe1579057, 0xe1579057, 0xe1579057, 0xc06b69b3, 0xc06b69b3, 0xc06b69b3, 0xbdd3a23f, 0xbdd3a23f, 0xbdd3a23f, 0xdd28f52b, 0x3acd5a9d, 0x3acd5a9d, 0xdd28f52b, }, 20 }, +- { "gfxterm_high", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x89f37601, 0x2262a1bc, 0x89f37601, 0xf17b28ae, 0x43d1f34, 0x43d1f34, 0x6486f7c4, 0x6486f7c4, 0x6486f7c4, 0x1b8c5e6c, 0x1b8c5e6c, 0x1b8c5e6c, 0x82dd5bea, 0x82dd5bea, 0x82dd5bea, 0x43d1f34, 0xf17b28ae, 0xf17b28ae, 0x43d1f34, }, 20 }, +- { "videotest", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x1368a483, 0x1368a483, 0x1368a483, 0x1368a483, 0x1368a483, }, 5 }, +- { "videotest", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0x7033079c, 0x7033079c, 0x7033079c, 0x7033079c, 0x7033079c, }, 5 }, +- { "videotest", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xff583fbf, 0xff583fbf, 0xff583fbf, 0xff583fbf, 0xff583fbf, }, 5 }, +- { "videotest", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x4c2cef83, 0x1b215a88, 0xe2378595, 0xb53a309e, 0x15f64d5e, }, 5 }, +- { "videotest", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x758f388c, 0xd4442397, 0x33f5784b, 0x923e6350, 0xf97bb902, }, 5 }, +- { "videotest", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xb9f6f52a, 0x4e24e8b7, 0x53beb8e1, 0xa46ca57c, 0x688a184d, }, 5 }, +- { "videotest", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x5bd98ce3, 0x15df7962, 0xc7d467e1, 0x89d29260, 0x662e2c16, }, 5 }, +- { "videotest", 640, 480, 0x2, 256, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi256 */, (grub_uint32_t []) { 0xf9847b65, 0xf9847b65, 0xf9847b65, 0xf9847b65, 0xf9847b65, }, 5 }, +- { "videotest", 800, 600, 0x2, 256, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi256 */, (grub_uint32_t []) { 0xc421716d, 0xc421716d, 0xc421716d, 0xc421716d, 0xc421716d, }, 5 }, +- { "videotest", 1024, 768, 0x2, 256, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi256 */, (grub_uint32_t []) { 0x5d46f2a8, 0x5d46f2a8, 0x5d46f2a8, 0x5d46f2a8, 0x5d46f2a8, }, 5 }, +- { "videotest", 640, 480, 0x1, 256, 15, 2, 10, 5, 5, 5, 0, 5, 0, 0 /* 640x480xrgba5550 */, (grub_uint32_t []) { 0x25690db2, 0x25690db2, 0x25690db2, 0x25690db2, 0x25690db2, }, 5 }, +- { "videotest", 800, 600, 0x1, 256, 15, 2, 10, 5, 5, 5, 0, 5, 0, 0 /* 800x600xrgba5550 */, (grub_uint32_t []) { 0x7333f220, 0x7333f220, 0x7333f220, 0x7333f220, 0x7333f220, }, 5 }, +- { "videotest", 1024, 768, 0x1, 256, 15, 2, 10, 5, 5, 5, 0, 5, 0, 0 /* 1024x768xrgba5550 */, (grub_uint32_t []) { 0xac52d537, 0xac52d537, 0xac52d537, 0xac52d537, 0xac52d537, }, 5 }, +- { "videotest", 640, 480, 0x1, 256, 16, 2, 11, 5, 5, 6, 0, 5, 0, 0 /* 640x480xrgba5650 */, (grub_uint32_t []) { 0xd4cbcd66, 0xd4cbcd66, 0xd4cbcd66, 0xd4cbcd66, 0xd4cbcd66, }, 5 }, +- { "videotest", 800, 600, 0x1, 256, 16, 2, 11, 5, 5, 6, 0, 5, 0, 0 /* 800x600xrgba5650 */, (grub_uint32_t []) { 0x9d23f9d1, 0x9d23f9d1, 0x9d23f9d1, 0x9d23f9d1, 0x9d23f9d1, }, 5 }, +- { "videotest", 1024, 768, 0x1, 256, 16, 2, 11, 5, 5, 6, 0, 5, 0, 0 /* 1024x768xrgba5650 */, (grub_uint32_t []) { 0x89acbf88, 0x89acbf88, 0x89acbf88, 0x89acbf88, 0x89acbf88, }, 5 }, +- { "videotest", 640, 480, 0x1, 256, 24, 3, 16, 8, 8, 8, 0, 8, 0, 0 /* 640x480xrgba8880 */, (grub_uint32_t []) { 0x335fadcb, 0x1f517b5c, 0x6b4200e5, 0x474cd672, 0x8364f797, }, 5 }, +- { "videotest", 800, 600, 0x1, 256, 24, 3, 16, 8, 8, 8, 0, 8, 0, 0 /* 800x600xrgba8880 */, (grub_uint32_t []) { 0xcf9985f8, 0x1d92c7fc, 0x6e637701, 0xbc683505, 0x898016fb, }, 5 }, +- { "videotest", 1024, 768, 0x1, 256, 24, 3, 16, 8, 8, 8, 0, 8, 0, 0 /* 1024x768xrgba8880 */, (grub_uint32_t []) { 0xdb824190, 0x378d05dc, 0x670bff9, 0xea7ffbb5, 0x658bcbb3, }, 5 }, +- { "videotest", 640, 480, 0x1, 256, 15, 2, 0, 5, 5, 5, 10, 5, 0, 0 /* 640x480xbgra5550 */, (grub_uint32_t []) { 0x18ed532e, 0x18ed532e, 0x18ed532e, 0x18ed532e, 0x18ed532e, }, 5 }, +- { "videotest", 800, 600, 0x1, 256, 15, 2, 0, 5, 5, 5, 10, 5, 0, 0 /* 800x600xbgra5550 */, (grub_uint32_t []) { 0x2b35b09f, 0x2b35b09f, 0x2b35b09f, 0x2b35b09f, 0x2b35b09f, }, 5 }, +- { "videotest", 1024, 768, 0x1, 256, 15, 2, 0, 5, 5, 5, 10, 5, 0, 0 /* 1024x768xbgra5550 */, (grub_uint32_t []) { 0xa24c4d98, 0xa24c4d98, 0xa24c4d98, 0xa24c4d98, 0xa24c4d98, }, 5 }, +- { "videotest", 640, 480, 0x1, 256, 16, 2, 0, 5, 5, 6, 11, 5, 0, 0 /* 640x480xbgra5650 */, (grub_uint32_t []) { 0xc07dde33, 0xc07dde33, 0xc07dde33, 0xc07dde33, 0xc07dde33, }, 5 }, +- { "videotest", 800, 600, 0x1, 256, 16, 2, 0, 5, 5, 6, 11, 5, 0, 0 /* 800x600xbgra5650 */, (grub_uint32_t []) { 0x7e6ed757, 0x7e6ed757, 0x7e6ed757, 0x7e6ed757, 0x7e6ed757, }, 5 }, +- { "videotest", 1024, 768, 0x1, 256, 16, 2, 0, 5, 5, 6, 11, 5, 0, 0 /* 1024x768xbgra5650 */, (grub_uint32_t []) { 0x700255dd, 0x700255dd, 0x700255dd, 0x700255dd, 0x700255dd, }, 5 }, +- { "videotest", 640, 480, 0x1, 256, 24, 3, 0, 8, 8, 8, 16, 8, 0, 0 /* 640x480xbgra8880 */, (grub_uint32_t []) { 0x157232bd, 0x5e6bdacd, 0x8341e25d, 0xc8580a2d, 0x3cf9e58c, }, 5 }, +- { "videotest", 800, 600, 0x1, 256, 24, 3, 0, 8, 8, 8, 16, 8, 0, 0 /* 800x600xbgra8880 */, (grub_uint32_t []) { 0xbfafd7cd, 0x51650951, 0x67d61c04, 0x891cc298, 0xab036ae, }, 5 }, +- { "videotest", 1024, 768, 0x1, 256, 24, 3, 0, 8, 8, 8, 16, 8, 0, 0 /* 1024x768xbgra8880 */, (grub_uint32_t []) { 0x760580c9, 0xdc6d8205, 0x2739f3a0, 0x8d51f16c, 0xd47d661b, }, 5 }, +- { "videotest", 640, 480, 0x1, 256, 32, 4, 0, 8, 8, 8, 16, 8, 24, 8 /* 640x480xbgra8888 */, (grub_uint32_t []) { 0xada3b5f, 0x24cd61a6, 0x56f48ead, 0x78e3d454, 0xb28750bb, }, 5 }, +- { "videotest", 800, 600, 0x1, 256, 32, 4, 0, 8, 8, 8, 16, 8, 24, 8 /* 800x600xbgra8888 */, (grub_uint32_t []) { 0x827694e2, 0x9d97c3dd, 0xbdb43a9c, 0xa2556da3, 0xfdf3c81e, }, 5 }, +- { "videotest", 1024, 768, 0x1, 256, 32, 4, 0, 8, 8, 8, 16, 8, 24, 8 /* 1024x768xbgra8888 */, (grub_uint32_t []) { 0x664534a5, 0xcd0979a0, 0x3531d85e, 0x9e7d955b, 0xc0aced53, }, 5 }, ++ { "cmdline_cat", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0xc69be699, 0xc69be699, 0xe17fc97c, 0xe17fc97c, 0xc2512486, 0xc2512486, 0x20260761, 0x20260761, 0xe3485349, 0xe3485349, 0x6020b4d9, 0x6020b4d9, 0x1605db98, 0x1605db98, 0xdca51b58, 0xdca51b58, 0xf3d66441, 0xf3d66441, 0x18cb7ce2, 0x18cb7ce2, 0x23b616d9, 0x23b616d9, 0xa1bf5dbf, 0xa1bf5dbf, 0x5e4a8b3d, 0x5e4a8b3d, 0x9933b3d8, 0x9933b3d8, 0xce7be2de, 0xce7be2de, 0x62531729, 0x62531729, 0xc39d3788, 0xc39d3788, 0xf7aee2fe, 0xf7aee2fe, 0xc66f4903, 0xc66f4903, 0x536c922f, 0x536c922f, 0xcb231652, 0x4ae07b67, 0x146816d5, 0x146816d5, }, 45 }, ++ { "cmdline_cat", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x29d0cfb7, 0x29d0cfb7, 0x4d57ad88, 0x4d57ad88, 0xaf7591cb, 0xaf7591cb, 0xb88e3c0, 0xb88e3c0, 0x5d55a031, 0x5d55a031, 0x4363bcff, 0x4363bcff, 0xe1142833, 0xe1142833, 0x9578c80d, 0x9578c80d, 0xff1f5174, 0xff1f5174, 0x6828d47, 0x6828d47, 0x2a849ae3, 0x2a849ae3, 0x27a811d9, 0x27a811d9, 0x6c42e1cb, 0x6c42e1cb, 0x5bba61f5, 0x5bba61f5, 0xc02ab705, 0xc02ab705, 0xeb3e0e05, 0xeb3e0e05, 0x6f4ce3c, 0x6f4ce3c, 0x2075c50e, 0x2075c50e, 0x54ac7fba, 0x54ac7fba, 0x335d1c21, 0x335d1c21, 0xf923fbd1, 0x1b489d4d, 0x1253eb5e, 0x1253eb5e, }, 45 }, ++ { "cmdline_cat", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0x6ff92a98, 0x6ff92a98, 0xbd8264b3, 0xbd8264b3, 0x5c50282c, 0x5c50282c, 0xd18d6a5a, 0xd18d6a5a, 0x99cea139, 0x99cea139, 0x2590c545, 0x2590c545, 0x55c86045, 0x55c86045, 0xad53ef1e, 0xad53ef1e, 0x5b44a23a, 0x5b44a23a, 0xa255f863, 0xa255f863, 0x85b0bdca, 0x85b0bdca, 0x4220ee1f, 0x4220ee1f, 0xeb991a9f, 0xeb991a9f, 0x86f366dd, 0x86f366dd, 0xfa176b7d, 0xfa176b7d, 0xd7384ca9, 0xd7384ca9, 0xceebf5c1, 0xceebf5c1, 0xae62b268, 0xae62b268, 0x6e89bbd6, 0x6e89bbd6, 0x3fe07c8e, 0x3fe07c8e, 0xee5358fe, 0x162d1a8a, 0x876f8d10, 0x876f8d10, }, 45 }, ++ { "cmdline_cat", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0xb96afaea, 0xb96afaea, 0xaa16ab1e, 0xaa16ab1e, 0x51ff382, 0x51ff382, 0xec74f127, 0xec74f127, 0xde4bca99, 0xde4bca99, 0x8ef3e8a5, 0x8ef3e8a5, 0x2daeb0b4, 0x2daeb0b4, 0x7cf5e243, 0x7cf5e243, 0x11fd57c6, 0x11fd57c6, 0x140723af, 0x140723af, 0x2bd93833, 0x2bd93833, 0xd731f4ac, 0xd731f4ac, 0x5fcd7114, 0x5fcd7114, 0xd1fea24a, 0xd1fea24a, 0x4083d53a, 0x4083d53a, 0x2e372605, 0x2e372605, 0x8e6316a7, 0x8e6316a7, 0x283ef6cc, 0x283ef6cc, 0x20cee9de, 0x20cee9de, 0xad6fa187, 0xad6fa187, 0xd691f438, 0xf3257e63, 0x4786ba7, 0x4786ba7, }, 45 }, ++ { "cmdline_cat", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x48acf1bf, 0x48acf1bf, 0xb8777469, 0xb8777469, 0xad2fad44, 0xad2fad44, 0xa415ac59, 0xa415ac59, 0x5a7bfb26, 0x5a7bfb26, 0xccb6016, 0xccb6016, 0x77a80cb3, 0x77a80cb3, 0x2034c102, 0x2034c102, 0x444b4ccd, 0x444b4ccd, 0xe6c31bea, 0xe6c31bea, 0x8408036e, 0x8408036e, 0x9e7c556f, 0x9e7c556f, 0x445dc388, 0x445dc388, 0x94b3f850, 0x94b3f850, 0xf6f15341, 0xf6f15341, 0xcb939b5f, 0xcb939b5f, 0xbe88067d, 0xbe88067d, 0x1efc4734, 0x1efc4734, 0x7f5dfca8, 0x7f5dfca8, 0xb7b10eb9, 0xb7b10eb9, 0xb94cb441, 0x9571329, 0x8a26912b, 0x8a26912b, }, 45 }, ++ { "cmdline_cat", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0xc508d04e, 0xc508d04e, 0x6dbccbfe, 0x6dbccbfe, 0xbf06ff60, 0xbf06ff60, 0xbc5ab06, 0xbc5ab06, 0x97eeab3c, 0x97eeab3c, 0x62663589, 0x62663589, 0xb03e21e2, 0xb03e21e2, 0xea196bb6, 0xea196bb6, 0x672c16c4, 0x672c16c4, 0xefbca2cd, 0xefbca2cd, 0x1af5b410, 0x1af5b410, 0xc7a80569, 0xc7a80569, 0x4926a16, 0x4926a16, 0xee29c99c, 0xee29c99c, 0xffb15985, 0xffb15985, 0x4f608e46, 0x4f608e46, 0x3e450fd2, 0x3e450fd2, 0xac45215f, 0xac45215f, 0x789b0ce7, 0x789b0ce7, 0x4cedfe22, 0x4cedfe22, 0xa005588c, 0x701da05c, 0x6f25cec1, 0x6f25cec1, }, 45 }, ++ { "cmdline_cat", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x29e7a7f, 0x29e7a7f, 0xbd221052, 0xbd221052, 0x3b18b64, 0x3b18b64, 0x7f1e8462, 0x7f1e8462, 0xf28d5124, 0xf28d5124, 0xc336f170, 0xc336f170, 0xfe3bf988, 0xfe3bf988, 0x7bf89e05, 0x7bf89e05, 0x7857a3f8, 0x7857a3f8, 0x272c1a36, 0x272c1a36, 0xe8adb445, 0xe8adb445, 0x70cfe280, 0x70cfe280, 0x4f2b6120, 0x4f2b6120, 0xbaf5caa5, 0xbaf5caa5, 0x4b6bcab2, 0x4b6bcab2, 0x2bef7b92, 0x2bef7b92, 0x17b381dc, 0x17b381dc, 0x884c9c35, 0x884c9c35, 0x2f9eb909, 0x2f9eb909, 0xa811b3af, 0xa811b3af, 0x4c39478f, 0x5a72c3ab, 0x8071678a, 0x8071678a, }, 45 }, ++ { "gfxterm_menu", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0xd9f04953, 0xbf3fa5d0, 0xd9f04953, 0x9a068414, 0x59c36f00, 0x59c36f00, 0x620c0067, 0x620c0067, 0x620c0067, 0x1c8c6d01, 0x1c8c6d01, 0x1c8c6d01, 0xc3269013, 0xc3269013, 0xc3269013, 0x59c36f00, 0x9a068414, 0x9a068414, 0x59c36f00, }, 20 }, ++ { "gfxterm_menu", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x9254157f, 0x367e92c7, 0x9254157f, 0xbc519000, 0xaa4593fe, 0xaa4593fe, 0xa8a596c8, 0xa8a596c8, 0xa8a596c8, 0xe509baf, 0xe509baf, 0xe509baf, 0x16f0dc06, 0x16f0dc06, 0x16f0dc06, 0xaa4593fe, 0xbc519000, 0xbc519000, 0xaa4593fe, }, 20 }, ++ { "gfxterm_menu", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0x354b1976, 0x8fc746ae, 0x354b1976, 0x685c74f2, 0xc9cbf769, 0xc9cbf769, 0x3ce35e1d, 0x3ce35e1d, 0x3ce35e1d, 0xc23b9fd1, 0xc23b9fd1, 0xc23b9fd1, 0x5b18528e, 0x5b18528e, 0x5b18528e, 0xc9cbf769, 0x685c74f2, 0x685c74f2, 0xc9cbf769, }, 20 }, ++ { "gfxterm_menu", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x1c9ec014, 0xaf3ec923, 0x1c9ec014, 0x43f5296, 0x9813a416, 0x9813a416, 0x43fda3fa, 0x43fda3fa, 0x43fda3fa, 0xd22625c9, 0xd22625c9, 0xd22625c9, 0x76a62c0a, 0x76a62c0a, 0x76a62c0a, 0x9813a416, 0x43f5296, 0x43f5296, 0x9813a416, }, 20 }, ++ { "gfxterm_menu", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0xa704f7ea, 0xb7f2ec8b, 0xa704f7ea, 0xb279bf59, 0x5fcf013d, 0x5fcf013d, 0xf3582c48, 0xf3582c48, 0xf3582c48, 0x2148343e, 0x2148343e, 0x2148343e, 0x9c719024, 0x9c719024, 0x9c719024, 0x5fcf013d, 0xb279bf59, 0xb279bf59, 0x5fcf013d, }, 20 }, ++ { "gfxterm_menu", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0xf293ce36, 0xa6eb6ae8, 0xf293ce36, 0xcd87647e, 0xdd28f52b, 0xdd28f52b, 0xb3c7ef80, 0xb3c7ef80, 0xb3c7ef80, 0x92fb1664, 0x92fb1664, 0x92fb1664, 0xd15b5e2e, 0xd15b5e2e, 0xd15b5e2e, 0xdd28f52b, 0xcd87647e, 0xcd87647e, 0xdd28f52b, }, 20 }, ++ { "gfxterm_menu", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x31e75bd7, 0x9a768c6a, 0x31e75bd7, 0xa8fc31a6, 0x43d1f34, 0x43d1f34, 0xa0717008, 0xa0717008, 0xa0717008, 0xdf7bd9a0, 0xdf7bd9a0, 0xdf7bd9a0, 0x8e5a9312, 0x8e5a9312, 0x8e5a9312, 0x43d1f34, 0xa8fc31a6, 0xa8fc31a6, 0x43d1f34, }, 20 }, ++ { "gfxmenu", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x1ce7bd78, 0x682580f5, 0x1ce7bd78, 0x490ad6fe, 0x9a2e0d26, 0x64eb71ba, 0x64eb71ba, 0x64eb71ba, 0x3833877a, 0x3833877a, 0x3833877a, 0xcfc14f0a, 0xcfc14f0a, 0xcfc14f0a, 0x59c36f00, 0x490ad6fe, 0x490ad6fe, }, 18 }, ++ { "gfxmenu", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x2b6ff87d, 0x63ce2ca2, 0x2b6ff87d, 0xf00f044e, 0xa9d58ccd, 0xe2c46577, 0xe2c46577, 0xe2c46577, 0xb79bcf7d, 0xb79bcf7d, 0xb79bcf7d, 0xbc30ed71, 0xbc30ed71, 0xbc30ed71, 0xaa4593fe, 0xf00f044e, 0xf00f044e, }, 18 }, ++ { "gfxmenu", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xe61cadba, 0x9880b727, 0xe61cadba, 0xdf5f2fc0, 0x5411be8b, 0x4449774e, 0x4449774e, 0x4449774e, 0x3bf7d1da, 0x3bf7d1da, 0x3bf7d1da, 0xd2ddee01, 0xd2ddee01, 0xd2ddee01, 0xc9cbf769, 0xdf5f2fc0, 0xdf5f2fc0, }, 18 }, ++ { "gfxmenu", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x1c3742c9, 0xbe54acf7, 0x9b4ce770, 0xbe54acf7, 0x3111489, 0x740d78cf, 0x314c4c59, 0x314c4c59, 0x314c4c59, 0xdae9a625, 0xdae9a625, 0xdae9a625, 0xcbf8af57, 0xcbf8af57, 0xcbf8af57, 0x1c3742c9, 0x3111489, 0x3111489, }, 18 }, ++ { "gfxmenu", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0xcc5a7bed, 0xee571de5, 0x568aaeff, 0xee571de5, 0xe328b7a7, 0xbcda144c, 0xf56e1b60, 0xf56e1b60, 0xf56e1b60, 0x9a27c771, 0x9a27c771, 0x9a27c771, 0xd6d05397, 0xd6d05397, 0xd6d05397, 0xcc5a7bed, 0xe328b7a7, 0xe328b7a7, }, 18 }, ++ { "gfxmenu", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xef4a3312, 0x1db9877c, 0x7e1afeae, 0x1db9877c, 0x8fc0c430, 0x5d55a141, 0x96f335c6, 0x96f335c6, 0x96f335c6, 0x504171d8, 0x504171d8, 0x504171d8, 0x69f71c0, 0x69f71c0, 0x69f71c0, 0xef4a3312, 0x8fc0c430, 0x8fc0c430, }, 18 }, ++ { "gfxmenu", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x54e48d80, 0x151819bd, 0xea8d4865, 0x151819bd, 0x11d75fd2, 0x6d6bb4bc, 0x650ccd09, 0x650ccd09, 0x650ccd09, 0xe4ff3bd8, 0xe4ff3bd8, 0xe4ff3bd8, 0xc5308b73, 0xc5308b73, 0xc5308b73, 0x54e48d80, 0x11d75fd2, 0x11d75fd2, }, 18 }, ++ { "gfxterm_ar", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0xd0b06c3d, 0xde50d1a5, 0xd0b06c3d, 0x9346a17a, 0x59c36f00, 0x59c36f00, 0xacff5d47, 0xacff5d47, 0xacff5d47, 0xd27f3021, 0xd27f3021, 0xd27f3021, 0xdd5cd33, 0xdd5cd33, 0xdd5cd33, 0x59c36f00, 0x9346a17a, 0x9346a17a, 0x59c36f00, }, 20 }, ++ { "gfxterm_ar", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0xf32d50c1, 0x730a7ed, 0xf32d50c1, 0xdd28d5be, 0xaa4593fe, 0xaa4593fe, 0xba8a2d4c, 0xba8a2d4c, 0xba8a2d4c, 0x1c7f202b, 0x1c7f202b, 0x1c7f202b, 0x4df6782, 0x4df6782, 0x4df6782, 0xaa4593fe, 0xdd28d5be, 0xdd28d5be, 0xaa4593fe, }, 20 }, ++ { "gfxterm_ar", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0x711a4ac1, 0x6396f14c, 0x711a4ac1, 0x2c0d2745, 0xc9cbf769, 0xc9cbf769, 0x6b6ccbb0, 0x6b6ccbb0, 0x6b6ccbb0, 0x95b40a7c, 0x95b40a7c, 0x95b40a7c, 0xc97c723, 0xc97c723, 0xc97c723, 0xc9cbf769, 0x2c0d2745, 0x2c0d2745, 0xc9cbf769, }, 20 }, ++ { "gfxterm_ar", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x29baad6a, 0x348b1f2b, 0x29baad6a, 0x311b3fe8, 0x9813a416, 0x9813a416, 0xe8e982cc, 0xe8e982cc, 0xe8e982cc, 0x793204ff, 0x793204ff, 0x793204ff, 0xddb20d3c, 0xddb20d3c, 0xddb20d3c, 0x9813a416, 0x311b3fe8, 0x311b3fe8, 0x9813a416, }, 20 }, ++ { "gfxterm_ar", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0xf834b3bb, 0x3951bd1a, 0xf834b3bb, 0xed49fb08, 0x5fcf013d, 0x5fcf013d, 0x5aefa2a7, 0x5aefa2a7, 0x5aefa2a7, 0x88ffbad1, 0x88ffbad1, 0x88ffbad1, 0x35c61ecb, 0x35c61ecb, 0x35c61ecb, 0x5fcf013d, 0xed49fb08, 0xed49fb08, 0x5fcf013d, }, 20 }, ++ { "gfxterm_ar", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0x7e9a7a47, 0xb1651b5a, 0x7e9a7a47, 0x418ed00f, 0xdd28f52b, 0xdd28f52b, 0x83f9db69, 0x83f9db69, 0x83f9db69, 0xa2c5228d, 0xa2c5228d, 0xa2c5228d, 0xe1656ac7, 0xe1656ac7, 0xe1656ac7, 0xdd28f52b, 0x418ed00f, 0x418ed00f, 0xdd28f52b, }, 20 }, ++ { "gfxterm_ar", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0xc6a0340, 0x7dd5855c, 0xc6a0340, 0x95716931, 0x43d1f34, 0x43d1f34, 0x5f1c24c0, 0x5f1c24c0, 0x5f1c24c0, 0x20168d68, 0x20168d68, 0x20168d68, 0x7137c7da, 0x7137c7da, 0x7137c7da, 0x43d1f34, 0x95716931, 0x95716931, 0x43d1f34, }, 20 }, ++ { "gfxterm_cyr", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0xd3798aaa, 0xab48784c, 0xd3798aaa, 0x908f47ed, 0x59c36f00, 0x59c36f00, 0x1688ec7c, 0x1688ec7c, 0x1688ec7c, 0x6808811a, 0x6808811a, 0x6808811a, 0xb7a27c08, 0xb7a27c08, 0xb7a27c08, 0x59c36f00, 0x908f47ed, 0x908f47ed, 0x59c36f00, }, 20 }, ++ { "gfxterm_cyr", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0xc30d9d2a, 0x60b9ed26, 0xc30d9d2a, 0xed081855, 0xaa4593fe, 0xaa4593fe, 0x3eba2192, 0x3eba2192, 0x3eba2192, 0x984f2cf5, 0x984f2cf5, 0x984f2cf5, 0x80ef6b5c, 0x80ef6b5c, 0x80ef6b5c, 0xaa4593fe, 0xed081855, 0xed081855, 0xaa4593fe, }, 20 }, ++ { "gfxterm_cyr", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xe469e6af, 0x46ac2012, 0xe469e6af, 0xb97e8b2b, 0xc9cbf769, 0xc9cbf769, 0x60f0d993, 0x60f0d993, 0x60f0d993, 0x9e28185f, 0x9e28185f, 0x9e28185f, 0x70bd500, 0x70bd500, 0x70bd500, 0xc9cbf769, 0xb97e8b2b, 0xb97e8b2b, 0xc9cbf769, }, 20 }, ++ { "gfxterm_cyr", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x8538d2ef, 0xab143284, 0x8538d2ef, 0x9d99406d, 0x9813a416, 0x9813a416, 0x7e8326ec, 0x7e8326ec, 0x7e8326ec, 0xef58a0df, 0xef58a0df, 0xef58a0df, 0x4bd8a91c, 0x4bd8a91c, 0x4bd8a91c, 0x9813a416, 0x9d99406d, 0x9d99406d, 0x9813a416, }, 20 }, ++ { "gfxterm_cyr", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x8115198c, 0x1abdaee1, 0x8115198c, 0x9468513f, 0x5fcf013d, 0x5fcf013d, 0xa5e86484, 0xa5e86484, 0xa5e86484, 0x77f87cf2, 0x77f87cf2, 0x77f87cf2, 0xcac1d8e8, 0xcac1d8e8, 0xcac1d8e8, 0x5fcf013d, 0x9468513f, 0x9468513f, 0x5fcf013d, }, 20 }, ++ { "gfxterm_cyr", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0xea03b805, 0x74148290, 0xea03b805, 0xd517124d, 0xdd28f52b, 0xdd28f52b, 0x8f6eee40, 0x8f6eee40, 0x8f6eee40, 0xae5217a4, 0xae5217a4, 0xae5217a4, 0xedf25fee, 0xedf25fee, 0xedf25fee, 0xdd28f52b, 0xd517124d, 0xd517124d, 0xdd28f52b, }, 20 }, ++ { "gfxterm_cyr", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0xa044490f, 0xe23458db, 0xa044490f, 0x395f237e, 0x43d1f34, 0x43d1f34, 0xe1ca82c2, 0xe1ca82c2, 0xe1ca82c2, 0x9ec02b6a, 0x9ec02b6a, 0x9ec02b6a, 0xcfe161d8, 0xcfe161d8, 0xcfe161d8, 0x43d1f34, 0x395f237e, 0x395f237e, 0x43d1f34, }, 20 }, ++ { "gfxterm_heb", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0xf3259b30, 0xf1f01411, 0xf3259b30, 0xb0d35677, 0x59c36f00, 0x59c36f00, 0x97895f8e, 0x97895f8e, 0x97895f8e, 0xe90932e8, 0xe90932e8, 0xe90932e8, 0x36a3cffa, 0x36a3cffa, 0x36a3cffa, 0x59c36f00, 0xb0d35677, 0xb0d35677, 0x59c36f00, }, 20 }, ++ { "gfxterm_heb", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x53a43759, 0xe0f26bfa, 0x53a43759, 0x7da1b226, 0xaa4593fe, 0xaa4593fe, 0xbf482a4e, 0xbf482a4e, 0xbf482a4e, 0x19bd2729, 0x19bd2729, 0x19bd2729, 0x11d6080, 0x11d6080, 0x11d6080, 0xaa4593fe, 0x7da1b226, 0x7da1b226, 0xaa4593fe, }, 20 }, ++ { "gfxterm_heb", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xd7ff8d53, 0x665b2728, 0xd7ff8d53, 0x8ae8e0d7, 0xc9cbf769, 0xc9cbf769, 0x5a693e73, 0x5a693e73, 0x5a693e73, 0xa4b1ffbf, 0xa4b1ffbf, 0xa4b1ffbf, 0x3d9232e0, 0x3d9232e0, 0x3d9232e0, 0xc9cbf769, 0x8ae8e0d7, 0x8ae8e0d7, 0xc9cbf769, }, 20 }, ++ { "gfxterm_heb", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x99fddcbe, 0x6d5c8895, 0x99fddcbe, 0x815c4e3c, 0x9813a416, 0x9813a416, 0x9bcf9821, 0x9bcf9821, 0x9bcf9821, 0xa141e12, 0xa141e12, 0xa141e12, 0xae9417d1, 0xae9417d1, 0xae9417d1, 0x9813a416, 0x815c4e3c, 0x815c4e3c, 0x9813a416, }, 20 }, ++ { "gfxterm_heb", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x5797846, 0x25a6ad40, 0x5797846, 0x100430f5, 0x5fcf013d, 0x5fcf013d, 0xddc86daf, 0xddc86daf, 0xddc86daf, 0xfd875d9, 0xfd875d9, 0xfd875d9, 0xb2e1d1c3, 0xb2e1d1c3, 0xb2e1d1c3, 0x5fcf013d, 0x100430f5, 0x100430f5, 0x5fcf013d, }, 20 }, ++ { "gfxterm_heb", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0x30653ae8, 0x7fcd187, 0x30653ae8, 0xf7190a0, 0xdd28f52b, 0xdd28f52b, 0x24c3d325, 0x24c3d325, 0x24c3d325, 0x5ff2ac1, 0x5ff2ac1, 0x5ff2ac1, 0x465f628b, 0x465f628b, 0x465f628b, 0xdd28f52b, 0xf7190a0, 0xf7190a0, 0xdd28f52b, }, 20 }, ++ { "gfxterm_heb", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x3bd91638, 0x1d74dd4a, 0x3bd91638, 0xa2c27c49, 0x43d1f34, 0x43d1f34, 0x53d1ad3d, 0x53d1ad3d, 0x53d1ad3d, 0x2cdb0495, 0x2cdb0495, 0x2cdb0495, 0x7dfa4e27, 0x7dfa4e27, 0x7dfa4e27, 0x43d1f34, 0xa2c27c49, 0xa2c27c49, 0x43d1f34, }, 20 }, ++ { "gfxterm_gre", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0xbe2c351a, 0x2692720, 0xbe2c351a, 0xfddaf85d, 0x59c36f00, 0x59c36f00, 0x1b2e2301, 0x1b2e2301, 0x1b2e2301, 0x65ae4e67, 0x65ae4e67, 0x65ae4e67, 0xba04b375, 0xba04b375, 0xba04b375, 0x59c36f00, 0xfddaf85d, 0xfddaf85d, 0x59c36f00, }, 20 }, ++ { "gfxterm_gre", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x1eca82e1, 0xe8fa59cc, 0x1eca82e1, 0x30cf079e, 0xaa4593fe, 0xaa4593fe, 0xaf27ddc5, 0xaf27ddc5, 0xaf27ddc5, 0x9d2d0a2, 0x9d2d0a2, 0x9d2d0a2, 0x1172970b, 0x1172970b, 0x1172970b, 0xaa4593fe, 0x30cf079e, 0x30cf079e, 0xaa4593fe, }, 20 }, ++ { "gfxterm_gre", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xa9ccd435, 0x1ac646eb, 0xa9ccd435, 0xf4dbb9b1, 0xc9cbf769, 0xc9cbf769, 0x86d69aa0, 0x86d69aa0, 0x86d69aa0, 0x780e5b6c, 0x780e5b6c, 0x780e5b6c, 0xe12d9633, 0xe12d9633, 0xe12d9633, 0xc9cbf769, 0xf4dbb9b1, 0xf4dbb9b1, 0xc9cbf769, }, 20 }, ++ { "gfxterm_gre", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0xf96d568, 0x7ad05c1b, 0xf96d568, 0x173747ea, 0x9813a416, 0x9813a416, 0xacf9792a, 0xacf9792a, 0xacf9792a, 0x3d22ff19, 0x3d22ff19, 0x3d22ff19, 0x99a2f6da, 0x99a2f6da, 0x99a2f6da, 0x9813a416, 0x173747ea, 0x173747ea, 0x9813a416, }, 20 }, ++ { "gfxterm_gre", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0xa0dc6b9c, 0xc2761148, 0xa0dc6b9c, 0xb5a1232f, 0x5fcf013d, 0x5fcf013d, 0x4e05748b, 0x4e05748b, 0x4e05748b, 0x9c156cfd, 0x9c156cfd, 0x9c156cfd, 0x212cc8e7, 0x212cc8e7, 0x212cc8e7, 0x5fcf013d, 0xb5a1232f, 0xb5a1232f, 0x5fcf013d, }, 20 }, ++ { "gfxterm_gre", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0xcd722f7d, 0xe4df8d6b, 0xcd722f7d, 0xf2668535, 0xdd28f52b, 0xdd28f52b, 0xbdbb8019, 0xbdbb8019, 0xbdbb8019, 0x9c8779fd, 0x9c8779fd, 0x9c8779fd, 0xdf2731b7, 0xdf2731b7, 0xdf2731b7, 0xdd28f52b, 0xf2668535, 0xf2668535, 0xdd28f52b, }, 20 }, ++ { "gfxterm_gre", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0xa6c99d2f, 0x1de04317, 0xa6c99d2f, 0x3fd2f75e, 0x43d1f34, 0x43d1f34, 0x3f85b7d3, 0x3f85b7d3, 0x3f85b7d3, 0x408f1e7b, 0x408f1e7b, 0x408f1e7b, 0x11ae54c9, 0x11ae54c9, 0x11ae54c9, 0x43d1f34, 0x3fd2f75e, 0x3fd2f75e, 0x43d1f34, }, 20 }, ++ { "gfxterm_ru", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x1e35b709, 0x2683bf92, 0x1e35b709, 0x5dc37a4e, 0x59c36f00, 0x59c36f00, 0xd697967f, 0xd697967f, 0xd697967f, 0xa817fb19, 0xa817fb19, 0xa817fb19, 0x77bd060b, 0x77bd060b, 0x77bd060b, 0x59c36f00, 0x5dc37a4e, 0x5dc37a4e, 0x59c36f00, }, 20 }, ++ { "gfxterm_ru", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x53ff7735, 0x8cbf197c, 0x53ff7735, 0x7dfaf24a, 0xaa4593fe, 0xaa4593fe, 0x389a922, 0x389a922, 0x389a922, 0xa57ca445, 0xa57ca445, 0xa57ca445, 0xbddce3ec, 0xbddce3ec, 0xbddce3ec, 0xaa4593fe, 0x7dfaf24a, 0x7dfaf24a, 0xaa4593fe, }, 20 }, ++ { "gfxterm_ru", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0x5217c47d, 0x7c8ae63e, 0x5217c47d, 0xf00a9f9, 0xc9cbf769, 0xc9cbf769, 0x3995409, 0x3995409, 0x3995409, 0xfd4195c5, 0xfd4195c5, 0xfd4195c5, 0x6462589a, 0x6462589a, 0x6462589a, 0xc9cbf769, 0xf00a9f9, 0xf00a9f9, 0xc9cbf769, }, 20 }, ++ { "gfxterm_ru", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x45b67706, 0x375fb5db, 0x45b67706, 0x5d17e584, 0x9813a416, 0x9813a416, 0x8195719b, 0x8195719b, 0x8195719b, 0x104ef7a8, 0x104ef7a8, 0x104ef7a8, 0xb4cefe6b, 0xb4cefe6b, 0xb4cefe6b, 0x9813a416, 0x5d17e584, 0x5d17e584, 0x9813a416, }, 20 }, ++ { "gfxterm_ru", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0xfc209a25, 0xd5c20779, 0xfc209a25, 0xe95dd296, 0x5fcf013d, 0x5fcf013d, 0xe5699efe, 0xe5699efe, 0xe5699efe, 0x37798688, 0x37798688, 0x37798688, 0x8a402292, 0x8a402292, 0x8a402292, 0x5fcf013d, 0xe95dd296, 0xe95dd296, 0x5fcf013d, }, 20 }, ++ { "gfxterm_ru", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0x77f956f0, 0xfb0cc079, 0x77f956f0, 0x48edfcb8, 0xdd28f52b, 0xdd28f52b, 0xd51b1dc9, 0xd51b1dc9, 0xd51b1dc9, 0xf427e42d, 0xf427e42d, 0xf427e42d, 0xb787ac67, 0xb787ac67, 0xb787ac67, 0xdd28f52b, 0x48edfcb8, 0x48edfcb8, 0xdd28f52b, }, 20 }, ++ { "gfxterm_ru", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x1d9ac82a, 0xa254aa53, 0x1d9ac82a, 0x8481a25b, 0x43d1f34, 0x43d1f34, 0xc304df68, 0xc304df68, 0xc304df68, 0xbc0e76c0, 0xbc0e76c0, 0xbc0e76c0, 0xed2f3c72, 0xed2f3c72, 0xed2f3c72, 0x43d1f34, 0x8481a25b, 0x8481a25b, 0x43d1f34, }, 20 }, ++ { "gfxterm_fr", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0xa6239a89, 0x8dc4bfbb, 0xa6239a89, 0xe5d557ce, 0x59c36f00, 0x59c36f00, 0x244cf807, 0x244cf807, 0x244cf807, 0x5acc9561, 0x5acc9561, 0x5acc9561, 0x85666873, 0x85666873, 0x85666873, 0x59c36f00, 0xe5d557ce, 0xe5d557ce, 0x59c36f00, }, 20 }, ++ { "gfxterm_fr", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x742cede9, 0x83bb7a50, 0x742cede9, 0x5a296896, 0xaa4593fe, 0xaa4593fe, 0xd83f8aeb, 0xd83f8aeb, 0xd83f8aeb, 0x7eca878c, 0x7eca878c, 0x7eca878c, 0x666ac025, 0x666ac025, 0x666ac025, 0xaa4593fe, 0x5a296896, 0x5a296896, 0xaa4593fe, }, 20 }, ++ { "gfxterm_fr", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xe20a98b0, 0x7e8cedef, 0xe20a98b0, 0xbf1df534, 0xc9cbf769, 0xc9cbf769, 0x2748b88c, 0x2748b88c, 0x2748b88c, 0xd9907940, 0xd9907940, 0xd9907940, 0x40b3b41f, 0x40b3b41f, 0x40b3b41f, 0xc9cbf769, 0xbf1df534, 0xbf1df534, 0xc9cbf769, }, 20 }, ++ { "gfxterm_fr", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x8f911ca4, 0xcbf1d895, 0x8f911ca4, 0x97308e26, 0x9813a416, 0x9813a416, 0x5b359bf4, 0x5b359bf4, 0x5b359bf4, 0xcaee1dc7, 0xcaee1dc7, 0xcaee1dc7, 0x6e6e1404, 0x6e6e1404, 0x6e6e1404, 0x9813a416, 0x97308e26, 0x97308e26, 0x9813a416, }, 20 }, ++ { "gfxterm_fr", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x1bf82c82, 0xc7b39627, 0x1bf82c82, 0xe856431, 0x5fcf013d, 0x5fcf013d, 0xa9dbae99, 0xa9dbae99, 0xa9dbae99, 0x7bcbb6ef, 0x7bcbb6ef, 0x7bcbb6ef, 0xc6f212f5, 0xc6f212f5, 0xc6f212f5, 0x5fcf013d, 0xe856431, 0xe856431, 0x5fcf013d, }, 20 }, ++ { "gfxterm_fr", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0xfae19a5c, 0xd1e8fabb, 0xfae19a5c, 0xc5f53014, 0xdd28f52b, 0xdd28f52b, 0xfa2c5565, 0xfa2c5565, 0xfa2c5565, 0xdb10ac81, 0xdb10ac81, 0xdb10ac81, 0x98b0e4cb, 0x98b0e4cb, 0x98b0e4cb, 0xdd28f52b, 0xc5f53014, 0xc5f53014, 0xdd28f52b, }, 20 }, ++ { "gfxterm_fr", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x9a18f7bc, 0x5fcecc43, 0x9a18f7bc, 0x3039dcd, 0x43d1f34, 0x43d1f34, 0x287a2b96, 0x287a2b96, 0x287a2b96, 0x5770823e, 0x5770823e, 0x5770823e, 0x651c88c, 0x651c88c, 0x651c88c, 0x43d1f34, 0x3039dcd, 0x3039dcd, 0x43d1f34, }, 20 }, ++ { "gfxterm_quot", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x65112dfc, 0x3dec17f, 0x65112dfc, 0x26e7e0bb, 0x59c36f00, 0x59c36f00, 0x620c0067, 0x620c0067, 0x620c0067, 0x1c8c6d01, 0x1c8c6d01, 0x1c8c6d01, 0xc3269013, 0xc3269013, 0xc3269013, 0x59c36f00, 0x26e7e0bb, 0x26e7e0bb, 0x59c36f00, }, 20 }, ++ { "gfxterm_quot", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x2b3430fb, 0x8f1eb743, 0x2b3430fb, 0x531b584, 0xaa4593fe, 0xaa4593fe, 0xa8a596c8, 0xa8a596c8, 0xa8a596c8, 0xe509baf, 0xe509baf, 0xe509baf, 0x16f0dc06, 0x16f0dc06, 0x16f0dc06, 0xaa4593fe, 0x531b584, 0x531b584, 0xaa4593fe, }, 20 }, ++ { "gfxterm_quot", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xb523e920, 0xfafb6f8, 0xb523e920, 0xe83484a4, 0xc9cbf769, 0xc9cbf769, 0x3ce35e1d, 0x3ce35e1d, 0x3ce35e1d, 0xc23b9fd1, 0xc23b9fd1, 0xc23b9fd1, 0x5b18528e, 0x5b18528e, 0x5b18528e, 0xc9cbf769, 0xe83484a4, 0xe83484a4, 0xc9cbf769, }, 20 }, ++ { "gfxterm_quot", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0xa9bf7336, 0x1a1f7a01, 0xa9bf7336, 0xb11ee1b4, 0x9813a416, 0x9813a416, 0x43fda3fa, 0x43fda3fa, 0x43fda3fa, 0xd22625c9, 0xd22625c9, 0xd22625c9, 0x76a62c0a, 0x76a62c0a, 0x76a62c0a, 0x9813a416, 0xb11ee1b4, 0xb11ee1b4, 0x9813a416, }, 20 }, ++ { "gfxterm_quot", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0xe5271912, 0xf5d10273, 0xe5271912, 0xf05a51a1, 0x5fcf013d, 0x5fcf013d, 0xf3582c48, 0xf3582c48, 0xf3582c48, 0x2148343e, 0x2148343e, 0x2148343e, 0x9c719024, 0x9c719024, 0x9c719024, 0x5fcf013d, 0xf05a51a1, 0xf05a51a1, 0x5fcf013d, }, 20 }, ++ { "gfxterm_quot", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0x66a34f49, 0x32dbeb97, 0x66a34f49, 0x59b7e501, 0xdd28f52b, 0xdd28f52b, 0xb3c7ef80, 0xb3c7ef80, 0xb3c7ef80, 0x92fb1664, 0x92fb1664, 0x92fb1664, 0xd15b5e2e, 0xd15b5e2e, 0xd15b5e2e, 0xdd28f52b, 0x59b7e501, 0x59b7e501, 0xdd28f52b, }, 20 }, ++ { "gfxterm_quot", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x7c2f19da, 0xd7bece67, 0x7c2f19da, 0xe53473ab, 0x43d1f34, 0x43d1f34, 0xa0717008, 0xa0717008, 0xa0717008, 0xdf7bd9a0, 0xdf7bd9a0, 0xdf7bd9a0, 0x8e5a9312, 0x8e5a9312, 0x8e5a9312, 0x43d1f34, 0xe53473ab, 0xe53473ab, 0x43d1f34, }, 20 }, ++ { "gfxterm_piglatin", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x37943894, 0x78248c70, 0x37943894, 0x7462f5d3, 0x59c36f00, 0x59c36f00, 0xf4be229a, 0xf4be229a, 0xf4be229a, 0x8a3e4ffc, 0x8a3e4ffc, 0x8a3e4ffc, 0x5594b2ee, 0x5594b2ee, 0x5594b2ee, 0x59c36f00, 0x7462f5d3, 0x7462f5d3, 0x59c36f00, }, 20 }, ++ { "gfxterm_piglatin", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0xd5158e6c, 0xdc71ba0f, 0xd5158e6c, 0xfb100b13, 0xaa4593fe, 0xaa4593fe, 0xd3ed72a3, 0xd3ed72a3, 0xd3ed72a3, 0x75187fc4, 0x75187fc4, 0x75187fc4, 0x6db8386d, 0x6db8386d, 0x6db8386d, 0xaa4593fe, 0xfb100b13, 0xfb100b13, 0xaa4593fe, }, 20 }, ++ { "gfxterm_piglatin", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0x6277a9e6, 0xa3265ffb, 0x6277a9e6, 0x3f60c462, 0xc9cbf769, 0xc9cbf769, 0x2dcf8a8d, 0x2dcf8a8d, 0x2dcf8a8d, 0xd3174b41, 0xd3174b41, 0xd3174b41, 0x4a34861e, 0x4a34861e, 0x4a34861e, 0xc9cbf769, 0x3f60c462, 0x3f60c462, 0xc9cbf769, }, 20 }, ++ { "gfxterm_piglatin", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x81115dc4, 0xddf3f768, 0x81115dc4, 0x99b0cf46, 0x9813a416, 0x9813a416, 0x9b9d96df, 0x9b9d96df, 0x9b9d96df, 0xa4610ec, 0xa4610ec, 0xa4610ec, 0xaec6192f, 0xaec6192f, 0xaec6192f, 0x9813a416, 0x99b0cf46, 0x99b0cf46, 0x9813a416, }, 20 }, ++ { "gfxterm_piglatin", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x5e96a904, 0x27864d3d, 0x5e96a904, 0x4bebe1b7, 0x5fcf013d, 0x5fcf013d, 0x18cae7f4, 0x18cae7f4, 0x18cae7f4, 0xcadaff82, 0xcadaff82, 0xcadaff82, 0x77e35b98, 0x77e35b98, 0x77e35b98, 0x5fcf013d, 0x4bebe1b7, 0x4bebe1b7, 0x5fcf013d, }, 20 }, ++ { "gfxterm_piglatin", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0xd00b19f8, 0xba73a9c6, 0xd00b19f8, 0xef1fb3b0, 0xdd28f52b, 0xdd28f52b, 0xb660046d, 0xb660046d, 0xb660046d, 0x975cfd89, 0x975cfd89, 0x975cfd89, 0xd4fcb5c3, 0xd4fcb5c3, 0xd4fcb5c3, 0xdd28f52b, 0xef1fb3b0, 0xef1fb3b0, 0xdd28f52b, }, 20 }, ++ { "gfxterm_piglatin", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x8b4b98cd, 0x78ddc6e4, 0x8b4b98cd, 0x1250f2bc, 0x43d1f34, 0x43d1f34, 0x4889d3fd, 0x4889d3fd, 0x4889d3fd, 0x37837a55, 0x37837a55, 0x37837a55, 0x66a230e7, 0x66a230e7, 0x66a230e7, 0x43d1f34, 0x1250f2bc, 0x1250f2bc, 0x43d1f34, }, 20 }, ++ { "gfxterm_ch", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0xfecb570e, 0xccb97a7a, 0xfecb570e, 0xbd3d9a49, 0x59c36f00, 0x59c36f00, 0x40281258, 0x40281258, 0x40281258, 0x3ea87f3e, 0x3ea87f3e, 0x3ea87f3e, 0xe102822c, 0xe102822c, 0xe102822c, 0x59c36f00, 0xbd3d9a49, 0xbd3d9a49, 0x59c36f00, }, 20 }, ++ { "gfxterm_ch", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x897d1fac, 0xaa982529, 0x897d1fac, 0xa7789ad3, 0xaa4593fe, 0xaa4593fe, 0xa482510, 0xa482510, 0xa482510, 0xacbd2877, 0xacbd2877, 0xacbd2877, 0xb41d6fde, 0xb41d6fde, 0xb41d6fde, 0xaa4593fe, 0xa7789ad3, 0xa7789ad3, 0xaa4593fe, }, 20 }, ++ { "gfxterm_ch", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xd02a5297, 0xe627ab58, 0xd02a5297, 0x8d3d3f13, 0xc9cbf769, 0xc9cbf769, 0xbf0a8b7f, 0xbf0a8b7f, 0xbf0a8b7f, 0x41d24ab3, 0x41d24ab3, 0x41d24ab3, 0xd8f187ec, 0xd8f187ec, 0xd8f187ec, 0xc9cbf769, 0x8d3d3f13, 0x8d3d3f13, 0xc9cbf769, }, 20 }, ++ { "gfxterm_ch", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0xa653dcda, 0x3392e976, 0xa653dcda, 0xbef24e58, 0x9813a416, 0x9813a416, 0x4f2bc106, 0x4f2bc106, 0x4f2bc106, 0xdef04735, 0xdef04735, 0xdef04735, 0x7a704ef6, 0x7a704ef6, 0x7a704ef6, 0x9813a416, 0xbef24e58, 0xbef24e58, 0x9813a416, }, 20 }, ++ { "gfxterm_ch", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0xe2d7b585, 0x35241f36, 0xe2d7b585, 0xf7aafd36, 0x5fcf013d, 0x5fcf013d, 0xf2bd04db, 0xf2bd04db, 0xf2bd04db, 0x20ad1cad, 0x20ad1cad, 0x20ad1cad, 0x9d94b8b7, 0x9d94b8b7, 0x9d94b8b7, 0x5fcf013d, 0xf7aafd36, 0xf7aafd36, 0x5fcf013d, }, 20 }, ++ { "gfxterm_ch", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0x72ff749c, 0xeda8c283, 0x72ff749c, 0x4debded4, 0xdd28f52b, 0xdd28f52b, 0xb8c9cc22, 0xb8c9cc22, 0xb8c9cc22, 0x99f535c6, 0x99f535c6, 0x99f535c6, 0xda557d8c, 0xda557d8c, 0xda557d8c, 0xdd28f52b, 0x4debded4, 0x4debded4, 0xdd28f52b, }, 20 }, ++ { "gfxterm_ch", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0xb7cac764, 0xeb4bf417, 0xb7cac764, 0x2ed1ad15, 0x43d1f34, 0x43d1f34, 0xce718801, 0xce718801, 0xce718801, 0xb17b21a9, 0xb17b21a9, 0xb17b21a9, 0xe05a6b1b, 0xe05a6b1b, 0xe05a6b1b, 0x43d1f34, 0x2ed1ad15, 0x2ed1ad15, 0x43d1f34, }, 20 }, ++ { "gfxterm_red", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x930e8e13, 0xf5c16290, 0x930e8e13, 0x27f5f1c0, 0x59c36f00, 0x59c36f00, 0xbad4e11, 0xbad4e11, 0xbad4e11, 0x752d2377, 0x752d2377, 0x752d2377, 0xaa87de65, 0xaa87de65, 0xaa87de65, 0x59c36f00, 0x27f5f1c0, 0x27f5f1c0, 0x59c36f00, }, 20 }, ++ { "gfxterm_red", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0xff9301f2, 0x5bb9864a, 0xff9301f2, 0x31c145de, 0xaa4593fe, 0xaa4593fe, 0x23bf2c32, 0x23bf2c32, 0x23bf2c32, 0x854a2155, 0x854a2155, 0x854a2155, 0x9dea66fc, 0x9dea66fc, 0x9dea66fc, 0xaa4593fe, 0x31c145de, 0x31c145de, 0xaa4593fe, }, 20 }, ++ { "gfxterm_red", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xfc5938ef, 0x46d56737, 0xfc5938ef, 0x23cf2668, 0xc9cbf769, 0xc9cbf769, 0xa8c549aa, 0xa8c549aa, 0xa8c549aa, 0x561d8866, 0x561d8866, 0x561d8866, 0xcf3e4539, 0xcf3e4539, 0xcf3e4539, 0xc9cbf769, 0x23cf2668, 0x23cf2668, 0xc9cbf769, }, 20 }, ++ { "gfxterm_red", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0xe7160822, 0x54b60115, 0xe7160822, 0x168efa6f, 0x9813a416, 0x9813a416, 0xb774a5aa, 0xb774a5aa, 0xb774a5aa, 0x26af2399, 0x26af2399, 0x26af2399, 0x822f2a5a, 0x822f2a5a, 0x822f2a5a, 0x9813a416, 0x168efa6f, 0x168efa6f, 0x9813a416, }, 20 }, ++ { "gfxterm_red", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0xf655f9b2, 0xe6a3e2d3, 0xf655f9b2, 0xd1d7405f, 0x5fcf013d, 0x5fcf013d, 0x2accaa08, 0x2accaa08, 0x2accaa08, 0xf8dcb27e, 0xf8dcb27e, 0xf8dcb27e, 0x45e51664, 0x45e51664, 0x45e51664, 0x5fcf013d, 0xd1d7405f, 0xd1d7405f, 0x5fcf013d, }, 20 }, ++ { "gfxterm_red", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0x2d85ebdc, 0x79fd4f02, 0x2d85ebdc, 0xc48ae2b6, 0xdd28f52b, 0xdd28f52b, 0x76b28a95, 0x76b28a95, 0x76b28a95, 0x578e7371, 0x578e7371, 0x578e7371, 0x142e3b3b, 0x142e3b3b, 0x142e3b3b, 0xdd28f52b, 0xc48ae2b6, 0xc48ae2b6, 0xdd28f52b, }, 20 }, ++ { "gfxterm_red", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x29c00f98, 0x8251d825, 0x29c00f98, 0x35a750d1, 0x43d1f34, 0x43d1f34, 0x48b70bc8, 0x48b70bc8, 0x48b70bc8, 0x37bda260, 0x37bda260, 0x37bda260, 0x669ce8d2, 0x669ce8d2, 0x669ce8d2, 0x43d1f34, 0x35a750d1, 0x35a750d1, 0x43d1f34, }, 20 }, ++ { "gfxterm_high", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x4afab717, 0x2c355b94, 0x4afab717, 0x1166d9d0, 0x59c36f00, 0x59c36f00, 0x620c0067, 0x620c0067, 0x620c0067, 0x1c8c6d01, 0x1c8c6d01, 0x1c8c6d01, 0xc3269013, 0xc3269013, 0xc3269013, 0x59c36f00, 0x1166d9d0, 0x1166d9d0, 0x59c36f00, }, 20 }, ++ { "gfxterm_high", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0xe3daadd4, 0x47f02a6c, 0xe3daadd4, 0x5ea9fb21, 0xaa4593fe, 0xaa4593fe, 0xa8a596c8, 0xa8a596c8, 0xa8a596c8, 0xe509baf, 0xe509baf, 0xe509baf, 0x16f0dc06, 0x16f0dc06, 0x16f0dc06, 0xaa4593fe, 0x5ea9fb21, 0x5ea9fb21, 0xaa4593fe, }, 20 }, ++ { "gfxterm_high", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xf140d1df, 0x4bcc8e07, 0xf140d1df, 0x7c962dcb, 0xc9cbf769, 0xc9cbf769, 0x3ce35e1d, 0x3ce35e1d, 0x3ce35e1d, 0xc23b9fd1, 0xc23b9fd1, 0xc23b9fd1, 0x5b18528e, 0x5b18528e, 0x5b18528e, 0xc9cbf769, 0x7c962dcb, 0x7c962dcb, 0xc9cbf769, }, 20 }, ++ { "gfxterm_high", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0xe709a12d, 0x54a9a81a, 0xe709a12d, 0xde04d65c, 0x9813a416, 0x9813a416, 0x43fda3fa, 0x43fda3fa, 0x43fda3fa, 0xd22625c9, 0xd22625c9, 0xd22625c9, 0x76a62c0a, 0x76a62c0a, 0x76a62c0a, 0x9813a416, 0xde04d65c, 0xde04d65c, 0x9813a416, }, 20 }, ++ { "gfxterm_high", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x65eff77c, 0x7519ec1d, 0x65eff77c, 0x1cd7d353, 0x5fcf013d, 0x5fcf013d, 0xf3582c48, 0xf3582c48, 0xf3582c48, 0x2148343e, 0x2148343e, 0x2148343e, 0x9c719024, 0x9c719024, 0x9c719024, 0x5fcf013d, 0x1cd7d353, 0x1cd7d353, 0x5fcf013d, }, 20 }, ++ { "gfxterm_high", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0x7318831a, 0x276027c4, 0x7318831a, 0xd7e4f5bb, 0xdd28f52b, 0xdd28f52b, 0xb3c7ef80, 0xb3c7ef80, 0xb3c7ef80, 0x92fb1664, 0x92fb1664, 0x92fb1664, 0xd15b5e2e, 0xd15b5e2e, 0xd15b5e2e, 0xdd28f52b, 0xd7e4f5bb, 0xd7e4f5bb, 0xdd28f52b, }, 20 }, ++ { "gfxterm_high", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x6927a7d4, 0xc2b67069, 0x6927a7d4, 0xfc345163, 0x43d1f34, 0x43d1f34, 0xa0717008, 0xa0717008, 0xa0717008, 0xdf7bd9a0, 0xdf7bd9a0, 0xdf7bd9a0, 0x8e5a9312, 0x8e5a9312, 0x8e5a9312, 0x43d1f34, 0xfc345163, 0xfc345163, 0x43d1f34, }, 20 }, ++ { "videotest", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0xe6012f70, 0xe6012f70, 0xe6012f70, 0xe6012f70, 0xe6012f70, }, 5 }, ++ { "videotest", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xfb6be77b, 0xfb6be77b, 0xfb6be77b, 0xfb6be77b, 0xfb6be77b, }, 5 }, ++ { "videotest", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0x67c0629f, 0x67c0629f, 0x67c0629f, 0x67c0629f, 0x67c0629f, }, 5 }, ++ { "videotest", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x8f20afbb, 0xd8f7abc, 0x8f937344, 0xd3ca643, 0x8e471645, }, 5 }, ++ { "videotest", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0xdca764da, 0x9f76da9a, 0x5b04185a, 0x18d5a61a, 0xd60deb2b, }, 5 }, ++ { "videotest", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0x7b87af36, 0x7cb96093, 0x75fa307c, 0x72c4ffd9, 0x677c91a2, }, 5 }, ++ { "videotest", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x72981c65, 0x50120635, 0x378c28c5, 0x15063295, 0xf8b07525, }, 5 }, ++ { "videotest", 640, 480, 0x2, 256, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi256 */, (grub_uint32_t []) { 0xc8f64b58, 0xc8f64b58, 0xc8f64b58, 0xc8f64b58, 0xc8f64b58, }, 5 }, ++ { "videotest", 800, 600, 0x2, 256, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi256 */, (grub_uint32_t []) { 0x2b499dfa, 0x2b499dfa, 0x2b499dfa, 0x2b499dfa, 0x2b499dfa, }, 5 }, ++ { "videotest", 1024, 768, 0x2, 256, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi256 */, (grub_uint32_t []) { 0x6156b420, 0x6156b420, 0x6156b420, 0x6156b420, 0x6156b420, }, 5 }, ++ { "videotest", 640, 480, 0x1, 256, 15, 2, 10, 5, 5, 5, 0, 5, 0, 0 /* 640x480xrgba5550 */, (grub_uint32_t []) { 0x363285ca, 0x363285ca, 0x363285ca, 0x363285ca, 0x363285ca, }, 5 }, ++ { "videotest", 800, 600, 0x1, 256, 15, 2, 10, 5, 5, 5, 0, 5, 0, 0 /* 800x600xrgba5550 */, (grub_uint32_t []) { 0x25bb37f4, 0x25bb37f4, 0x25bb37f4, 0x25bb37f4, 0x25bb37f4, }, 5 }, ++ { "videotest", 1024, 768, 0x1, 256, 15, 2, 10, 5, 5, 5, 0, 5, 0, 0 /* 1024x768xrgba5550 */, (grub_uint32_t []) { 0xeeab9e91, 0xeeab9e91, 0xeeab9e91, 0xeeab9e91, 0xeeab9e91, }, 5 }, ++ { "videotest", 640, 480, 0x1, 256, 16, 2, 11, 5, 5, 6, 0, 5, 0, 0 /* 640x480xrgba5650 */, (grub_uint32_t []) { 0x26a9a50b, 0x26a9a50b, 0x26a9a50b, 0x26a9a50b, 0x26a9a50b, }, 5 }, ++ { "videotest", 800, 600, 0x1, 256, 16, 2, 11, 5, 5, 6, 0, 5, 0, 0 /* 800x600xrgba5650 */, (grub_uint32_t []) { 0x2c0f4fe7, 0x2c0f4fe7, 0x2c0f4fe7, 0x2c0f4fe7, 0x2c0f4fe7, }, 5 }, ++ { "videotest", 1024, 768, 0x1, 256, 16, 2, 11, 5, 5, 6, 0, 5, 0, 0 /* 1024x768xrgba5650 */, (grub_uint32_t []) { 0x46c11052, 0x46c11052, 0x46c11052, 0x46c11052, 0x46c11052, }, 5 }, ++ { "videotest", 640, 480, 0x1, 256, 24, 3, 16, 8, 8, 8, 0, 8, 0, 0 /* 640x480xrgba8880 */, (grub_uint32_t []) { 0xe56cf615, 0xcd2be572, 0xb5e2d0db, 0x9da5c3bc, 0x4470bb89, }, 5 }, ++ { "videotest", 800, 600, 0x1, 256, 24, 3, 16, 8, 8, 8, 0, 8, 0, 0 /* 800x600xrgba8880 */, (grub_uint32_t []) { 0x2a25b871, 0x4bf85361, 0xe99e6e51, 0x88438541, 0xa8be62c0, }, 5 }, ++ { "videotest", 1024, 768, 0x1, 256, 24, 3, 16, 8, 8, 8, 0, 8, 0, 0 /* 1024x768xrgba8880 */, (grub_uint32_t []) { 0x81523037, 0xd8c0bfd3, 0x32772fff, 0x6be5a01b, 0xe2f47956, }, 5 }, ++ { "videotest", 640, 480, 0x1, 256, 15, 2, 0, 5, 5, 5, 10, 5, 0, 0 /* 640x480xbgra5550 */, (grub_uint32_t []) { 0x1833bb41, 0x1833bb41, 0x1833bb41, 0x1833bb41, 0x1833bb41, }, 5 }, ++ { "videotest", 800, 600, 0x1, 256, 15, 2, 0, 5, 5, 5, 10, 5, 0, 0 /* 800x600xbgra5550 */, (grub_uint32_t []) { 0x2c39a0e8, 0x2c39a0e8, 0x2c39a0e8, 0x2c39a0e8, 0x2c39a0e8, }, 5 }, ++ { "videotest", 1024, 768, 0x1, 256, 15, 2, 0, 5, 5, 5, 10, 5, 0, 0 /* 1024x768xbgra5550 */, (grub_uint32_t []) { 0xf0d4c23, 0xf0d4c23, 0xf0d4c23, 0xf0d4c23, 0xf0d4c23, }, 5 }, ++ { "videotest", 640, 480, 0x1, 256, 16, 2, 0, 5, 5, 6, 11, 5, 0, 0 /* 640x480xbgra5650 */, (grub_uint32_t []) { 0x456d063c, 0x456d063c, 0x456d063c, 0x456d063c, 0x456d063c, }, 5 }, ++ { "videotest", 800, 600, 0x1, 256, 16, 2, 0, 5, 5, 6, 11, 5, 0, 0 /* 800x600xbgra5650 */, (grub_uint32_t []) { 0x47e15a2e, 0x47e15a2e, 0x47e15a2e, 0x47e15a2e, 0x47e15a2e, }, 5 }, ++ { "videotest", 1024, 768, 0x1, 256, 16, 2, 0, 5, 5, 6, 11, 5, 0, 0 /* 1024x768xbgra5650 */, (grub_uint32_t []) { 0x54d7300d, 0x54d7300d, 0x54d7300d, 0x54d7300d, 0x54d7300d, }, 5 }, ++ { "videotest", 640, 480, 0x1, 256, 24, 3, 0, 8, 8, 8, 16, 8, 0, 0 /* 640x480xbgra8880 */, (grub_uint32_t []) { 0x770da211, 0x8ef2528e, 0x811e35de, 0x78e1c541, 0x9ec6fb7e, }, 5 }, ++ { "videotest", 800, 600, 0x1, 256, 24, 3, 0, 8, 8, 8, 16, 8, 0, 0 /* 800x600xbgra8880 */, (grub_uint32_t []) { 0xeb181fbc, 0xae648cc1, 0x61e13946, 0x249daa3b, 0xfb0624b9, }, 5 }, ++ { "videotest", 1024, 768, 0x1, 256, 24, 3, 0, 8, 8, 8, 16, 8, 0, 0 /* 1024x768xbgra8880 */, (grub_uint32_t []) { 0x2b6f64dc, 0xc25f8431, 0xfce2d3f7, 0x15d2331a, 0x81987c7b, }, 5 }, ++ { "videotest", 640, 480, 0x1, 256, 32, 4, 0, 8, 8, 8, 16, 8, 24, 8 /* 640x480xbgra8888 */, (grub_uint32_t []) { 0xa260f7dd, 0x3e2f4980, 0x9f13fd96, 0x35c43cb, 0xd886e34b, }, 5 }, ++ { "videotest", 800, 600, 0x1, 256, 32, 4, 0, 8, 8, 8, 16, 8, 24, 8 /* 800x600xbgra8888 */, (grub_uint32_t []) { 0x41a9bff8, 0xa0d3f7c3, 0x86b1597f, 0x67cb1144, 0xca740407, }, 5 }, ++ { "videotest", 1024, 768, 0x1, 256, 32, 4, 0, 8, 8, 8, 16, 8, 24, 8 /* 1024x768xbgra8888 */, (grub_uint32_t []) { 0x8f7a3b6d, 0xcb84c6e3, 0x687c071, 0x42793dff, 0x996dbba4, }, 5 }, +-- +2.14.3 + diff --git a/0081-grub-fs-tester-Fix-bashism.patch b/0081-grub-fs-tester-Fix-bashism.patch new file mode 100644 index 0000000..040e696 --- /dev/null +++ b/0081-grub-fs-tester-Fix-bashism.patch @@ -0,0 +1,25 @@ +From 4f31bfe1d36e95ca3b1cdaf6a9d45d1e3722ad2f Mon Sep 17 00:00:00 2001 +From: Vladimir Serbinenko +Date: Wed, 30 Aug 2017 17:22:58 +0200 +Subject: [PATCH 081/225] grub-fs-tester: Fix bashism + +--- + tests/util/grub-fs-tester.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/util/grub-fs-tester.in b/tests/util/grub-fs-tester.in +index fd7e0f14b..15969d796 100644 +--- a/tests/util/grub-fs-tester.in ++++ b/tests/util/grub-fs-tester.in +@@ -957,7 +957,7 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do + esac + # Make sure file is not exact multiple of block size. This helps to force + # tail packing in case of squash4. +- : $((BLOCKCNT--)) ++ BLOCKCNT="$((BLOCKCNT-1))" + case x"$fs" in + x"ntfscomp") + setfattr -h -v 0x00000800 -n system.ntfs_attrib_be "$MNTPOINTRW/$OSDIR";; +-- +2.14.3 + diff --git a/0082-gzio-fix-unaligned-access.patch b/0082-gzio-fix-unaligned-access.patch new file mode 100644 index 0000000..f12a0c6 --- /dev/null +++ b/0082-gzio-fix-unaligned-access.patch @@ -0,0 +1,25 @@ +From 95acd4cbdac495c088fc3401fa365455f7039151 Mon Sep 17 00:00:00 2001 +From: Vladimir Serbinenko +Date: Wed, 30 Aug 2017 20:46:14 +0200 +Subject: [PATCH 082/225] gzio: fix unaligned access + +--- + grub-core/io/gzio.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/grub-core/io/gzio.c b/grub-core/io/gzio.c +index dcf3a8701..86ea8cfde 100644 +--- a/grub-core/io/gzio.c ++++ b/grub-core/io/gzio.c +@@ -1116,7 +1116,7 @@ inflate_window (grub_gzio_t gzio) + grub_uint32_t csum; + + gzio->hdesc->final (gzio->hcontext); +- csum = *(grub_uint32_t *)gzio->hdesc->read (gzio->hcontext); ++ csum = grub_get_unaligned32 (gzio->hdesc->read (gzio->hcontext)); + csum = grub_be_to_cpu32 (csum); + if (csum != gzio->orig_checksum) + grub_error (GRUB_ERR_BAD_COMPRESSED_DATA, +-- +2.14.3 + diff --git a/0083-Add-a-file-missing-in-multiboot2-commit.patch b/0083-Add-a-file-missing-in-multiboot2-commit.patch new file mode 100644 index 0000000..2f51601 --- /dev/null +++ b/0083-Add-a-file-missing-in-multiboot2-commit.patch @@ -0,0 +1,123 @@ +From 1b18d6b0d34872ced6b3dbfc3e7957c80efbcb7a Mon Sep 17 00:00:00 2001 +From: Vladimir Serbinenko +Date: Tue, 5 Sep 2017 23:13:55 +0200 +Subject: [PATCH 083/225] Add a file missing in multiboot2 commit. + +--- + include/grub/multiboot2.h | 104 ++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 104 insertions(+) + create mode 100644 include/grub/multiboot2.h + +diff --git a/include/grub/multiboot2.h b/include/grub/multiboot2.h +new file mode 100644 +index 000000000..502d34ef1 +--- /dev/null ++++ b/include/grub/multiboot2.h +@@ -0,0 +1,104 @@ ++/* multiboot.h - multiboot header file with grub definitions. */ ++/* ++ * GRUB -- GRand Unified Bootloader ++ * Copyright (C) 2003,2007,2008,2010 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 . ++ */ ++ ++#ifndef GRUB_MULTIBOOT2_HEADER ++#define GRUB_MULTIBOOT2_HEADER 1 ++ ++#include ++ ++#include ++ ++#include ++#include ++ ++extern struct grub_relocator *grub_multiboot2_relocator; ++ ++void grub_multiboot2 (int argc, char *argv[]); ++void grub_module2 (int argc, char *argv[]); ++ ++void grub_multiboot2_set_accepts_video (int val); ++grub_err_t grub_multiboot2_make_mbi (grub_uint32_t *target); ++void grub_multiboot2_free_mbi (void); ++grub_err_t grub_multiboot2_init_mbi (int argc, char *argv[]); ++grub_err_t grub_multiboot2_add_module (grub_addr_t start, grub_size_t size, ++ int argc, char *argv[]); ++void grub_multiboot2_set_bootdev (void); ++void ++grub_multiboot2_add_elfsyms (grub_size_t num, grub_size_t entsize, ++ unsigned shndx, void *data); ++ ++grub_uint32_t grub_multiboot2_get_mmap_count (void); ++grub_err_t grub_multiboot2_set_video_mode (void); ++ ++/* FIXME: support coreboot as well. */ ++#if defined (GRUB_MACHINE_PCBIOS) ++#define GRUB_MACHINE_HAS_VBE 1 ++#else ++#define GRUB_MACHINE_HAS_VBE 0 ++#endif ++ ++#if defined (GRUB_MACHINE_PCBIOS) || defined (GRUB_MACHINE_COREBOOT) || defined (GRUB_MACHINE_MULTIBOOT) || defined (GRUB_MACHINE_QEMU) ++#define GRUB_MACHINE_HAS_VGA_TEXT 1 ++#else ++#define GRUB_MACHINE_HAS_VGA_TEXT 0 ++#endif ++ ++#if defined (GRUB_MACHINE_EFI) || defined (GRUB_MACHINE_PCBIOS) || defined (GRUB_MACHINE_COREBOOT) || defined (GRUB_MACHINE_MULTIBOOT) ++#define GRUB_MACHINE_HAS_ACPI 1 ++#else ++#define GRUB_MACHINE_HAS_ACPI 0 ++#endif ++ ++#define GRUB_MULTIBOOT2_CONSOLE_EGA_TEXT 1 ++#define GRUB_MULTIBOOT2_CONSOLE_FRAMEBUFFER 2 ++ ++grub_err_t ++grub_multiboot2_set_console (int console_type, int accepted_consoles, ++ int width, int height, int depth, ++ int console_required); ++grub_err_t ++grub_multiboot2_load (grub_file_t file, const char *filename); ++ ++struct mbi_load_data ++{ ++ grub_file_t file; ++ const char *filename; ++ void *buffer; ++ unsigned int mbi_ver; ++ int relocatable; ++ grub_uint32_t min_addr; ++ grub_uint32_t max_addr; ++ grub_size_t align; ++ grub_uint32_t preference; ++ grub_uint32_t link_base_addr; ++ grub_uint32_t load_base_addr; ++ int avoid_efi_boot_services; ++}; ++typedef struct mbi_load_data mbi_load_data_t; ++ ++/* Load ELF32 or ELF64. */ ++grub_err_t ++grub_multiboot2_load_elf (mbi_load_data_t *mld); ++ ++extern grub_size_t grub_multiboot2_pure_size; ++extern grub_size_t grub_multiboot2_alloc_mbi; ++extern grub_uint32_t grub_multiboot2_payload_eip; ++ ++ ++#endif /* ! GRUB_MULTIBOOT_HEADER */ +-- +2.14.3 + diff --git a/0084-Fix-compilation-for-x86_64-efi.patch b/0084-Fix-compilation-for-x86_64-efi.patch new file mode 100644 index 0000000..ccbeeb0 --- /dev/null +++ b/0084-Fix-compilation-for-x86_64-efi.patch @@ -0,0 +1,41 @@ +From 78d2b81bd1af0a3a84d0c23c9ff4af3caa2df23b Mon Sep 17 00:00:00 2001 +From: Vladimir Serbinenko +Date: Thu, 7 Sep 2017 13:55:22 +0200 +Subject: [PATCH 084/225] Fix compilation for x86_64-efi. + +--- + grub-core/loader/multiboot.c | 2 +- + include/grub/i386/multiboot.h | 4 ++++ + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/grub-core/loader/multiboot.c b/grub-core/loader/multiboot.c +index 3b57cb132..40c67e824 100644 +--- a/grub-core/loader/multiboot.c ++++ b/grub-core/loader/multiboot.c +@@ -143,7 +143,7 @@ efi_boot (struct grub_relocator *rel, + #else + struct grub_relocator_efi_state state_efi = MULTIBOOT_EFI_INITIAL_STATE; + #endif +- state_efi.MULTIBOOT_EFI_ENTRY_REGISTER = grub_multiboot_payload_eip; ++ state_efi.MULTIBOOT_EFI_ENTRY_REGISTER = GRUB_MULTIBOOT (payload_eip); + state_efi.MULTIBOOT_EFI_MBI_REGISTER = target; + + grub_relocator_efi_boot (rel, state_efi); +diff --git a/include/grub/i386/multiboot.h b/include/grub/i386/multiboot.h +index 9cd97dfce..0b596fc20 100644 +--- a/include/grub/i386/multiboot.h ++++ b/include/grub/i386/multiboot.h +@@ -43,6 +43,10 @@ + .rcx = 0, \ + .rdx = 0, \ + } ++#define MULTIBOOT2_EFI_INITIAL_STATE { .rax = MULTIBOOT2_BOOTLOADER_MAGIC, \ ++ .rcx = 0, \ ++ .rdx = 0, \ ++ } + #define MULTIBOOT_EFI_ENTRY_REGISTER rip + #define MULTIBOOT_EFI_MBI_REGISTER rbx + #endif +-- +2.14.3 + diff --git a/0195-Fix-util-grub.d-20_linux_xen.in-Add-xen_boot-command.patch b/0085-Fix-util-grub.d-20_linux_xen.in-Add-xen_boot-command.patch similarity index 58% rename from 0195-Fix-util-grub.d-20_linux_xen.in-Add-xen_boot-command.patch rename to 0085-Fix-util-grub.d-20_linux_xen.in-Add-xen_boot-command.patch index 159ec4e..ccd9da5 100644 --- a/0195-Fix-util-grub.d-20_linux_xen.in-Add-xen_boot-command.patch +++ b/0085-Fix-util-grub.d-20_linux_xen.in-Add-xen_boot-command.patch @@ -1,7 +1,7 @@ -From f107e84be87038bf5bf8795c0f2005e11f35c145 Mon Sep 17 00:00:00 2001 +From a8e0f1adf7019238fff263111794c86f4eea79ac Mon Sep 17 00:00:00 2001 From: Konrad Rzeszutek Wilk -Date: Mon, 28 Aug 2017 13:51:14 -0400 -Subject: [PATCH 195/197] Fix util/grub.d/20_linux_xen.in: Add xen_boot command +Date: Tue, 29 Aug 2017 16:40:52 -0400 +Subject: [PATCH 085/225] Fix util/grub.d/20_linux_xen.in: Add xen_boot command support for aarch64 Commit d33045ce7ffcb7c1e4a60c14d5ca64b36e3c5abe introduced @@ -15,12 +15,29 @@ The 20_linux_xen is run under a shell and any exits from within it: [root@tst063 grub]# echo $? 1 -will result in 20_linux_xen exciting without continuing +will result in 20_linux_xen exiting without continuing and also causing grub2-mkconfig to stop processing. As in: -[root@tst063 ~]# + [root@tst063 grub]# ./grub-mkconfig | tail + Generating grub configuration file ... + Found linux image: /boot/vmlinuz-4.13.0-0.rc5.git1.1.fc27.x86_64 + Found initrd image: /boot/initramfs-4.13.0-0.rc5.git1.1.fc27.x86_64.img + Found linux image: /boot/vmlinuz-0-rescue-ec082ee24aea41b9b16aca52a6d10cc2 + Found initrd image: /boot/initramfs-0-rescue-ec082ee24aea41b9b16aca52a6d10cc2.img + echo 'Loading Linux 0-rescue-ec082ee24aea41b9b16aca52a6d10cc2 ...' + linux /vmlinuz-0-rescue-ec082ee24aea41b9b16aca52a6d10cc2 root=/dev/mapper/fedora_tst063-root ro single + echo 'Loading initial ramdisk ...' + initrd /initramfs-0-rescue-ec082ee24aea41b9b16aca52a6d10cc2.img + } + } + + ### END /usr/local/etc/grub.d/10_linux ### + + ### BEGIN /usr/local/etc/grub.d/20_linux_xen ### + + root@tst063 grub]# And no more. @@ -29,17 +46,19 @@ and to process the return value in a conditional. That fixes the issue. RH-BZ 1486002: grub2-mkconfig does not work if xen.gz is installed. + CC: Fu Wei Signed-off-by: Konrad Rzeszutek Wilk +Reviewed-by: Daniel Kiper --- util/grub.d/20_linux_xen.in | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in -index 462f8e1f8..9b1bd7169 100644 +index c002fc9f9..083bcef5d 100644 --- a/util/grub.d/20_linux_xen.in +++ b/util/grub.d/20_linux_xen.in -@@ -210,13 +210,12 @@ while [ "x${xen_list}" != "x" ] ; do +@@ -206,13 +206,12 @@ while [ "x${xen_list}" != "x" ] ; do if [ "x$is_top_level" != xtrue ]; then echo " submenu '$(gettext_printf "Xen hypervisor, version %s" "${xen_version}" | grub_quote)' \$menuentry_id_option 'xen-hypervisor-$xen_version-$boot_device_id' {" fi @@ -58,5 +77,5 @@ index 462f8e1f8..9b1bd7169 100644 while [ "x$list" != "x" ] ; do linux=`version_find_latest $list` -- -2.14.2 +2.14.3 diff --git a/0086-Use-grub-file-to-figure-out-whether-multiboot2-shoul.patch b/0086-Use-grub-file-to-figure-out-whether-multiboot2-shoul.patch new file mode 100644 index 0000000..430c5f1 --- /dev/null +++ b/0086-Use-grub-file-to-figure-out-whether-multiboot2-shoul.patch @@ -0,0 +1,39 @@ +From b4d709b6ee789cdaf3fa7a80fd90c721a16f48c2 Mon Sep 17 00:00:00 2001 +From: Konrad Rzeszutek Wilk +Date: Tue, 29 Aug 2017 16:40:53 -0400 +Subject: [PATCH 086/225] 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 +Reviewed-by: Daniel Kiper +--- + util/grub.d/20_linux_xen.in | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in +index 083bcef5d..0cb0f4e49 100644 +--- a/util/grub.d/20_linux_xen.in ++++ b/util/grub.d/20_linux_xen.in +@@ -210,8 +210,13 @@ while [ "x${xen_list}" != "x" ] ; do + xen_loader="xen_hypervisor" + module_loader="xen_module" + else +- xen_loader="multiboot" +- module_loader="module" ++ if ($grub_file --is-x86-multiboot2 $current_xen); then ++ xen_loader="multiboot2" ++ module_loader="module2" ++ else ++ xen_loader="multiboot" ++ module_loader="module" ++ fi + fi + while [ "x$list" != "x" ] ; do + linux=`version_find_latest $list` +-- +2.14.3 + diff --git a/0087-efi-Move-grub_reboot-into-kernel.patch b/0087-efi-Move-grub_reboot-into-kernel.patch new file mode 100644 index 0000000..3474e14 --- /dev/null +++ b/0087-efi-Move-grub_reboot-into-kernel.patch @@ -0,0 +1,118 @@ +From 0ba90a7f017889d32a47897d9107ef45cc50a049 Mon Sep 17 00:00:00 2001 +From: Alexander Graf +Date: Thu, 31 Aug 2017 16:40:18 +0200 +Subject: [PATCH 087/225] efi: Move grub_reboot() into kernel + +The reboot function calls machine_fini() and then reboots the system. +Currently it lives in lib/ which means it gets compiled into the +reboot module which lives on the heap. + +In a following patch, I want to free the heap on machine_fini() +though, so we would free the memory that the code is running in. That +obviously breaks with smarter UEFI implementations. + +So this patch moves it into the core. That way we ensure that all +code running after machine_fini() in the UEFI case is running from +memory that got allocated (and gets deallocated) by the UEFI core. + +Signed-off-by: Alexander Graf +Reviewed-by: Daniel Kiper +--- + grub-core/Makefile.core.def | 4 ---- + grub-core/kern/efi/efi.c | 9 +++++++++ + grub-core/lib/efi/reboot.c | 33 --------------------------------- + include/grub/misc.h | 3 ++- + 4 files changed, 11 insertions(+), 38 deletions(-) + delete mode 100644 grub-core/lib/efi/reboot.c + +diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def +index d90ad6220..2c1d62cee 100644 +--- a/grub-core/Makefile.core.def ++++ b/grub-core/Makefile.core.def +@@ -872,10 +872,6 @@ module = { + name = reboot; + i386 = lib/i386/reboot.c; + i386 = lib/i386/reboot_trampoline.S; +- ia64_efi = lib/efi/reboot.c; +- x86_64_efi = lib/efi/reboot.c; +- arm_efi = lib/efi/reboot.c; +- arm64_efi = lib/efi/reboot.c; + powerpc_ieee1275 = lib/ieee1275/reboot.c; + sparc64_ieee1275 = lib/ieee1275/reboot.c; + mips_arc = lib/mips/arc/reboot.c; +diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c +index d467785fc..708581fcb 100644 +--- a/grub-core/kern/efi/efi.c ++++ b/grub-core/kern/efi/efi.c +@@ -154,6 +154,15 @@ grub_efi_get_loaded_image (grub_efi_handle_t image_handle) + GRUB_EFI_OPEN_PROTOCOL_GET_PROTOCOL); + } + ++void ++grub_reboot (void) ++{ ++ grub_machine_fini (GRUB_LOADER_FLAG_NORETURN); ++ efi_call_4 (grub_efi_system_table->runtime_services->reset_system, ++ GRUB_EFI_RESET_COLD, GRUB_EFI_SUCCESS, 0, NULL); ++ for (;;) ; ++} ++ + void + grub_exit (void) + { +diff --git a/grub-core/lib/efi/reboot.c b/grub-core/lib/efi/reboot.c +deleted file mode 100644 +index 7de8bcb5d..000000000 +--- a/grub-core/lib/efi/reboot.c ++++ /dev/null +@@ -1,33 +0,0 @@ +-/* +- * GRUB -- GRand Unified Bootloader +- * Copyright (C) 2011 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 . +- */ +- +-#include +-#include +-#include +-#include +-#include +-#include +- +-void +-grub_reboot (void) +-{ +- grub_machine_fini (GRUB_LOADER_FLAG_NORETURN); +- efi_call_4 (grub_efi_system_table->runtime_services->reset_system, +- GRUB_EFI_RESET_COLD, GRUB_EFI_SUCCESS, 0, NULL); +- for (;;) ; +-} +diff --git a/include/grub/misc.h b/include/grub/misc.h +index 2a9f87cc2..372f009e8 100644 +--- a/include/grub/misc.h ++++ b/include/grub/misc.h +@@ -396,7 +396,8 @@ grub_abs (int x) + } + + /* Reboot the machine. */ +-#if defined (GRUB_MACHINE_EMU) || defined (GRUB_MACHINE_QEMU_MIPS) ++#if defined (GRUB_MACHINE_EMU) || defined (GRUB_MACHINE_QEMU_MIPS) || \ ++ defined (GRUB_MACHINE_EFI) + void EXPORT_FUNC(grub_reboot) (void) __attribute__ ((noreturn)); + #else + void grub_reboot (void) __attribute__ ((noreturn)); +-- +2.14.3 + diff --git a/0088-efi-Free-malloc-regions-on-exit.patch b/0088-efi-Free-malloc-regions-on-exit.patch new file mode 100644 index 0000000..f1201d6 --- /dev/null +++ b/0088-efi-Free-malloc-regions-on-exit.patch @@ -0,0 +1,157 @@ +From 92bfc33db984eec22966a163eed7b6f2ab0266bf Mon Sep 17 00:00:00 2001 +From: Alexander Graf +Date: Thu, 31 Aug 2017 16:40:19 +0200 +Subject: [PATCH 088/225] efi: Free malloc regions on exit + +When we exit grub, we don't free all the memory that we allocated earlier +for our heap region. This can cause problems with setups where you try +to descend the boot order using "exit" entries, such as PXE -> HD boot +scenarios. + +Signed-off-by: Alexander Graf +Reviewed-by: Daniel Kiper +--- + grub-core/kern/efi/init.c | 1 + + grub-core/kern/efi/mm.c | 82 +++++++++++++++++++++++++++++++++++++++++++++++ + include/grub/efi/efi.h | 1 + + 3 files changed, 84 insertions(+) + +diff --git a/grub-core/kern/efi/init.c b/grub-core/kern/efi/init.c +index 2c31847bf..3dfdf2d22 100644 +--- a/grub-core/kern/efi/init.c ++++ b/grub-core/kern/efi/init.c +@@ -80,4 +80,5 @@ grub_efi_fini (void) + { + grub_efidisk_fini (); + grub_console_fini (); ++ grub_efi_memory_fini (); + } +diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c +index ac2a4c556..c48e9b5c7 100644 +--- a/grub-core/kern/efi/mm.c ++++ b/grub-core/kern/efi/mm.c +@@ -49,6 +49,70 @@ static grub_efi_uintn_t finish_desc_size; + static grub_efi_uint32_t finish_desc_version; + int grub_efi_is_finished = 0; + ++/* ++ * We need to roll back EFI allocations on exit. Remember allocations that ++ * we'll free on exit. ++ */ ++struct efi_allocation; ++struct efi_allocation { ++ grub_efi_physical_address_t address; ++ grub_efi_uint64_t pages; ++ struct efi_allocation *next; ++}; ++static struct efi_allocation *efi_allocated_memory; ++ ++static void ++grub_efi_store_alloc (grub_efi_physical_address_t address, ++ grub_efi_uintn_t pages) ++{ ++ grub_efi_boot_services_t *b; ++ struct efi_allocation *alloc; ++ grub_efi_status_t status; ++ ++ b = grub_efi_system_table->boot_services; ++ status = efi_call_3 (b->allocate_pool, GRUB_EFI_LOADER_DATA, ++ sizeof(*alloc), (void**)&alloc); ++ ++ if (status == GRUB_EFI_SUCCESS) ++ { ++ alloc->next = efi_allocated_memory; ++ alloc->address = address; ++ alloc->pages = pages; ++ efi_allocated_memory = alloc; ++ } ++ else ++ grub_printf ("Could not malloc memory to remember EFI allocation. " ++ "Exiting GRUB won't free all memory.\n"); ++} ++ ++static void ++grub_efi_drop_alloc (grub_efi_physical_address_t address, ++ grub_efi_uintn_t pages) ++{ ++ struct efi_allocation *ea, *eap; ++ grub_efi_boot_services_t *b; ++ ++ b = grub_efi_system_table->boot_services; ++ ++ for (eap = NULL, ea = efi_allocated_memory; ea; eap = ea, ea = ea->next) ++ { ++ if (ea->address != address || ea->pages != pages) ++ continue; ++ ++ /* Remove the current entry from the list. */ ++ if (eap) ++ eap->next = ea->next; ++ else ++ efi_allocated_memory = ea->next; ++ ++ /* Then free the memory backing it. */ ++ efi_call_1 (b->free_pool, ea); ++ ++ /* And leave, we're done. */ ++ break; ++ } ++} ++ + /* Allocate pages. Return the pointer to the first of allocated pages. */ + void * + grub_efi_allocate_pages_real (grub_efi_physical_address_t address, +@@ -79,6 +143,8 @@ grub_efi_allocate_pages_real (grub_efi_physical_address_t address, + return 0; + } + ++ grub_efi_store_alloc (address, pages); ++ + return (void *) ((grub_addr_t) address); + } + +@@ -108,6 +174,8 @@ grub_efi_free_pages (grub_efi_physical_address_t address, + + b = grub_efi_system_table->boot_services; + efi_call_2 (b->free_pages, address, pages); ++ ++ grub_efi_drop_alloc (address, pages); + } + + #if defined (__i386__) || defined (__x86_64__) +@@ -422,6 +490,20 @@ add_memory_regions (grub_efi_memory_descriptor_t *memory_map, + grub_fatal ("too little memory"); + } + ++void ++grub_efi_memory_fini (void) ++{ ++ /* ++ * Free all stale allocations. grub_efi_free_pages() will remove ++ * the found entry from the list and it will always find the first ++ * list entry (efi_allocated_memory is the list start). Hence we ++ * remove all entries from the list until none is left altogether. ++ */ ++ while (efi_allocated_memory) ++ grub_efi_free_pages (efi_allocated_memory->address, ++ efi_allocated_memory->pages); ++} ++ + #if 0 + /* Print the memory map. */ + static void +diff --git a/include/grub/efi/efi.h b/include/grub/efi/efi.h +index 3fa082816..c996913e5 100644 +--- a/include/grub/efi/efi.h ++++ b/include/grub/efi/efi.h +@@ -55,6 +55,7 @@ EXPORT_FUNC(grub_efi_get_memory_map) (grub_efi_uintn_t *memory_map_size, + grub_efi_uintn_t *map_key, + grub_efi_uintn_t *descriptor_size, + grub_efi_uint32_t *descriptor_version); ++void grub_efi_memory_fini (void); + grub_efi_loaded_image_t *EXPORT_FUNC(grub_efi_get_loaded_image) (grub_efi_handle_t image_handle); + void EXPORT_FUNC(grub_efi_print_device_path) (grub_efi_device_path_t *dp); + char *EXPORT_FUNC(grub_efi_get_filename) (grub_efi_device_path_t *dp); +-- +2.14.3 + diff --git a/0089-tsc-Change-default-tsc-calibration-method-to-pmtimer.patch b/0089-tsc-Change-default-tsc-calibration-method-to-pmtimer.patch new file mode 100644 index 0000000..f42fdbe --- /dev/null +++ b/0089-tsc-Change-default-tsc-calibration-method-to-pmtimer.patch @@ -0,0 +1,32 @@ +From 446794de8da4329ea532cbee4ca877bcafd0e534 Mon Sep 17 00:00:00 2001 +From: "David E. Box" +Date: Fri, 15 Sep 2017 15:37:05 -0700 +Subject: [PATCH 089/225] 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 +Reviewed-by: Daniel Kiper +--- + grub-core/kern/i386/tsc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/grub-core/kern/i386/tsc.c b/grub-core/kern/i386/tsc.c +index 2e85289d8..f266eb131 100644 +--- a/grub-core/kern/i386/tsc.c ++++ b/grub-core/kern/i386/tsc.c +@@ -68,7 +68,7 @@ grub_tsc_init (void) + #ifdef GRUB_MACHINE_XEN + (void) (grub_tsc_calibrate_from_xen () || calibrate_tsc_hardcode()); + #elif defined (GRUB_MACHINE_EFI) +- (void) (grub_tsc_calibrate_from_pit () || grub_tsc_calibrate_from_pmtimer () || grub_tsc_calibrate_from_efi() || calibrate_tsc_hardcode()); ++ (void) (grub_tsc_calibrate_from_pmtimer () || grub_tsc_calibrate_from_pit () || grub_tsc_calibrate_from_efi() || calibrate_tsc_hardcode()); + #elif defined (GRUB_MACHINE_COREBOOT) + (void) (grub_tsc_calibrate_from_pmtimer () || grub_tsc_calibrate_from_pit () || calibrate_tsc_hardcode()); + #else +-- +2.14.3 + diff --git a/0090-ls-prevent-double-open.patch b/0090-ls-prevent-double-open.patch new file mode 100644 index 0000000..18e8282 --- /dev/null +++ b/0090-ls-prevent-double-open.patch @@ -0,0 +1,45 @@ +From 3d8df86d825ff07a8eeb202329b8731fd1a4a24e Mon Sep 17 00:00:00 2001 +From: Eric Snowberg +Date: Mon, 13 Nov 2017 08:27:28 -0800 +Subject: [PATCH 090/225] ls: prevent double open + +Prevent a double open. This can cause problems with some ieee1275 +devices, causing the system to hang. The double open can occur +as follows: + +grub_ls_list_files (char *dirname, int longlist, int all, int human) + dev = grub_device_open (device_name); + dev remains open while: + grub_normal_print_device_info (device_name); + dev = grub_device_open (name); + +Signed-off-by: Eric Snowberg +Signed-off-by: Daniel Kiper +Reviewed-by: Daniel Kiper +--- + grub-core/commands/ls.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/grub-core/commands/ls.c b/grub-core/commands/ls.c +index 0eaf83652..c25161cc4 100644 +--- a/grub-core/commands/ls.c ++++ b/grub-core/commands/ls.c +@@ -201,6 +201,15 @@ grub_ls_list_files (char *dirname, int longlist, int all, int human) + if (grub_errno == GRUB_ERR_UNKNOWN_FS) + grub_errno = GRUB_ERR_NONE; + ++#ifdef GRUB_MACHINE_IEEE1275 ++ /* ++ * Close device to prevent a double open in grub_normal_print_device_info(). ++ * Otherwise it may lead to hangs on some IEEE 1275 platforms. ++ */ ++ grub_device_close (dev); ++ dev = NULL; ++#endif ++ + grub_normal_print_device_info (device_name); + } + else if (fs) +-- +2.14.3 + diff --git a/0091-grub-install-Fix-memory-leak.patch b/0091-grub-install-Fix-memory-leak.patch new file mode 100644 index 0000000..49f159e --- /dev/null +++ b/0091-grub-install-Fix-memory-leak.patch @@ -0,0 +1,26 @@ +From 2a8856401774d86ec78481e2188a54bbf689f25e Mon Sep 17 00:00:00 2001 +From: Eric Snowberg +Date: Mon, 27 Nov 2017 09:12:49 -0800 +Subject: [PATCH 091/225] grub-install: Fix memory leak + +Signed-off-by: Eric Snowberg +Reviewed-by: Daniel Kiper +--- + util/grub-install.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/util/grub-install.c b/util/grub-install.c +index 75e3e5ba6..5e4cdfd2b 100644 +--- a/util/grub-install.c ++++ b/util/grub-install.c +@@ -1472,6 +1472,7 @@ main (int argc, char *argv[]) + { + grub_util_fprint_full_disk_name (load_cfg_f, g, dev); + fprintf (load_cfg_f, " "); ++ free (g); + } + if (dev != grub_dev) + grub_device_close (dev); +-- +2.14.3 + diff --git a/0092-ieee1275-Fix-segfault-in-grub-ofpathname.patch b/0092-ieee1275-Fix-segfault-in-grub-ofpathname.patch new file mode 100644 index 0000000..5c721cd --- /dev/null +++ b/0092-ieee1275-Fix-segfault-in-grub-ofpathname.patch @@ -0,0 +1,29 @@ +From 2dc163bf692c18275de7b0d6716138c676e3bf92 Mon Sep 17 00:00:00 2001 +From: Eric Snowberg +Date: Tue, 28 Nov 2017 11:51:39 -0800 +Subject: [PATCH 092/225] ieee1275: Fix segfault in grub-ofpathname + +Signed-off-by: Eric Snowberg +Reviewed-by: Daniel Kiper +--- + util/ieee1275/grub-ofpathname.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/util/ieee1275/grub-ofpathname.c b/util/ieee1275/grub-ofpathname.c +index 8e5d766cb..300fbddad 100644 +--- a/util/ieee1275/grub-ofpathname.c ++++ b/util/ieee1275/grub-ofpathname.c +@@ -46,7 +46,9 @@ int main(int argc, char **argv) + } + + of_path = grub_util_devname_to_ofpath (argv[1]); +- printf("%s\n", of_path); ++ ++ if (of_path) ++ printf ("%s\n", of_path); + + free (of_path); + +-- +2.14.3 + diff --git a/0093-grub-mkconfig-Fix-detecting-.sig-files-as-system-ima.patch b/0093-grub-mkconfig-Fix-detecting-.sig-files-as-system-ima.patch new file mode 100644 index 0000000..614642c --- /dev/null +++ b/0093-grub-mkconfig-Fix-detecting-.sig-files-as-system-ima.patch @@ -0,0 +1,31 @@ +From 5033080eb6cb784a3d7f36b3d66b71f4603bf0aa Mon Sep 17 00:00:00 2001 +From: Jordan Glover +Date: Wed, 29 Nov 2017 08:35:37 -0500 +Subject: [PATCH 093/225] grub-mkconfig: Fix detecting .sig files as system + images + +grub-mkconfig detects detached RSA signatures for kernel images used for +signature checking as valid images and adds them to grub.cfg as separate +menu entries. This patch adds .sig extension to common blacklist. + +Signed-off-by: Jordan Glover +Reviewed-by: Daniel Kiper +--- + util/grub-mkconfig_lib.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in +index 60b31cadd..0f801cab3 100644 +--- a/util/grub-mkconfig_lib.in ++++ b/util/grub-mkconfig_lib.in +@@ -188,6 +188,7 @@ grub_file_is_not_garbage () + *.dpkg-*) return 1 ;; # debian dpkg + *.rpmsave|*.rpmnew) return 1 ;; + README*|*/README*) return 1 ;; # documentation ++ *.sig) return 1 ;; # signatures + esac + else + return 1 +-- +2.14.3 + diff --git a/0094-arm64-xen-Add-missing-address-cells-and-size-cells-p.patch b/0094-arm64-xen-Add-missing-address-cells-and-size-cells-p.patch new file mode 100644 index 0000000..6ca3b05 --- /dev/null +++ b/0094-arm64-xen-Add-missing-address-cells-and-size-cells-p.patch @@ -0,0 +1,48 @@ +From d34977cb662d9d3c74532dc175103758c47f552f Mon Sep 17 00:00:00 2001 +From: Julien Grall +Date: Wed, 29 Nov 2017 17:08:12 +0000 +Subject: [PATCH 094/225] arm64/xen: Add missing #address-cells and #size-cells + properties + +The properties #address-cells and #size-cells are used to know the +number of cells for ranges provided by "regs". If they don't exist, the +value are resp. 2 and 1. + +Currently, when multiboot nodes are created it is assumed that #address-cells +and #size-cells are exactly 2. However, they are never set by GRUB and +will result to later failure when the device-tree is generated by GRUB +or contain different values. + +To prevent this failure, create the both properties in the chosen nodes. + +Signed-off-by: Julien Grall +Reviewed-by: Daniel Kiper +--- + grub-core/loader/arm64/xen_boot.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/grub-core/loader/arm64/xen_boot.c b/grub-core/loader/arm64/xen_boot.c +index c95d6c5a8..6780b1f0c 100644 +--- a/grub-core/loader/arm64/xen_boot.c ++++ b/grub-core/loader/arm64/xen_boot.c +@@ -115,6 +115,17 @@ prepare_xen_hypervisor_params (void *xen_boot_fdt) + if (chosen_node < 1) + return grub_error (GRUB_ERR_IO, "failed to get chosen node in FDT"); + ++ /* ++ * The address and size are always written using 64-bits value. Set ++ * #address-cells and #size-cells accordingly. ++ */ ++ retval = grub_fdt_set_prop32 (xen_boot_fdt, chosen_node, "#address-cells", 2); ++ if (retval) ++ return grub_error (GRUB_ERR_IO, "failed to set #address-cells"); ++ retval = grub_fdt_set_prop32 (xen_boot_fdt, chosen_node, "#size-cells", 2); ++ if (retval) ++ return grub_error (GRUB_ERR_IO, "failed to set #size-cells"); ++ + grub_dprintf ("xen_loader", + "Xen Hypervisor cmdline : %s @ %p size:%d\n", + xen_hypervisor->cmdline, xen_hypervisor->cmdline, +-- +2.14.3 + diff --git a/0065-re-write-.gitignore.patch b/0095-Re-write-.gitignore.patch similarity index 96% rename from 0065-re-write-.gitignore.patch rename to 0095-Re-write-.gitignore.patch index e6d919a..8ba97fb 100644 --- a/0065-re-write-.gitignore.patch +++ b/0095-Re-write-.gitignore.patch @@ -1,8 +1,14 @@ -From ff9da35fd789354cc1490b75893e765771808352 Mon Sep 17 00:00:00 2001 +From 75a56b418d61781dc386e300b05e65764c651a98 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Tue, 8 Aug 2017 12:48:04 -0400 -Subject: [PATCH 065/194] re-write .gitignore +Subject: [PATCH 095/225] Re-write .gitignore +This re-writes the main .gitignore file, putting only things in it that +need to be, and adding comments about what's there and why. It also +moves ignored things from subdirectories into .gitignore in those +subdirectories. + +Signed-off-by: Peter Jones --- .gitignore | 352 ++++++++++++-------------------------- build-aux/.gitignore | 9 + @@ -496,5 +502,5 @@ index 000000000..b7e1eb124 @@ -0,0 +1 @@ +grub -- -2.13.5 +2.14.3 diff --git a/0075-Mark-po-exclude.pot-as-binary-so-git-won-t-try-to-di.patch b/0096-git-Mark-po-exclude.pot-as-binary-so-git-won-t-diff-.patch similarity index 52% rename from 0075-Mark-po-exclude.pot-as-binary-so-git-won-t-try-to-di.patch rename to 0096-git-Mark-po-exclude.pot-as-binary-so-git-won-t-diff-.patch index 49b545d..7f9a86b 100644 --- a/0075-Mark-po-exclude.pot-as-binary-so-git-won-t-try-to-di.patch +++ b/0096-git-Mark-po-exclude.pot-as-binary-so-git-won-t-diff-.patch @@ -1,8 +1,12 @@ -From 126f6952b853ea67e784650ed12f365ab7988f51 Mon Sep 17 00:00:00 2001 +From 13d072ac934f4f5f7861e271080b739f18f5bb91 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Wed, 22 Jul 2015 11:21:01 -0400 -Subject: [PATCH 075/194] Mark po/exclude.pot as binary so git won't try to - diff nonprintables. +Subject: [PATCH 096/225] git: Mark po/exclude.pot as binary so git won't diff + nonprintables. + +Right now when we diff the .pot file, things really really don't work. +This patch adds the "binary" attribute to the file, so that it'll diff +it as a binary blob instead of ascii/utf-8. Signed-off-by: Peter Jones --- @@ -18,5 +22,5 @@ index 000000000..33ffaa404 @@ -0,0 +1 @@ +po/exclude.pot binary -- -2.13.5 +2.14.3 diff --git a/0064-info-in-builddir.patch b/0097-docs-Makefile.am-use-info-in-builddir.patch similarity index 55% rename from 0064-info-in-builddir.patch rename to 0097-docs-Makefile.am-use-info-in-builddir.patch index 84cca1c..8034728 100644 --- a/0064-info-in-builddir.patch +++ b/0097-docs-Makefile.am-use-info-in-builddir.patch @@ -1,8 +1,13 @@ -From 5cf0df8753c19e83251c7244cafe38869a65060f Mon Sep 17 00:00:00 2001 +From 238f753f0e7ffae2a73356377ba4178b2d12a193 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Tue, 8 Aug 2017 13:08:59 -0400 -Subject: [PATCH 064/194] info-in-builddir +Subject: [PATCH 097/225] docs/Makefile.am: use info-in-builddir +This makes it so builds in subdirectories don't contaminate the main +build directory with their .info files. While the result is two +identical targets built, it still makes packaging more straightforward. + +Signed-off-by: Peter Jones --- docs/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) @@ -18,5 +23,5 @@ index 93eb39627..e396ba10f 100644 # AM_MAKEINFOFLAGS = --no-split --no-validate info_TEXINFOS = grub.texi grub-dev.texi -- -2.13.5 +2.14.3 diff --git a/0098-Trivial-fix-for-an-error-message-in-get_header_from_.patch b/0098-Trivial-fix-for-an-error-message-in-get_header_from_.patch new file mode 100644 index 0000000..fdadffc --- /dev/null +++ b/0098-Trivial-fix-for-an-error-message-in-get_header_from_.patch @@ -0,0 +1,30 @@ +From c8b28987a79b1afac94d1e28746a63ff051dd15d Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Tue, 3 Jan 2017 17:39:25 -0500 +Subject: [PATCH 098/225] Trivial fix for an error message in + get_header_from_pointer() + +get_header_from_pointer() prints an error when a double-free happens, +but it doesn't have a newline. It obviously should. + +Signed-off-by: Peter Jones +--- + grub-core/kern/mm.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/grub-core/kern/mm.c b/grub-core/kern/mm.c +index ee88ff611..9c73c12f1 100644 +--- a/grub-core/kern/mm.c ++++ b/grub-core/kern/mm.c +@@ -99,7 +99,7 @@ get_header_from_pointer (void *ptr, grub_mm_header_t *p, grub_mm_region_t *r) + + *p = (grub_mm_header_t) ptr - 1; + if ((*p)->magic == GRUB_MM_FREE_MAGIC) +- grub_fatal ("double free at %p", *p); ++ grub_fatal ("double free at %p\n", *p); + if ((*p)->magic != GRUB_MM_ALLOC_MAGIC) + grub_fatal ("alloc magic is broken at %p: %lx", *p, + (unsigned long) (*p)->magic); +-- +2.14.3 + diff --git a/0066-IBM-client-architecture-CAS-reboot-support.patch b/0099-IBM-client-architecture-CAS-reboot-support.patch similarity index 97% rename from 0066-IBM-client-architecture-CAS-reboot-support.patch rename to 0099-IBM-client-architecture-CAS-reboot-support.patch index 7138208..45071cd 100644 --- a/0066-IBM-client-architecture-CAS-reboot-support.patch +++ b/0099-IBM-client-architecture-CAS-reboot-support.patch @@ -1,7 +1,7 @@ -From 34423216f8f3d7ce6086e2f1ee9869407e6a2221 Mon Sep 17 00:00:00 2001 +From 9a445f819d5648c3a25535536dd85bff407a1a09 Mon Sep 17 00:00:00 2001 From: Paulo Flabiano Smorigo Date: Thu, 20 Sep 2012 18:07:39 -0300 -Subject: [PATCH 066/194] IBM client architecture (CAS) reboot support +Subject: [PATCH 099/225] IBM client architecture (CAS) reboot support This is an implementation of IBM client architecture (CAS) reboot for GRUB. @@ -170,5 +170,5 @@ index 8e4251303..9f26c69a2 100644 #define FOR_IEEE1275_DEVALIASES(alias) for (grub_ieee1275_devalias_init_iterator (&(alias)); grub_ieee1275_devalias_next (&(alias));) -- -2.13.5 +2.14.3 diff --git a/0067-for-ppc-reset-console-display-attr-when-clear-screen.patch b/0100-ppc-Use-x0c-instead-of-a-literal-L-for-terminfo-s-cl.patch similarity index 76% rename from 0067-for-ppc-reset-console-display-attr-when-clear-screen.patch rename to 0100-ppc-Use-x0c-instead-of-a-literal-L-for-terminfo-s-cl.patch index 917ec59..52af562 100644 --- a/0067-for-ppc-reset-console-display-attr-when-clear-screen.patch +++ b/0100-ppc-Use-x0c-instead-of-a-literal-L-for-terminfo-s-cl.patch @@ -1,13 +1,10 @@ -From 070dc282d3cc6602571296e90945df9d4671aecb Mon Sep 17 00:00:00 2001 +From 0252f348aa6da30c30051b86421bc1a5e5a33725 Mon Sep 17 00:00:00 2001 From: Paulo Flabiano Smorigo Date: Wed, 24 Apr 2013 10:51:48 -0300 -Subject: [PATCH 067/194] for ppc, reset console display attr when clear screen +Subject: [PATCH 100/225] ppc: Use \x0c instead of a literal ^L for terminfo's + ->cls() method -v2: Also use \x0c instead of a literal ^L to make future patches less -awkward. - -This should fix this bugzilla: -https://bugzilla.redhat.com/show_bug.cgi?id=908519 +This makes future patches less awkward. Signed-off-by: Peter Jones --- @@ -28,5 +25,5 @@ index d317efa36..29df35e6d 100644 data->reverse_video_off = grub_strdup ("\e[m"); if (grub_strcmp ("ieee1275", str) == 0) -- -2.13.5 +2.14.3 diff --git a/0068-Disable-GRUB-video-support-for-IBM-power-machines.patch b/0101-Disable-GRUB-video-support-for-IBM-power-machines.patch similarity index 94% rename from 0068-Disable-GRUB-video-support-for-IBM-power-machines.patch rename to 0101-Disable-GRUB-video-support-for-IBM-power-machines.patch index bbcf776..ed58663 100644 --- a/0068-Disable-GRUB-video-support-for-IBM-power-machines.patch +++ b/0101-Disable-GRUB-video-support-for-IBM-power-machines.patch @@ -1,7 +1,7 @@ -From 4e31478fdf4cda470305c1bb2acb9b820e790757 Mon Sep 17 00:00:00 2001 +From 88e906f88bda94b9c96ef02a09491aec23c5862f Mon Sep 17 00:00:00 2001 From: Paulo Flabiano Smorigo Date: Tue, 11 Jun 2013 15:14:05 -0300 -Subject: [PATCH 068/194] Disable GRUB video support for IBM power machines +Subject: [PATCH 101/225] Disable GRUB video support for IBM power machines Should fix the problem in bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=973205 @@ -61,5 +61,5 @@ index 9f26c69a2..ab4f284c3 100644 extern int EXPORT_FUNC(grub_ieee1275_test_flag) (enum grub_ieee1275_flag flag); -- -2.13.5 +2.14.3 diff --git a/0069-Honor-a-symlink-when-generating-configuration-by-gru.patch b/0102-Honor-a-symlink-when-generating-configuration-by-gru.patch similarity index 85% rename from 0069-Honor-a-symlink-when-generating-configuration-by-gru.patch rename to 0102-Honor-a-symlink-when-generating-configuration-by-gru.patch index 33b11ed..c5d7b1a 100644 --- a/0069-Honor-a-symlink-when-generating-configuration-by-gru.patch +++ b/0102-Honor-a-symlink-when-generating-configuration-by-gru.patch @@ -1,7 +1,7 @@ -From 35535549324923af7fecf79cc739baba48246f21 Mon Sep 17 00:00:00 2001 +From 5e06c7c7ea67f482e48ad79b51b3a56f312468cd Mon Sep 17 00:00:00 2001 From: Marcel Kolaja Date: Tue, 21 Jan 2014 10:57:08 -0500 -Subject: [PATCH 069/194] Honor a symlink when generating configuration by +Subject: [PATCH 102/225] Honor a symlink when generating configuration by grub2-mkconfig Honor a symlink when generating configuration by grub2-mkconfig, so that @@ -25,5 +25,5 @@ index f8496d28b..3b070fd76 100644 fi -- -2.13.5 +2.14.3 diff --git a/0070-Move-bash-completion-script-922997.patch b/0103-Move-bash-completion-script-922997.patch similarity index 84% rename from 0070-Move-bash-completion-script-922997.patch rename to 0103-Move-bash-completion-script-922997.patch index 6c33653..0b3b883 100644 --- a/0070-Move-bash-completion-script-922997.patch +++ b/0103-Move-bash-completion-script-922997.patch @@ -1,7 +1,7 @@ -From 999bbc2002275efce284aed6e1e31b3ca351fa19 Mon Sep 17 00:00:00 2001 +From af71c599231367520ee2509280e9b8826384d2bf Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Wed, 3 Apr 2013 14:35:34 -0400 -Subject: [PATCH 070/194] Move bash completion script (#922997) +Subject: [PATCH 103/225] Move bash completion script (#922997) Apparently these go in a new place now. --- @@ -10,10 +10,10 @@ Apparently these go in a new place now. 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac -index 571f7a0b5..9ae97f026 100644 +index c7888e40f..783118ccd 100644 --- a/configure.ac +++ b/configure.ac -@@ -288,6 +288,14 @@ AC_SUBST(grubdirname) +@@ -289,6 +289,14 @@ AC_SUBST(grubdirname) AC_DEFINE_UNQUOTED(GRUB_DIR_NAME, "$grubdirname", [Default grub directory name]) @@ -28,7 +28,7 @@ index 571f7a0b5..9ae97f026 100644 # # Checks for build programs. # -@@ -497,6 +505,9 @@ HOST_CFLAGS="$HOST_CFLAGS $grub_cv_cc_w_extra_flags" +@@ -498,6 +506,9 @@ HOST_CFLAGS="$HOST_CFLAGS $grub_cv_cc_w_extra_flags" # Check for target programs. # @@ -51,5 +51,5 @@ index 136287cf1..61108f054 100644 $(bash_completion_script): $(bash_completion_source) $(top_builddir)/config.status -- -2.13.5 +2.14.3 diff --git a/0071-Update-to-minilzo-2.08.patch b/0104-Update-to-minilzo-2.08.patch similarity index 99% rename from 0071-Update-to-minilzo-2.08.patch rename to 0104-Update-to-minilzo-2.08.patch index 0bffbdd..3528b1c 100644 --- a/0071-Update-to-minilzo-2.08.patch +++ b/0104-Update-to-minilzo-2.08.patch @@ -1,7 +1,7 @@ -From c0977f7fd42e16cc568af7ae667a2aeda85eb583 Mon Sep 17 00:00:00 2001 +From 0d3701ae7256a5721b59017106442818b8f4180a Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Thu, 4 Dec 2014 15:36:09 -0500 -Subject: [PATCH 071/194] Update to minilzo-2.08 +Subject: [PATCH 104/225] Update to minilzo-2.08 This fixes CVE-2014-4607 - lzo: lzo1x_decompress_safe() integer overflow @@ -8786,5 +8786,5 @@ index 74fefa9fe..793745467 100644 -- -2.13.5 +2.14.3 diff --git a/0074-Make-exit-take-a-return-code.patch b/0105-Make-exit-take-a-return-code.patch similarity index 91% rename from 0074-Make-exit-take-a-return-code.patch rename to 0105-Make-exit-take-a-return-code.patch index 51a19cf..c05b427 100644 --- a/0074-Make-exit-take-a-return-code.patch +++ b/0105-Make-exit-take-a-return-code.patch @@ -1,7 +1,7 @@ -From 68d514b51b81911d8359d7825618112dae4a44d9 Mon Sep 17 00:00:00 2001 +From 17f0301053032e4da761bb786159860e63340555 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Wed, 26 Feb 2014 21:49:12 -0500 -Subject: [PATCH 074/194] Make "exit" take a return code. +Subject: [PATCH 105/225] Make "exit" take a return code. This adds "exit" with a return code. With this patch, any "exit" command /may/ include a return code, and on platforms that support @@ -20,11 +20,11 @@ Signed-off-by: Peter Jones grub-core/kern/mips/arc/init.c | 2 +- grub-core/kern/mips/loongson/init.c | 2 +- grub-core/kern/mips/qemu_mips/init.c | 2 +- - grub-core/kern/misc.c | 2 +- + grub-core/kern/misc.c | 11 ++++++++++- grub-core/kern/uboot/init.c | 6 +++--- grub-core/kern/xen/init.c | 2 +- include/grub/misc.h | 2 +- - 14 files changed, 39 insertions(+), 21 deletions(-) + 14 files changed, 48 insertions(+), 21 deletions(-) diff --git a/grub-core/commands/minicmd.c b/grub-core/commands/minicmd.c index a3a118241..b25ca4b9f 100644 @@ -60,17 +60,17 @@ index a3a118241..b25ca4b9f 100644 } diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c -index d467785fc..684ca93f8 100644 +index 708581fcb..f3fb6e654 100644 --- a/grub-core/kern/efi/efi.c +++ b/grub-core/kern/efi/efi.c -@@ -155,11 +155,16 @@ grub_efi_get_loaded_image (grub_efi_handle_t image_handle) +@@ -164,11 +164,16 @@ grub_reboot (void) } void -grub_exit (void) +grub_exit (int retval) { -+ int rc = GRUB_EFI_LOAD_ERROR; ++ grub_efi_status_t rc = GRUB_EFI_LOAD_ERROR; + + if (retval == 0) + rc = GRUB_EFI_SUCCESS; @@ -191,10 +191,10 @@ index be88b77d2..8b6c55ffc 100644 grub_halt (); } diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c -index 3b633d51f..952411d5d 100644 +index 3b633d51f..cd63a8cea 100644 --- a/grub-core/kern/misc.c +++ b/grub-core/kern/misc.c -@@ -1095,7 +1095,7 @@ grub_abort (void) +@@ -1095,9 +1095,18 @@ grub_abort (void) grub_getkey (); } @@ -202,7 +202,18 @@ index 3b633d51f..952411d5d 100644 + grub_exit (1); } ++#if defined (__clang__) && !defined (GRUB_UTIL) ++/* clang emits references to abort(). */ ++void __attribute__ ((noreturn)) ++abort (void) ++{ ++ grub_abort (); ++} ++#endif ++ void + grub_fatal (const char *fmt, ...) + { diff --git a/grub-core/kern/uboot/init.c b/grub-core/kern/uboot/init.c index 3e338645c..be2a5be1d 100644 --- a/grub-core/kern/uboot/init.c @@ -242,7 +253,7 @@ index 0559c033c..fce526d41 100644 struct sched_shutdown arg; diff --git a/include/grub/misc.h b/include/grub/misc.h -index 2a9f87cc2..062081437 100644 +index 372f009e8..83fd69f4a 100644 --- a/include/grub/misc.h +++ b/include/grub/misc.h @@ -334,7 +334,7 @@ int EXPORT_FUNC(grub_vsnprintf) (char *str, grub_size_t n, const char *fmt, @@ -255,5 +266,5 @@ index 2a9f87cc2..062081437 100644 grub_uint64_t d, grub_uint64_t *r); -- -2.13.5 +2.14.3 diff --git a/0106-Add-grub_efi_allocate_pool-and-grub_efi_free_pool-wr.patch b/0106-Add-grub_efi_allocate_pool-and-grub_efi_free_pool-wr.patch new file mode 100644 index 0000000..b05c3e3 --- /dev/null +++ b/0106-Add-grub_efi_allocate_pool-and-grub_efi_free_pool-wr.patch @@ -0,0 +1,74 @@ +From f5f294de1c33334035ef9230f23238b8c7cb0a19 Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Thu, 1 Jun 2017 09:59:56 -0400 +Subject: [PATCH 106/225] Add grub_efi_allocate_pool() and grub_efi_free_pool() + wrappers. + +Signed-off-by: Peter Jones +--- + grub-core/kern/efi/mm.c | 23 +++++++++++++++++++++++ + include/grub/efi/efi.h | 5 +++++ + 2 files changed, 28 insertions(+) + +diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c +index c48e9b5c7..1ef5a42bf 100644 +--- a/grub-core/kern/efi/mm.c ++++ b/grub-core/kern/efi/mm.c +@@ -165,6 +165,18 @@ grub_efi_allocate_fixed (grub_efi_physical_address_t address, + GRUB_EFI_LOADER_DATA); + } + ++grub_efi_status_t ++grub_efi_allocate_pool (grub_efi_memory_type_t pool_type, ++ grub_efi_uintn_t buffer_size, void **buffer) ++{ ++ grub_efi_boot_services_t *b; ++ grub_efi_status_t status; ++ ++ b = grub_efi_system_table->boot_services; ++ status = efi_call_3 (b->allocate_pool, pool_type, buffer_size, buffer); ++ return status; ++} ++ + /* Free pages starting from ADDRESS. */ + void + grub_efi_free_pages (grub_efi_physical_address_t address, +@@ -178,6 +190,17 @@ grub_efi_free_pages (grub_efi_physical_address_t address, + grub_efi_drop_alloc (address, pages); + } + ++grub_efi_status_t ++grub_efi_free_pool (void *buffer) ++{ ++ grub_efi_boot_services_t *b; ++ grub_efi_status_t status; ++ ++ b = grub_efi_system_table->boot_services; ++ status = efi_call_1 (b->free_pool, buffer); ++ return status; ++} ++ + #if defined (__i386__) || defined (__x86_64__) + + /* Helper for stop_broadcom. */ +diff --git a/include/grub/efi/efi.h b/include/grub/efi/efi.h +index c996913e5..a4d0d9767 100644 +--- a/include/grub/efi/efi.h ++++ b/include/grub/efi/efi.h +@@ -47,8 +47,13 @@ EXPORT_FUNC(grub_efi_allocate_fixed) (grub_efi_physical_address_t address, + grub_efi_uintn_t pages); + void * + EXPORT_FUNC(grub_efi_allocate_any_pages) (grub_efi_uintn_t pages); ++grub_efi_status_t EXPORT_FUNC(grub_efi_allocate_pool) ( ++ grub_efi_memory_type_t pool_type, ++ grub_efi_uintn_t buffer_size, ++ void **buffer); + void EXPORT_FUNC(grub_efi_free_pages) (grub_efi_physical_address_t address, + grub_efi_uintn_t pages); ++grub_efi_status_t EXPORT_FUNC(grub_efi_free_pool) (void *buffer); + int + EXPORT_FUNC(grub_efi_get_memory_map) (grub_efi_uintn_t *memory_map_size, + grub_efi_memory_descriptor_t *memory_map, +-- +2.14.3 + diff --git a/0107-Use-grub_efi_.-memory-helpers-where-reasonable.patch b/0107-Use-grub_efi_.-memory-helpers-where-reasonable.patch new file mode 100644 index 0000000..03d857d --- /dev/null +++ b/0107-Use-grub_efi_.-memory-helpers-where-reasonable.patch @@ -0,0 +1,224 @@ +From f94d8ef23f942bcb5c156a11da54bff9cb672c60 Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Thu, 1 Jun 2017 10:06:38 -0400 +Subject: [PATCH 107/225] Use grub_efi_...() memory helpers where reasonable. + +This uses grub_efi_allocate_pool(), grub_efi_free_pool(), +grub_efi_free_pages(), and grub_efi_allocate_pages_real() instead of +open-coded efi_call_N() calls, so we get more reasonable type checking. + +Signed-off-by: Peter Jones +--- + grub-core/kern/efi/mm.c | 11 +++-------- + grub-core/lib/efi/relocator.c | 9 ++++----- + grub-core/loader/efi/chainloader.c | 12 ++++++------ + grub-core/mmap/efi/mmap.c | 26 +++++++++----------------- + 4 files changed, 22 insertions(+), 36 deletions(-) + +diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c +index 1ef5a42bf..75d934457 100644 +--- a/grub-core/kern/efi/mm.c ++++ b/grub-core/kern/efi/mm.c +@@ -69,10 +69,8 @@ grub_efi_store_alloc (grub_efi_physical_address_t address, + struct efi_allocation *alloc; + grub_efi_status_t status; + +- b = grub_efi_system_table->boot_services; +- status = efi_call_3 (b->allocate_pool, GRUB_EFI_LOADER_DATA, +- sizeof(*alloc), (void**)&alloc); +- ++ status = grub_efi_allocate_pool (GRUB_EFI_LOADER_DATA, ++ sizeof(*alloc), (void**)&alloc); + if (status == GRUB_EFI_SUCCESS) + { + alloc->next = efi_allocated_memory; +@@ -90,9 +88,6 @@ grub_efi_drop_alloc (grub_efi_physical_address_t address, + grub_efi_uintn_t pages) + { + struct efi_allocation *ea, *eap; +- grub_efi_boot_services_t *b; +- +- b = grub_efi_system_table->boot_services; + + for (eap = NULL, ea = efi_allocated_memory; ea; eap = ea, ea = ea->next) + { +@@ -106,7 +101,7 @@ grub_efi_drop_alloc (grub_efi_physical_address_t address, + efi_allocated_memory = ea->next; + + /* Then free the memory backing it. */ +- efi_call_1 (b->free_pool, ea); ++ grub_efi_free_pool (ea); + + /* And leave, we're done. */ + break; +diff --git a/grub-core/lib/efi/relocator.c b/grub-core/lib/efi/relocator.c +index 319b69eeb..c4cd456ad 100644 +--- a/grub-core/lib/efi/relocator.c ++++ b/grub-core/lib/efi/relocator.c +@@ -90,7 +90,6 @@ grub_relocator_firmware_fill_events (struct grub_relocator_mmap_event *events) + int + grub_relocator_firmware_alloc_region (grub_addr_t start, grub_size_t size) + { +- grub_efi_boot_services_t *b; + grub_efi_physical_address_t address = start; + grub_efi_status_t status; + +@@ -100,9 +99,9 @@ grub_relocator_firmware_alloc_region (grub_addr_t start, grub_size_t size) + grub_dprintf ("relocator", "EFI alloc: %llx, %llx\n", + (unsigned long long) start, (unsigned long long) size); + #endif +- b = grub_efi_system_table->boot_services; +- status = efi_call_4 (b->allocate_pages, GRUB_EFI_ALLOCATE_ADDRESS, +- GRUB_EFI_LOADER_DATA, size >> 12, &address); ++ status = grub_efi_allocate_pages_real (GRUB_EFI_ALLOCATE_ADDRESS, ++ GRUB_EFI_LOADER_DATA, ++ size >> 12, &address); + return (status == GRUB_EFI_SUCCESS); + } + +@@ -115,5 +114,5 @@ grub_relocator_firmware_free_region (grub_addr_t start, grub_size_t size) + return; + + b = grub_efi_system_table->boot_services; +- efi_call_2 (b->free_pages, start, size >> 12); ++ grub_efi_free_pages (start, size >> 12); + } +diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c +index adc856366..c5f08f03f 100644 +--- a/grub-core/loader/efi/chainloader.c ++++ b/grub-core/loader/efi/chainloader.c +@@ -57,7 +57,7 @@ grub_chainloader_unload (void) + + b = grub_efi_system_table->boot_services; + efi_call_1 (b->unload_image, image_handle); +- efi_call_2 (b->free_pages, address, pages); ++ grub_efi_free_pages (address, pages); + + grub_free (file_path); + grub_free (cmdline); +@@ -99,7 +99,7 @@ grub_chainloader_boot (void) + } + + if (exit_data) +- efi_call_1 (b->free_pool, exit_data); ++ grub_efi_free_pool (exit_data); + + grub_loader_unset (); + +@@ -273,9 +273,9 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)), + } + pages = (((grub_efi_uintn_t) size + ((1 << 12) - 1)) >> 12); + +- status = efi_call_4 (b->allocate_pages, GRUB_EFI_ALLOCATE_ANY_PAGES, +- GRUB_EFI_LOADER_CODE, +- pages, &address); ++ status = grub_efi_allocate_pages_real (GRUB_EFI_ALLOCATE_ANY_PAGES, ++ GRUB_EFI_LOADER_CODE, ++ pages, &address); + if (status != GRUB_EFI_SUCCESS) + { + grub_dprintf ("chain", "Failed to allocate %u pages\n", +@@ -400,7 +400,7 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)), + grub_free (file_path); + + if (address) +- efi_call_2 (b->free_pages, address, pages); ++ grub_efi_free_pages (address, pages); + + grub_dl_unref (my_mod); + +diff --git a/grub-core/mmap/efi/mmap.c b/grub-core/mmap/efi/mmap.c +index bd495a184..d103c5e01 100644 +--- a/grub-core/mmap/efi/mmap.c ++++ b/grub-core/mmap/efi/mmap.c +@@ -191,7 +191,6 @@ grub_mmap_register (grub_uint64_t start, grub_uint64_t size, int type) + { + grub_uint64_t end = start + size; + grub_efi_physical_address_t address; +- grub_efi_boot_services_t *b; + grub_efi_uintn_t pages; + grub_efi_status_t status; + struct overlay *curover; +@@ -200,17 +199,17 @@ grub_mmap_register (grub_uint64_t start, grub_uint64_t size, int type) + if (! curover) + return 0; + +- b = grub_efi_system_table->boot_services; + address = start & (~0xfffULL); + pages = (end - address + 0xfff) >> 12; +- status = efi_call_2 (b->free_pages, address, pages); ++ status = grub_efi_free_pages (address, pages); + if (status != GRUB_EFI_SUCCESS && status != GRUB_EFI_NOT_FOUND) + { + grub_free (curover); + return 0; + } +- status = efi_call_4 (b->allocate_pages, GRUB_EFI_ALLOCATE_ADDRESS, +- make_efi_memtype (type), pages, &address); ++ status = grub_efi_allocate_pages_real (GRUB_EFI_ALLOCATE_ADDRESS, ++ make_efi_memtype (type), ++ pages, &address); + if (status != GRUB_EFI_SUCCESS) + { + grub_free (curover); +@@ -229,17 +228,13 @@ grub_err_t + grub_mmap_unregister (int handle) + { + struct overlay *curover, *prevover; +- grub_efi_boot_services_t *b; +- +- b = grub_efi_system_table->boot_services; +- + + for (curover = overlays, prevover = 0; curover; + prevover = curover, curover = curover->next) + { + if (curover->handle == handle) + { +- efi_call_2 (b->free_pages, curover->address, curover->pages); ++ grub_efi_free_pages (curover->address, curover->pages); + if (prevover != 0) + prevover->next = curover->next; + else +@@ -259,7 +254,6 @@ grub_mmap_malign_and_register (grub_uint64_t align __attribute__ ((unused)), + int flags __attribute__ ((unused))) + { + grub_efi_physical_address_t address; +- grub_efi_boot_services_t *b; + grub_efi_uintn_t pages; + grub_efi_status_t status; + struct overlay *curover; +@@ -269,8 +263,6 @@ grub_mmap_malign_and_register (grub_uint64_t align __attribute__ ((unused)), + if (! curover) + return 0; + +- b = grub_efi_system_table->boot_services; +- + address = 0xffffffff; + + #if GRUB_TARGET_SIZEOF_VOID_P < 8 +@@ -281,8 +273,8 @@ grub_mmap_malign_and_register (grub_uint64_t align __attribute__ ((unused)), + #endif + + pages = (size + 0xfff) >> 12; +- status = efi_call_4 (b->allocate_pages, atype, +- make_efi_memtype (type), pages, &address); ++ status = grub_efi_allocate_pages_real (atype, make_efi_memtype (type), ++ pages, &address); + if (status != GRUB_EFI_SUCCESS) + { + grub_free (curover); +@@ -294,8 +286,8 @@ grub_mmap_malign_and_register (grub_uint64_t align __attribute__ ((unused)), + /* Uggh, the address 0 was allocated... This is too annoying, + so reallocate another one. */ + address = 0xffffffff; +- status = efi_call_4 (b->allocate_pages, atype, +- make_efi_memtype (type), pages, &address); ++ status = grub_efi_allocate_pages_real (atype, make_efi_memtype (type), ++ pages, &address); + grub_efi_free_pages (0, pages); + if (status != GRUB_EFI_SUCCESS) + return 0; +-- +2.14.3 + diff --git a/0086-Pass-x-hex-hex-straight-through-unmolested.patch b/0108-Don-t-escape-x-hex-hex-in-command-line-wildcard-pars.patch similarity index 78% rename from 0086-Pass-x-hex-hex-straight-through-unmolested.patch rename to 0108-Don-t-escape-x-hex-hex-in-command-line-wildcard-pars.patch index 0f7da97..dd618e4 100644 --- a/0086-Pass-x-hex-hex-straight-through-unmolested.patch +++ b/0108-Don-t-escape-x-hex-hex-in-command-line-wildcard-pars.patch @@ -1,14 +1,29 @@ -From cc8be4cafeb5a0af779afe5d2856da434c165612 Mon Sep 17 00:00:00 2001 +From c670a4a91e1949ffb39989be8e3cec3944567f84 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Mon, 1 Oct 2012 13:24:37 -0400 -Subject: [PATCH 086/194] Pass "\x[[:hex:]][[:hex:]]" straight through - unmolested. +Subject: [PATCH 108/225] Don't escape "\x[[:hex:]][[:hex:]]" in command line + wildcard parsing. +This patch makes wildcard parsing of the config file leave +"\x[[:hex:]][[:hex:]]" escape sequences in place. This allows us to pass +in \x20 and similar without it being tokenized, so that it appears +intact to all levels of the parser, which we need for e.g. filesystem +labels in command line arguments. + +Based on the following patches fedora has shipped: +* 41d002615 - Pass "\x[[:hex:]][[:hex:]]" straight through unmolested. (49 minutes ago) +* 3ebad1305 - Don't munge raw spaces when we're doing our cmdline escaping (#923374) (49 minutes ago) + +Resolves: rhbz#855849 +Resolves: rhbz#923374 + +Signed-off-by: Peter Jones +Signed-off-by: Hans de Goede --- grub-core/commands/wildcard.c | 16 +++++++++++++++- - grub-core/lib/cmdline.c | 34 ++++++++++++++++++++++++++++++++-- + grub-core/lib/cmdline.c | 25 +++++++++++++++++++++++-- grub-core/script/execute.c | 43 +++++++++++++++++++++++++++++++++++++------ - 3 files changed, 84 insertions(+), 9 deletions(-) + 3 files changed, 75 insertions(+), 9 deletions(-) diff --git a/grub-core/commands/wildcard.c b/grub-core/commands/wildcard.c index 9b4e72766..02c46f9fd 100644 @@ -45,7 +60,7 @@ index 9b4e72766..02c46f9fd 100644 *optr++ = iptr[1]; iptr += 2; diff --git a/grub-core/lib/cmdline.c b/grub-core/lib/cmdline.c -index d5e10ee87..0a5b2afb9 100644 +index d5e10ee87..970ea868c 100644 --- a/grub-core/lib/cmdline.c +++ b/grub-core/lib/cmdline.c @@ -20,6 +20,12 @@ @@ -76,21 +91,12 @@ index d5e10ee87..0a5b2afb9 100644 size++; else if (*c == ' ') space = 1; -@@ -85,7 +97,25 @@ int grub_create_loader_cmdline (int argc, char *argv[], char *buf, +@@ -85,7 +97,16 @@ int grub_create_loader_cmdline (int argc, char *argv[], char *buf, while (*c) { - if (*c == '\\' || *c == '\'' || *c == '"') -+ if (*c == ' ') -+ { -+ *buf++ = '\\'; -+ *buf++ = 'x'; -+ *buf++ = '2'; -+ *buf++ = '0'; -+ c++; -+ continue; -+ } -+ else if (*c == '\\' && *(c+1) == 'x' && ++ if (*c == '\\' && *(c+1) == 'x' && + is_hex(*(c+2)) && is_hex(*(c+3))) + { + *buf++ = *c++; @@ -179,5 +185,5 @@ index ab78ca87f..cf6cd6601 100644 case '$': if (escaped) -- -2.13.5 +2.14.3 diff --git a/0108-Don-t-munge-raw-spaces-when-we-re-doing-our-cmdline-.patch b/0108-Don-t-munge-raw-spaces-when-we-re-doing-our-cmdline-.patch deleted file mode 100644 index 63960fe..0000000 --- a/0108-Don-t-munge-raw-spaces-when-we-re-doing-our-cmdline-.patch +++ /dev/null @@ -1,36 +0,0 @@ -From ff25c6034ab8213d911414e666b7d44bc44496aa Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Mon, 30 Jun 2014 14:16:46 -0400 -Subject: [PATCH 108/194] Don't munge raw spaces when we're doing our cmdline - escaping (#923374) - -Signed-off-by: Peter Jones ---- - grub-core/lib/cmdline.c | 11 +---------- - 1 file changed, 1 insertion(+), 10 deletions(-) - -diff --git a/grub-core/lib/cmdline.c b/grub-core/lib/cmdline.c -index 0a5b2afb9..970ea868c 100644 ---- a/grub-core/lib/cmdline.c -+++ b/grub-core/lib/cmdline.c -@@ -97,16 +97,7 @@ int grub_create_loader_cmdline (int argc, char *argv[], char *buf, - - while (*c) - { -- if (*c == ' ') -- { -- *buf++ = '\\'; -- *buf++ = 'x'; -- *buf++ = '2'; -- *buf++ = '0'; -- c++; -- continue; -- } -- else if (*c == '\\' && *(c+1) == 'x' && -+ if (*c == '\\' && *(c+1) == 'x' && - is_hex(*(c+2)) && is_hex(*(c+3))) - { - *buf++ = *c++; --- -2.13.5 - diff --git a/0087-Add-X-option-to-printf-functions.patch b/0109-Add-X-option-to-printf-functions.patch similarity index 89% rename from 0087-Add-X-option-to-printf-functions.patch rename to 0109-Add-X-option-to-printf-functions.patch index 37bf66b..2c669ca 100644 --- a/0087-Add-X-option-to-printf-functions.patch +++ b/0109-Add-X-option-to-printf-functions.patch @@ -1,14 +1,14 @@ -From d3e9800ae2fe7c0ed2d7795eae2be17a66e625ff Mon Sep 17 00:00:00 2001 +From ff3f25449bb25ae68a859c49ba936baf61601236 Mon Sep 17 00:00:00 2001 From: Paulo Flabiano Smorigo Date: Tue, 27 Nov 2012 16:58:39 -0200 -Subject: [PATCH 087/194] Add %X option to printf functions. +Subject: [PATCH 109/225] Add %X option to printf functions. --- grub-core/kern/misc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c -index 952411d5d..8344526be 100644 +index cd63a8cea..2656a670e 100644 --- a/grub-core/kern/misc.c +++ b/grub-core/kern/misc.c @@ -588,7 +588,7 @@ grub_divmod64 (grub_uint64_t n, grub_uint64_t d, grub_uint64_t *r) @@ -54,5 +54,5 @@ index 952411d5d..8344526be 100644 case 'd': { -- -2.13.5 +2.14.3 diff --git a/0155-Make-grub_fatal-also-backtrace.patch b/0110-Make-grub_fatal-dump-a-backtrace.patch similarity index 85% rename from 0155-Make-grub_fatal-also-backtrace.patch rename to 0110-Make-grub_fatal-dump-a-backtrace.patch index 407aa56..bfcfa94 100644 --- a/0155-Make-grub_fatal-also-backtrace.patch +++ b/0110-Make-grub_fatal-dump-a-backtrace.patch @@ -1,25 +1,29 @@ -From 482aef96798dec0896902dace1b1be71b1a12455 Mon Sep 17 00:00:00 2001 +From fe5b4ca9a6a76f4695e96736b0ff8f6c26cc96c5 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Wed, 27 Jan 2016 09:22:42 -0500 -Subject: [PATCH 155/194] Make grub_fatal() also backtrace. +Subject: [PATCH 110/225] Make grub_fatal() dump a backtrace. +This also adds a grub_backtrace() implementation for ARM AArch64. + +Signed-off-by: Peter Jones --- - grub-core/Makefile.core.def | 3 ++ + grub-core/Makefile.core.def | 4 +++ grub-core/kern/misc.c | 8 +++++- grub-core/lib/arm64/backtrace.c | 62 +++++++++++++++++++++++++++++++++++++++++ grub-core/lib/backtrace.c | 2 ++ grub-core/lib/i386/backtrace.c | 14 +++++++++- - 5 files changed, 87 insertions(+), 2 deletions(-) + 5 files changed, 88 insertions(+), 2 deletions(-) create mode 100644 grub-core/lib/arm64/backtrace.c diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def -index 75a7ab344..3a5d450f3 100644 +index 2c1d62cee..540955519 100644 --- a/grub-core/Makefile.core.def +++ b/grub-core/Makefile.core.def -@@ -175,6 +175,9 @@ kernel = { +@@ -175,6 +175,10 @@ kernel = { softdiv = lib/division.c; ++ arm64 = lib/arm64/backtrace.c; + x86 = lib/i386/backtrace.c; + x86 = lib/backtrace.c; + @@ -27,7 +31,7 @@ index 75a7ab344..3a5d450f3 100644 i386_xen = kern/i386/dl.c; diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c -index f1fab7000..5ce89a40c 100644 +index 2656a670e..f4461451a 100644 --- a/grub-core/kern/misc.c +++ b/grub-core/kern/misc.c @@ -24,6 +24,7 @@ @@ -38,12 +42,12 @@ index f1fab7000..5ce89a40c 100644 union printf_arg { -@@ -1101,8 +1102,13 @@ grub_xasprintf (const char *fmt, ...) +@@ -1088,8 +1089,13 @@ grub_xasprintf (const char *fmt, ...) static void __attribute__ ((noreturn)) grub_abort (void) { +#ifndef GRUB_UTIL -+#if defined(__i386__) || defined(__x86_64__) ++#if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) + grub_backtrace(); +#endif +#endif @@ -122,7 +126,7 @@ index 000000000..1079b5380 +} + diff --git a/grub-core/lib/backtrace.c b/grub-core/lib/backtrace.c -index 825a8800e..c0ad6ab8b 100644 +index 825a8800e..8659d00e0 100644 --- a/grub-core/lib/backtrace.c +++ b/grub-core/lib/backtrace.c @@ -29,6 +29,7 @@ GRUB_MOD_LICENSE ("GPLv3+"); @@ -133,14 +137,14 @@ index 825a8800e..c0ad6ab8b 100644 grub_dl_t mod; FOR_DL_MODULES (mod) -@@ -44,6 +45,7 @@ grub_backtrace_print_address (void *addr) +@@ -43,6 +44,7 @@ grub_backtrace_print_address (void *addr) + return; } } - +#endif + grub_printf ("%p", addr); } - diff --git a/grub-core/lib/i386/backtrace.c b/grub-core/lib/i386/backtrace.c index c3e03c727..c67273db3 100644 --- a/grub-core/lib/i386/backtrace.c @@ -171,5 +175,5 @@ index c3e03c727..c67273db3 100644 #include #include -- -2.13.5 +2.14.3 diff --git a/0072-Allow-fallback-to-include-entries-by-title-not-just-.patch b/0111-Allow-fallback-to-include-entries-by-title-not-just-.patch similarity index 96% rename from 0072-Allow-fallback-to-include-entries-by-title-not-just-.patch rename to 0111-Allow-fallback-to-include-entries-by-title-not-just-.patch index 04a51b2..6df329e 100644 --- a/0072-Allow-fallback-to-include-entries-by-title-not-just-.patch +++ b/0111-Allow-fallback-to-include-entries-by-title-not-just-.patch @@ -1,7 +1,7 @@ -From 15e9ccc8abd5621107788bea6ae6f2bdb27a3ed3 Mon Sep 17 00:00:00 2001 +From 35bf7ce4bd7e3beb060cacfee867668056453485 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Fri, 5 Sep 2014 10:07:04 -0400 -Subject: [PATCH 072/194] Allow "fallback" to include entries by title, not +Subject: [PATCH 111/225] Allow "fallback" to include entries by title, not just number. Resolves: rhbz#1026084 @@ -140,5 +140,5 @@ index e7a83c2d6..d2f64b05e 100644 static int get_entry_number (grub_menu_t menu, const char *name) -- -2.13.5 +2.14.3 diff --git a/0151-bz1374141-fix-incorrect-mask-for-ppc64.patch b/0112-bz1374141-fix-incorrect-mask-for-ppc64.patch similarity index 94% rename from 0151-bz1374141-fix-incorrect-mask-for-ppc64.patch rename to 0112-bz1374141-fix-incorrect-mask-for-ppc64.patch index 4245e14..2c94b4a 100644 --- a/0151-bz1374141-fix-incorrect-mask-for-ppc64.patch +++ b/0112-bz1374141-fix-incorrect-mask-for-ppc64.patch @@ -1,7 +1,7 @@ -From 7e592062f2f97bb488bfe454e522c5cef9b2702f Mon Sep 17 00:00:00 2001 +From 2113dfa868d0b5404cc6b92313945d7bd5ceb61f Mon Sep 17 00:00:00 2001 From: Masahiro Matsuya Date: Sat, 29 Oct 2016 08:35:26 +0900 -Subject: [PATCH 151/194] bz1374141 fix incorrect mask for ppc64 +Subject: [PATCH 112/225] bz1374141 fix incorrect mask for ppc64 The netmask configured in firmware is not respected on ppc64 (big endian). When 255.255.252.0 is set as netmask in firmware, the following is the value of bootpath string in grub_ieee1275_parse_bootpath(). @@ -44,5 +44,5 @@ index 002446be1..3df75357a 100644 if (gateway_addr.ipv4 != 0) -- -2.13.5 +2.14.3 diff --git a/0173-print-more-debug-info-in-our-module-loader.patch b/0113-efi-Better-grub_dprintf-in-our-module-loader.patch similarity index 72% rename from 0173-print-more-debug-info-in-our-module-loader.patch rename to 0113-efi-Better-grub_dprintf-in-our-module-loader.patch index ed76801..4df0212 100644 --- a/0173-print-more-debug-info-in-our-module-loader.patch +++ b/0113-efi-Better-grub_dprintf-in-our-module-loader.patch @@ -1,7 +1,11 @@ -From 409a1fe49689976f464e3db82cb48c6488b78864 Mon Sep 17 00:00:00 2001 +From cb5decaaf3d53218031770c9a25a359630784fb6 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Mon, 1 May 2017 11:19:40 -0400 -Subject: [PATCH 173/194] print more debug info in our module loader. +Subject: [PATCH 113/225] efi: Better grub_dprintf() in our module loader. + +This adds a "sections" dprintf type that shows details of +grub_efi_module_addr()'s parsing of sections, whether they're valid or +not, and what their load addresses are. Signed-off-by: Peter Jones --- @@ -9,10 +13,10 @@ Signed-off-by: Peter Jones 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c -index 684ca93f8..1f3ac5e1d 100644 +index f3fb6e654..caa9d9979 100644 --- a/grub-core/kern/efi/efi.c +++ b/grub-core/kern/efi/efi.c -@@ -304,13 +304,23 @@ grub_efi_modules_addr (void) +@@ -313,13 +313,23 @@ grub_efi_modules_addr (void) } if (i == coff_header->num_sections) @@ -40,5 +44,5 @@ index 684ca93f8..1f3ac5e1d 100644 } -- -2.13.5 +2.14.3 diff --git a/0190-make-GRUB_MOD_INIT-declare-its-function-prototypes.patch b/0114-make-GRUB_MOD_INIT-declare-its-function-prototypes.patch similarity index 64% rename from 0190-make-GRUB_MOD_INIT-declare-its-function-prototypes.patch rename to 0114-make-GRUB_MOD_INIT-declare-its-function-prototypes.patch index 5d155b2..112f793 100644 --- a/0190-make-GRUB_MOD_INIT-declare-its-function-prototypes.patch +++ b/0114-make-GRUB_MOD_INIT-declare-its-function-prototypes.patch @@ -1,8 +1,16 @@ -From 25ef0f18c77e5a5080f04e34a84aa801f21fb893 Mon Sep 17 00:00:00 2001 +From ab07701c8f31b55a80e1721fd9c4a14997d8ffc7 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Mon, 26 Jun 2017 12:46:23 -0400 -Subject: [PATCH 190/194] make GRUB_MOD_INIT() declare its function prototypes. +Subject: [PATCH 114/225] make GRUB_MOD_INIT() declare its function prototypes. +GRUB_MOD_INIT() creates non-static functions defined inline. With some +compiler flags (which are useful for finding other problems), this +causes compilers to emit warnings about missing declarations for those +functions. + +This patch adds declarations for this definitions created by the macro. + +Signed-off-by: Peter Jones --- include/grub/dl.h | 2 ++ 1 file changed, 2 insertions(+) @@ -28,5 +36,5 @@ index 2bca56ce0..b1ed3c333 100644 grub_##name##_fini (void) { grub_mod_fini (); } \ static void \ -- -2.13.5 +2.14.3 diff --git a/0193-Make-libgrub.pp-depend-on-config-util.h.patch b/0115-Make-libgrub.pp-depend-on-config-util.h.patch similarity index 97% rename from 0193-Make-libgrub.pp-depend-on-config-util.h.patch rename to 0115-Make-libgrub.pp-depend-on-config-util.h.patch index 651971b..af74e16 100644 --- a/0193-Make-libgrub.pp-depend-on-config-util.h.patch +++ b/0115-Make-libgrub.pp-depend-on-config-util.h.patch @@ -1,7 +1,7 @@ -From e4b316bd39c8a93c146f0d4c4c570170084a7404 Mon Sep 17 00:00:00 2001 +From 9af01c2bf43e16d3cb71a2d1c2646a267ec16018 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Wed, 23 Aug 2017 10:37:27 -0400 -Subject: [PATCH 193/194] Make libgrub.pp depend on config-util.h +Subject: [PATCH 115/225] Make libgrub.pp depend on config-util.h If you build with "make -j48" a lot, sometimes you see: @@ -44,5 +44,5 @@ index 7795baeb6..c7b0e6a9c 100644 -D'GRUB_MOD_INIT(x)=@MARKER@x@' $^ > $@ || (rm -f $@; exit 1) CLEANFILES += libgrub.pp -- -2.13.5 +2.14.3 diff --git a/0148-Normalize-slashes-in-tftp-paths.patch b/0116-Normalize-slashes-in-tftp-paths.patch similarity index 53% rename from 0148-Normalize-slashes-in-tftp-paths.patch rename to 0116-Normalize-slashes-in-tftp-paths.patch index 19c4bef..8cd2c7d 100644 --- a/0148-Normalize-slashes-in-tftp-paths.patch +++ b/0116-Normalize-slashes-in-tftp-paths.patch @@ -1,18 +1,32 @@ -From 56569789e125711b56b6a2100ee901660aa57668 Mon Sep 17 00:00:00 2001 +From 7de6bfc149f657a997968d29e1d557f6f4e61c97 Mon Sep 17 00:00:00 2001 From: Lenny Szubowicz Date: Mon, 29 Aug 2016 11:04:48 -0400 -Subject: [PATCH 148/194] Normalize slashes in tftp paths. +Subject: [PATCH 116/225] Normalize slashes in tftp paths. Some tftp servers do not handle multiple consecutive slashes correctly; this patch avoids sending tftp requests with non-normalized paths. Signed-off-by: Peter Jones + +(This was previously 06dce837a - Normalize slashes in tftp paths) + +This commit also merges: +9b00cee6e - Fix malformed tftp packets + +0088-Normalize-slashes-in-tftp-paths.patch collapses multiple contiguous +slashes in a filename into one slash in the tftp packet filename field. +However, the packet buffer pointer is advanced using the original name. +This leaves unitialized data between the name field and the type field +leading to tftp errors. Use the length of the normalized name to avoid +this. + +Signed-off-by: Mark Salter --- - grub-core/net/tftp.c | 24 +++++++++++++++++++++++- - 1 file changed, 23 insertions(+), 1 deletion(-) + grub-core/net/tftp.c | 28 +++++++++++++++++++++++++--- + 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/grub-core/net/tftp.c b/grub-core/net/tftp.c -index 1157524fc..5ca0a96a6 100644 +index 7d90bf66e..dd4ce6b23 100644 --- a/grub-core/net/tftp.c +++ b/grub-core/net/tftp.c @@ -300,6 +300,25 @@ destroy_pq (tftp_data_t data) @@ -26,7 +40,7 @@ index 1157524fc..5ca0a96a6 100644 +grub_normalize_filename (char *normalized, const char *filename) +{ + char *dest = normalized; -+ char *src = filename; ++ const char *src = filename; + + while (*src != '\0') + { @@ -41,18 +55,22 @@ index 1157524fc..5ca0a96a6 100644 static grub_err_t tftp_open (struct grub_file *file, const char *filename) { -@@ -337,7 +356,10 @@ tftp_open (struct grub_file *file, const char *filename) +@@ -337,9 +356,12 @@ tftp_open (struct grub_file *file, const char *filename) rrqlen = 0; tftph->opcode = grub_cpu_to_be16_compile_time (TFTP_RRQ); - grub_strcpy (rrq, filename); +- rrqlen += grub_strlen (filename) + 1; +- rrq += grub_strlen (filename) + 1; + + /* Copy and normalize the filename to work-around issues on some tftp + servers when file names are being matched for remapping. */ + grub_normalize_filename (rrq, filename); - rrqlen += grub_strlen (filename) + 1; - rrq += grub_strlen (filename) + 1; ++ rrqlen += grub_strlen (rrq) + 1; ++ rrq += grub_strlen (rrq) + 1; + grub_strcpy (rrq, "octet"); + rrqlen += grub_strlen ("octet") + 1; -- -2.13.5 +2.14.3 diff --git a/0073-Add-GRUB_DISABLE_UUID.patch b/0117-Add-GRUB_DISABLE_UUID.patch similarity index 95% rename from 0073-Add-GRUB_DISABLE_UUID.patch rename to 0117-Add-GRUB_DISABLE_UUID.patch index 9498050..2ebe01c 100644 --- a/0073-Add-GRUB_DISABLE_UUID.patch +++ b/0117-Add-GRUB_DISABLE_UUID.patch @@ -1,7 +1,7 @@ -From 87602724b509a60628623baabf5a2c7741a68884 Mon Sep 17 00:00:00 2001 +From 0b3e2c5f46d39ba2c414b684de2f63723bd98ebb Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Thu, 4 Sep 2014 16:49:25 -0400 -Subject: [PATCH 073/194] Add GRUB_DISABLE_UUID. +Subject: [PATCH 117/225] Add GRUB_DISABLE_UUID. This will cause "search --fs-uuid --set=root ..." not to be generated by grub2-mkconfig, and instead simply attempt to use the grub device name @@ -15,7 +15,7 @@ Signed-off-by: Peter Jones 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/docs/grub.texi b/docs/grub.texi -index a0c4b9e4e..6fdd2a041 100644 +index 137b894fa..a07dfbfa3 100644 --- a/docs/grub.texi +++ b/docs/grub.texi @@ -1409,6 +1409,13 @@ disable the use of UUIDs, set this option to @samp{true}. @@ -73,7 +73,7 @@ index 3b070fd76..c088b7054 100644 GRUB_GFXMODE \ GRUB_BACKGROUND \ diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in -index 60b31cadd..cf35e4174 100644 +index 0f801cab3..1001a1223 100644 --- a/util/grub-mkconfig_lib.in +++ b/util/grub-mkconfig_lib.in @@ -156,7 +156,7 @@ prepare_grub_to_access_device () @@ -95,5 +95,5 @@ index 60b31cadd..cf35e4174 100644 else echo $device |sed 's, ,_,g' -- -2.13.5 +2.14.3 diff --git a/0117-reopen-SNP-protocol-for-exclusive-use-by-grub.patch b/0117-reopen-SNP-protocol-for-exclusive-use-by-grub.patch deleted file mode 100644 index c6b0e43..0000000 --- a/0117-reopen-SNP-protocol-for-exclusive-use-by-grub.patch +++ /dev/null @@ -1,46 +0,0 @@ -From debcbbacd18bfbbcbd5fd9dce947f2cbce09c916 Mon Sep 17 00:00:00 2001 -From: Fedora Ninjas -Date: Sat, 15 Feb 2014 15:10:22 -0500 -Subject: [PATCH 117/194] reopen SNP protocol for exclusive use by grub - ---- - grub-core/net/drivers/efi/efinet.c | 16 ++++++++++++++++ - 1 file changed, 16 insertions(+) - -diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c -index 5388f952b..ea0e0ca36 100644 ---- a/grub-core/net/drivers/efi/efinet.c -+++ b/grub-core/net/drivers/efi/efinet.c -@@ -330,6 +330,7 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device, - { - struct grub_net_card *card; - grub_efi_device_path_t *dp; -+ grub_efi_simple_network_t *net; - - dp = grub_efi_get_device_path (hnd); - if (! dp) -@@ -383,6 +384,21 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device, - &pxe_mode->dhcp_ack, - sizeof (pxe_mode->dhcp_ack), - 1, device, path); -+ net = grub_efi_open_protocol (card->efi_handle, &net_io_guid, -+ GRUB_EFI_OPEN_PROTOCOL_BY_EXCLUSIVE); -+ if (net) { -+ if (net->mode->state == GRUB_EFI_NETWORK_STOPPED -+ && efi_call_1 (net->start, net) != GRUB_EFI_SUCCESS) -+ continue; -+ -+ if (net->mode->state == GRUB_EFI_NETWORK_STOPPED) -+ continue; -+ -+ if (net->mode->state == GRUB_EFI_NETWORK_STARTED -+ && efi_call_3 (net->initialize, net, 0, 0) != GRUB_EFI_SUCCESS) -+ continue; -+ card->efi_net = net; -+ } - return; - } - } --- -2.13.5 - diff --git a/0076-Make-efi-machines-load-an-env-block-from-a-variable.patch b/0118-Make-efi-machines-load-an-env-block-from-a-variable.patch similarity index 89% rename from 0076-Make-efi-machines-load-an-env-block-from-a-variable.patch rename to 0118-Make-efi-machines-load-an-env-block-from-a-variable.patch index 8fea681..9d8c506 100644 --- a/0076-Make-efi-machines-load-an-env-block-from-a-variable.patch +++ b/0118-Make-efi-machines-load-an-env-block-from-a-variable.patch @@ -1,7 +1,7 @@ -From 506b52759b2b2ad46e7b389979fcbaa78d68dab9 Mon Sep 17 00:00:00 2001 +From 70e1efe6f19c90d33eab8bf9b3098c3c1447414f Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Mon, 7 Dec 2015 14:20:49 -0500 -Subject: [PATCH 076/194] Make efi machines load an env block from a variable +Subject: [PATCH 118/225] Make efi machines load an env block from a variable Signed-off-by: Peter Jones --- @@ -10,10 +10,10 @@ Signed-off-by: Peter Jones 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def -index a65c27f7f..1eb86bed3 100644 +index 540955519..0f06d8f09 100644 --- a/grub-core/Makefile.core.def +++ b/grub-core/Makefile.core.def -@@ -191,6 +191,7 @@ kernel = { +@@ -195,6 +195,7 @@ kernel = { efi = term/efi/console.c; efi = kern/acpi.c; efi = kern/efi/acpi.c; @@ -22,7 +22,7 @@ index a65c27f7f..1eb86bed3 100644 i386_multiboot = kern/i386/pc/acpi.c; i386_coreboot = kern/acpi.c; diff --git a/grub-core/kern/efi/init.c b/grub-core/kern/efi/init.c -index 2c31847bf..f7782b6e1 100644 +index 3dfdf2d22..71d2279a0 100644 --- a/grub-core/kern/efi/init.c +++ b/grub-core/kern/efi/init.c @@ -25,9 +25,40 @@ @@ -80,5 +80,5 @@ index 2c31847bf..f7782b6e1 100644 char **path); -- -2.13.5 +2.14.3 diff --git a/0118-Revert-reopen-SNP-protocol-for-exclusive-use-by-grub.patch b/0118-Revert-reopen-SNP-protocol-for-exclusive-use-by-grub.patch deleted file mode 100644 index e30bf4a..0000000 --- a/0118-Revert-reopen-SNP-protocol-for-exclusive-use-by-grub.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 88892eedb9beb9d8c295329fad87edb339e4e27c Mon Sep 17 00:00:00 2001 -From: Peter Jones -Date: Fri, 4 Mar 2016 15:13:59 -0500 -Subject: [PATCH 118/194] Revert "reopen SNP protocol for exclusive use by - grub" - -This reverts commit a3f2c756ce34c9666bddef35e3b3b85ccecdcffc , which is -obsoleted by these: - -49426e9 efinet: open Simple Network Protocol exclusively -f348aee efinet: enable hardware filters when opening interface -c52ae40 efinet: skip virtual IPv4 and IPv6 devices when enumerating cards - -Signed-off-by: Peter Jones ---- - grub-core/net/drivers/efi/efinet.c | 16 ---------------- - 1 file changed, 16 deletions(-) - -diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c -index ea0e0ca36..5388f952b 100644 ---- a/grub-core/net/drivers/efi/efinet.c -+++ b/grub-core/net/drivers/efi/efinet.c -@@ -330,7 +330,6 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device, - { - struct grub_net_card *card; - grub_efi_device_path_t *dp; -- grub_efi_simple_network_t *net; - - dp = grub_efi_get_device_path (hnd); - if (! dp) -@@ -384,21 +383,6 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device, - &pxe_mode->dhcp_ack, - sizeof (pxe_mode->dhcp_ack), - 1, device, path); -- net = grub_efi_open_protocol (card->efi_handle, &net_io_guid, -- GRUB_EFI_OPEN_PROTOCOL_BY_EXCLUSIVE); -- if (net) { -- if (net->mode->state == GRUB_EFI_NETWORK_STOPPED -- && efi_call_1 (net->start, net) != GRUB_EFI_SUCCESS) -- continue; -- -- if (net->mode->state == GRUB_EFI_NETWORK_STOPPED) -- continue; -- -- if (net->mode->state == GRUB_EFI_NETWORK_STARTED -- && efi_call_3 (net->initialize, net, 0, 0) != GRUB_EFI_SUCCESS) -- continue; -- card->efi_net = net; -- } - return; - } - } --- -2.13.5 - diff --git a/0077-DHCP-client-ID-and-UUID-options-added.patch b/0119-DHCP-client-ID-and-UUID-options-added.patch similarity index 96% rename from 0077-DHCP-client-ID-and-UUID-options-added.patch rename to 0119-DHCP-client-ID-and-UUID-options-added.patch index 3e98429..367d369 100644 --- a/0077-DHCP-client-ID-and-UUID-options-added.patch +++ b/0119-DHCP-client-ID-and-UUID-options-added.patch @@ -1,7 +1,7 @@ -From 8a0b654a520e407da69e0cf64f3dd6bb7cf86240 Mon Sep 17 00:00:00 2001 +From 028660516264a1642fdf1629fb03184d1f3dea3a Mon Sep 17 00:00:00 2001 From: Paulo Flabiano Smorigo Date: Tue, 27 Nov 2012 17:18:53 -0200 -Subject: [PATCH 077/194] DHCP client ID and UUID options added. +Subject: [PATCH 119/225] DHCP client ID and UUID options added. --- grub-core/net/bootp.c | 87 ++++++++++++++++++++++++++++++++++++++++++++++----- @@ -141,5 +141,5 @@ index 1096b2432..e266bae23 100644 }; -- -2.13.5 +2.14.3 diff --git a/0078-trim-arp-packets-with-abnormal-size.patch b/0120-trim-arp-packets-with-abnormal-size.patch similarity index 84% rename from 0078-trim-arp-packets-with-abnormal-size.patch rename to 0120-trim-arp-packets-with-abnormal-size.patch index ef000b1..a28c0ff 100644 --- a/0078-trim-arp-packets-with-abnormal-size.patch +++ b/0120-trim-arp-packets-with-abnormal-size.patch @@ -1,7 +1,7 @@ -From c0fa21c8898437747ce093884e6aba48d45ac329 Mon Sep 17 00:00:00 2001 +From fc080913f7a4fdc5163a2482828a407a931cd522 Mon Sep 17 00:00:00 2001 From: Paulo Flabiano Smorigo Date: Wed, 5 Feb 2014 09:42:42 -0200 -Subject: [PATCH 078/194] trim arp packets with abnormal size +Subject: [PATCH 120/225] trim arp packets with abnormal size GRUB uses arp request to create the arp response. If the incoming packet is foobared, GRUB needs to trim the arp response packet before sending it. @@ -10,7 +10,7 @@ is foobared, GRUB needs to trim the arp response packet before sending it. 1 file changed, 6 insertions(+) diff --git a/grub-core/net/arp.c b/grub-core/net/arp.c -index 54306e3b1..2083b5a4b 100644 +index 54306e3b1..d1c69ed2b 100644 --- a/grub-core/net/arp.c +++ b/grub-core/net/arp.c @@ -150,6 +150,12 @@ grub_net_arp_receive (struct grub_net_buff *nb, struct grub_net_card *card, @@ -19,7 +19,7 @@ index 54306e3b1..2083b5a4b 100644 { + if ((nb->tail - nb->data) > 50) + { -+ grub_dprintf ("net", "arp packet with abnormal size (%d bytes).\n", ++ grub_dprintf ("net", "arp packet with abnormal size (%ld bytes).\n", + nb->tail - nb->data); + nb->tail = nb->data + 50; + } @@ -27,5 +27,5 @@ index 54306e3b1..2083b5a4b 100644 struct grub_net_buff nb_reply; struct arppkt *arp_reply; -- -2.13.5 +2.14.3 diff --git a/0079-Fix-bad-test-on-GRUB_DISABLE_SUBMENU.patch b/0121-Fix-bad-test-on-GRUB_DISABLE_SUBMENU.patch similarity index 89% rename from 0079-Fix-bad-test-on-GRUB_DISABLE_SUBMENU.patch rename to 0121-Fix-bad-test-on-GRUB_DISABLE_SUBMENU.patch index 076026c..156deda 100644 --- a/0079-Fix-bad-test-on-GRUB_DISABLE_SUBMENU.patch +++ b/0121-Fix-bad-test-on-GRUB_DISABLE_SUBMENU.patch @@ -1,7 +1,7 @@ -From 60262dc77512d017974f38768d7492b4588d54f0 Mon Sep 17 00:00:00 2001 +From 3f83f30c816bf0cfd314154ab34d31788c6c9ae7 Mon Sep 17 00:00:00 2001 From: Prarit Bhargava Date: Wed, 12 Mar 2014 10:58:16 -0400 -Subject: [PATCH 079/194] Fix bad test on GRUB_DISABLE_SUBMENU. +Subject: [PATCH 121/225] Fix bad test on GRUB_DISABLE_SUBMENU. The file /etc/grub.d/10_linux does @@ -37,5 +37,5 @@ index de9044c7f..cf6331f2a 100644 "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" -- -2.13.5 +2.14.3 diff --git a/0119-Add-grub_util_readlink.patch b/0122-Add-grub_util_readlink.patch similarity index 99% rename from 0119-Add-grub_util_readlink.patch rename to 0122-Add-grub_util_readlink.patch index 953637d..2d41169 100644 --- a/0119-Add-grub_util_readlink.patch +++ b/0122-Add-grub_util_readlink.patch @@ -1,7 +1,7 @@ -From 9c1af9c0a44353f6b72691456a4a2883246b6346 Mon Sep 17 00:00:00 2001 +From 361bd97bdab17bca03499377072bb83cb1625133 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Wed, 3 Sep 2014 10:01:03 -0400 -Subject: [PATCH 119/194] Add grub_util_readlink() +Subject: [PATCH 122/225] Add grub_util_readlink() Add grub_util_readlink(). This requires pulling in stat and readlink from gnulib, which pulls in stat and related headers, but after that the @@ -3730,5 +3730,5 @@ index 000000000..9852778f9 + REPLACE_LOCALTIME=0; AC_SUBST([REPLACE_LOCALTIME]) +]) -- -2.13.5 +2.14.3 diff --git a/0120-Make-editenv-chase-symlinks-including-those-across-d.patch b/0123-Make-editenv-chase-symlinks-including-those-across-d.patch similarity index 66% rename from 0120-Make-editenv-chase-symlinks-including-those-across-d.patch rename to 0123-Make-editenv-chase-symlinks-including-those-across-d.patch index a3838c4..314ef05 100644 --- a/0120-Make-editenv-chase-symlinks-including-those-across-d.patch +++ b/0123-Make-editenv-chase-symlinks-including-those-across-d.patch @@ -1,7 +1,7 @@ -From 5c54e71e4b4a3f8fbfedd5eca821238a7d80b491 Mon Sep 17 00:00:00 2001 +From fe6b1111aa9d842524c01196b4d0533a20a1a367 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Wed, 3 Sep 2014 10:38:00 -0400 -Subject: [PATCH 120/194] Make editenv chase symlinks including those across +Subject: [PATCH 123/225] Make editenv chase symlinks including those across devices. This lets us make /boot/grub2/grubenv a symlink to @@ -11,13 +11,23 @@ which allows /usr/bin/grub2-editenv to be the same across platforms Signed-off-by: Peter Jones Reviewed-by: Adam Jackson + +This version also merges in: +f1f67e3fc editenv: handle relative symlinks + +Handle symlinks with targets relative to the containing dir. This +ensures that the rename operation does not depend on the cwd. + +Resolves: rhbz#1479960 + +Signed-off-by: Jonathan Lebon --- Makefile.util.def | 9 +++++++++ - util/editenv.c | 46 ++++++++++++++++++++++++++++++++++++++++++++-- - 2 files changed, 53 insertions(+), 2 deletions(-) + util/editenv.c | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- + 2 files changed, 65 insertions(+), 2 deletions(-) diff --git a/Makefile.util.def b/Makefile.util.def -index 6d452da02..206110458 100644 +index f9caccb97..e7410494b 100644 --- a/Makefile.util.def +++ b/Makefile.util.def @@ -230,8 +230,17 @@ program = { @@ -39,10 +49,18 @@ index 6d452da02..206110458 100644 ldadd = libgrubgcry.a; ldadd = libgrubkern.a; diff --git a/util/editenv.c b/util/editenv.c -index c6f8d2298..d8d1dad6a 100644 +index c6f8d2298..41bc7cb1c 100644 --- a/util/editenv.c +++ b/util/editenv.c -@@ -37,6 +37,7 @@ grub_util_create_envblk_file (const char *name) +@@ -28,6 +28,7 @@ + + #include + #include ++#include + + #define DEFAULT_ENVBLK_SIZE 1024 + +@@ -37,6 +38,7 @@ grub_util_create_envblk_file (const char *name) FILE *fp; char *buf; char *namenew; @@ -50,7 +68,7 @@ index c6f8d2298..d8d1dad6a 100644 buf = xmalloc (DEFAULT_ENVBLK_SIZE); -@@ -59,7 +60,48 @@ grub_util_create_envblk_file (const char *name) +@@ -59,7 +61,59 @@ grub_util_create_envblk_file (const char *name) free (buf); fclose (fp); @@ -83,9 +101,20 @@ index c6f8d2298..d8d1dad6a 100644 + continue; + } + -+ free (rename_target); + linkbuf[retsize] = '\0'; -+ rename_target = linkbuf; ++ if (linkbuf[0] == '/') ++ { ++ free (rename_target); ++ rename_target = linkbuf; ++ } ++ else ++ { ++ char *dbuf = xstrdup (rename_target); ++ const char *dir = dirname (dbuf); ++ free (rename_target); ++ rename_target = xasprintf("%s/%s", dir, linkbuf); ++ free (dbuf); ++ } + } + + int rc = grub_util_rename (namenew, rename_target); @@ -102,5 +131,5 @@ index c6f8d2298..d8d1dad6a 100644 + free (rename_target); } -- -2.13.5 +2.14.3 diff --git a/0124-grub-install-Don-t-mark-PPC-machines-as-EFI-when-boo.patch b/0124-grub-install-Don-t-mark-PPC-machines-as-EFI-when-boo.patch new file mode 100644 index 0000000..4a522f5 --- /dev/null +++ b/0124-grub-install-Don-t-mark-PPC-machines-as-EFI-when-boo.patch @@ -0,0 +1,57 @@ +From aafe24fc80167e140326dab914ccc177512ef9b6 Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Thu, 20 Apr 2017 13:29:06 -0400 +Subject: [PATCH 124/225] grub-install: Don't mark PPC machines as EFI when + /boot/efi/ exists. + +Currently when platform == GRUB_INSTALL_PLATFORM_POWERPC_IEEE1275, the +presence of /boot/efi used to determine if this is an EFI machine. This +makes no sense at all, as it's a big-endian ieee1275 platform that's +never an EFI platform. + +Since some OSes (such as Fedora) always put the grubenv at +/boot/efi/EFI/fedora/grubenv, this code causes it to always make the +wrong decision on those OSes. + +This isn't the right thing at all, and it's difficult to know why you +might ever want it, especially since Mac PPC machines /don't have EFI/. +This patch removes the code that does this. I don't know why it was +there, and the commit message merely states "Implement better +integration with Mac firmware.", so there's little hope I'll figure it +out. As such, I have not replaced this with some other heuristic or +other behavior. + +Resolves: rhbz#1484474 + +Signed-off-by: Peter Jones +--- + util/grub-install.c | 12 +----------- + 1 file changed, 1 insertion(+), 11 deletions(-) + +diff --git a/util/grub-install.c b/util/grub-install.c +index 5e4cdfd2b..86756c884 100644 +--- a/util/grub-install.c ++++ b/util/grub-install.c +@@ -1154,18 +1154,8 @@ main (int argc, char *argv[]) + char *d; + + is_guess = 1; +- d = grub_util_path_concat (2, bootdir, "macppc"); +- if (!grub_util_is_directory (d)) +- { +- free (d); +- d = grub_util_path_concat (2, bootdir, "efi"); +- } + /* Find the Mac HFS(+) System Partition. */ +- if (!grub_util_is_directory (d)) +- { +- free (d); +- d = grub_util_path_concat (2, bootdir, "EFI"); +- } ++ d = grub_util_path_concat (2, bootdir, "macppc"); + if (!grub_util_is_directory (d)) + { + free (d); +-- +2.14.3 + diff --git a/0080-Add-support-for-UEFI-operating-systems-returned-by-o.patch b/0125-Add-support-for-UEFI-operating-systems-returned-by-o.patch similarity index 90% rename from 0080-Add-support-for-UEFI-operating-systems-returned-by-o.patch rename to 0125-Add-support-for-UEFI-operating-systems-returned-by-o.patch index a80e104..4ded43c 100644 --- a/0080-Add-support-for-UEFI-operating-systems-returned-by-o.patch +++ b/0125-Add-support-for-UEFI-operating-systems-returned-by-o.patch @@ -1,7 +1,7 @@ -From 699b7db9cabfe5e2dd48e61fcb079a91df3af4a7 Mon Sep 17 00:00:00 2001 +From 1ca2fc680297fc0ba1e9b24e83272b17e6df9b46 Mon Sep 17 00:00:00 2001 From: Matthew Garrett Date: Wed, 12 Jun 2013 11:51:49 -0400 -Subject: [PATCH 080/194] Add support for UEFI operating systems returned by +Subject: [PATCH 125/225] Add support for UEFI operating systems returned by os-prober os-prober returns UEFI operating systems in the form: @@ -46,5 +46,5 @@ index 515a68c7a..9b8f5968e 100644 esac done -- -2.13.5 +2.14.3 diff --git a/0081-Migrate-PPC-from-Yaboot-to-Grub2.patch b/0126-Migrate-PPC-from-Yaboot-to-Grub2.patch similarity index 94% rename from 0081-Migrate-PPC-from-Yaboot-to-Grub2.patch rename to 0126-Migrate-PPC-from-Yaboot-to-Grub2.patch index bcaac73..02bad74 100644 --- a/0081-Migrate-PPC-from-Yaboot-to-Grub2.patch +++ b/0126-Migrate-PPC-from-Yaboot-to-Grub2.patch @@ -1,7 +1,7 @@ -From 91b2efdd5e9c3b0784d0a70282407324f07a30b8 Mon Sep 17 00:00:00 2001 +From 030f2f742200a96667296e48a1d748333b5b1e42 Mon Sep 17 00:00:00 2001 From: Mark Hamzy Date: Wed, 28 Mar 2012 14:46:41 -0500 -Subject: [PATCH 081/194] Migrate PPC from Yaboot to Grub2 +Subject: [PATCH 126/225] Migrate PPC from Yaboot to Grub2 Add configuration support for serial terminal consoles. This will set the maximum screen size so that text is not overwritten. @@ -12,23 +12,23 @@ maximum screen size so that text is not overwritten. create mode 100644 util/grub.d/20_ppc_terminfo.in diff --git a/Makefile.util.def b/Makefile.util.def -index f9caccb97..6d452da02 100644 +index e7410494b..206110458 100644 --- a/Makefile.util.def +++ b/Makefile.util.def -@@ -487,6 +487,13 @@ script = { +@@ -495,6 +495,13 @@ script = { + condition = COND_HOST_LINUX; }; - script = { ++script = { + name = '20_ppc_terminfo'; + common = util/grub.d/20_ppc_terminfo.in; + installdir = grubconf; + condition = COND_HOST_LINUX; +}; + -+script = { + script = { name = '30_os-prober'; common = util/grub.d/30_os-prober.in; - installdir = grubconf; diff --git a/util/grub.d/20_ppc_terminfo.in b/util/grub.d/20_ppc_terminfo.in new file mode 100644 index 000000000..10d665868 @@ -150,5 +150,5 @@ index 000000000..10d665868 + terminfo -g ${X}x${Y} ${TERMINAL} +EOF -- -2.13.5 +2.14.3 diff --git a/0082-Add-fw_path-variable-revised.patch b/0127-Add-fw_path-variable-revised.patch similarity index 94% rename from 0082-Add-fw_path-variable-revised.patch rename to 0127-Add-fw_path-variable-revised.patch index 42cdf2b..76a1f4b 100644 --- a/0082-Add-fw_path-variable-revised.patch +++ b/0127-Add-fw_path-variable-revised.patch @@ -1,7 +1,7 @@ -From bcb1f1a6a5530ecbc4b674e61acbb406592714c6 Mon Sep 17 00:00:00 2001 +From 5144efc5a79f0321dd7495513b460ad32d1aa91d Mon Sep 17 00:00:00 2001 From: Paulo Flabiano Smorigo Date: Wed, 19 Sep 2012 21:22:55 -0300 -Subject: [PATCH 082/194] Add fw_path variable (revised) +Subject: [PATCH 127/225] Add fw_path variable (revised) This patch makes grub look for its config file on efi where the app was found. It was originally written by Matthew Garrett, and adapted to fix the @@ -77,5 +77,5 @@ index 249e19bc7..759c475c4 100644 prefix = grub_env_get ("prefix"); if (prefix) -- -2.13.5 +2.14.3 diff --git a/0083-Add-support-for-linuxefi.patch b/0128-Add-support-for-linuxefi.patch similarity index 95% rename from 0083-Add-support-for-linuxefi.patch rename to 0128-Add-support-for-linuxefi.patch index ee42905..27ebdfa 100644 --- a/0083-Add-support-for-linuxefi.patch +++ b/0128-Add-support-for-linuxefi.patch @@ -1,7 +1,7 @@ -From 28136df7d90f865a8030a0ff6513dacb3096dc10 Mon Sep 17 00:00:00 2001 +From 2bf79d64dbb6f130e8cf3364debf5bd764eeb50a Mon Sep 17 00:00:00 2001 From: Matthew Garrett Date: Tue, 10 Jul 2012 11:58:52 -0400 -Subject: [PATCH 083/194] Add support for linuxefi +Subject: [PATCH 128/225] Add support for linuxefi --- grub-core/Makefile.core.def | 8 + @@ -13,13 +13,14 @@ Subject: [PATCH 083/194] Add support for linuxefi create mode 100644 grub-core/loader/i386/efi/linux.c diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def -index 1eb86bed3..c653c71c5 100644 +index 0f06d8f09..903564b54 100644 --- a/grub-core/Makefile.core.def +++ b/grub-core/Makefile.core.def -@@ -1765,6 +1765,14 @@ module = { +@@ -1758,6 +1758,14 @@ module = { + enable = x86_64_efi; }; - module = { ++module = { + name = linuxefi; + efi = loader/i386/efi/linux.c; + efi = lib/cmdline.c; @@ -27,17 +28,16 @@ index 1eb86bed3..c653c71c5 100644 + enable = x86_64_efi; +}; + -+module = { + module = { name = chain; efi = loader/efi/chainloader.c; - i386_pc = loader/i386/pc/chainloader.c; diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c -index ac2a4c556..f5440cb1d 100644 +index 75d934457..0adf8fb22 100644 --- a/grub-core/kern/efi/mm.c +++ b/grub-core/kern/efi/mm.c -@@ -49,6 +49,38 @@ static grub_efi_uintn_t finish_desc_size; - static grub_efi_uint32_t finish_desc_version; - int grub_efi_is_finished = 0; +@@ -108,6 +108,38 @@ grub_efi_drop_alloc (grub_efi_physical_address_t address, + } + } +/* Allocate pages below a specified address */ +void * @@ -452,19 +452,19 @@ index 000000000..b79e6320b + grub_unregister_command (cmd_initrd); +} diff --git a/include/grub/efi/efi.h b/include/grub/efi/efi.h -index 3fa082816..91e29ce66 100644 +index a4d0d9767..926544afe 100644 --- a/include/grub/efi/efi.h +++ b/include/grub/efi/efi.h -@@ -47,6 +47,9 @@ EXPORT_FUNC(grub_efi_allocate_fixed) (grub_efi_physical_address_t address, +@@ -46,6 +46,9 @@ void * + EXPORT_FUNC(grub_efi_allocate_fixed) (grub_efi_physical_address_t address, grub_efi_uintn_t pages); void * - EXPORT_FUNC(grub_efi_allocate_any_pages) (grub_efi_uintn_t pages); -+void * +EXPORT_FUNC(grub_efi_allocate_pages_max) (grub_efi_physical_address_t max, + grub_efi_uintn_t pages); - void EXPORT_FUNC(grub_efi_free_pages) (grub_efi_physical_address_t address, - grub_efi_uintn_t pages); - int ++void * + EXPORT_FUNC(grub_efi_allocate_any_pages) (grub_efi_uintn_t pages); + grub_efi_status_t EXPORT_FUNC(grub_efi_allocate_pool) ( + grub_efi_memory_type_t pool_type, diff --git a/include/grub/i386/linux.h b/include/grub/i386/linux.h index da0ca3b83..fc36bdaf3 100644 --- a/include/grub/i386/linux.h @@ -478,5 +478,5 @@ index da0ca3b83..fc36bdaf3 100644 /* Boot parameters for Linux based on 2.6.12. This is used by the setup -- -2.13.5 +2.14.3 diff --git a/0084-Use-linuxefi-and-initrdefi-where-appropriate.patch b/0129-Use-linuxefi-and-initrdefi-where-appropriate.patch similarity index 91% rename from 0084-Use-linuxefi-and-initrdefi-where-appropriate.patch rename to 0129-Use-linuxefi-and-initrdefi-where-appropriate.patch index f4676d4..ea09ef0 100644 --- a/0084-Use-linuxefi-and-initrdefi-where-appropriate.patch +++ b/0129-Use-linuxefi-and-initrdefi-where-appropriate.patch @@ -1,7 +1,7 @@ -From e915644108ed022ad0cc5d2d987f116d2605bcf2 Mon Sep 17 00:00:00 2001 +From 8f0ca8ece8d81a7d612bc28890516244a26746c5 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Mon, 16 Jul 2012 18:57:11 -0400 -Subject: [PATCH 084/194] Use "linuxefi" and "initrdefi" where appropriate. +Subject: [PATCH 129/225] Use "linuxefi" and "initrdefi" where appropriate. --- util/grub.d/10_linux.in | 18 ++++++++++++++++-- @@ -46,5 +46,5 @@ index cf6331f2a..8ccf012f7 100644 sed "s/^/$submenu_indentation/" << EOF } -- -2.13.5 +2.14.3 diff --git a/0085-Don-t-allow-insmod-when-secure-boot-is-enabled.patch b/0130-Don-t-allow-insmod-when-secure-boot-is-enabled.patch similarity index 91% rename from 0085-Don-t-allow-insmod-when-secure-boot-is-enabled.patch rename to 0130-Don-t-allow-insmod-when-secure-boot-is-enabled.patch index 2bff02f..b175c57 100644 --- a/0085-Don-t-allow-insmod-when-secure-boot-is-enabled.patch +++ b/0130-Don-t-allow-insmod-when-secure-boot-is-enabled.patch @@ -1,7 +1,7 @@ -From b1eb9a8b9aa961bf6b6f40d6b4d22a5741f29ae4 Mon Sep 17 00:00:00 2001 +From ae4278207d2ba74301cbc1669a0543976e08e582 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Tue, 23 Oct 2012 10:40:49 -0400 -Subject: [PATCH 085/194] Don't allow insmod when secure boot is enabled. +Subject: [PATCH 130/225] Don't allow insmod when secure boot is enabled. Hi, @@ -69,10 +69,10 @@ index e394cd96f..621070918 100644 file = grub_file_open (filename); diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c -index 684ca93f8..2588b481e 100644 +index caa9d9979..4bfde0dac 100644 --- a/grub-core/kern/efi/efi.c +++ b/grub-core/kern/efi/efi.c -@@ -269,6 +269,34 @@ grub_efi_get_variable (const char *var, const grub_efi_guid_t *guid, +@@ -278,6 +278,34 @@ grub_efi_get_variable (const char *var, const grub_efi_guid_t *guid, return NULL; } @@ -108,10 +108,10 @@ index 684ca93f8..2588b481e 100644 /* Search the mods section from the PE32/PE32+ image. This code uses diff --git a/include/grub/efi/efi.h b/include/grub/efi/efi.h -index 91e29ce66..bb3ab7dfd 100644 +index 926544afe..72283ee99 100644 --- a/include/grub/efi/efi.h +++ b/include/grub/efi/efi.h -@@ -83,6 +83,7 @@ EXPORT_FUNC (grub_efi_set_variable) (const char *var, +@@ -89,6 +89,7 @@ EXPORT_FUNC (grub_efi_set_variable) (const char *var, const grub_efi_guid_t *guid, void *data, grub_size_t datasize); @@ -120,5 +120,5 @@ index 91e29ce66..bb3ab7dfd 100644 EXPORT_FUNC (grub_efi_compare_device_paths) (const grub_efi_device_path_t *dp1, const grub_efi_device_path_t *dp2); -- -2.13.5 +2.14.3 diff --git a/0088-Search-for-specific-config-file-for-netboot.patch b/0131-Search-for-specific-config-file-for-netboot.patch similarity index 87% rename from 0088-Search-for-specific-config-file-for-netboot.patch rename to 0131-Search-for-specific-config-file-for-netboot.patch index c1c1d13..725dee5 100644 --- a/0088-Search-for-specific-config-file-for-netboot.patch +++ b/0131-Search-for-specific-config-file-for-netboot.patch @@ -1,7 +1,7 @@ -From 30c15e39be47d60f6a4a45628a687911a9f11091 Mon Sep 17 00:00:00 2001 +From deb647ceb970112c195151eefdf2f4438e1d1320 Mon Sep 17 00:00:00 2001 From: Paulo Flabiano Smorigo Date: Tue, 27 Nov 2012 17:22:07 -0200 -Subject: [PATCH 088/194] Search for specific config file for netboot +Subject: [PATCH 131/225] Search for specific config file for netboot This patch implements a search for a specific configuration when the config file is on a remoteserver. It uses the following order: @@ -16,16 +16,16 @@ http://www.syslinux.org/wiki/index.php/PXELINUX#config This should close the bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=873406 --- - grub-core/net/net.c | 118 ++++++++++++++++++++++++++++++++++++++++++++++++ - grub-core/normal/main.c | 18 ++++++-- + grub-core/net/net.c | 129 ++++++++++++++++++++++++++++++++++++++++++++++++ + grub-core/normal/main.c | 18 +++++-- include/grub/net.h | 3 ++ - 3 files changed, 135 insertions(+), 4 deletions(-) + 3 files changed, 146 insertions(+), 4 deletions(-) diff --git a/grub-core/net/net.c b/grub-core/net/net.c -index 10773fc34..0769bf850 100644 +index 10773fc34..62ae107b3 100644 --- a/grub-core/net/net.c +++ b/grub-core/net/net.c -@@ -1735,6 +1735,124 @@ grub_net_restore_hw (void) +@@ -1735,6 +1735,135 @@ grub_net_restore_hw (void) return GRUB_ERR_NONE; } @@ -75,14 +75,25 @@ index 10773fc34..0769bf850 100644 + { + /* By the Client UUID. */ + -+ char client_uuid_var[sizeof ("net_") + grub_strlen (inf->name) + -+ sizeof ("_clientuuid") + 1]; -+ grub_snprintf (client_uuid_var, sizeof (client_uuid_var), ++ char *client_uuid_var; ++ grub_size_t client_uuid_var_size; ++ ++ client_uuid_var_size = grub_snprintf (NULL, 0, ++ "net_%s_clientuuid", inf->name); ++ if (client_uuid_var_size <= 0) ++ continue; ++ client_uuid_var_size += 1; ++ client_uuid_var = grub_malloc(client_uuid_var_size); ++ if (!client_uuid_var) ++ continue; ++ grub_snprintf (client_uuid_var, client_uuid_var_size, + "net_%s_clientuuid", inf->name); + + const char *client_uuid; + client_uuid = grub_env_get (client_uuid_var); + ++ grub_free(client_uuid_var); ++ + if (client_uuid) + { + grub_strcpy (suffix, client_uuid); @@ -199,5 +210,5 @@ index e266bae23..50d62ab0c 100644 + #endif /* ! GRUB_NET_HEADER */ -- -2.13.5 +2.14.3 diff --git a/0131-calibrate_tsc-use-the-Stall-EFI-boot-service-on-GRUB.patch b/0131-calibrate_tsc-use-the-Stall-EFI-boot-service-on-GRUB.patch deleted file mode 100644 index b9ffcb6..0000000 --- a/0131-calibrate_tsc-use-the-Stall-EFI-boot-service-on-GRUB.patch +++ /dev/null @@ -1,103 +0,0 @@ -From 603f5c1a20ec0acd20227eb4c48ffc4d21960ec1 Mon Sep 17 00:00:00 2001 -From: Laszlo Ersek -Date: Fri, 10 Oct 2014 11:11:09 +0200 -Subject: [PATCH 131/194] calibrate_tsc(): use the Stall() EFI boot service on - GRUB_MACHINE_EFI - -Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1150698 - -HyperV Gen2 virtual machines have no PIT; guest code should rely on UEFI -services instead. - -Signed-off-by: RHEL Ninjas ---- - grub-core/kern/i386/tsc.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++- - 1 file changed, 58 insertions(+), 1 deletion(-) - -diff --git a/grub-core/kern/i386/tsc.c b/grub-core/kern/i386/tsc.c -index 2e85289d8..48c013860 100644 ---- a/grub-core/kern/i386/tsc.c -+++ b/grub-core/kern/i386/tsc.c -@@ -24,6 +24,17 @@ - #include - #include - #include -+#ifdef GRUB_MACHINE_XEN -+# include -+#else -+# ifdef GRUB_MACHINE_EFI -+# include -+# include -+# else -+# include -+# endif -+#endif -+#include - - /* This defines the value TSC had at the epoch (that is, when we calibrated it). */ - static grub_uint64_t tsc_boot_time; -@@ -33,6 +44,44 @@ static grub_uint64_t tsc_boot_time; - in 32-bit. */ - grub_uint32_t grub_tsc_rate; - -+#ifndef GRUB_MACHINE_XEN -+ -+static void -+grub_stall (grub_uint16_t tics) -+{ -+# ifdef GRUB_MACHINE_EFI -+ grub_uint64_t microseconds; -+ -+ microseconds = (grub_uint64_t)tics * 1000 * 1000 * 3 / 3579545; -+ efi_call_1 (grub_efi_system_table->boot_services->stall, microseconds); -+# else -+ /* Disable timer2 gate and speaker. */ -+ grub_outb (grub_inb (GRUB_PIT_SPEAKER_PORT) -+ & ~ (GRUB_PIT_SPK_DATA | GRUB_PIT_SPK_TMR2), -+ GRUB_PIT_SPEAKER_PORT); -+ -+ /* Set tics. */ -+ grub_outb (GRUB_PIT_CTRL_SELECT_2 | GRUB_PIT_CTRL_READLOAD_WORD, -+ GRUB_PIT_CTRL); -+ grub_outb (tics & 0xff, GRUB_PIT_COUNTER_2); -+ grub_outb (tics >> 8, GRUB_PIT_COUNTER_2); -+ -+ /* Enable timer2 gate, keep speaker disabled. */ -+ grub_outb ((grub_inb (GRUB_PIT_SPEAKER_PORT) & ~ GRUB_PIT_SPK_DATA) -+ | GRUB_PIT_SPK_TMR2, -+ GRUB_PIT_SPEAKER_PORT); -+ -+ /* Wait. */ -+ while ((grub_inb (GRUB_PIT_SPEAKER_PORT) & GRUB_PIT_SPK_TMR2_LATCH) == 0x00); -+ -+ /* Disable timer2 gate and speaker. */ -+ grub_outb (grub_inb (GRUB_PIT_SPEAKER_PORT) -+ & ~ (GRUB_PIT_SPK_DATA | GRUB_PIT_SPK_TMR2), -+ GRUB_PIT_SPEAKER_PORT); -+# endif -+} -+#endif -+ - static grub_uint64_t - grub_tsc_get_time_ms (void) - { -@@ -46,7 +95,15 @@ grub_tsc_get_time_ms (void) - static int - calibrate_tsc_hardcode (void) - { -- grub_tsc_rate = 5368;/* 800 MHz */ -+ /* First calibrate the TSC rate (relative, not absolute time). */ -+ grub_uint64_t end_tsc; -+ -+ tsc_boot_time = grub_get_tsc (); -+ grub_stall (0xffff); -+ end_tsc = grub_get_tsc (); -+ -+ grub_tsc_rate = grub_divmod64 ((55ULL << 32), end_tsc - tsc_boot_time, 0); -+ - return 1; - } - --- -2.13.5 - diff --git a/0132-Make-grub2-mkconfig-construct-titles-that-look-like-.patch b/0132-Make-grub2-mkconfig-construct-titles-that-look-like-.patch deleted file mode 100644 index 27196bb..0000000 --- a/0132-Make-grub2-mkconfig-construct-titles-that-look-like-.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 1e3b125bce76027722c7ac9844298646f9a6e42d Mon Sep 17 00:00:00 2001 -From: Peter Jones -Date: Tue, 28 Apr 2015 11:15:03 -0400 -Subject: [PATCH 132/194] Make grub2-mkconfig construct titles that look like - the ones we want elsewhere. - -Resolves: rhbz#1215839 - -Signed-off-by: Peter Jones ---- - util/grub.d/10_linux.in | 34 +++++++++++++++++++++++----------- - 1 file changed, 23 insertions(+), 11 deletions(-) - -diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in -index 121524185..584ad1f46 100644 ---- a/util/grub.d/10_linux.in -+++ b/util/grub.d/10_linux.in -@@ -70,11 +70,28 @@ esac - - mktitle () - { -- local OS_NAME="$(eval $(grep ^NAME= /etc/os-release) ; echo ${NAME})" -- local OS_VERS="$(eval $(grep ^VERSION= /etc/os-release) ; echo ${VERSION})" -- -- local titlestr="${OS_NAME} (%s) ${OS_VERS}" -- echo -n ${titlestr} -+ local title_type -+ local version -+ local OS_NAME -+ local OS_VERS -+ -+ title_type=$1 && shift -+ version=$1 && shift -+ -+ OS_NAME="$(eval $(grep ^NAME= /etc/os-release) ; echo ${NAME})" -+ OS_VERS="$(eval $(grep ^VERSION= /etc/os-release) ; echo ${VERSION})" -+ -+ case $title_type in -+ recovery) -+ title=$(printf '%s (%s) %s (recovery mode)' \ -+ "${OS_NAME}" "${version}" "${OS_VERS}") -+ ;; -+ *) -+ title=$(printf '%s (%s) %s' \ -+ "${OS_NAME}" "${version}" "${OS_VERS}") -+ ;; -+ esac -+ echo -n ${title} - } - - title_correction_code= -@@ -105,12 +122,7 @@ linux_entry () - boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")" - fi - if [ x$type != xsimple ] ; then -- case $type in -- recovery) -- title="$(printf "$(mktitle) (recovery mode)" "${version}")" ;; -- *) -- title="$(printf "$(mktitle)" "${version}")" ;; -- esac -+ title=$(mktitle "$type" "$version") - if [ x"$title" = x"$GRUB_ACTUAL_DEFAULT" ] || [ x"Previous Linux versions>$title" = x"$GRUB_ACTUAL_DEFAULT" ]; then - replacement_title="$(echo "Advanced options for ${OS}" | sed 's,>,>>,g')>$(echo "$title" | sed 's,>,>>,g')" - quoted="$(echo "$GRUB_ACTUAL_DEFAULT" | grub_quote)" --- -2.13.5 - diff --git a/0089-blscfg-add-blscfg-module-to-parse-Boot-Loader-Specif.patch b/0132-blscfg-add-blscfg-module-to-parse-Boot-Loader-Specif.patch similarity index 96% rename from 0089-blscfg-add-blscfg-module-to-parse-Boot-Loader-Specif.patch rename to 0132-blscfg-add-blscfg-module-to-parse-Boot-Loader-Specif.patch index b310fd0..7dacdad 100644 --- a/0089-blscfg-add-blscfg-module-to-parse-Boot-Loader-Specif.patch +++ b/0132-blscfg-add-blscfg-module-to-parse-Boot-Loader-Specif.patch @@ -1,7 +1,7 @@ -From 266c7e797971879dc229594556a687a79c92d3b6 Mon Sep 17 00:00:00 2001 +From 3450ca2f4bd5617ca93da3b8523caa53c38f9ac3 Mon Sep 17 00:00:00 2001 From: Fedora Ninjas Date: Tue, 22 Jan 2013 06:31:38 +0100 -Subject: [PATCH 089/194] blscfg: add blscfg module to parse Boot Loader +Subject: [PATCH 132/225] blscfg: add blscfg module to parse Boot Loader Specification snippets http://www.freedesktop.org/wiki/Specifications/BootLoaderSpec @@ -21,13 +21,14 @@ Signed-off-by: Peter Jones create mode 100644 grub-core/commands/blscfg.c diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def -index c653c71c5..7f3d5a2bf 100644 +index 903564b54..8d7edded8 100644 --- a/grub-core/Makefile.core.def +++ b/grub-core/Makefile.core.def -@@ -769,6 +769,14 @@ module = { +@@ -772,6 +772,14 @@ module = { + common = commands/blocklist.c; }; - module = { ++module = { + name = blscfg; + common = commands/blscfg.c; + enable = i386_efi; @@ -35,10 +36,9 @@ index c653c71c5..7f3d5a2bf 100644 + enable = i386_pc; +}; + -+module = { + module = { name = boot; common = commands/boot.c; - i386_pc = lib/i386/pc/biosnum.c; diff --git a/grub-core/commands/blscfg.c b/grub-core/commands/blscfg.c new file mode 100644 index 000000000..4274aca5a @@ -247,5 +247,5 @@ index 000000000..4274aca5a + grub_unregister_extcmd (cmd); +} -- -2.13.5 +2.14.3 diff --git a/0090-Don-t-write-messages-to-the-screen.patch b/0133-Don-t-write-messages-to-the-screen.patch similarity index 97% rename from 0090-Don-t-write-messages-to-the-screen.patch rename to 0133-Don-t-write-messages-to-the-screen.patch index 197f653..21f3f25 100644 --- a/0090-Don-t-write-messages-to-the-screen.patch +++ b/0133-Don-t-write-messages-to-the-screen.patch @@ -1,7 +1,7 @@ -From 6609ba848331d9153c554bb52f2ef0a33531cf55 Mon Sep 17 00:00:00 2001 +From 8dc6e01f6f73fb959efd5d94edb2c6add90f26ca Mon Sep 17 00:00:00 2001 From: William Jon McCann Date: Wed, 15 May 2013 13:30:20 -0400 -Subject: [PATCH 090/194] Don't write messages to the screen +Subject: [PATCH 133/225] Don't write messages to the screen Writing messages to the screen before the menus or boot splash happens so quickly it looks like something is wrong and isn't @@ -177,5 +177,5 @@ index 8ccf012f7..a3d9711d6 100644 EOF fi -- -2.13.5 +2.14.3 diff --git a/0133-Try-to-make-sure-configure.ac-and-grub-rpm-sort-play.patch b/0133-Try-to-make-sure-configure.ac-and-grub-rpm-sort-play.patch deleted file mode 100644 index bc3104d..0000000 --- a/0133-Try-to-make-sure-configure.ac-and-grub-rpm-sort-play.patch +++ /dev/null @@ -1,61 +0,0 @@ -From fbfd5d8ed8993f3da4555b69a6018393be20b259 Mon Sep 17 00:00:00 2001 -From: Peter Jones -Date: Mon, 3 Aug 2015 11:46:42 -0400 -Subject: [PATCH 133/194] Try to make sure configure.ac and grub-rpm-sort play - nice. - -Apparently the test for whether to use grub-rpm-sort and also the -renaming of it to grub2-rpm-sort on the runtime side weren't right. - -Related: rhbz#1124074 - -Signed-off-by: Peter Jones ---- - configure.ac | 2 +- - util/grub-mkconfig_lib.in | 9 ++++++--- - 2 files changed, 7 insertions(+), 4 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 196084004..3c4b9a19b 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1795,7 +1795,7 @@ AC_SUBST([LIBDEVMAPPER]) - AC_ARG_ENABLE([rpm-sort], - [AS_HELP_STRING([--enable-rpm-sort], - [enable native rpm sorting of kernels in grub (default=guessed)])]) --if test x"$enable_rpm-sort" = xno ; then -+if test x"$enable_rpm_sort" = xno ; then - rpm_sort_excuse="explicitly disabled" - fi - -diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in -index 954844d2d..9c410eae4 100644 ---- a/util/grub-mkconfig_lib.in -+++ b/util/grub-mkconfig_lib.in -@@ -33,6 +33,9 @@ fi - if test "x$grub_mkrelpath" = x; then - grub_mkrelpath="${bindir}/@grub_mkrelpath@" - fi -+if test "x$grub_rpm_sort" = x; then -+ grub_rpm_sort="${sbindir}/@grub_rpm_sort@" -+fi - - if which gettext >/dev/null 2>/dev/null; then - : -@@ -213,10 +216,10 @@ version_sort () - esac - } - --if [ "x$RPMLIB" = x ]; then -- kernel_sort=version_sort -+if [ "x$grub_rpm_sort" != x -a -x "$grub_rpm_sort" ]; then -+ kernel_sort="$grub_rpm_sort" - else -- kernel_sort="${sbindir}/grub-rpm-sort" -+ kernel_sort=version_sort - fi - - version_test_numeric () --- -2.13.5 - diff --git a/0091-Don-t-print-GNU-GRUB-header.patch b/0134-Don-t-print-GNU-GRUB-header.patch similarity index 89% rename from 0091-Don-t-print-GNU-GRUB-header.patch rename to 0134-Don-t-print-GNU-GRUB-header.patch index 538a095..9bf41ce 100644 --- a/0091-Don-t-print-GNU-GRUB-header.patch +++ b/0134-Don-t-print-GNU-GRUB-header.patch @@ -1,7 +1,7 @@ -From 95aeba5fe67ad11a995eb8e583708a722b8bdeb9 Mon Sep 17 00:00:00 2001 +From 578303245d228daa40a13c883fe9843fb8e9b6e0 Mon Sep 17 00:00:00 2001 From: William Jon McCann Date: Wed, 15 May 2013 13:53:48 -0400 -Subject: [PATCH 091/194] Don't print GNU GRUB header +Subject: [PATCH 134/225] Don't print GNU GRUB header No one cares. --- @@ -41,5 +41,5 @@ index b2654ef62..f57b7508a 100644 static void -- -2.13.5 +2.14.3 diff --git a/0092-Don-t-add-to-highlighted-row.patch b/0135-Don-t-add-to-highlighted-row.patch similarity index 84% rename from 0092-Don-t-add-to-highlighted-row.patch rename to 0135-Don-t-add-to-highlighted-row.patch index caa2c80..9b63067 100644 --- a/0092-Don-t-add-to-highlighted-row.patch +++ b/0135-Don-t-add-to-highlighted-row.patch @@ -1,7 +1,7 @@ -From aca25c56911ece3e4d82ae9edbde6c705c1eaacc Mon Sep 17 00:00:00 2001 +From 26d86389501a23518776a4fbd59e90240de6d8aa Mon Sep 17 00:00:00 2001 From: William Jon McCann Date: Wed, 15 May 2013 17:49:45 -0400 -Subject: [PATCH 092/194] Don't add '*' to highlighted row +Subject: [PATCH 135/225] Don't add '*' to highlighted row It is already highlighted. --- @@ -22,5 +22,5 @@ index e22bb91f6..a3d1f23f6 100644 grub_print_ucs4_menu (unicode_title, unicode_title + len, -- -2.13.5 +2.14.3 diff --git a/0093-Message-string-cleanups.patch b/0136-Message-string-cleanups.patch similarity index 96% rename from 0093-Message-string-cleanups.patch rename to 0136-Message-string-cleanups.patch index 4276a3f..dc9d23a 100644 --- a/0093-Message-string-cleanups.patch +++ b/0136-Message-string-cleanups.patch @@ -1,7 +1,7 @@ -From eef343ff642b42f0e46eb5e8ff5d89fef375f4a2 Mon Sep 17 00:00:00 2001 +From 4aeb4b8d7d897216c2144d9426b20ff48ae9c1ce Mon Sep 17 00:00:00 2001 From: William Jon McCann Date: Fri, 7 Jun 2013 11:09:04 -0400 -Subject: [PATCH 093/194] Message string cleanups +Subject: [PATCH 136/225] Message string cleanups Make use of terminology consistent. Remove jargon. --- @@ -67,5 +67,5 @@ index a3d1f23f6..64a83862f 100644 { grub_print_error (); -- -2.13.5 +2.14.3 diff --git a/0094-Fix-border-spacing-now-that-we-aren-t-displaying-it.patch b/0137-Fix-border-spacing-now-that-we-aren-t-displaying-it.patch similarity index 87% rename from 0094-Fix-border-spacing-now-that-we-aren-t-displaying-it.patch rename to 0137-Fix-border-spacing-now-that-we-aren-t-displaying-it.patch index 6a277ce..eb1b046 100644 --- a/0094-Fix-border-spacing-now-that-we-aren-t-displaying-it.patch +++ b/0137-Fix-border-spacing-now-that-we-aren-t-displaying-it.patch @@ -1,7 +1,7 @@ -From c2e1e09485a5773dc3639d34eadc3a07ebce8fe5 Mon Sep 17 00:00:00 2001 +From 60eaf4051aca4a86cbe6cefdb72ec099f9760d9f Mon Sep 17 00:00:00 2001 From: William Jon McCann Date: Fri, 7 Jun 2013 14:08:23 -0400 -Subject: [PATCH 094/194] Fix border spacing now that we aren't displaying it +Subject: [PATCH 137/225] Fix border spacing now that we aren't displaying it --- grub-core/normal/menu_text.c | 6 +++--- @@ -28,5 +28,5 @@ index 64a83862f..1062d64ee 100644 geo->timeout_lines = 2; -- -2.13.5 +2.14.3 diff --git a/0137-efinet-add-filter-for-the-first-exclusive-reopen-of-.patch b/0137-efinet-add-filter-for-the-first-exclusive-reopen-of-.patch deleted file mode 100644 index c42470e..0000000 --- a/0137-efinet-add-filter-for-the-first-exclusive-reopen-of-.patch +++ /dev/null @@ -1,63 +0,0 @@ -From e1e6bdda43fd14f2a8a2dfe8352469921c820e0b Mon Sep 17 00:00:00 2001 -From: RHEL Ninjas -Date: Fri, 25 Sep 2015 16:24:23 +0900 -Subject: [PATCH 137/194] efinet: add filter for the first exclusive reopen of - SNP - ---- - grub-core/net/drivers/efi/efinet.c | 39 ++++++++++++++++++++++++++++++++++++++ - 1 file changed, 39 insertions(+) - -diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c -index a3ce4c67c..b870d3f19 100644 ---- a/grub-core/net/drivers/efi/efinet.c -+++ b/grub-core/net/drivers/efi/efinet.c -@@ -465,6 +465,45 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device, - &pxe_mode->dhcp_ack, - sizeof (pxe_mode->dhcp_ack), - 1, device, path); -+ net = grub_efi_open_protocol (card->efi_handle, &net_io_guid, -+ GRUB_EFI_OPEN_PROTOCOL_BY_EXCLUSIVE); -+ if (net) { -+ if (net->mode->state == GRUB_EFI_NETWORK_STOPPED -+ && efi_call_1 (net->start, net) != GRUB_EFI_SUCCESS) -+ continue; -+ -+ if (net->mode->state == GRUB_EFI_NETWORK_STOPPED) -+ continue; -+ -+ if (net->mode->state == GRUB_EFI_NETWORK_STARTED -+ && efi_call_3 (net->initialize, net, 0, 0) != GRUB_EFI_SUCCESS) -+ continue; -+ -+ /* Enable hardware receive filters if driver declares support for it. -+ We need unicast and broadcast and additionaly all nodes and -+ solicited multicast for IPv6. Solicited multicast is per-IPv6 -+ address and we currently do not have API to do it so simply -+ try to enable receive of all multicast packets or evertyhing in -+ the worst case (i386 PXE driver always enables promiscuous too). -+ -+ This does trust firmware to do what it claims to do. -+ */ -+ if (net->mode->receive_filter_mask) -+ { -+ grub_uint32_t filters = GRUB_EFI_SIMPLE_NETWORK_RECEIVE_UNICAST | -+ GRUB_EFI_SIMPLE_NETWORK_RECEIVE_BROADCAST | -+ GRUB_EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS_MULTICAST; -+ -+ filters &= net->mode->receive_filter_mask; -+ if (!(filters & GRUB_EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS_MULTICAST)) -+ filters |= (net->mode->receive_filter_mask & -+ GRUB_EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS); -+ -+ efi_call_6 (net->receive_filters, net, filters, 0, 0, 0, NULL); -+ } -+ -+ card->efi_net = net; -+ } - return; - } - } --- -2.13.5 - diff --git a/0095-Use-the-correct-indentation-for-the-term-help-text.patch b/0138-Use-the-correct-indentation-for-the-term-help-text.patch similarity index 87% rename from 0095-Use-the-correct-indentation-for-the-term-help-text.patch rename to 0138-Use-the-correct-indentation-for-the-term-help-text.patch index 71570ed..163ba6a 100644 --- a/0095-Use-the-correct-indentation-for-the-term-help-text.patch +++ b/0138-Use-the-correct-indentation-for-the-term-help-text.patch @@ -1,7 +1,7 @@ -From e29b4dd346fa10dc6a073239ef1ed8fb32a0c838 Mon Sep 17 00:00:00 2001 +From 32b402e85b2f74730bb5ccabc61e15f24b0358be Mon Sep 17 00:00:00 2001 From: William Jon McCann Date: Fri, 7 Jun 2013 14:08:49 -0400 -Subject: [PATCH 095/194] Use the correct indentation for the term help text +Subject: [PATCH 138/225] Use the correct indentation for the term help text That is consistent with the menu help text --- @@ -24,5 +24,5 @@ index f57b7508a..0ce59fdc3 100644 grub_print_message_indented (msg_formatted, 0, 0, term); grub_putcode ('\n', term); -- -2.13.5 +2.14.3 diff --git a/0096-Indent-menu-entries.patch b/0139-Indent-menu-entries.patch similarity index 85% rename from 0096-Indent-menu-entries.patch rename to 0139-Indent-menu-entries.patch index 41bede5..457e564 100644 --- a/0096-Indent-menu-entries.patch +++ b/0139-Indent-menu-entries.patch @@ -1,7 +1,7 @@ -From a67be6e17cd318ad3d4a669efb2b8c5f6e76c003 Mon Sep 17 00:00:00 2001 +From 52bc601b8383a5153edc26db8d688da15860c949 Mon Sep 17 00:00:00 2001 From: William Jon McCann Date: Fri, 7 Jun 2013 14:30:55 -0400 -Subject: [PATCH 096/194] Indent menu entries +Subject: [PATCH 139/225] Indent menu entries --- grub-core/normal/menu_text.c | 3 ++- @@ -22,5 +22,5 @@ index 1062d64ee..ecc60f99f 100644 grub_print_ucs4_menu (unicode_title, unicode_title + len, -- -2.13.5 +2.14.3 diff --git a/0097-Fix-margins.patch b/0140-Fix-margins.patch similarity index 91% rename from 0097-Fix-margins.patch rename to 0140-Fix-margins.patch index 58904ce..768a359 100644 --- a/0097-Fix-margins.patch +++ b/0140-Fix-margins.patch @@ -1,7 +1,7 @@ -From 8e5a006c6c48002f3debd99f4c377b443f9f8369 Mon Sep 17 00:00:00 2001 +From 3a56a956e916d79d07eac6628c4db4b94b0b2c22 Mon Sep 17 00:00:00 2001 From: William Jon McCann Date: Fri, 7 Jun 2013 14:59:36 -0400 -Subject: [PATCH 097/194] Fix margins +Subject: [PATCH 140/225] Fix margins --- grub-core/normal/menu_text.c | 8 +++----- @@ -33,5 +33,5 @@ index ecc60f99f..0e43f2c10 100644 - geo->timeout_lines /* timeout */ - 1 /* empty final line */; -- -2.13.5 +2.14.3 diff --git a/0098-Use-2-instead-of-1-for-our-right-hand-margin-so-line.patch b/0141-Use-2-instead-of-1-for-our-right-hand-margin-so-line.patch similarity index 84% rename from 0098-Use-2-instead-of-1-for-our-right-hand-margin-so-line.patch rename to 0141-Use-2-instead-of-1-for-our-right-hand-margin-so-line.patch index 79715a9..0924d88 100644 --- a/0098-Use-2-instead-of-1-for-our-right-hand-margin-so-line.patch +++ b/0141-Use-2-instead-of-1-for-our-right-hand-margin-so-line.patch @@ -1,7 +1,7 @@ -From 01757871cb2a7355a7f67e80f77a57fecba26f54 Mon Sep 17 00:00:00 2001 +From 26c1490e0e7f829e93c17aee76385e5feda85e9b Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Fri, 21 Jun 2013 14:44:08 -0400 -Subject: [PATCH 098/194] Use -2 instead of -1 for our right-hand margin, so +Subject: [PATCH 141/225] Use -2 instead of -1 for our right-hand margin, so linewrapping works (#976643). Signed-off-by: Peter Jones @@ -23,5 +23,5 @@ index 0e43f2c10..537d4bf86 100644 geo->first_entry_y = 3; /* three empty lines*/ -- -2.13.5 +2.14.3 diff --git a/0099-Use-linux16-when-appropriate-880840.patch b/0142-Use-linux16-when-appropriate-880840.patch similarity index 90% rename from 0099-Use-linux16-when-appropriate-880840.patch rename to 0142-Use-linux16-when-appropriate-880840.patch index c28450b..78360cf 100644 --- a/0099-Use-linux16-when-appropriate-880840.patch +++ b/0142-Use-linux16-when-appropriate-880840.patch @@ -1,7 +1,7 @@ -From ac001b7b4cc1819186fbe2bc695cbe58d2077d0f Mon Sep 17 00:00:00 2001 +From 626968f529c13539a8cb64bffa1db4483129b64a Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Mon, 28 Oct 2013 10:05:07 -0400 -Subject: [PATCH 099/194] Use linux16 when appropriate (#880840) +Subject: [PATCH 142/225] Use linux16 when appropriate (#880840) The kernel group really would prefer that we use the 16 bit entry point on x86 bios machines. @@ -48,5 +48,5 @@ index a3d9711d6..f3bf6acd8 100644 fi fi -- -2.13.5 +2.14.3 diff --git a/0142-efiemu-Handle-persistent-RAM-and-unknown-possible-fu.patch b/0142-efiemu-Handle-persistent-RAM-and-unknown-possible-fu.patch deleted file mode 100644 index 2cbb4a4..0000000 --- a/0142-efiemu-Handle-persistent-RAM-and-unknown-possible-fu.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 30420391d9c42ee08d0d68b13de70a4f63b01ec8 Mon Sep 17 00:00:00 2001 -From: Robert Elliott -Date: Fri, 22 Jan 2016 13:32:30 +0100 -Subject: [PATCH 142/194] efiemu: Handle persistent RAM and unknown possible - future additions. - -(cherry picked from commit ae3b83a4d4df75a01198a2fed7542391e7c449e0) - -Resolves: rhbz#1288608 ---- - grub-core/efiemu/mm.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/grub-core/efiemu/mm.c b/grub-core/efiemu/mm.c -index 52a032f7b..92e7df7e5 100644 ---- a/grub-core/efiemu/mm.c -+++ b/grub-core/efiemu/mm.c -@@ -410,8 +410,8 @@ fill_hook (grub_uint64_t addr, grub_uint64_t size, grub_memory_type_t type, - return grub_efiemu_add_to_mmap (addr, size, - GRUB_EFI_ACPI_MEMORY_NVS); - -- case GRUB_MEMORY_PERSISTENT: -- case GRUB_MEMORY_PERSISTENT_LEGACY: -+ case GRUB_MEMORY_PRAM: -+ case GRUB_MEMORY_PMEM: - return grub_efiemu_add_to_mmap (addr, size, - GRUB_EFI_PERSISTENT_MEMORY); - default: --- -2.13.5 - diff --git a/0100-Enable-pager-by-default.-985860.patch b/0143-Enable-pager-by-default.-985860.patch similarity index 82% rename from 0100-Enable-pager-by-default.-985860.patch rename to 0143-Enable-pager-by-default.-985860.patch index 8e15e9b..b409ab5 100644 --- a/0100-Enable-pager-by-default.-985860.patch +++ b/0143-Enable-pager-by-default.-985860.patch @@ -1,7 +1,7 @@ -From cc60fb5b7693dabcf100c910d42b3ffe1816597f Mon Sep 17 00:00:00 2001 +From 9e7945c701d386985d1c20419d431b2a1a00e5e0 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Mon, 28 Oct 2013 10:09:27 -0400 -Subject: [PATCH 100/194] Enable pager by default. (#985860) +Subject: [PATCH 143/225] Enable pager by default. (#985860) Signed-off-by: Peter Jones --- @@ -22,5 +22,5 @@ index 93a90233e..858b526c9 100644 load_env fi -- -2.13.5 +2.14.3 diff --git a/0143-efiemu-Fix-compilation-failure.patch b/0143-efiemu-Fix-compilation-failure.patch deleted file mode 100644 index 4a516a0..0000000 --- a/0143-efiemu-Fix-compilation-failure.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 0588a88adbd4fd4482a02f717c76b4b3753bd653 Mon Sep 17 00:00:00 2001 -From: Vladimir Serbinenko -Date: Fri, 22 Jan 2016 14:10:30 +0100 -Subject: [PATCH 143/194] efiemu: Fix compilation failure - -(cherry picked from commit b6a03dfd327489d53ee07c6d7d593b99c7b7cb62) - -Resolves: rhbz#1288608 ---- - grub-core/efiemu/mm.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/grub-core/efiemu/mm.c b/grub-core/efiemu/mm.c -index 92e7df7e5..52a032f7b 100644 ---- a/grub-core/efiemu/mm.c -+++ b/grub-core/efiemu/mm.c -@@ -410,8 +410,8 @@ fill_hook (grub_uint64_t addr, grub_uint64_t size, grub_memory_type_t type, - return grub_efiemu_add_to_mmap (addr, size, - GRUB_EFI_ACPI_MEMORY_NVS); - -- case GRUB_MEMORY_PRAM: -- case GRUB_MEMORY_PMEM: -+ case GRUB_MEMORY_PERSISTENT: -+ case GRUB_MEMORY_PERSISTENT_LEGACY: - return grub_efiemu_add_to_mmap (addr, size, - GRUB_EFI_PERSISTENT_MEMORY); - default: --- -2.13.5 - diff --git a/0101-F10-doesn-t-work-on-serial-so-don-t-tell-the-user-to.patch b/0144-F10-doesn-t-work-on-serial-so-don-t-tell-the-user-to.patch similarity index 87% rename from 0101-F10-doesn-t-work-on-serial-so-don-t-tell-the-user-to.patch rename to 0144-F10-doesn-t-work-on-serial-so-don-t-tell-the-user-to.patch index 5016265..41204ca 100644 --- a/0101-F10-doesn-t-work-on-serial-so-don-t-tell-the-user-to.patch +++ b/0144-F10-doesn-t-work-on-serial-so-don-t-tell-the-user-to.patch @@ -1,7 +1,7 @@ -From f1cb6c5a7640406294b7dffab3c5e4a4afdaf745 Mon Sep 17 00:00:00 2001 +From 0c082dc20b7a646155ac663e08cd1b55a6c24a61 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Mon, 28 Oct 2013 10:13:27 -0400 -Subject: [PATCH 101/194] F10 doesn't work on serial, so don't tell the user to +Subject: [PATCH 144/225] F10 doesn't work on serial, so don't tell the user to hit it (#987443) Signed-off-by: Peter Jones @@ -23,5 +23,5 @@ index 537d4bf86..452d55bf9 100644 STANDARD_MARGIN, STANDARD_MARGIN, term, dry_run); -- -2.13.5 +2.14.3 diff --git a/0144-Revert-reopen-SNP-protocol-for-exclusive-use-by-grub.patch b/0144-Revert-reopen-SNP-protocol-for-exclusive-use-by-grub.patch deleted file mode 100644 index 14fdce1..0000000 --- a/0144-Revert-reopen-SNP-protocol-for-exclusive-use-by-grub.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 7766b66bf1f1c7c586026be98883e60e2cc943b9 Mon Sep 17 00:00:00 2001 -From: Peter Jones -Date: Thu, 7 Apr 2016 10:58:06 -0400 -Subject: [PATCH 144/194] Revert "reopen SNP protocol for exclusive use by - grub" - -I *think* this should have been replaced by upstream's -49426e9fd2e562c73a4f1206f32eff9e424a1a73, so I'm reverting for now. - -May resolve rhbz#1273974. - -This reverts commit 147daeab22db793978f952b6f0d832919a1b0081. ---- - grub-core/net/drivers/efi/efinet.c | 39 -------------------------------------- - 1 file changed, 39 deletions(-) - -diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c -index b870d3f19..a3ce4c67c 100644 ---- a/grub-core/net/drivers/efi/efinet.c -+++ b/grub-core/net/drivers/efi/efinet.c -@@ -465,45 +465,6 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device, - &pxe_mode->dhcp_ack, - sizeof (pxe_mode->dhcp_ack), - 1, device, path); -- net = grub_efi_open_protocol (card->efi_handle, &net_io_guid, -- GRUB_EFI_OPEN_PROTOCOL_BY_EXCLUSIVE); -- if (net) { -- if (net->mode->state == GRUB_EFI_NETWORK_STOPPED -- && efi_call_1 (net->start, net) != GRUB_EFI_SUCCESS) -- continue; -- -- if (net->mode->state == GRUB_EFI_NETWORK_STOPPED) -- continue; -- -- if (net->mode->state == GRUB_EFI_NETWORK_STARTED -- && efi_call_3 (net->initialize, net, 0, 0) != GRUB_EFI_SUCCESS) -- continue; -- -- /* Enable hardware receive filters if driver declares support for it. -- We need unicast and broadcast and additionaly all nodes and -- solicited multicast for IPv6. Solicited multicast is per-IPv6 -- address and we currently do not have API to do it so simply -- try to enable receive of all multicast packets or evertyhing in -- the worst case (i386 PXE driver always enables promiscuous too). -- -- This does trust firmware to do what it claims to do. -- */ -- if (net->mode->receive_filter_mask) -- { -- grub_uint32_t filters = GRUB_EFI_SIMPLE_NETWORK_RECEIVE_UNICAST | -- GRUB_EFI_SIMPLE_NETWORK_RECEIVE_BROADCAST | -- GRUB_EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS_MULTICAST; -- -- filters &= net->mode->receive_filter_mask; -- if (!(filters & GRUB_EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS_MULTICAST)) -- filters |= (net->mode->receive_filter_mask & -- GRUB_EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS); -- -- efi_call_6 (net->receive_filters, net, filters, 0, 0, 0, NULL); -- } -- -- card->efi_net = net; -- } - return; - } - } --- -2.13.5 - diff --git a/0102-Don-t-say-GNU-Linux-in-generated-menus.patch b/0145-Don-t-say-GNU-Linux-in-generated-menus.patch similarity index 89% rename from 0102-Don-t-say-GNU-Linux-in-generated-menus.patch rename to 0145-Don-t-say-GNU-Linux-in-generated-menus.patch index 0f5f81b..c6fc2a1 100644 --- a/0102-Don-t-say-GNU-Linux-in-generated-menus.patch +++ b/0145-Don-t-say-GNU-Linux-in-generated-menus.patch @@ -1,7 +1,7 @@ -From 13c028af4104555993650dd9a26dd633c516d23f Mon Sep 17 00:00:00 2001 +From 5fe2c767d1ec50986c7a54dbdc826e0e2947ac29 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Mon, 14 Mar 2011 14:27:42 -0400 -Subject: [PATCH 102/194] Don't say "GNU/Linux" in generated menus. +Subject: [PATCH 145/225] Don't say "GNU/Linux" in generated menus. --- util/grub.d/10_linux.in | 4 ++-- @@ -25,7 +25,7 @@ index f3bf6acd8..ef52cf3db 100644 fi diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in -index c002fc9f9..54f1ec8a2 100644 +index 0cb0f4e49..b184fc904 100644 --- a/util/grub.d/20_linux_xen.in +++ b/util/grub.d/20_linux_xen.in @@ -29,9 +29,9 @@ export TEXTDOMAINDIR="@localedir@" @@ -41,5 +41,5 @@ index c002fc9f9..54f1ec8a2 100644 fi -- -2.13.5 +2.14.3 diff --git a/0103-Don-t-draw-a-border-around-the-menu.patch b/0146-Don-t-draw-a-border-around-the-menu.patch similarity index 95% rename from 0103-Don-t-draw-a-border-around-the-menu.patch rename to 0146-Don-t-draw-a-border-around-the-menu.patch index 4c928e4..3072966 100644 --- a/0103-Don-t-draw-a-border-around-the-menu.patch +++ b/0146-Don-t-draw-a-border-around-the-menu.patch @@ -1,7 +1,7 @@ -From 8b51cba8f5587746d1559bd6ec957db3e185c049 Mon Sep 17 00:00:00 2001 +From 8ae94b92fcaa68954d9c2468812734a93c2801a9 Mon Sep 17 00:00:00 2001 From: William Jon McCann Date: Wed, 15 May 2013 16:47:33 -0400 -Subject: [PATCH 103/194] Don't draw a border around the menu +Subject: [PATCH 146/225] Don't draw a border around the menu It looks cleaner without it. --- @@ -70,5 +70,5 @@ index 452d55bf9..1ed2bd92c 100644 grub_term_highlight_color = old_color_highlight; geo->timeout_y = geo->first_entry_y + geo->num_entries -- -2.13.5 +2.14.3 diff --git a/0104-Use-the-standard-margin-for-the-timeout-string.patch b/0147-Use-the-standard-margin-for-the-timeout-string.patch similarity index 91% rename from 0104-Use-the-standard-margin-for-the-timeout-string.patch rename to 0147-Use-the-standard-margin-for-the-timeout-string.patch index c1462a3..4173c26 100644 --- a/0104-Use-the-standard-margin-for-the-timeout-string.patch +++ b/0147-Use-the-standard-margin-for-the-timeout-string.patch @@ -1,7 +1,7 @@ -From 137250b0ef67150568074da35c568c6c649899f6 Mon Sep 17 00:00:00 2001 +From c6478ee168c0c0821a79940238b59b16bfaf98e6 Mon Sep 17 00:00:00 2001 From: William Jon McCann Date: Fri, 7 Jun 2013 10:52:32 -0400 -Subject: [PATCH 104/194] Use the standard margin for the timeout string +Subject: [PATCH 147/225] Use the standard margin for the timeout string So that it aligns with the other messages --- @@ -39,5 +39,5 @@ index 1ed2bd92c..7681f7d28 100644 } -- -2.13.5 +2.14.3 diff --git a/0105-Add-.eh_frame-to-list-of-relocations-stripped.patch b/0148-Add-.eh_frame-to-list-of-relocations-stripped.patch similarity index 88% rename from 0105-Add-.eh_frame-to-list-of-relocations-stripped.patch rename to 0148-Add-.eh_frame-to-list-of-relocations-stripped.patch index 00f419a..55ce4a9 100644 --- a/0105-Add-.eh_frame-to-list-of-relocations-stripped.patch +++ b/0148-Add-.eh_frame-to-list-of-relocations-stripped.patch @@ -1,7 +1,7 @@ -From 0464db837a67b88a761f100391b135a70b7054eb Mon Sep 17 00:00:00 2001 +From 40ff3a3f5487c63dc60cd94842d61e3e2844a04a Mon Sep 17 00:00:00 2001 From: Fedora Ninjas Date: Mon, 13 Jan 2014 21:50:59 -0500 -Subject: [PATCH 105/194] Add .eh_frame to list of relocations stripped +Subject: [PATCH 148/225] Add .eh_frame to list of relocations stripped --- conf/Makefile.common | 2 +- @@ -21,5 +21,5 @@ index 311da61c6..044ab3abe 100644 CFLAGS_MODULE = $(CFLAGS_PLATFORM) -ffreestanding LDFLAGS_MODULE = $(LDFLAGS_PLATFORM) -nostdlib $(TARGET_LDFLAGS_OLDMAGIC) -Wl,-r,-d -- -2.13.5 +2.14.3 diff --git a/0149-Fix-malformed-tftp-packets.patch b/0149-Fix-malformed-tftp-packets.patch deleted file mode 100644 index b21a08c..0000000 --- a/0149-Fix-malformed-tftp-packets.patch +++ /dev/null @@ -1,35 +0,0 @@ -From b62f9afe0f9b424237b68812d283aadc076109a1 Mon Sep 17 00:00:00 2001 -From: Mark Salter -Date: Tue, 7 Mar 2017 18:26:17 -0500 -Subject: [PATCH 149/194] Fix malformed tftp packets - -0088-Normalize-slashes-in-tftp-paths.patch collapses multiple contiguous -slashes in a filename into one slash in the tftp packet filename field. -However, the packet buffer pointer is advanced using the original name. -This leaves unitialized data between the name field and the type field -leading to tftp errors. Use the length of the normalized name to avoid -this. - -Signed-off-by: Mark Salter ---- - grub-core/net/tftp.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/grub-core/net/tftp.c b/grub-core/net/tftp.c -index 5ca0a96a6..dcd824943 100644 ---- a/grub-core/net/tftp.c -+++ b/grub-core/net/tftp.c -@@ -360,8 +360,8 @@ tftp_open (struct grub_file *file, const char *filename) - /* Copy and normalize the filename to work-around issues on some tftp - servers when file names are being matched for remapping. */ - grub_normalize_filename (rrq, filename); -- rrqlen += grub_strlen (filename) + 1; -- rrq += grub_strlen (filename) + 1; -+ rrqlen += grub_strlen (rrq) + 1; -+ rrq += grub_strlen (rrq) + 1; - - grub_strcpy (rrq, "octet"); - rrqlen += grub_strlen ("octet") + 1; --- -2.13.5 - diff --git a/0106-Make-10_linux-work-with-our-changes-for-linux16-and-.patch b/0149-Make-10_linux-work-with-our-changes-for-linux16-and-.patch similarity index 94% rename from 0106-Make-10_linux-work-with-our-changes-for-linux16-and-.patch rename to 0149-Make-10_linux-work-with-our-changes-for-linux16-and-.patch index ad3dae3..cd23003 100644 --- a/0106-Make-10_linux-work-with-our-changes-for-linux16-and-.patch +++ b/0149-Make-10_linux-work-with-our-changes-for-linux16-and-.patch @@ -1,7 +1,7 @@ -From fb582651ea4568d7226f96e6b618ad795430c842 Mon Sep 17 00:00:00 2001 +From dc682c232d2e5e459e48a1e8932bb3c6db7c8549 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Tue, 14 Jan 2014 13:12:23 -0500 -Subject: [PATCH 106/194] Make 10_linux work with our changes for linux16 and +Subject: [PATCH 149/225] Make 10_linux work with our changes for linux16 and linuxefi on aarch64 Signed-off-by: Peter Jones @@ -81,5 +81,5 @@ index ef52cf3db..191aebe80 100644 for i in "${dirname}/config-${version}" "${dirname}/config-${alt_version}" "/etc/kernels/kernel-config-${version}" ; do if test -e "${i}" ; then -- -2.13.5 +2.14.3 diff --git a/0107-Don-t-print-during-fdt-loading-method.patch b/0150-Don-t-print-during-fdt-loading-method.patch similarity index 81% rename from 0107-Don-t-print-during-fdt-loading-method.patch rename to 0150-Don-t-print-during-fdt-loading-method.patch index 425d882..c14f651 100644 --- a/0107-Don-t-print-during-fdt-loading-method.patch +++ b/0150-Don-t-print-during-fdt-loading-method.patch @@ -1,7 +1,7 @@ -From 40e56a4c2e879f5efcbcc36cf6a88ee1cb39d607 Mon Sep 17 00:00:00 2001 +From b0e13593383ad4561f38c5babaa74c62886b9242 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Tue, 14 Jan 2014 16:15:46 -0500 -Subject: [PATCH 107/194] Don't print during fdt loading method. +Subject: [PATCH 150/225] Don't print during fdt loading method. Signed-off-by: Peter Jones --- @@ -23,5 +23,5 @@ index 191aebe80..452a9f69d 100644 EOF fi -- -2.13.5 +2.14.3 diff --git a/0109-Don-t-require-a-password-to-boot-entries-generated-b.patch b/0151-Don-t-require-a-password-to-boot-entries-generated-b.patch similarity index 86% rename from 0109-Don-t-require-a-password-to-boot-entries-generated-b.patch rename to 0151-Don-t-require-a-password-to-boot-entries-generated-b.patch index 78b89d4..993c3d5 100644 --- a/0109-Don-t-require-a-password-to-boot-entries-generated-b.patch +++ b/0151-Don-t-require-a-password-to-boot-entries-generated-b.patch @@ -1,7 +1,7 @@ -From 2df38f07986a91d2a06cb3e432f9121d9f678f89 Mon Sep 17 00:00:00 2001 +From 5f1cc0a84b0b60de49b89a4e55430ad603c56f12 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Tue, 11 Feb 2014 11:14:50 -0500 -Subject: [PATCH 109/194] Don't require a password to boot entries generated by +Subject: [PATCH 151/225] Don't require a password to boot entries generated by grub-mkconfig. When we set a password, we just want that to mean you can't /edit/ an entry. @@ -27,5 +27,5 @@ index 452a9f69d..79a747ebd 100644 if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then OS="$(sed 's, release .*$,,g' /etc/system-release)" -- -2.13.5 +2.14.3 diff --git a/0110-Don-t-emit-Booting-.-message.patch b/0152-Don-t-emit-Booting-.-message.patch similarity index 91% rename from 0110-Don-t-emit-Booting-.-message.patch rename to 0152-Don-t-emit-Booting-.-message.patch index 01b4ffc..dce7546 100644 --- a/0110-Don-t-emit-Booting-.-message.patch +++ b/0152-Don-t-emit-Booting-.-message.patch @@ -1,7 +1,7 @@ -From a72d4819fb7275cbf65b5de901c50d076bf861fd Mon Sep 17 00:00:00 2001 +From 93d71cc36248aeff8fface61116b65c313762426 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Tue, 18 Feb 2014 09:37:49 -0500 -Subject: [PATCH 110/194] Don't emit "Booting ..." message. +Subject: [PATCH 152/225] Don't emit "Booting ..." message. UI team still hates this stuff, so we're disabling it for RHEL 7. @@ -48,5 +48,5 @@ index cdf3590a3..5785f67ee 100644 errs_before = grub_err_printed_errors; -- -2.13.5 +2.14.3 diff --git a/0111-Replace-a-lot-of-man-pages-with-slightly-nicer-ones.patch b/0153-Replace-a-lot-of-man-pages-with-slightly-nicer-ones.patch similarity index 99% rename from 0111-Replace-a-lot-of-man-pages-with-slightly-nicer-ones.patch rename to 0153-Replace-a-lot-of-man-pages-with-slightly-nicer-ones.patch index 7652346..5b629ed 100644 --- a/0111-Replace-a-lot-of-man-pages-with-slightly-nicer-ones.patch +++ b/0153-Replace-a-lot-of-man-pages-with-slightly-nicer-ones.patch @@ -1,7 +1,7 @@ -From 6412d775976361b52c0914f6e5e3b0a4b99cdba9 Mon Sep 17 00:00:00 2001 +From c59c89ff8dfc449a0923958eb5a053c73c46ff8e Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Tue, 4 Mar 2014 11:00:23 -0500 -Subject: [PATCH 111/194] Replace a lot of man pages with slightly nicer ones. +Subject: [PATCH 153/225] Replace a lot of man pages with slightly nicer ones. Replace a bunch of machine generated ones with ones that look nicer. --- @@ -134,7 +134,7 @@ index b16bd9253..39eb94bde 100644 EXTRA_DIST += docs/grub.cfg EXTRA_DIST += docs/osdetect.cfg diff --git a/configure.ac b/configure.ac -index 9ae97f026..0cb971a92 100644 +index 783118ccd..d5db2803e 100644 --- a/configure.ac +++ b/configure.ac @@ -70,6 +70,29 @@ grub_TRANSFORM([grub-set-default]) @@ -1959,5 +1959,5 @@ index 000000000..37ea2dd5e +.SH SEE ALSO +.BR "info grub" -- -2.13.5 +2.14.3 diff --git a/0112-use-fw_path-prefix-when-fallback-searching-for-grub-.patch b/0154-use-fw_path-prefix-when-fallback-searching-for-grub-.patch similarity index 91% rename from 0112-use-fw_path-prefix-when-fallback-searching-for-grub-.patch rename to 0154-use-fw_path-prefix-when-fallback-searching-for-grub-.patch index f31b4fa..7949a26 100644 --- a/0112-use-fw_path-prefix-when-fallback-searching-for-grub-.patch +++ b/0154-use-fw_path-prefix-when-fallback-searching-for-grub-.patch @@ -1,7 +1,7 @@ -From acf4cfa6d1691a9476b36949af7e296080c88d25 Mon Sep 17 00:00:00 2001 +From 163118cbd816fd2f20d792f74078737a43daa242 Mon Sep 17 00:00:00 2001 From: Fedora Ninjas Date: Wed, 19 Feb 2014 15:58:43 -0500 -Subject: [PATCH 112/194] use fw_path prefix when fallback searching for grub +Subject: [PATCH 154/225] use fw_path prefix when fallback searching for grub config When PXE booting via UEFI firmware, grub was searching for grub.cfg @@ -41,5 +41,5 @@ index 0ce59fdc3..a3713efcd 100644 { grub_size_t config_len; -- -2.13.5 +2.14.3 diff --git a/0113-Try-mac-guid-etc-before-grub.cfg-on-tftp-config-file.patch b/0155-Try-mac-guid-etc-before-grub.cfg-on-tftp-config-file.patch similarity index 95% rename from 0113-Try-mac-guid-etc-before-grub.cfg-on-tftp-config-file.patch rename to 0155-Try-mac-guid-etc-before-grub.cfg-on-tftp-config-file.patch index 89cb209..9eb3e55 100644 --- a/0113-Try-mac-guid-etc-before-grub.cfg-on-tftp-config-file.patch +++ b/0155-Try-mac-guid-etc-before-grub.cfg-on-tftp-config-file.patch @@ -1,7 +1,7 @@ -From b7aa57a2f879d185888e4d47f77a1a30370973f9 Mon Sep 17 00:00:00 2001 +From 60e0ece623296cc2bac05500aff175d120b98e71 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Thu, 6 Mar 2014 11:51:33 -0500 -Subject: [PATCH 113/194] Try mac/guid/etc before grub.cfg on tftp config +Subject: [PATCH 155/225] Try mac/guid/etc before grub.cfg on tftp config files. Signed-off-by: Peter Jones @@ -111,5 +111,5 @@ index a3713efcd..7d9c4f09b 100644 else grub_enter_normal_mode (argv[0]); -- -2.13.5 +2.14.3 diff --git a/0114-Fix-convert-function-to-support-NVMe-devices.patch b/0156-Fix-convert-function-to-support-NVMe-devices.patch similarity index 91% rename from 0114-Fix-convert-function-to-support-NVMe-devices.patch rename to 0156-Fix-convert-function-to-support-NVMe-devices.patch index 32d51c0..b3560b4 100644 --- a/0114-Fix-convert-function-to-support-NVMe-devices.patch +++ b/0156-Fix-convert-function-to-support-NVMe-devices.patch @@ -1,7 +1,7 @@ -From 69946054baab92385b9f6518cc78e94810b40c48 Mon Sep 17 00:00:00 2001 +From e78958cab16742268b179cd75ec8ab710860c846 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Tue, 18 Feb 2014 11:34:00 -0500 -Subject: [PATCH 114/194] Fix convert function to support NVMe devices +Subject: [PATCH 156/225] Fix convert function to support NVMe devices This is adapted from the patch at https://bugzilla.redhat.com/show_bug.cgi?id=1019660 , which is against @@ -55,5 +55,5 @@ index 847406fba..fa3460d6c 100644 return grub_util_devmapper_part_to_disk (&st, is_part, os_dev); -- -2.13.5 +2.14.3 diff --git a/0115-Switch-to-use-APM-Mustang-device-tree-for-hardware-t.patch b/0157-Switch-to-use-APM-Mustang-device-tree-for-hardware-t.patch similarity index 84% rename from 0115-Switch-to-use-APM-Mustang-device-tree-for-hardware-t.patch rename to 0157-Switch-to-use-APM-Mustang-device-tree-for-hardware-t.patch index 6332685..df5e6eb 100644 --- a/0115-Switch-to-use-APM-Mustang-device-tree-for-hardware-t.patch +++ b/0157-Switch-to-use-APM-Mustang-device-tree-for-hardware-t.patch @@ -1,7 +1,7 @@ -From f168a0803d8d35e431ef6888755f9b2622304846 Mon Sep 17 00:00:00 2001 +From 85e1522feb8c98c689fef7a78b13e7f11f1958d2 Mon Sep 17 00:00:00 2001 From: Fedora Ninjas Date: Mon, 10 Feb 2014 16:13:10 -0500 -Subject: [PATCH 115/194] Switch to use APM Mustang device tree, for hardware +Subject: [PATCH 157/225] Switch to use APM Mustang device tree, for hardware testing. Signed-off-by: David A. Marlin @@ -25,5 +25,5 @@ index 79a747ebd..462b461ff 100644 fi done -- -2.13.5 +2.14.3 diff --git a/0116-Use-the-default-device-tree-from-the-grub-default-fi.patch b/0158-Use-the-default-device-tree-from-the-grub-default-fi.patch similarity index 90% rename from 0116-Use-the-default-device-tree-from-the-grub-default-fi.patch rename to 0158-Use-the-default-device-tree-from-the-grub-default-fi.patch index fbd3192..ba2da02 100644 --- a/0116-Use-the-default-device-tree-from-the-grub-default-fi.patch +++ b/0158-Use-the-default-device-tree-from-the-grub-default-fi.patch @@ -1,7 +1,7 @@ -From 6ec36777aae0c4afd98f67f22d4d511b447dbb02 Mon Sep 17 00:00:00 2001 +From 53dbc2917c554a492b306eea3dae802df09a206d Mon Sep 17 00:00:00 2001 From: Fedora Ninjas Date: Wed, 12 Feb 2014 14:54:04 -0500 -Subject: [PATCH 116/194] Use the default device tree from the grub default +Subject: [PATCH 158/225] Use the default device tree from the grub default file instead of hardcoding a value. @@ -42,5 +42,5 @@ index 462b461ff..a9692a0c2 100644 fi done -- -2.13.5 +2.14.3 diff --git a/0121-Generate-OS-and-CLASS-in-10_linux-from-etc-os-releas.patch b/0159-Generate-OS-and-CLASS-in-10_linux-from-etc-os-releas.patch similarity index 89% rename from 0121-Generate-OS-and-CLASS-in-10_linux-from-etc-os-releas.patch rename to 0159-Generate-OS-and-CLASS-in-10_linux-from-etc-os-releas.patch index 8d8780b..0022a16 100644 --- a/0121-Generate-OS-and-CLASS-in-10_linux-from-etc-os-releas.patch +++ b/0159-Generate-OS-and-CLASS-in-10_linux-from-etc-os-releas.patch @@ -1,7 +1,7 @@ -From 7ca8e2b9e23a3588654d53a8e84bb22743896f80 Mon Sep 17 00:00:00 2001 +From fdc79fb32bfdbf9cb5618814d2642c5877bc121e Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Thu, 4 Sep 2014 14:23:23 -0400 -Subject: [PATCH 121/194] Generate OS and CLASS in 10_linux from +Subject: [PATCH 159/225] Generate OS and CLASS in 10_linux from /etc/os-release This makes us use pretty names in the titles we generate in @@ -29,5 +29,5 @@ index a9692a0c2..c6627268c 100644 OS="${GRUB_DISTRIBUTOR}" CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}" -- -2.13.5 +2.14.3 diff --git a/0122-Minimize-the-sort-ordering-for-.debug-and-rescue-ker.patch b/0160-Minimize-the-sort-ordering-for-.debug-and-rescue-ker.patch similarity index 82% rename from 0122-Minimize-the-sort-ordering-for-.debug-and-rescue-ker.patch rename to 0160-Minimize-the-sort-ordering-for-.debug-and-rescue-ker.patch index 79281f4..e600eb7 100644 --- a/0122-Minimize-the-sort-ordering-for-.debug-and-rescue-ker.patch +++ b/0160-Minimize-the-sort-ordering-for-.debug-and-rescue-ker.patch @@ -1,7 +1,7 @@ -From e84a66eb07c96db182d57f4d40ff7c607a0e5296 Mon Sep 17 00:00:00 2001 +From fca1668c6c045df47af6f311eeeb1bd3330895bc Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Thu, 4 Sep 2014 15:52:08 -0400 -Subject: [PATCH 122/194] Minimize the sort ordering for .debug and -rescue- +Subject: [PATCH 160/225] Minimize the sort ordering for .debug and -rescue- kernels. Resolves: rhbz#1065360 @@ -11,10 +11,10 @@ Signed-off-by: Peter Jones 1 file changed, 8 insertions(+) diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in -index cf35e4174..10fabee5e 100644 +index 1001a1223..1a4a57898 100644 --- a/util/grub-mkconfig_lib.in +++ b/util/grub-mkconfig_lib.in -@@ -248,6 +248,14 @@ version_test_gt () +@@ -249,6 +249,14 @@ version_test_gt () *.old:*.old) ;; *.old:*) version_test_gt_a="`echo "$version_test_gt_a" | sed -e 's/\.old$//'`" ; version_test_gt_cmp=gt ;; *:*.old) version_test_gt_b="`echo "$version_test_gt_b" | sed -e 's/\.old$//'`" ; version_test_gt_cmp=ge ;; @@ -30,5 +30,5 @@ index cf35e4174..10fabee5e 100644 version_test_numeric "$version_test_gt_a" "$version_test_gt_cmp" "$version_test_gt_b" return "$?" -- -2.13.5 +2.14.3 diff --git a/0123-Load-arm-with-SB-enabled.patch b/0161-Load-arm-with-SB-enabled.patch similarity index 94% rename from 0123-Load-arm-with-SB-enabled.patch rename to 0161-Load-arm-with-SB-enabled.patch index aff9066..8586d6b 100644 --- a/0123-Load-arm-with-SB-enabled.patch +++ b/0161-Load-arm-with-SB-enabled.patch @@ -1,7 +1,7 @@ -From b21b80fe44eb379bb268c623ee092a9b776d11d9 Mon Sep 17 00:00:00 2001 +From 7e16c8920dd4545508da0a8fdb5a7f9a164b2ffd Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Thu, 18 Sep 2014 11:26:14 -0400 -Subject: [PATCH 123/194] Load arm with SB enabled. +Subject: [PATCH 161/225] Load arm with SB enabled. Make sure we actually try to validate secure boot on this platform (even though we're not shipping it enabled by default.) @@ -11,20 +11,20 @@ kernel command line, because we can't call systab->bs->LoadImage() if SB is enabled. --- grub-core/Makefile.core.def | 3 + - grub-core/loader/arm64/linux.c | 115 ++++++++++++++++++++------------------ + grub-core/loader/arm64/linux.c | 116 ++++++++++++++++++++------------------ grub-core/loader/efi/linux.c | 65 +++++++++++++++++++++ grub-core/loader/i386/efi/linux.c | 39 +------------ include/grub/arm64/linux.h | 7 +++ include/grub/efi/linux.h | 31 ++++++++++ - 6 files changed, 170 insertions(+), 90 deletions(-) + 6 files changed, 171 insertions(+), 90 deletions(-) create mode 100644 grub-core/loader/efi/linux.c create mode 100644 include/grub/efi/linux.h diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def -index 7f3d5a2bf..5ae70204c 100644 +index 8d7edded8..4bfd2889e 100644 --- a/grub-core/Makefile.core.def +++ b/grub-core/Makefile.core.def -@@ -1709,6 +1709,8 @@ module = { +@@ -1703,6 +1703,8 @@ module = { ia64_efi = loader/ia64/efi/linux.c; arm = loader/arm/linux.c; arm64 = loader/arm64/linux.c; @@ -33,7 +33,7 @@ index 7f3d5a2bf..5ae70204c 100644 common = loader/linux.c; common = lib/cmdline.c; enable = noemu; -@@ -1776,6 +1778,7 @@ module = { +@@ -1770,6 +1772,7 @@ module = { name = linuxefi; efi = loader/i386/efi/linux.c; efi = lib/cmdline.c; @@ -42,7 +42,7 @@ index 7f3d5a2bf..5ae70204c 100644 enable = x86_64_efi; }; diff --git a/grub-core/loader/arm64/linux.c b/grub-core/loader/arm64/linux.c -index 746edd104..33345d375 100644 +index 746edd104..03ff83563 100644 --- a/grub-core/loader/arm64/linux.c +++ b/grub-core/loader/arm64/linux.c @@ -28,6 +28,7 @@ @@ -71,7 +71,7 @@ index 746edd104..33345d375 100644 void *fdt; -@@ -100,6 +103,25 @@ finalize_params_linux (void) +@@ -100,6 +103,26 @@ finalize_params_linux (void) if (grub_fdt_install() != GRUB_ERR_NONE) goto failure; @@ -86,7 +86,8 @@ index 746edd104..33345d375 100644 + loaded_image->load_options_size = len = + (grub_strlen (linux_args) + 1) * sizeof (grub_efi_char16_t); + loaded_image->load_options = -+ grub_efi_allocate_any_pages (GRUB_EFI_BYTES_TO_PAGES (loaded_image->load_options_size)); ++ grub_efi_allocate_pages_max (0, ++ GRUB_EFI_BYTES_TO_PAGES (loaded_image->load_options_size)); + if (!loaded_image->load_options) + return grub_error(GRUB_ERR_BAD_OS, "failed to create kernel parameters"); + @@ -97,7 +98,7 @@ index 746edd104..33345d375 100644 return GRUB_ERR_NONE; failure: -@@ -107,72 +129,47 @@ failure: +@@ -107,72 +130,47 @@ failure: return grub_error(GRUB_ERR_BAD_OS, "failed to install/update FDT"); } @@ -198,7 +199,7 @@ index 746edd104..33345d375 100644 } static grub_err_t -@@ -249,6 +246,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)), +@@ -249,6 +247,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)), { grub_file_t file = 0; struct grub_arm64_linux_kernel_header lh; @@ -206,7 +207,7 @@ index 746edd104..33345d375 100644 grub_dl_ref (my_mod); -@@ -293,6 +291,15 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)), +@@ -293,6 +292,15 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)), grub_dprintf ("linux", "kernel @ %p\n", kernel_addr); @@ -422,5 +423,5 @@ index 000000000..d9ede3677 + +#endif /* ! GRUB_EFI_LINUX_HEADER */ -- -2.13.5 +2.14.3 diff --git a/0124-Try-prefix-if-fw_path-doesn-t-work.patch b/0162-Try-prefix-if-fw_path-doesn-t-work.patch similarity index 95% rename from 0124-Try-prefix-if-fw_path-doesn-t-work.patch rename to 0162-Try-prefix-if-fw_path-doesn-t-work.patch index 4279e1a..650fd07 100644 --- a/0124-Try-prefix-if-fw_path-doesn-t-work.patch +++ b/0162-Try-prefix-if-fw_path-doesn-t-work.patch @@ -1,7 +1,7 @@ -From 8fd7dd327b69530d901168cb02827a894f1f9cf7 Mon Sep 17 00:00:00 2001 +From 4b2aab75a1fc7db24f571f35a379ed32a5b6734d Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Fri, 3 Oct 2014 11:08:03 -0400 -Subject: [PATCH 124/194] Try $prefix if $fw_path doesn't work. +Subject: [PATCH 162/225] Try $prefix if $fw_path doesn't work. Related: rhbz#1148652 @@ -57,10 +57,10 @@ index e69c0133e..4dfa41a37 100644 } diff --git a/grub-core/net/net.c b/grub-core/net/net.c -index 0769bf850..16d2ce06d 100644 +index 62ae107b3..b4325750f 100644 --- a/grub-core/net/net.c +++ b/grub-core/net/net.c -@@ -1850,7 +1850,7 @@ grub_net_search_configfile (char *config) +@@ -1861,7 +1861,7 @@ grub_net_search_configfile (char *config) /* Remove the remaining minus sign at the end. */ config[config_len] = '\0'; @@ -207,5 +207,5 @@ index 7d9c4f09b..b69f9e738 100644 } -- -2.13.5 +2.14.3 diff --git a/0125-Update-info-with-grub.cfg-netboot-selection-order-11.patch b/0163-Update-info-with-grub.cfg-netboot-selection-order-11.patch similarity index 92% rename from 0125-Update-info-with-grub.cfg-netboot-selection-order-11.patch rename to 0163-Update-info-with-grub.cfg-netboot-selection-order-11.patch index 57ac7b9..5969ab2 100644 --- a/0125-Update-info-with-grub.cfg-netboot-selection-order-11.patch +++ b/0163-Update-info-with-grub.cfg-netboot-selection-order-11.patch @@ -1,7 +1,7 @@ -From 577f38ceb2f1676cb8e63a1d461eb9d6a9936385 Mon Sep 17 00:00:00 2001 +From 0c9411f3da673785c591d3409437edc3e92d7b63 Mon Sep 17 00:00:00 2001 From: Robert Marshall Date: Mon, 16 Mar 2015 16:34:51 -0400 -Subject: [PATCH 125/194] Update info with grub.cfg netboot selection order +Subject: [PATCH 163/225] Update info with grub.cfg netboot selection order (#1148650) Added documentation to the grub info page that specifies the order @@ -13,7 +13,7 @@ Resolves rhbz#1148650 1 file changed, 42 insertions(+) diff --git a/docs/grub.texi b/docs/grub.texi -index 6fdd2a041..15a90b26e 100644 +index a07dfbfa3..121a1c1e8 100644 --- a/docs/grub.texi +++ b/docs/grub.texi @@ -2414,6 +2414,48 @@ grub-mknetdir --net-directory=/srv/tftp --subdir=/boot/grub -d /usr/lib/grub/i38 @@ -66,5 +66,5 @@ index 6fdd2a041..15a90b26e 100644 @samp{(tftp)} device. -- -2.13.5 +2.14.3 diff --git a/0126-Use-Distribution-Package-Sort-for-grub2-mkconfig-112.patch b/0164-Use-Distribution-Package-Sort-for-grub2-mkconfig-112.patch similarity index 93% rename from 0126-Use-Distribution-Package-Sort-for-grub2-mkconfig-112.patch rename to 0164-Use-Distribution-Package-Sort-for-grub2-mkconfig-112.patch index 6e733bf..240ae19 100644 --- a/0126-Use-Distribution-Package-Sort-for-grub2-mkconfig-112.patch +++ b/0164-Use-Distribution-Package-Sort-for-grub2-mkconfig-112.patch @@ -1,7 +1,7 @@ -From 42c78f4a2f3359b415eff631712a0400c2042522 Mon Sep 17 00:00:00 2001 +From ee6ae1b06e150c705edfb2642831009629472980 Mon Sep 17 00:00:00 2001 From: Robert Marshall Date: Mon, 16 Mar 2015 14:14:19 -0400 -Subject: [PATCH 126/194] Use Distribution Package Sort for grub2-mkconfig +Subject: [PATCH 164/225] Use Distribution Package Sort for grub2-mkconfig (#1124074) Users reported that newly installed kernels on their systems installed @@ -14,10 +14,10 @@ Resolves rhbz#1124074 .gitignore | 2 + Makefile.util.def | 16 +++ configure.ac | 29 +++++ - util/grub-mkconfig_lib.in | 8 +- + util/grub-mkconfig_lib.in | 11 +- util/grub-rpm-sort.8 | 12 ++ util/grub-rpm-sort.c | 281 ++++++++++++++++++++++++++++++++++++++++++++++ - 6 files changed, 347 insertions(+), 1 deletion(-) + 6 files changed, 350 insertions(+), 1 deletion(-) create mode 100644 util/grub-rpm-sort.8 create mode 100644 util/grub-rpm-sort.c @@ -62,7 +62,7 @@ index 206110458..d846b81b5 100644 name = grub-mkconfig; common = util/grub-mkconfig.in; diff --git a/configure.ac b/configure.ac -index 0cb971a92..49427cbf9 100644 +index d5db2803e..00f1db29b 100644 --- a/configure.ac +++ b/configure.ac @@ -65,6 +65,7 @@ grub_TRANSFORM([grub-mkrelpath]) @@ -81,14 +81,14 @@ index 0cb971a92..49427cbf9 100644 grub_TRANSFORM([grub-reboot.3]) grub_TRANSFORM([grub-render-label.3]) grub_TRANSFORM([grub-script-check.3]) -@@ -1789,6 +1791,33 @@ fi +@@ -1790,6 +1792,33 @@ fi AC_SUBST([LIBDEVMAPPER]) +AC_ARG_ENABLE([rpm-sort], + [AS_HELP_STRING([--enable-rpm-sort], + [enable native rpm sorting of kernels in grub (default=guessed)])]) -+if test x"$enable_rpm-sort" = xno ; then ++if test x"$enable_rpm_sort" = xno ; then + rpm_sort_excuse="explicitly disabled" +fi + @@ -116,23 +116,33 @@ index 0cb971a92..49427cbf9 100644 if test x$host_kernel = xkfreebsd; then AC_CHECK_LIB([geom], [geom_gettree], [], diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in -index 10fabee5e..954844d2d 100644 +index 1a4a57898..113a41f94 100644 --- a/util/grub-mkconfig_lib.in +++ b/util/grub-mkconfig_lib.in -@@ -213,6 +213,12 @@ version_sort () +@@ -33,6 +33,9 @@ fi + if test "x$grub_mkrelpath" = x; then + grub_mkrelpath="${bindir}/@grub_mkrelpath@" + fi ++if test "x$grub_rpm_sort" = x; then ++ grub_rpm_sort="${sbindir}/@grub_rpm_sort@" ++fi + + if which gettext >/dev/null 2>/dev/null; then + : +@@ -214,6 +217,12 @@ version_sort () esac } -+if [ "x$RPMLIB" = x ]; then -+ kernel_sort=version_sort ++if [ "x$grub_rpm_sort" != x -a -x "$grub_rpm_sort" ]; then ++ kernel_sort="$grub_rpm_sort" +else -+ kernel_sort="${sbindir}/grub-rpm-sort" ++ kernel_sort=version_sort +fi + version_test_numeric () { version_test_numeric_a="$1" -@@ -229,7 +235,7 @@ version_test_numeric () +@@ -230,7 +239,7 @@ version_test_numeric () version_test_numeric_a="$version_test_numeric_b" version_test_numeric_b="$version_test_numeric_c" fi @@ -447,5 +457,5 @@ index 000000000..f33bd1ed5 + return 0; +} -- -2.13.5 +2.14.3 diff --git a/0127-Handle-rssd-storage-devices.patch b/0165-Handle-rssd-storage-devices.patch similarity index 88% rename from 0127-Handle-rssd-storage-devices.patch rename to 0165-Handle-rssd-storage-devices.patch index f686ec0..80a8ab4 100644 --- a/0127-Handle-rssd-storage-devices.patch +++ b/0165-Handle-rssd-storage-devices.patch @@ -1,7 +1,7 @@ -From 1dbfe2b96218a579d8da9ba8418857f0cf030890 Mon Sep 17 00:00:00 2001 +From 2be491fd083ab8e155ee1d33f4fc34c3bdeb11fe Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Tue, 30 Jun 2015 15:50:41 -0400 -Subject: [PATCH 127/194] Handle rssd storage devices. +Subject: [PATCH 165/225] Handle rssd storage devices. Resolves: rhbz#1087962 @@ -35,5 +35,5 @@ index 90d92d3ad..6d9f4e5fa 100644 if ((strncmp ("loop", p, 4) == 0) && p[4] >= '0' && p[4] <= '9') { -- -2.13.5 +2.14.3 diff --git a/0128-Try-to-emit-linux16-initrd16-and-linuxefi-initrdefi-.patch b/0166-Try-to-emit-linux16-initrd16-and-linuxefi-initrdefi-.patch similarity index 93% rename from 0128-Try-to-emit-linux16-initrd16-and-linuxefi-initrdefi-.patch rename to 0166-Try-to-emit-linux16-initrd16-and-linuxefi-initrdefi-.patch index 3563c28..0c4d108 100644 --- a/0128-Try-to-emit-linux16-initrd16-and-linuxefi-initrdefi-.patch +++ b/0166-Try-to-emit-linux16-initrd16-and-linuxefi-initrdefi-.patch @@ -1,7 +1,7 @@ -From f6c0a92a360a92e58b3e90120ddbd1e183eccb50 Mon Sep 17 00:00:00 2001 +From f418fbc9c47b362aa68ee5f6c71b3ae0407a1d92 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Mon, 27 Oct 2014 09:22:55 -0400 -Subject: [PATCH 128/194] Try to emit linux16/initrd16 and linuxefi/initrdefi +Subject: [PATCH 166/225] Try to emit linux16/initrd16 and linuxefi/initrdefi in 30-os_prober. Resolves: rhbz#1108296 @@ -73,5 +73,5 @@ index 9b8f5968e..dc98eace9 100644 fi cat << EOF -- -2.13.5 +2.14.3 diff --git a/0129-Make-grub2-mkconfig-construct-titles-that-look-like-.patch b/0167-Make-grub2-mkconfig-construct-titles-that-look-like-.patch similarity index 57% rename from 0129-Make-grub2-mkconfig-construct-titles-that-look-like-.patch rename to 0167-Make-grub2-mkconfig-construct-titles-that-look-like-.patch index ab644ed..fd6affb 100644 --- a/0129-Make-grub2-mkconfig-construct-titles-that-look-like-.patch +++ b/0167-Make-grub2-mkconfig-construct-titles-that-look-like-.patch @@ -1,46 +1,64 @@ -From 12fd265ed00dcbe26e423800fc6b7058f48163db Mon Sep 17 00:00:00 2001 +From dbf9675dc2aa9732aa5abc3babc3a16ee8166ec0 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Tue, 28 Apr 2015 11:15:03 -0400 -Subject: [PATCH 129/194] Make grub2-mkconfig construct titles that look like +Subject: [PATCH 167/225] Make grub2-mkconfig construct titles that look like the ones we want elsewhere. Resolves: rhbz#1215839 Signed-off-by: Peter Jones --- - util/grub.d/10_linux.in | 14 +++++++++++--- - 1 file changed, 11 insertions(+), 3 deletions(-) + util/grub.d/10_linux.in | 34 +++++++++++++++++++++++++++------- + 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in -index c6627268c..121524185 100644 +index c6627268c..584ad1f46 100644 --- a/util/grub.d/10_linux.in +++ b/util/grub.d/10_linux.in -@@ -68,6 +68,15 @@ case x"$GRUB_FS" in +@@ -68,6 +68,32 @@ case x"$GRUB_FS" in ;; esac +mktitle () +{ -+ local OS_NAME="$(eval $(grep ^NAME= /etc/os-release) ; echo ${NAME})" -+ local OS_VERS="$(eval $(grep ^VERSION= /etc/os-release) ; echo ${VERSION})" ++ local title_type ++ local version ++ local OS_NAME ++ local OS_VERS + -+ local titlestr="${OS_NAME} (%s) ${OS_VERS}" -+ echo -n ${titlestr} ++ title_type=$1 && shift ++ version=$1 && shift ++ ++ OS_NAME="$(eval $(grep ^NAME= /etc/os-release) ; echo ${NAME})" ++ OS_VERS="$(eval $(grep ^VERSION= /etc/os-release) ; echo ${VERSION})" ++ ++ case $title_type in ++ recovery) ++ title=$(printf '%s (%s) %s (recovery mode)' \ ++ "${OS_NAME}" "${version}" "${OS_VERS}") ++ ;; ++ *) ++ title=$(printf '%s (%s) %s' \ ++ "${OS_NAME}" "${version}" "${OS_VERS}") ++ ;; ++ esac ++ echo -n ${title} +} + title_correction_code= linux_entry () -@@ -98,15 +107,14 @@ linux_entry () +@@ -96,17 +122,11 @@ linux_entry () + boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")" + fi if [ x$type != xsimple ] ; then - case $type in - recovery) +- case $type in +- recovery) - title="$(gettext_printf "%s, with Linux %s (recovery mode)" "${os}" "${version}")" ;; -+ title="$(printf "$(mktitle) (recovery mode)" "${version}")" ;; - *) +- *) - title="$(gettext_printf "%s, with Linux %s" "${os}" "${version}")" ;; -+ title="$(printf "$(mktitle)" "${version}")" ;; - esac +- esac ++ title=$(mktitle "$type" "$version") if [ x"$title" = x"$GRUB_ACTUAL_DEFAULT" ] || [ x"Previous Linux versions>$title" = x"$GRUB_ACTUAL_DEFAULT" ]; then replacement_title="$(echo "Advanced options for ${OS}" | sed 's,>,>>,g')>$(echo "$title" | sed 's,>,>>,g')" quoted="$(echo "$GRUB_ACTUAL_DEFAULT" | grub_quote)" @@ -50,5 +68,5 @@ index c6627268c..121524185 100644 echo "menuentry '$(echo "$title" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-$version-$type-$boot_device_id' {" | sed "s/^/$submenu_indentation/" else -- -2.13.5 +2.14.3 diff --git a/0130-Add-friendly-grub2-password-config-tool-985962.patch b/0168-Add-friendly-grub2-password-config-tool-985962.patch similarity index 96% rename from 0130-Add-friendly-grub2-password-config-tool-985962.patch rename to 0168-Add-friendly-grub2-password-config-tool-985962.patch index ad60457..29973db 100644 --- a/0130-Add-friendly-grub2-password-config-tool-985962.patch +++ b/0168-Add-friendly-grub2-password-config-tool-985962.patch @@ -1,7 +1,7 @@ -From dda4c69e2fb3c12f838866740eb04142975df9a3 Mon Sep 17 00:00:00 2001 +From fde965bf34d64b9debc1ea9d12088978bbb1e1ea Mon Sep 17 00:00:00 2001 From: Robert Marshall Date: Thu, 25 Jun 2015 11:13:11 -0400 -Subject: [PATCH 130/194] Add friendly grub2 password config tool (#985962) +Subject: [PATCH 168/225] Add friendly grub2 password config tool (#985962) Provided a tool for users to reset the grub2 root user password without having to alter the grub.cfg. The hashed password now @@ -38,35 +38,35 @@ diff --git a/Makefile.util.def b/Makefile.util.def index d846b81b5..226c46b2d 100644 --- a/Makefile.util.def +++ b/Makefile.util.def -@@ -440,6 +440,12 @@ script = { +@@ -439,6 +439,12 @@ script = { + installdir = grubconf; }; - script = { ++script = { + name = '01_users'; + common = util/grub.d/01_users.in; + installdir = grubconf; +}; + -+script = { + script = { name = '10_windows'; common = util/grub.d/10_windows.in; - installdir = grubconf; -@@ -722,6 +728,13 @@ script = { +@@ -721,6 +727,13 @@ script = { + installdir = sbin; }; - script = { ++script = { + name = grub-setpassword; + common = util/grub-setpassword.in; + mansection = 8; + installdir = sbin; +}; + -+script = { + script = { name = grub-mkconfig_lib; common = util/grub-mkconfig_lib.in; - installdir = noinst; diff --git a/configure.ac b/configure.ac -index 49427cbf9..196084004 100644 +index 00f1db29b..71d105696 100644 --- a/configure.ac +++ b/configure.ac @@ -65,6 +65,7 @@ grub_TRANSFORM([grub-mkrelpath]) @@ -271,5 +271,5 @@ index 000000000..db2f44bfb +fi +EOF -- -2.13.5 +2.14.3 diff --git a/0169-Make-exit-take-a-return-code.patch b/0169-Make-exit-take-a-return-code.patch deleted file mode 100644 index f6ddea7..0000000 --- a/0169-Make-exit-take-a-return-code.patch +++ /dev/null @@ -1,56 +0,0 @@ -From c281b1fc8f2533f7655c83d43d772092b9d74f7b Mon Sep 17 00:00:00 2001 -From: Peter Jones -Date: Wed, 26 Feb 2014 21:49:12 -0500 -Subject: [PATCH 169/194] Make "exit" take a return code. - -This adds "exit" with a return code. With this patch, any "exit" -command /may/ include a return code, and on platforms that support -returning with an exit status, we will do so. By default we return the -same exit status we did before this patch. - -Signed-off-by: Peter Jones ---- - grub-core/kern/emu/main.c | 6 ++++++ - grub-core/kern/misc.c | 9 +++++++++ - 2 files changed, 15 insertions(+) - -diff --git a/grub-core/kern/emu/main.c b/grub-core/kern/emu/main.c -index 55ea5a11c..7e47ec812 100644 ---- a/grub-core/kern/emu/main.c -+++ b/grub-core/kern/emu/main.c -@@ -73,6 +73,12 @@ grub_exit (int retval __attribute__((unused))) - } - - void -+grub_exit (int retval __attribute__((unused))) -+{ -+ grub_reboot (); -+} -+ -+void - grub_machine_init (void) - { - } -diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c -index 5ce89a40c..04371ac49 100644 ---- a/grub-core/kern/misc.c -+++ b/grub-core/kern/misc.c -@@ -1120,6 +1120,15 @@ grub_abort (void) - grub_exit (1); - } - -+#if defined (__clang__) && !defined (GRUB_UTIL) -+/* clang emits references to abort(). */ -+void __attribute__ ((noreturn)) -+abort (void) -+{ -+ grub_abort (); -+} -+#endif -+ - void - grub_fatal (const char *fmt, ...) - { --- -2.13.5 - diff --git a/0134-tcp-add-window-scaling-support.patch b/0169-tcp-add-window-scaling-support.patch similarity index 95% rename from 0134-tcp-add-window-scaling-support.patch rename to 0169-tcp-add-window-scaling-support.patch index 6ea60e9..5d4bdb0 100644 --- a/0134-tcp-add-window-scaling-support.patch +++ b/0169-tcp-add-window-scaling-support.patch @@ -1,7 +1,7 @@ -From bb693d96ccfdd5a2bd79ae67325c75b81679fae7 Mon Sep 17 00:00:00 2001 +From 7c93eafdd749acb862b53eb36692e4cf952da0c0 Mon Sep 17 00:00:00 2001 From: Josef Bacik Date: Wed, 12 Aug 2015 08:57:55 -0700 -Subject: [PATCH 134/194] tcp: add window scaling support +Subject: [PATCH 169/225] tcp: add window scaling support Sometimes we have to provision boxes across regions, such as California to Sweden. The http server has a 10 minute timeout, so if we can't get our 250mb @@ -86,5 +86,5 @@ index e8ad34b84..7d4b82262 100644 tcp_socket_register (socket); -- -2.13.5 +2.14.3 diff --git a/0135-efinet-retransmit-if-our-device-is-busy.patch b/0170-efinet-retransmit-if-our-device-is-busy.patch similarity index 92% rename from 0135-efinet-retransmit-if-our-device-is-busy.patch rename to 0170-efinet-retransmit-if-our-device-is-busy.patch index ce67254..c2348a9 100644 --- a/0135-efinet-retransmit-if-our-device-is-busy.patch +++ b/0170-efinet-retransmit-if-our-device-is-busy.patch @@ -1,7 +1,7 @@ -From 0fd33baa9fa8db6b8868a9691dc08a683bade47b Mon Sep 17 00:00:00 2001 +From 58929d4f33126c133881fa8f3ff6aef6a2453844 Mon Sep 17 00:00:00 2001 From: Josef Bacik Date: Mon, 31 Aug 2015 13:34:35 -0400 -Subject: [PATCH 135/194] efinet: retransmit if our device is busy +Subject: [PATCH 170/225] efinet: retransmit if our device is busy When I fixed the txbuf handling I ripped out the retransmission code since it was flooding our network when we had the buggy behavior. Turns out this was too @@ -44,5 +44,5 @@ index 5388f952b..3f112438a 100644 return grub_error (GRUB_ERR_TIMEOUT, N_("couldn't send network packet")); -- -2.13.5 +2.14.3 diff --git a/0136-Be-more-aggro-about-actually-using-the-configured-ne.patch b/0171-Be-more-aggro-about-actually-using-the-configured-ne.patch similarity index 98% rename from 0136-Be-more-aggro-about-actually-using-the-configured-ne.patch rename to 0171-Be-more-aggro-about-actually-using-the-configured-ne.patch index b4e6f2f..52a47be 100644 --- a/0136-Be-more-aggro-about-actually-using-the-configured-ne.patch +++ b/0171-Be-more-aggro-about-actually-using-the-configured-ne.patch @@ -1,7 +1,7 @@ -From 6296e091d9568b7334b5ba2392968ea839e404ba Mon Sep 17 00:00:00 2001 +From 51da5fdae9125868a951ee5a6d3ce495f0d5cc7a Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Fri, 11 Sep 2015 17:30:49 -0400 -Subject: [PATCH 136/194] Be more aggro about actually using the *configured* +Subject: [PATCH 171/225] Be more aggro about actually using the *configured* network device. Right now we use any SNP device with the same mac+IP block, but when @@ -220,5 +220,5 @@ index c7c9f0e1d..97b9aa7a4 100644 #define GRUB_EFI_DEVICE_PATH_SUBTYPE(dp) ((dp)->subtype) #define GRUB_EFI_DEVICE_PATH_LENGTH(dp) ((dp)->length) -- -2.13.5 +2.14.3 diff --git a/0138-Fix-security-issue-when-reading-username-and-passwor.patch b/0172-Fix-security-issue-when-reading-username-and-passwor.patch similarity index 89% rename from 0138-Fix-security-issue-when-reading-username-and-passwor.patch rename to 0172-Fix-security-issue-when-reading-username-and-passwor.patch index e0ec9d1..ac15f0f 100644 --- a/0138-Fix-security-issue-when-reading-username-and-passwor.patch +++ b/0172-Fix-security-issue-when-reading-username-and-passwor.patch @@ -1,7 +1,7 @@ -From 7b470ffd69ab31874f04d8f4518f8feea592a16d Mon Sep 17 00:00:00 2001 +From 09c96090262a8c7243867f276275165b8c66155b Mon Sep 17 00:00:00 2001 From: Hector Marco-Gisbert Date: Fri, 13 Nov 2015 16:21:09 +0100 -Subject: [PATCH 138/194] Fix security issue when reading username and password +Subject: [PATCH 172/225] Fix security issue when reading username and password This patch fixes two integer underflows at: * grub-core/lib/crypto.c @@ -43,5 +43,5 @@ index 6be678c0d..c35ce9724 100644 if (cur_len) { -- -2.13.5 +2.14.3 diff --git a/0139-Warn-if-grub-password-will-not-be-read-1290803.patch b/0173-Warn-if-grub-password-will-not-be-read-1290803.patch similarity index 88% rename from 0139-Warn-if-grub-password-will-not-be-read-1290803.patch rename to 0173-Warn-if-grub-password-will-not-be-read-1290803.patch index a308304..da5bf39 100644 --- a/0139-Warn-if-grub-password-will-not-be-read-1290803.patch +++ b/0173-Warn-if-grub-password-will-not-be-read-1290803.patch @@ -1,7 +1,7 @@ -From e49580ec2f0a1898df2dc54a99ee7a148f8f6a87 Mon Sep 17 00:00:00 2001 +From 884a0e2cbe195db86c4ba25518654857fe3761ac Mon Sep 17 00:00:00 2001 From: Robert Marshall Date: Mon, 22 Feb 2016 15:30:05 -0500 -Subject: [PATCH 139/194] Warn if grub password will not be read (#1290803) +Subject: [PATCH 173/225] Warn if grub password will not be read (#1290803) It is possible for a system to have never run grub-mkconfig and add the section that reads the user.cfg file which contains a user set GRUB @@ -27,5 +27,5 @@ index dd76f00fc..fb9d3a3b6 100644 + echo "Update your configuration with @grub_mkconfig@ to support this feature." +fi -- -2.13.5 +2.14.3 diff --git a/0140-Clean-up-grub-setpassword-documentation-1290799.patch b/0174-Clean-up-grub-setpassword-documentation-1290799.patch similarity index 93% rename from 0140-Clean-up-grub-setpassword-documentation-1290799.patch rename to 0174-Clean-up-grub-setpassword-documentation-1290799.patch index ac5ea2c..e73847c 100644 --- a/0140-Clean-up-grub-setpassword-documentation-1290799.patch +++ b/0174-Clean-up-grub-setpassword-documentation-1290799.patch @@ -1,7 +1,7 @@ -From ccef3063f3e6d95f8caa0154dc91a278d3f54dd1 Mon Sep 17 00:00:00 2001 +From 03d62cfc8523c6af02191311d45e04f426c94847 Mon Sep 17 00:00:00 2001 From: Robert Marshall Date: Tue, 26 Jan 2016 10:28:35 -0500 -Subject: [PATCH 140/194] Clean up grub-setpassword documentation (#1290799) +Subject: [PATCH 174/225] Clean up grub-setpassword documentation (#1290799) The output for --help had some errors. Corrected those and polished the text to be a little easier to follow. Carried verbage over to man page @@ -54,5 +54,5 @@ index fb9d3a3b6..c8c0fa419 100644 Report bugs at https://bugzilla.redhat.com. EOF -- -2.13.5 +2.14.3 diff --git a/0141-Fix-locale-issue-in-grub-setpassword-1294243.patch b/0175-Fix-locale-issue-in-grub-setpassword-1294243.patch similarity index 86% rename from 0141-Fix-locale-issue-in-grub-setpassword-1294243.patch rename to 0175-Fix-locale-issue-in-grub-setpassword-1294243.patch index 7a732d6..0f45ae4 100644 --- a/0141-Fix-locale-issue-in-grub-setpassword-1294243.patch +++ b/0175-Fix-locale-issue-in-grub-setpassword-1294243.patch @@ -1,7 +1,7 @@ -From 149d7c90af749a5b2f0a958ea364785319fd290a Mon Sep 17 00:00:00 2001 +From 4db75213ca97bae7d5687bda5a613ee46768512e Mon Sep 17 00:00:00 2001 From: Robert Marshall Date: Fri, 29 Jan 2016 16:56:11 -0500 -Subject: [PATCH 141/194] Fix locale issue in grub-setpassword (#1294243) +Subject: [PATCH 175/225] Fix locale issue in grub-setpassword (#1294243) A shell substitution was expecting non-translated output to grab the hashed password and put it in the user.cfg file. Modified code to force @@ -26,5 +26,5 @@ index c8c0fa419..d7924af51 100644 sed -e "s/PBKDF2 hash of your password is //" } -- -2.13.5 +2.14.3 diff --git a/0145-Add-a-url-parser.patch b/0176-Add-a-url-parser.patch similarity index 98% rename from 0145-Add-a-url-parser.patch rename to 0176-Add-a-url-parser.patch index 34d7f3f..44545be 100644 --- a/0145-Add-a-url-parser.patch +++ b/0176-Add-a-url-parser.patch @@ -1,7 +1,7 @@ -From af7f8bf044711fbbd3568b43e1ce31cdd6282561 Mon Sep 17 00:00:00 2001 +From eac9ebde350842c620fd4ae6feaf36b3532f0ed6 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Tue, 14 Jun 2016 16:18:44 -0400 -Subject: [PATCH 145/194] Add a url parser. +Subject: [PATCH 176/225] Add a url parser. This patch adds a url parser that can parse http, https, tftp, and tftps urls, and is easily extensible to handle more types. @@ -20,10 +20,10 @@ Signed-off-by: Peter Jones create mode 100644 include/grub/net/url.h diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def -index 5ae70204c..4857a1e5f 100644 +index 4bfd2889e..079180919 100644 --- a/grub-core/Makefile.core.def +++ b/grub-core/Makefile.core.def -@@ -2199,6 +2199,7 @@ module = { +@@ -2193,6 +2193,7 @@ module = { common = net/ethernet.c; common = net/arp.c; common = net/netbuff.c; @@ -32,10 +32,10 @@ index 5ae70204c..4857a1e5f 100644 module = { diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c -index 8344526be..f1fab7000 100644 +index f4461451a..b42f9ba46 100644 --- a/grub-core/kern/misc.c +++ b/grub-core/kern/misc.c -@@ -296,6 +296,19 @@ grub_strrchr (const char *s, int c) +@@ -297,6 +297,19 @@ grub_strrchr (const char *s, int c) return p; } @@ -923,7 +923,7 @@ index 000000000..146858284 +} +#endif diff --git a/include/grub/misc.h b/include/grub/misc.h -index 062081437..4737da1ea 100644 +index 83fd69f4a..fcaf1201e 100644 --- a/include/grub/misc.h +++ b/include/grub/misc.h @@ -85,6 +85,7 @@ int EXPORT_FUNC(grub_strncmp) (const char *s1, const char *s2, grub_size_t n); @@ -1020,5 +1020,5 @@ index 000000000..a215fa27d + +#endif /* GRUB_URL_HEADER */ -- -2.13.5 +2.14.3 diff --git a/0146-efinet-and-bootp-add-support-for-dhcpv6.patch b/0177-efinet-and-bootp-add-support-for-dhcpv6.patch similarity index 98% rename from 0146-efinet-and-bootp-add-support-for-dhcpv6.patch rename to 0177-efinet-and-bootp-add-support-for-dhcpv6.patch index 4be841c..cc7e615 100644 --- a/0146-efinet-and-bootp-add-support-for-dhcpv6.patch +++ b/0177-efinet-and-bootp-add-support-for-dhcpv6.patch @@ -1,7 +1,7 @@ -From f809be3900ca1d95892f00d0c5dc8b975b510ef6 Mon Sep 17 00:00:00 2001 +From 48986bcfd3186d9502d6587364eab81399059d96 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Wed, 8 Jun 2016 21:03:37 -0400 -Subject: [PATCH 146/194] efinet and bootp: add support for dhcpv6 +Subject: [PATCH 177/225] efinet and bootp: add support for dhcpv6 Signed-off-by: Peter Jones --- @@ -319,7 +319,7 @@ index a3ce4c67c..329024b6f 100644 } } diff --git a/grub-core/net/net.c b/grub-core/net/net.c -index 16d2ce06d..4be228d95 100644 +index b4325750f..fa3e29126 100644 --- a/grub-core/net/net.c +++ b/grub-core/net/net.c @@ -955,6 +955,78 @@ grub_net_network_level_interface_register (struct grub_net_network_level_interfa @@ -402,10 +402,10 @@ index 16d2ce06d..4be228d95 100644 grub_err_t grub_net_add_ipv4_local (struct grub_net_network_level_interface *inter, diff --git a/grub-core/net/tftp.c b/grub-core/net/tftp.c -index 7d90bf66e..1157524fc 100644 +index dd4ce6b23..f90071353 100644 --- a/grub-core/net/tftp.c +++ b/grub-core/net/tftp.c -@@ -379,19 +379,23 @@ tftp_open (struct grub_file *file, const char *filename) +@@ -401,19 +401,23 @@ tftp_open (struct grub_file *file, const char *filename) return grub_errno; } @@ -663,5 +663,5 @@ index 50d62ab0c..f8f3ec13a 100644 grub_net_add_ipv4_local (struct grub_net_network_level_interface *inf, int mask); -- -2.13.5 +2.14.3 diff --git a/0147-Add-grub-get-kernel-settings-and-use-it-in-10_linux.patch b/0178-Add-grub-get-kernel-settings-and-use-it-in-10_linux.patch similarity index 96% rename from 0147-Add-grub-get-kernel-settings-and-use-it-in-10_linux.patch rename to 0178-Add-grub-get-kernel-settings-and-use-it-in-10_linux.patch index 7ca2092..7bd449f 100644 --- a/0147-Add-grub-get-kernel-settings-and-use-it-in-10_linux.patch +++ b/0178-Add-grub-get-kernel-settings-and-use-it-in-10_linux.patch @@ -1,7 +1,7 @@ -From a037c9021bf1b24299a521d0c40643600ddc437e Mon Sep 17 00:00:00 2001 +From f7d75cce1b07cc85887292fbdd0bc231af9f2a79 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Thu, 23 Jun 2016 11:01:39 -0400 -Subject: [PATCH 147/194] Add grub-get-kernel-settings and use it in 10_linux +Subject: [PATCH 178/225] Add grub-get-kernel-settings and use it in 10_linux This patch adds grub-get-kernel-settings, which reads the system kernel installation configuration from /etc/sysconfig/kernel, and outputs @@ -40,22 +40,22 @@ diff --git a/Makefile.util.def b/Makefile.util.def index 226c46b2d..ed27351eb 100644 --- a/Makefile.util.def +++ b/Makefile.util.def -@@ -714,6 +714,13 @@ script = { +@@ -713,6 +713,13 @@ script = { + installdir = sbin; }; - script = { ++script = { + name = grub-get-kernel-settings; + common = util/grub-get-kernel-settings.in; + mansection = 3; + installdir = sbin; +}; + -+script = { + script = { name = grub-set-default; common = util/grub-set-default.in; - mansection = 8; diff --git a/configure.ac b/configure.ac -index 3c4b9a19b..40be70019 100644 +index 71d105696..aa06ed59c 100644 --- a/configure.ac +++ b/configure.ac @@ -58,6 +58,7 @@ grub_TRANSFORM([grub-install]) @@ -78,10 +78,11 @@ diff --git a/util/bash-completion.d/grub-completion.bash.in b/util/bash-completi index 44bf135b9..5c4acd496 100644 --- a/util/bash-completion.d/grub-completion.bash.in +++ b/util/bash-completion.d/grub-completion.bash.in -@@ -265,6 +265,28 @@ unset __grub_sparc64_setup_program +@@ -264,6 +264,28 @@ have ${__grub_sparc64_setup_program} && \ + unset __grub_sparc64_setup_program - # ++# +# grub-get-kernel-settings +# +_grub_get_kernel_settings () { @@ -103,10 +104,9 @@ index 44bf135b9..5c4acd496 100644 +unset __grub_get_kernel_settings_program + + -+# + # # grub-install # - _grub_install () { diff --git a/util/grub-get-kernel-settings.3 b/util/grub-get-kernel-settings.3 new file mode 100644 index 000000000..ba33330e2 @@ -299,5 +299,5 @@ index 584ad1f46..c9bf223f2 100644 fi -- -2.13.5 +2.14.3 diff --git a/0150-Fix-race-in-EFI-validation.patch b/0179-Fix-race-in-EFI-validation.patch similarity index 95% rename from 0150-Fix-race-in-EFI-validation.patch rename to 0179-Fix-race-in-EFI-validation.patch index 4ae0d3c..974c57d 100644 --- a/0150-Fix-race-in-EFI-validation.patch +++ b/0179-Fix-race-in-EFI-validation.patch @@ -1,7 +1,7 @@ -From 6e1e394239abeb37940cf7fcbadddec9980061aa Mon Sep 17 00:00:00 2001 +From 5172df9aa18f4722b0919b148544c93fb14816f1 Mon Sep 17 00:00:00 2001 From: Matthew Garrett Date: Tue, 14 Jul 2015 16:58:51 -0700 -Subject: [PATCH 150/194] Fix race in EFI validation +Subject: [PATCH 179/225] Fix race in EFI validation --- grub-core/loader/i386/efi/linux.c | 44 ++++++++++----------------------------- @@ -93,5 +93,5 @@ index e5b778577..7ccf32d9d 100644 { grub_dl_unref (my_mod); -- -2.13.5 +2.14.3 diff --git a/0152-Use-device-part-of-chainloader-target-if-present.patch b/0180-Use-device-part-of-chainloader-target-if-present.patch similarity index 85% rename from 0152-Use-device-part-of-chainloader-target-if-present.patch rename to 0180-Use-device-part-of-chainloader-target-if-present.patch index f8ebfe5..be41b18 100644 --- a/0152-Use-device-part-of-chainloader-target-if-present.patch +++ b/0180-Use-device-part-of-chainloader-target-if-present.patch @@ -1,7 +1,7 @@ -From 88db52c0af846192d0e8ae56cf9b5ef041feeb4a Mon Sep 17 00:00:00 2001 +From e911a238ce390e4ecad909b32c8f7bb4ed7a4549 Mon Sep 17 00:00:00 2001 From: Raymund Will Date: Fri, 10 Apr 2015 01:45:02 -0400 -Subject: [PATCH 152/194] Use device part of chainloader target, if present. +Subject: [PATCH 180/225] Use device part of chainloader target, if present. Otherwise chainloading is restricted to '$root', which might not even be readable by EFI! @@ -15,7 +15,7 @@ Signed-off-by: Peter Jones 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c -index adc856366..14ce6ddd7 100644 +index c5f08f03f..6f5fccb2a 100644 --- a/grub-core/loader/efi/chainloader.c +++ b/grub-core/loader/efi/chainloader.c @@ -223,8 +223,11 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)), @@ -33,5 +33,5 @@ index adc856366..14ce6ddd7 100644 goto fail; -- -2.13.5 +2.14.3 diff --git a/0153-Add-secureboot-support-on-efi-chainloader.patch b/0181-Add-secureboot-support-on-efi-chainloader.patch similarity index 93% rename from 0153-Add-secureboot-support-on-efi-chainloader.patch rename to 0181-Add-secureboot-support-on-efi-chainloader.patch index e58c457..075ac34 100644 --- a/0153-Add-secureboot-support-on-efi-chainloader.patch +++ b/0181-Add-secureboot-support-on-efi-chainloader.patch @@ -1,7 +1,7 @@ -From ec51ea2e584230bfcac463b3355e76bb6cb0b89b Mon Sep 17 00:00:00 2001 +From 0bb23453ebbb5b38f475ebba523192b207a740ae Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Tue, 6 Oct 2015 13:04:37 -0400 -Subject: [PATCH 153/194] Add secureboot support on efi chainloader +Subject: [PATCH 181/225] Add secureboot support on efi chainloader Expand the chainloader to be able to verify the image by means of shim lock protocol. The PE/COFF image is loaded and relocated by the @@ -17,12 +17,12 @@ Based on https://build.opensuse.org/package/view_file/openSUSE:Factory/grub2/gru Signed-off-by: Peter Jones --- - grub-core/loader/efi/chainloader.c | 612 ++++++++++++++++++++++++++++++++++--- + grub-core/loader/efi/chainloader.c | 605 ++++++++++++++++++++++++++++++++++--- include/grub/efi/pe32.h | 20 +- - 2 files changed, 595 insertions(+), 37 deletions(-) + 2 files changed, 588 insertions(+), 37 deletions(-) diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c -index 14ce6ddd7..87a91e16f 100644 +index 6f5fccb2a..7196d4d2d 100644 --- a/grub-core/loader/efi/chainloader.c +++ b/grub-core/loader/efi/chainloader.c @@ -32,6 +32,8 @@ @@ -57,7 +57,7 @@ index 14ce6ddd7..87a91e16f 100644 grub_dl_unref (my_mod); return GRUB_ERR_NONE; -@@ -191,12 +199,523 @@ make_file_path (grub_efi_device_path_t *dp, const char *filename) +@@ -191,12 +199,516 @@ make_file_path (grub_efi_device_path_t *dp, const char *filename) return file_path; } @@ -363,10 +363,9 @@ index 14ce6ddd7..87a91e16f 100644 +static grub_efi_boolean_t +handle_image (void *data, grub_efi_uint32_t datasize) +{ -+ grub_efi_boot_services_t *b; + grub_efi_loaded_image_t *li, li_bak; + grub_efi_status_t efi_status; -+ char *buffer = NULL; ++ void *buffer = NULL; + char *buffer_aligned = NULL; + grub_efi_uint32_t i, size; + struct grub_pe32_section_table *section; @@ -375,8 +374,6 @@ index 14ce6ddd7..87a91e16f 100644 + grub_uint32_t section_alignment; + grub_uint32_t buffer_size; + -+ b = grub_efi_system_table->boot_services; -+ + if (read_header (data, datasize, &context)) + { + grub_dprintf ("chain", "Succeed to read header\n"); @@ -390,9 +387,8 @@ index 14ce6ddd7..87a91e16f 100644 + section_alignment = context.section_alignment; + buffer_size = context.image_size + section_alignment; + -+ efi_status = efi_call_3 (b->allocate_pool, GRUB_EFI_LOADER_DATA, -+ buffer_size, &buffer); -+ ++ efi_status = grub_efi_allocate_pool (GRUB_EFI_LOADER_DATA, ++ buffer_size, &buffer); + if (efi_status != GRUB_EFI_SUCCESS) + { + grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("out of memory")); @@ -537,13 +533,13 @@ index 14ce6ddd7..87a91e16f 100644 + grub_efi_system_table); + + grub_memcpy (li, &li_bak, sizeof (grub_efi_loaded_image_t)); -+ efi_status = efi_call_1 (b->free_pool, buffer); ++ efi_status = grub_efi_free_pool (buffer); + + return 1; + +error_exit: + if (buffer) -+ efi_call_1 (b->free_pool, buffer); ++ grub_efi_free_pool (buffer); + + return 0; +} @@ -551,10 +547,7 @@ index 14ce6ddd7..87a91e16f 100644 +static grub_err_t +grub_secureboot_chainloader_unload (void) +{ -+ grub_efi_boot_services_t *b; -+ -+ b = grub_efi_system_table->boot_services; -+ efi_call_2 (b->free_pages, address, pages); ++ grub_efi_free_pages (address, pages); + grub_free (file_path); + grub_free (cmdline); + cmdline = 0; @@ -582,7 +575,7 @@ index 14ce6ddd7..87a91e16f 100644 grub_efi_status_t status; grub_efi_boot_services_t *b; grub_device_t dev = 0; -@@ -204,7 +723,6 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)), +@@ -204,7 +716,6 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)), grub_efi_loaded_image_t *loaded_image; char *filename; void *boot_image = 0; @@ -590,7 +583,7 @@ index 14ce6ddd7..87a91e16f 100644 if (argc == 0) return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected")); -@@ -216,9 +734,36 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)), +@@ -216,9 +727,36 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)), address = 0; image_handle = 0; file_path = 0; @@ -627,7 +620,7 @@ index 14ce6ddd7..87a91e16f 100644 file = grub_file_open (filename); if (! file) goto fail; -@@ -267,14 +812,14 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)), +@@ -267,14 +805,14 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)), grub_printf ("file path: "); grub_efi_print_device_path (file_path); @@ -643,9 +636,9 @@ index 14ce6ddd7..87a91e16f 100644 - pages = (((grub_efi_uintn_t) size + ((1 << 12) - 1)) >> 12); + pages = (((grub_efi_uintn_t) fsize + ((1 << 12) - 1)) >> 12); - status = efi_call_4 (b->allocate_pages, GRUB_EFI_ALLOCATE_ANY_PAGES, - GRUB_EFI_LOADER_CODE, -@@ -288,7 +833,7 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)), + status = grub_efi_allocate_pages_real (GRUB_EFI_ALLOCATE_ANY_PAGES, + GRUB_EFI_LOADER_CODE, +@@ -288,7 +826,7 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)), } boot_image = (void *) ((grub_addr_t) address); @@ -654,7 +647,7 @@ index 14ce6ddd7..87a91e16f 100644 { if (grub_errno == GRUB_ERR_NONE) grub_error (GRUB_ERR_BAD_OS, N_("premature end of file %s"), -@@ -298,7 +843,7 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)), +@@ -298,7 +836,7 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)), } #if defined (__i386__) || defined (__x86_64__) @@ -663,7 +656,7 @@ index 14ce6ddd7..87a91e16f 100644 { struct grub_macho_fat_header *head = boot_image; if (head->magic -@@ -307,6 +852,14 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)), +@@ -307,6 +845,14 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)), grub_uint32_t i; struct grub_macho_fat_arch *archs = (struct grub_macho_fat_arch *) (head + 1); @@ -678,7 +671,7 @@ index 14ce6ddd7..87a91e16f 100644 for (i = 0; i < grub_cpu_to_le32 (head->nfat_arch); i++) { if (GRUB_MACHO_CPUTYPE_IS_HOST_CURRENT (archs[i].cputype)) -@@ -321,21 +874,28 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)), +@@ -321,21 +867,28 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)), > ~grub_cpu_to_le32 (archs[i].size) || grub_cpu_to_le32 (archs[i].offset) + grub_cpu_to_le32 (archs[i].size) @@ -711,7 +704,7 @@ index 14ce6ddd7..87a91e16f 100644 if (status != GRUB_EFI_SUCCESS) { if (status == GRUB_EFI_OUT_OF_RESOURCES) -@@ -357,33 +917,10 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)), +@@ -357,33 +910,10 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)), } loaded_image->device_handle = dev_handle; @@ -747,9 +740,9 @@ index 14ce6ddd7..87a91e16f 100644 } grub_file_close (file); -@@ -405,6 +942,9 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)), +@@ -405,6 +935,9 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)), if (address) - efi_call_2 (b->free_pages, address, pages); + grub_efi_free_pages (address, pages); + if (cmdline) + grub_free (cmdline); @@ -796,5 +789,5 @@ index 7d44732d2..6e24dae2c 100644 { grub_uint32_t page_rva; -- -2.13.5 +2.14.3 diff --git a/0154-Make-any-of-the-loaders-that-link-in-efi-mode-honor-.patch b/0182-Make-any-of-the-loaders-that-link-in-efi-mode-honor-.patch similarity index 95% rename from 0154-Make-any-of-the-loaders-that-link-in-efi-mode-honor-.patch rename to 0182-Make-any-of-the-loaders-that-link-in-efi-mode-honor-.patch index 30c52b8..a24ab6b 100644 --- a/0154-Make-any-of-the-loaders-that-link-in-efi-mode-honor-.patch +++ b/0182-Make-any-of-the-loaders-that-link-in-efi-mode-honor-.patch @@ -1,7 +1,7 @@ -From 2a279098464fb9c45491c0cd44a35ff88c9ea644 Mon Sep 17 00:00:00 2001 +From d98713c31c46b73c5a4a3653e42de063205e8e42 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Tue, 6 Oct 2015 16:09:25 -0400 -Subject: [PATCH 154/194] Make any of the loaders that link in efi mode honor +Subject: [PATCH 182/225] Make any of the loaders that link in efi mode honor secure boot. And in this case "honor" means "even if somebody does link this in, they @@ -49,10 +49,10 @@ index 104513847..f7b4d29b0 100644 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/env_private.h KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/err.h diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def -index 4857a1e5f..75a7ab344 100644 +index 079180919..031609c20 100644 --- a/grub-core/Makefile.core.def +++ b/grub-core/Makefile.core.def -@@ -196,6 +196,7 @@ kernel = { +@@ -200,6 +200,7 @@ kernel = { i386_multiboot = kern/i386/pc/acpi.c; i386_coreboot = kern/acpi.c; i386_multiboot = kern/acpi.c; @@ -125,10 +125,10 @@ index 98769eadb..088cbe9e2 100644 grub_unregister_extcmd (cmd_read_word); grub_unregister_extcmd (cmd_read_dword); diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c -index 2588b481e..684ca93f8 100644 +index 4bfde0dac..caa9d9979 100644 --- a/grub-core/kern/efi/efi.c +++ b/grub-core/kern/efi/efi.c -@@ -269,34 +269,6 @@ grub_efi_get_variable (const char *var, const grub_efi_guid_t *guid, +@@ -278,34 +278,6 @@ grub_efi_get_variable (const char *var, const grub_efi_guid_t *guid, return NULL; } @@ -259,7 +259,7 @@ index 74888c463..69c2a10d3 100644 grub_unregister_command (cmd); } diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c -index 87a91e16f..aee8e6bec 100644 +index 7196d4d2d..b88e374c2 100644 --- a/grub-core/loader/efi/chainloader.c +++ b/grub-core/loader/efi/chainloader.c @@ -34,6 +34,7 @@ @@ -367,10 +367,10 @@ index a293b17aa..91283157e 100644 grub_unregister_command (cmd_initrd); } diff --git a/grub-core/loader/multiboot.c b/grub-core/loader/multiboot.c -index bd9d5b3e6..fb044a60c 100644 +index 40c67e824..26df46a41 100644 --- a/grub-core/loader/multiboot.c +++ b/grub-core/loader/multiboot.c -@@ -42,6 +42,7 @@ +@@ -50,6 +50,7 @@ #include #include #include @@ -378,7 +378,7 @@ index bd9d5b3e6..fb044a60c 100644 GRUB_MOD_LICENSE ("GPLv3+"); -@@ -431,6 +432,9 @@ static grub_command_t cmd_multiboot, cmd_module; +@@ -446,6 +447,9 @@ static grub_command_t cmd_multiboot, cmd_module; GRUB_MOD_INIT(multiboot) { @@ -388,7 +388,7 @@ index bd9d5b3e6..fb044a60c 100644 cmd_multiboot = #ifdef GRUB_USE_MULTIBOOT2 grub_register_command ("multiboot2", grub_cmd_multiboot, -@@ -451,6 +455,9 @@ GRUB_MOD_INIT(multiboot) +@@ -466,6 +470,9 @@ GRUB_MOD_INIT(multiboot) GRUB_MOD_FINI(multiboot) { @@ -431,10 +431,10 @@ index c9885b1bc..df8dfdb4b 100644 grub_unregister_command (cmd_resume); #endif diff --git a/include/grub/efi/efi.h b/include/grub/efi/efi.h -index bb3ab7dfd..91e29ce66 100644 +index 72283ee99..926544afe 100644 --- a/include/grub/efi/efi.h +++ b/include/grub/efi/efi.h -@@ -83,7 +83,6 @@ EXPORT_FUNC (grub_efi_set_variable) (const char *var, +@@ -89,7 +89,6 @@ EXPORT_FUNC (grub_efi_set_variable) (const char *var, const grub_efi_guid_t *guid, void *data, grub_size_t datasize); @@ -490,5 +490,5 @@ diff --git a/include/grub/sparc64/linux.h b/include/grub/sparc64/linux.h new file mode 100644 index 000000000..e69de29bb -- -2.13.5 +2.14.3 diff --git a/0156-Rework-linux-command.patch b/0183-Rework-linux-command.patch similarity index 96% rename from 0156-Rework-linux-command.patch rename to 0183-Rework-linux-command.patch index 164f0d2..eb1d6cd 100644 --- a/0156-Rework-linux-command.patch +++ b/0183-Rework-linux-command.patch @@ -1,7 +1,7 @@ -From a6c2dfdf5ea765938849dc7f54a685de0ef21193 Mon Sep 17 00:00:00 2001 +From e2011d5e919b72524c83e5e20f536f9c52a284ed Mon Sep 17 00:00:00 2001 From: Matthew Garrett Date: Sun, 9 Aug 2015 16:12:39 -0700 -Subject: [PATCH 156/194] Rework linux command +Subject: [PATCH 183/225] Rework linux command We want a single buffer that contains the entire kernel image in order to perform a TPM measurement. Allocate one and copy the entire kernel into it @@ -103,5 +103,5 @@ index b2438547d..e4b8342f5 100644 grub_file_close (file); -- -2.13.5 +2.14.3 diff --git a/0184-Add-grub_efi_allocate_pool-and-grub_efi_free_pool-wr.patch b/0184-Add-grub_efi_allocate_pool-and-grub_efi_free_pool-wr.patch deleted file mode 100644 index a57c2c3..0000000 --- a/0184-Add-grub_efi_allocate_pool-and-grub_efi_free_pool-wr.patch +++ /dev/null @@ -1,75 +0,0 @@ -From ab2832aae2c1aa27d95a18c9a15ea6e5b630cca9 Mon Sep 17 00:00:00 2001 -From: Peter Jones -Date: Thu, 1 Jun 2017 09:59:56 -0400 -Subject: [PATCH 184/194] Add grub_efi_allocate_pool() and grub_efi_free_pool() - wrappers. - -Signed-off-by: Peter Jones ---- - include/grub/efi/efi.h | 36 ++++++++++++++++++++++++++++++++---- - 1 file changed, 32 insertions(+), 4 deletions(-) - -diff --git a/include/grub/efi/efi.h b/include/grub/efi/efi.h -index 91e29ce66..68326d96f 100644 ---- a/include/grub/efi/efi.h -+++ b/include/grub/efi/efi.h -@@ -24,6 +24,10 @@ - #include - #include - -+/* Variables. */ -+extern grub_efi_system_table_t *EXPORT_VAR(grub_efi_system_table); -+extern grub_efi_handle_t EXPORT_VAR(grub_efi_image_handle); -+ - /* Functions. */ - void *EXPORT_FUNC(grub_efi_locate_protocol) (grub_efi_guid_t *protocol, - void *registration); -@@ -58,6 +62,33 @@ EXPORT_FUNC(grub_efi_get_memory_map) (grub_efi_uintn_t *memory_map_size, - grub_efi_uintn_t *map_key, - grub_efi_uintn_t *descriptor_size, - grub_efi_uint32_t *descriptor_version); -+ -+static inline grub_efi_status_t -+__attribute__((__unused__)) -+grub_efi_allocate_pool (grub_efi_memory_type_t pool_type, -+ grub_efi_uintn_t buffer_size, -+ void **buffer) -+{ -+ grub_efi_boot_services_t *b; -+ grub_efi_status_t status; -+ -+ b = grub_efi_system_table->boot_services; -+ status = efi_call_3 (b->allocate_pool, pool_type, buffer_size, buffer); -+ return status; -+} -+ -+static inline grub_efi_status_t -+__attribute__((__unused__)) -+grub_efi_free_pool (void *buffer) -+{ -+ grub_efi_boot_services_t *b; -+ grub_efi_status_t status; -+ -+ b = grub_efi_system_table->boot_services; -+ status = efi_call_1 (b->free_pool, buffer); -+ return status; -+} -+ - grub_efi_loaded_image_t *EXPORT_FUNC(grub_efi_get_loaded_image) (grub_efi_handle_t image_handle); - void EXPORT_FUNC(grub_efi_print_device_path) (grub_efi_device_path_t *dp); - char *EXPORT_FUNC(grub_efi_get_filename) (grub_efi_device_path_t *dp); -@@ -103,10 +134,7 @@ void grub_efi_init (void); - void grub_efi_fini (void); - void grub_efi_set_prefix (void); - --/* Variables. */ --extern grub_efi_system_table_t *EXPORT_VAR(grub_efi_system_table); --extern grub_efi_handle_t EXPORT_VAR(grub_efi_image_handle); -- -+/* More variables. */ - extern int EXPORT_VAR(grub_efi_is_finished); - - struct grub_net_card; --- -2.13.5 - diff --git a/0157-Rework-linux16-command.patch b/0184-Rework-linux16-command.patch similarity index 96% rename from 0157-Rework-linux16-command.patch rename to 0184-Rework-linux16-command.patch index c7b0460..3cc1c05 100644 --- a/0157-Rework-linux16-command.patch +++ b/0184-Rework-linux16-command.patch @@ -1,7 +1,7 @@ -From fe4560a74b419441cc337e6395fd42f988616b32 Mon Sep 17 00:00:00 2001 +From 5a7996fb9a745f1e0cf9fa068402ecadcee184cb Mon Sep 17 00:00:00 2001 From: Matthew Garrett Date: Sun, 9 Aug 2015 16:20:58 -0700 -Subject: [PATCH 157/194] Rework linux16 command +Subject: [PATCH 184/225] Rework linux16 command We want a single buffer that contains the entire kernel image in order to perform a TPM measurement. Allocate one and copy the entire kernel int it @@ -97,5 +97,5 @@ index 91283157e..b864e5403 100644 grub_file_close (file); -- -2.13.5 +2.14.3 diff --git a/0158-Make-grub-editenv-build-again.patch b/0185-Make-grub-editenv-build-again.patch similarity index 87% rename from 0158-Make-grub-editenv-build-again.patch rename to 0185-Make-grub-editenv-build-again.patch index e7206ca..cebcc6a 100644 --- a/0158-Make-grub-editenv-build-again.patch +++ b/0185-Make-grub-editenv-build-again.patch @@ -1,7 +1,7 @@ -From a06e773669c63d8d32f54e17b31a7af66320a708 Mon Sep 17 00:00:00 2001 +From 8b2101db991088a17f8c27fe590b48a641b8805e Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Fri, 4 Mar 2016 16:29:13 -0500 -Subject: [PATCH 158/194] Make grub-editenv build again. +Subject: [PATCH 185/225] Make grub-editenv build again. 36212460d3565b18439a3a8130b28e6c97702c6a split how some of the mkimage utility functions are defined, and they wind up being linked into @@ -26,5 +26,5 @@ index ed27351eb..38cdf4ccc 100644 common = util/config.c; common = util/resolve.c; -- -2.13.5 +2.14.3 diff --git a/0185-Use-grub_efi_.-memory-helpers-where-reasonable.patch b/0185-Use-grub_efi_.-memory-helpers-where-reasonable.patch deleted file mode 100644 index 9c44fe2..0000000 --- a/0185-Use-grub_efi_.-memory-helpers-where-reasonable.patch +++ /dev/null @@ -1,109 +0,0 @@ -From 38441515e97a0ae8bf668a747b40cd839821887a Mon Sep 17 00:00:00 2001 -From: Peter Jones -Date: Thu, 1 Jun 2017 10:06:38 -0400 -Subject: [PATCH 185/194] Use grub_efi_...() memory helpers where reasonable. - -This uses grub_efi_allocate_pool(), grub_efi_free_pool(), and -grub_efi_free_pages() instead of open-coded efi_call_N() calls, so we -get more reasonable type checking. - -Signed-off-by: Peter Jones ---- - grub-core/loader/efi/chainloader.c | 24 +++++++++--------------- - 1 file changed, 9 insertions(+), 15 deletions(-) - -diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c -index 7826e794a..d2557b38d 100644 ---- a/grub-core/loader/efi/chainloader.c -+++ b/grub-core/loader/efi/chainloader.c -@@ -65,7 +65,7 @@ grub_chainloader_unload (void) - - b = grub_efi_system_table->boot_services; - efi_call_1 (b->unload_image, image_handle); -- efi_call_2 (b->free_pages, address, pages); -+ grub_efi_free_pages (address, pages); - - grub_free (file_path); - grub_free (cmdline); -@@ -108,7 +108,7 @@ grub_chainloader_boot (void) - } - - if (exit_data) -- efi_call_1 (b->free_pool, exit_data); -+ grub_efi_free_pool (exit_data); - - grub_loader_unset (); - -@@ -500,10 +500,9 @@ grub_efi_get_media_file_path (grub_efi_device_path_t *dp) - static grub_efi_boolean_t - handle_image (void *data, grub_efi_uint32_t datasize) - { -- grub_efi_boot_services_t *b; - grub_efi_loaded_image_t *li, li_bak; - grub_efi_status_t efi_status; -- char *buffer = NULL; -+ void *buffer = NULL; - char *buffer_aligned = NULL; - grub_efi_uint32_t i; - struct grub_pe32_section_table *section; -@@ -514,8 +513,6 @@ handle_image (void *data, grub_efi_uint32_t datasize) - int found_entry_point = 0; - int rc; - -- b = grub_efi_system_table->boot_services; -- - rc = read_header (data, datasize, &context); - if (rc < 0) - { -@@ -555,8 +552,8 @@ handle_image (void *data, grub_efi_uint32_t datasize) - grub_dprintf ("chain", "image size is %08"PRIxGRUB_UINT64_T", datasize is %08x\n", - context.image_size, datasize); - -- efi_status = efi_call_3 (b->allocate_pool, GRUB_EFI_LOADER_DATA, -- buffer_size, &buffer); -+ efi_status = grub_efi_allocate_pool (GRUB_EFI_LOADER_DATA, buffer_size, -+ &buffer); - - if (efi_status != GRUB_EFI_SUCCESS) - { -@@ -788,14 +785,14 @@ handle_image (void *data, grub_efi_uint32_t datasize) - - grub_dprintf ("chain", "entry_point returned %ld\n", efi_status); - grub_memcpy (li, &li_bak, sizeof (grub_efi_loaded_image_t)); -- efi_status = efi_call_1 (b->free_pool, buffer); -+ efi_status = grub_efi_free_pool (buffer); - - return 1; - - error_exit: - grub_dprintf ("chain", "error_exit: grub_errno: %d\n", grub_errno); - if (buffer) -- efi_call_1 (b->free_pool, buffer); -+ grub_efi_free_pool (buffer); - - return 0; - } -@@ -803,10 +800,7 @@ error_exit: - static grub_err_t - grub_secureboot_chainloader_unload (void) - { -- grub_efi_boot_services_t *b; -- -- b = grub_efi_system_table->boot_services; -- efi_call_2 (b->free_pages, address, pages); -+ grub_efi_free_pages (address, pages); - grub_free (file_path); - grub_free (cmdline); - cmdline = 0; -@@ -1073,7 +1067,7 @@ fail: - grub_free (file_path); - - if (address) -- efi_call_2 (b->free_pages, address, pages); -+ grub_efi_free_pages (address, pages); - - if (cmdline) - grub_free (cmdline); --- -2.13.5 - diff --git a/0186-Add-PRIxGRUB_EFI_STATUS-and-use-it.patch b/0186-Add-PRIxGRUB_EFI_STATUS-and-use-it.patch deleted file mode 100644 index feff5ea..0000000 --- a/0186-Add-PRIxGRUB_EFI_STATUS-and-use-it.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 03c01ad6ac50624a9cb9b061dbb9b46e590c6b1e Mon Sep 17 00:00:00 2001 -From: Peter Jones -Date: Thu, 1 Jun 2017 10:07:50 -0400 -Subject: [PATCH 186/194] Add PRIxGRUB_EFI_STATUS and use it. - -This avoids syntax checkers getting confused about if it's llx or lx. - -Signed-off-by: Peter Jones ---- - grub-core/loader/efi/chainloader.c | 3 ++- - include/grub/efi/api.h | 8 ++++++++ - 2 files changed, 10 insertions(+), 1 deletion(-) - -diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c -index d2557b38d..2c62faa29 100644 ---- a/grub-core/loader/efi/chainloader.c -+++ b/grub-core/loader/efi/chainloader.c -@@ -783,7 +783,8 @@ handle_image (void *data, grub_efi_uint32_t datasize) - efi_status = efi_call_2 (entry_point, grub_efi_image_handle, - grub_efi_system_table); - -- grub_dprintf ("chain", "entry_point returned %ld\n", efi_status); -+ grub_dprintf ("chain", "entry_point returned 0x%"PRIxGRUB_EFI_STATUS"\n", -+ efi_status); - grub_memcpy (li, &li_bak, sizeof (grub_efi_loaded_image_t)); - efi_status = grub_efi_free_pool (buffer); - -diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h -index 02488ec35..ddc5ecfb0 100644 ---- a/include/grub/efi/api.h -+++ b/include/grub/efi/api.h -@@ -527,6 +527,14 @@ typedef grub_uint8_t grub_efi_char8_t; - typedef grub_uint16_t grub_efi_char16_t; - - typedef grub_efi_intn_t grub_efi_status_t; -+/* Make grub_efi_status_t reasonably printable. */ -+#if GRUB_CPU_SIZEOF_VOID_P == 8 -+#define PRIxGRUB_EFI_STATUS "lx" -+#define PRIdGRUB_EFI_STATUS "ld" -+#else -+#define PRIxGRUB_EFI_STATUS "llx" -+#define PRIdGRUB_EFI_STATUS "lld" -+#endif - - #define GRUB_EFI_ERROR_CODE(value) \ - ((((grub_efi_status_t) 1) << (sizeof (grub_efi_status_t) * 8 - 1)) | (value)) --- -2.13.5 - diff --git a/0159-Fix-up-some-man-pages-rpmdiff-noticed.patch b/0186-Fix-up-some-man-pages-rpmdiff-noticed.patch similarity index 95% rename from 0159-Fix-up-some-man-pages-rpmdiff-noticed.patch rename to 0186-Fix-up-some-man-pages-rpmdiff-noticed.patch index 58a29a6..2c048ca 100644 --- a/0159-Fix-up-some-man-pages-rpmdiff-noticed.patch +++ b/0186-Fix-up-some-man-pages-rpmdiff-noticed.patch @@ -1,7 +1,7 @@ -From 37e1a445f41ebf79242310e5f9a39573118aa21b Mon Sep 17 00:00:00 2001 +From 2a3c86ae30d228a5d7ceb52f4a24e7598d598558 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Tue, 23 Sep 2014 09:58:49 -0400 -Subject: [PATCH 159/194] Fix up some man pages rpmdiff noticed. +Subject: [PATCH 186/225] Fix up some man pages rpmdiff noticed. --- configure.ac | 2 ++ @@ -13,7 +13,7 @@ Subject: [PATCH 159/194] Fix up some man pages rpmdiff noticed. create mode 100644 util/grub-syslinux2cfg.1 diff --git a/configure.ac b/configure.ac -index 40be70019..ae371a97d 100644 +index aa06ed59c..f69f89867 100644 --- a/configure.ac +++ b/configure.ac @@ -80,6 +80,7 @@ grub_TRANSFORM([grub-get-kernel-settings.3]) @@ -149,5 +149,5 @@ index 000000000..853094827 +.SH SEE ALSO +.BR "info grub" -- -2.13.5 +2.14.3 diff --git a/0187-Add-PRIxGRUB_EFI_STATUS-and-use-it.patch b/0187-Add-PRIxGRUB_EFI_STATUS-and-use-it.patch new file mode 100644 index 0000000..bc57629 --- /dev/null +++ b/0187-Add-PRIxGRUB_EFI_STATUS-and-use-it.patch @@ -0,0 +1,34 @@ +From 0d56e5228336aca3c86b87995e4e6635818fa8eb Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Thu, 1 Jun 2017 10:07:50 -0400 +Subject: [PATCH 187/225] Add PRIxGRUB_EFI_STATUS and use it. + +This avoids syntax checkers getting confused about if it's llx or lx. + +Signed-off-by: Peter Jones +--- + include/grub/efi/api.h | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h +index 02488ec35..ddc5ecfb0 100644 +--- a/include/grub/efi/api.h ++++ b/include/grub/efi/api.h +@@ -527,6 +527,14 @@ typedef grub_uint8_t grub_efi_char8_t; + typedef grub_uint16_t grub_efi_char16_t; + + typedef grub_efi_intn_t grub_efi_status_t; ++/* Make grub_efi_status_t reasonably printable. */ ++#if GRUB_CPU_SIZEOF_VOID_P == 8 ++#define PRIxGRUB_EFI_STATUS "lx" ++#define PRIdGRUB_EFI_STATUS "ld" ++#else ++#define PRIxGRUB_EFI_STATUS "llx" ++#define PRIdGRUB_EFI_STATUS "lld" ++#endif + + #define GRUB_EFI_ERROR_CODE(value) \ + ((((grub_efi_status_t) 1) << (sizeof (grub_efi_status_t) * 8 - 1)) | (value)) +-- +2.14.3 + diff --git a/0187-Don-t-use-dynamic-sized-arrays-since-we-don-t-build-.patch b/0187-Don-t-use-dynamic-sized-arrays-since-we-don-t-build-.patch deleted file mode 100644 index 0a1bc5f..0000000 --- a/0187-Don-t-use-dynamic-sized-arrays-since-we-don-t-build-.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 4bb62c765c1456e33181b704a01008d8df42817f Mon Sep 17 00:00:00 2001 -From: Peter Jones -Date: Mon, 26 Jun 2017 12:42:57 -0400 -Subject: [PATCH 187/194] Don't use dynamic sized arrays since we don't build - with -std=c99 - ---- - grub-core/net/net.c | 17 ++++++++++++++--- - 1 file changed, 14 insertions(+), 3 deletions(-) - -diff --git a/grub-core/net/net.c b/grub-core/net/net.c -index 4be228d95..fa3e29126 100644 ---- a/grub-core/net/net.c -+++ b/grub-core/net/net.c -@@ -1853,14 +1853,25 @@ grub_net_search_configfile (char *config) - { - /* By the Client UUID. */ - -- char client_uuid_var[sizeof ("net_") + grub_strlen (inf->name) + -- sizeof ("_clientuuid") + 1]; -- grub_snprintf (client_uuid_var, sizeof (client_uuid_var), -+ char *client_uuid_var; -+ grub_size_t client_uuid_var_size; -+ -+ client_uuid_var_size = grub_snprintf (NULL, 0, -+ "net_%s_clientuuid", inf->name); -+ if (client_uuid_var_size <= 0) -+ continue; -+ client_uuid_var_size += 1; -+ client_uuid_var = grub_malloc(client_uuid_var_size); -+ if (!client_uuid_var) -+ continue; -+ grub_snprintf (client_uuid_var, client_uuid_var_size, - "net_%s_clientuuid", inf->name); - - const char *client_uuid; - client_uuid = grub_env_get (client_uuid_var); - -+ grub_free(client_uuid_var); -+ - if (client_uuid) - { - grub_strcpy (suffix, client_uuid); --- -2.13.5 - diff --git a/0160-Re-work-some-intricacies-of-PE-loading.patch b/0188-Re-work-some-intricacies-of-PE-loading.patch similarity index 91% rename from 0160-Re-work-some-intricacies-of-PE-loading.patch rename to 0188-Re-work-some-intricacies-of-PE-loading.patch index c1ae027..c521c8e 100644 --- a/0160-Re-work-some-intricacies-of-PE-loading.patch +++ b/0188-Re-work-some-intricacies-of-PE-loading.patch @@ -1,18 +1,18 @@ -From 47e691b7f6e3035ff6658ea1c414661ee53eab02 Mon Sep 17 00:00:00 2001 +From cbd4866c4631294fa8000a3aa99f915866cb2385 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Thu, 9 Jun 2016 12:22:29 -0400 -Subject: [PATCH 160/194] Re-work some intricacies of PE loading. +Subject: [PATCH 188/225] Re-work some intricacies of PE loading. The PE spec is not a well written document, and awesomely every place where there's an ambiguous way to read something, Windows' bootmgfw.efi takes a different read than either of them. --- - grub-core/loader/efi/chainloader.c | 156 +++++++++++++++++++++++++++++-------- + grub-core/loader/efi/chainloader.c | 157 +++++++++++++++++++++++++++++-------- include/grub/efi/pe32.h | 32 +++++++- - 2 files changed, 152 insertions(+), 36 deletions(-) + 2 files changed, 153 insertions(+), 36 deletions(-) diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c -index aee8e6bec..4b77a7d5a 100644 +index b88e374c2..ecdaff003 100644 --- a/grub-core/loader/efi/chainloader.c +++ b/grub-core/loader/efi/chainloader.c @@ -301,7 +301,7 @@ image_is_64_bit (grub_pe_header_t *pe_hdr) @@ -38,9 +38,9 @@ index aee8e6bec..4b77a7d5a 100644 if (!reloc_base && !reloc_base_end) return GRUB_EFI_SUCCESS; -@@ -507,12 +507,13 @@ handle_image (void *data, grub_efi_uint32_t datasize) +@@ -506,12 +506,13 @@ handle_image (void *data, grub_efi_uint32_t datasize) grub_efi_status_t efi_status; - char *buffer = NULL; + void *buffer = NULL; char *buffer_aligned = NULL; - grub_efi_uint32_t i, size; + grub_efi_uint32_t i; @@ -51,9 +51,9 @@ index aee8e6bec..4b77a7d5a 100644 grub_uint32_t buffer_size; + int found_entry_point = 0; - b = grub_efi_system_table->boot_services; - -@@ -526,8 +527,28 @@ handle_image (void *data, grub_efi_uint32_t datasize) + if (read_header (data, datasize, &context)) + { +@@ -523,8 +524,28 @@ handle_image (void *data, grub_efi_uint32_t datasize) goto error_exit; } @@ -80,9 +80,9 @@ index aee8e6bec..4b77a7d5a 100644 + grub_dprintf ("chain", "image size is %08lx, datasize is %08x\n", + context.image_size, datasize); - efi_status = efi_call_3 (b->allocate_pool, GRUB_EFI_LOADER_DATA, - buffer_size, &buffer); -@@ -539,7 +560,6 @@ handle_image (void *data, grub_efi_uint32_t datasize) + efi_status = grub_efi_allocate_pool (GRUB_EFI_LOADER_DATA, + buffer_size, &buffer); +@@ -535,7 +556,6 @@ handle_image (void *data, grub_efi_uint32_t datasize) } buffer_aligned = (char *)ALIGN_UP ((grub_addr_t)buffer, section_alignment); @@ -90,7 +90,7 @@ index aee8e6bec..4b77a7d5a 100644 if (!buffer_aligned) { grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("out of memory")); -@@ -548,27 +568,62 @@ handle_image (void *data, grub_efi_uint32_t datasize) +@@ -544,27 +564,62 @@ handle_image (void *data, grub_efi_uint32_t datasize) grub_memcpy (buffer_aligned, data, context.size_of_headers); @@ -159,7 +159,7 @@ index aee8e6bec..4b77a7d5a 100644 /* We do want to process .reloc, but it's often marked * discardable, so we don't want to memcpy it. */ -@@ -587,21 +642,46 @@ handle_image (void *data, grub_efi_uint32_t datasize) +@@ -583,21 +638,46 @@ handle_image (void *data, grub_efi_uint32_t datasize) if (section->raw_data_size && section->virtual_size && base && end && reloc_base == base && reloc_base_end == end) { @@ -210,7 +210,7 @@ index aee8e6bec..4b77a7d5a 100644 { grub_error (GRUB_ERR_BAD_ARGUMENT, "Section %d is inside image headers", i); -@@ -609,13 +689,24 @@ handle_image (void *data, grub_efi_uint32_t datasize) +@@ -605,13 +685,24 @@ handle_image (void *data, grub_efi_uint32_t datasize) } if (section->raw_data_size > 0) @@ -240,7 +240,7 @@ index aee8e6bec..4b77a7d5a 100644 } /* 5 == EFI_IMAGE_DIRECTORY_ENTRY_BASERELOC */ -@@ -638,12 +729,15 @@ handle_image (void *data, grub_efi_uint32_t datasize) +@@ -634,12 +725,15 @@ handle_image (void *data, grub_efi_uint32_t datasize) } } @@ -261,7 +261,7 @@ index aee8e6bec..4b77a7d5a 100644 goto error_exit; } -@@ -661,26 +755,24 @@ handle_image (void *data, grub_efi_uint32_t datasize) +@@ -657,26 +751,25 @@ handle_image (void *data, grub_efi_uint32_t datasize) li->load_options_size = cmdline_len; li->file_path = grub_efi_get_media_file_path (file_path); li->device_handle = dev_handle; @@ -281,16 +281,17 @@ index aee8e6bec..4b77a7d5a 100644 efi_status = efi_call_2 (entry_point, grub_efi_image_handle, grub_efi_system_table); -+ grub_dprintf ("chain", "entry_point returned %ld\n", efi_status); ++ grub_dprintf ("chain", "entry_point returned 0x%"PRIxGRUB_EFI_STATUS"\n", ++ efi_status); grub_memcpy (li, &li_bak, sizeof (grub_efi_loaded_image_t)); - efi_status = efi_call_1 (b->free_pool, buffer); + efi_status = grub_efi_free_pool (buffer); return 1; error_exit: + grub_dprintf ("chain", "error_exit: grub_errno: %d\n", grub_errno); if (buffer) - efi_call_1 (b->free_pool, buffer); + grub_efi_free_pool (buffer); diff --git a/include/grub/efi/pe32.h b/include/grub/efi/pe32.h index 6e24dae2c..c03cc599f 100644 @@ -349,5 +350,5 @@ index 6e24dae2c..c03cc599f 100644 struct grub_pe32_header -- -2.13.5 +2.14.3 diff --git a/0188-don-t-ignore-const.patch b/0188-don-t-ignore-const.patch deleted file mode 100644 index 60c67e1..0000000 --- a/0188-don-t-ignore-const.patch +++ /dev/null @@ -1,25 +0,0 @@ -From a87adc91140a81b55728d0519bb14ace5ed7d3e3 Mon Sep 17 00:00:00 2001 -From: Peter Jones -Date: Mon, 26 Jun 2017 12:43:22 -0400 -Subject: [PATCH 188/194] don't ignore const - ---- - grub-core/net/tftp.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/grub-core/net/tftp.c b/grub-core/net/tftp.c -index dcd824943..f90071353 100644 ---- a/grub-core/net/tftp.c -+++ b/grub-core/net/tftp.c -@@ -307,7 +307,7 @@ static void - grub_normalize_filename (char *normalized, const char *filename) - { - char *dest = normalized; -- char *src = filename; -+ const char *src = filename; - - while (*src != '\0') - { --- -2.13.5 - diff --git a/0161-Rework-even-more-of-efi-chainload-so-non-sb-cases-wo.patch b/0189-Rework-even-more-of-efi-chainload-so-non-sb-cases-wo.patch similarity index 93% rename from 0161-Rework-even-more-of-efi-chainload-so-non-sb-cases-wo.patch rename to 0189-Rework-even-more-of-efi-chainload-so-non-sb-cases-wo.patch index c39a248..15554f5 100644 --- a/0161-Rework-even-more-of-efi-chainload-so-non-sb-cases-wo.patch +++ b/0189-Rework-even-more-of-efi-chainload-so-non-sb-cases-wo.patch @@ -1,7 +1,7 @@ -From 654a7f0c5b1f89d8b77524faf5cda08b56d493c8 Mon Sep 17 00:00:00 2001 +From f3dd564e7ed295f6ac166c429b322386558696c5 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Fri, 10 Jun 2016 14:06:15 -0400 -Subject: [PATCH 161/194] Rework even more of efi chainload so non-sb cases +Subject: [PATCH 189/225] Rework even more of efi chainload so non-sb cases work right. This ensures that if shim protocol is not loaded, or is loaded but shim @@ -80,10 +80,10 @@ index a41b6c5b8..d74778b0c 100644 if (*secure_boot && !*setup_mode) ret = 1; diff --git a/grub-core/loader/arm64/linux.c b/grub-core/loader/arm64/linux.c -index 33345d375..ad39a3015 100644 +index 03ff83563..34f34e65a 100644 --- a/grub-core/loader/arm64/linux.c +++ b/grub-core/loader/arm64/linux.c -@@ -247,6 +247,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)), +@@ -248,6 +248,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)), grub_file_t file = 0; struct grub_arm64_linux_kernel_header lh; struct grub_arm64_linux_pe_header *pe; @@ -91,7 +91,7 @@ index 33345d375..ad39a3015 100644 grub_dl_ref (my_mod); -@@ -291,7 +292,8 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)), +@@ -292,7 +293,8 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)), grub_dprintf ("linux", "kernel @ %p\n", kernel_addr); @@ -102,7 +102,7 @@ index 33345d375..ad39a3015 100644 grub_error (GRUB_ERR_INVALID_COMMAND, N_("%s has invalid signature"), argv[0]); goto fail; diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c -index 4b77a7d5a..b977c7b55 100644 +index ecdaff003..c9be56ef1 100644 --- a/grub-core/loader/efi/chainloader.c +++ b/grub-core/loader/efi/chainloader.c @@ -182,7 +182,6 @@ make_file_path (grub_efi_device_path_t *dp, const char *filename) @@ -143,14 +143,12 @@ index 4b77a7d5a..b977c7b55 100644 if (adjust == 0) return GRUB_EFI_SUCCESS; -@@ -514,17 +512,24 @@ handle_image (void *data, grub_efi_uint32_t datasize) +@@ -513,15 +511,22 @@ handle_image (void *data, grub_efi_uint32_t datasize) grub_uint32_t section_alignment; grub_uint32_t buffer_size; int found_entry_point = 0; + int rc; - b = grub_efi_system_table->boot_services; - - if (read_header (data, datasize, &context)) + rc = read_header (data, datasize, &context); + if (rc < 0) @@ -172,7 +170,7 @@ index 4b77a7d5a..b977c7b55 100644 } /* -@@ -547,7 +552,7 @@ handle_image (void *data, grub_efi_uint32_t datasize) +@@ -544,7 +549,7 @@ handle_image (void *data, grub_efi_uint32_t datasize) section_alignment = 4096; buffer_size = context.image_size + section_alignment; @@ -180,8 +178,8 @@ index 4b77a7d5a..b977c7b55 100644 + grub_dprintf ("chain", "image size is %08"PRIxGRUB_UINT64_T", datasize is %08x\n", context.image_size, datasize); - efi_status = efi_call_3 (b->allocate_pool, GRUB_EFI_LOADER_DATA, -@@ -580,7 +585,7 @@ handle_image (void *data, grub_efi_uint32_t datasize) + efi_status = grub_efi_allocate_pool (GRUB_EFI_LOADER_DATA, +@@ -576,7 +581,7 @@ handle_image (void *data, grub_efi_uint32_t datasize) char *reloc_base, *reloc_base_end; grub_dprintf ("chain", "reloc_dir: %p reloc_size: 0x%08x\n", @@ -190,10 +188,11 @@ index 4b77a7d5a..b977c7b55 100644 context.reloc_dir->size); reloc_base = image_address (buffer_aligned, context.image_size, context.reloc_dir->rva); -@@ -797,9 +802,55 @@ grub_secureboot_chainloader_unload (void) +@@ -790,10 +795,56 @@ grub_secureboot_chainloader_unload (void) + return GRUB_ERR_NONE; } - static grub_err_t ++static grub_err_t +grub_load_and_start_image(void *boot_image) +{ + grub_efi_boot_services_t *b; @@ -233,7 +232,7 @@ index 4b77a7d5a..b977c7b55 100644 + return 0; +} + -+static grub_err_t + static grub_err_t grub_secureboot_chainloader_boot (void) { - handle_image ((void *)address, fsize); @@ -247,7 +246,7 @@ index 4b77a7d5a..b977c7b55 100644 grub_loader_unset (); return grub_errno; } -@@ -813,9 +864,9 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)), +@@ -807,9 +858,9 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)), grub_efi_boot_services_t *b; grub_device_t dev = 0; grub_efi_device_path_t *dp = 0; @@ -258,7 +257,7 @@ index 4b77a7d5a..b977c7b55 100644 if (argc == 0) return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected")); -@@ -902,9 +953,6 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)), +@@ -896,9 +947,6 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)), if (! file_path) goto fail; @@ -268,7 +267,7 @@ index 4b77a7d5a..b977c7b55 100644 fsize = grub_file_size (file); if (!fsize) { -@@ -979,51 +1027,27 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)), +@@ -973,51 +1021,27 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)), } #endif @@ -409,5 +408,5 @@ index d9ede3677..0033d9305 100644 grub_err_t EXPORT_FUNC(grub_efi_linux_boot) (void *kernel_address, grub_off_t offset, -- -2.13.5 +2.14.3 diff --git a/0189-don-t-use-int-for-efi-status.patch b/0189-don-t-use-int-for-efi-status.patch deleted file mode 100644 index 5cd9d75..0000000 --- a/0189-don-t-use-int-for-efi-status.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 5f6a3933dfc6e3fff9aef089eea365f40e3c830c Mon Sep 17 00:00:00 2001 -From: Peter Jones -Date: Mon, 26 Jun 2017 12:44:59 -0400 -Subject: [PATCH 189/194] don't use int for efi status - ---- - grub-core/kern/efi/efi.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c -index 1f3ac5e1d..2b60a6e27 100644 ---- a/grub-core/kern/efi/efi.c -+++ b/grub-core/kern/efi/efi.c -@@ -157,7 +157,7 @@ grub_efi_get_loaded_image (grub_efi_handle_t image_handle) - void - grub_exit (int retval) - { -- int rc = GRUB_EFI_LOAD_ERROR; -+ grub_efi_status_t rc = GRUB_EFI_LOAD_ERROR; - - if (retval == 0) - rc = GRUB_EFI_SUCCESS; --- -2.13.5 - diff --git a/0162-linuxefi-fix-double-free-on-verification-failure.patch b/0190-linuxefi-fix-double-free-on-verification-failure.patch similarity index 82% rename from 0162-linuxefi-fix-double-free-on-verification-failure.patch rename to 0190-linuxefi-fix-double-free-on-verification-failure.patch index 41b7912..dd9fad0 100644 --- a/0162-linuxefi-fix-double-free-on-verification-failure.patch +++ b/0190-linuxefi-fix-double-free-on-verification-failure.patch @@ -1,7 +1,7 @@ -From 45e38084c55932c6039dfa1cb464ea12fd03488f Mon Sep 17 00:00:00 2001 +From fab42c280bf34e7d151f22ca4907306f8b7a14ff Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Tue, 14 Jun 2016 09:50:25 -0400 -Subject: [PATCH 162/194] linuxefi: fix double free on verification failure. +Subject: [PATCH 190/225] linuxefi: fix double free on verification failure. Signed-off-by: Peter Jones --- @@ -21,5 +21,5 @@ index 82f75b7f3..010bf982d 100644 } -- -2.13.5 +2.14.3 diff --git a/0163-fix-machine-type-test-in-30_os-prober.in.patch b/0191-fix-machine-type-test-in-30_os-prober.in.patch similarity index 80% rename from 0163-fix-machine-type-test-in-30_os-prober.in.patch rename to 0191-fix-machine-type-test-in-30_os-prober.in.patch index 0fc8d92..f0c2248 100644 --- a/0163-fix-machine-type-test-in-30_os-prober.in.patch +++ b/0191-fix-machine-type-test-in-30_os-prober.in.patch @@ -1,7 +1,7 @@ -From 939ff26ad26a6d3d17eb4d02a6c4cd263a3b107f Mon Sep 17 00:00:00 2001 +From 352287abf82dad26996dd0cd9a201050b4e3cc75 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Mon, 11 Jul 2016 13:36:45 -0400 -Subject: [PATCH 163/194] fix machine type test in 30_os-prober.in +Subject: [PATCH 191/225] fix machine type test in 30_os-prober.in Signed-off-by: Peter Jones --- @@ -21,5 +21,5 @@ index dc98eace9..e40274fc0 100644 i?86|x86_64) sixteenbit="16" -- -2.13.5 +2.14.3 diff --git a/0192-editenv-handle-relative-symlinks.patch b/0192-editenv-handle-relative-symlinks.patch deleted file mode 100644 index 4c72fe7..0000000 --- a/0192-editenv-handle-relative-symlinks.patch +++ /dev/null @@ -1,53 +0,0 @@ -From ed676cb54536f5ed2948babe61afff197de5083f Mon Sep 17 00:00:00 2001 -From: Jonathan Lebon -Date: Mon, 14 Aug 2017 14:37:20 -0400 -Subject: [PATCH 192/194] editenv: handle relative symlinks - -Handle symlinks with targets relative to the containing dir. This -ensures that the rename operation does not depend on the cwd. - -Resolves: rhbz#1479960 - -Signed-off-by: Jonathan Lebon ---- - util/editenv.c | 16 ++++++++++++++-- - 1 file changed, 14 insertions(+), 2 deletions(-) - -diff --git a/util/editenv.c b/util/editenv.c -index d8d1dad6a..41bc7cb1c 100644 ---- a/util/editenv.c -+++ b/util/editenv.c -@@ -28,6 +28,7 @@ - - #include - #include -+#include - - #define DEFAULT_ENVBLK_SIZE 1024 - -@@ -87,9 +88,20 @@ grub_util_create_envblk_file (const char *name) - continue; - } - -- free (rename_target); - linkbuf[retsize] = '\0'; -- rename_target = linkbuf; -+ if (linkbuf[0] == '/') -+ { -+ free (rename_target); -+ rename_target = linkbuf; -+ } -+ else -+ { -+ char *dbuf = xstrdup (rename_target); -+ const char *dir = dirname (dbuf); -+ free (rename_target); -+ rename_target = xasprintf("%s/%s", dir, linkbuf); -+ free (dbuf); -+ } - } - - int rc = grub_util_rename (namenew, rename_target); --- -2.13.5 - diff --git a/0164-efi-chainloader-fix-wrong-sanity-check-in-relocate_c.patch b/0192-efi-chainloader-fix-wrong-sanity-check-in-relocate_c.patch similarity index 88% rename from 0164-efi-chainloader-fix-wrong-sanity-check-in-relocate_c.patch rename to 0192-efi-chainloader-fix-wrong-sanity-check-in-relocate_c.patch index 3fb9e4d..6bdc050 100644 --- a/0164-efi-chainloader-fix-wrong-sanity-check-in-relocate_c.patch +++ b/0192-efi-chainloader-fix-wrong-sanity-check-in-relocate_c.patch @@ -1,7 +1,7 @@ -From 64b1750a0d12280b7ac2612858680a99a673e24b Mon Sep 17 00:00:00 2001 +From d5057e204cdbe73e42843719e65a7486eaa10fd7 Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Mon, 21 Nov 2016 15:34:00 +0100 -Subject: [PATCH 164/194] efi/chainloader: fix wrong sanity check in +Subject: [PATCH 192/225] efi/chainloader: fix wrong sanity check in relocate_coff() In relocate_coff(), the relocation entries are parsed from the original @@ -22,7 +22,7 @@ Tested-by: Juan Orti 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c -index b977c7b55..d5ab21d09 100644 +index c9be56ef1..3cf8a7717 100644 --- a/grub-core/loader/efi/chainloader.c +++ b/grub-core/loader/efi/chainloader.c @@ -401,7 +401,7 @@ relocate_coff (pe_coff_loader_image_context_t *context, @@ -35,5 +35,5 @@ index b977c7b55..d5ab21d09 100644 grub_error (GRUB_ERR_BAD_ARGUMENT, "Reloc entry %d overflows binary", n); -- -2.13.5 +2.14.3 diff --git a/0165-efi-chainloader-truncate-overlong-relocation-section.patch b/0193-efi-chainloader-truncate-overlong-relocation-section.patch similarity index 93% rename from 0165-efi-chainloader-truncate-overlong-relocation-section.patch rename to 0193-efi-chainloader-truncate-overlong-relocation-section.patch index d019393..be716d1 100644 --- a/0165-efi-chainloader-truncate-overlong-relocation-section.patch +++ b/0193-efi-chainloader-truncate-overlong-relocation-section.patch @@ -1,7 +1,7 @@ -From c073cea489549ce6b2398a14c407ff83f0a2962c Mon Sep 17 00:00:00 2001 +From e4552e70537ca385d8ae1a9a9fd940c11e23f4fd Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Wed, 23 Nov 2016 06:27:09 +0100 -Subject: [PATCH 165/194] efi/chainloader: truncate overlong relocation section +Subject: [PATCH 193/225] efi/chainloader: truncate overlong relocation section The UEFI Windows 7 boot loader ("EFI/Microsoft/Boot/bootmgfw.efi", SHA1 31b410e029bba87d2068c65a80b88882f9f8ea25) has inconsistent headers. @@ -63,10 +63,10 @@ Signed-off-by: Laszlo Ersek 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c -index d5ab21d09..7826e794a 100644 +index 3cf8a7717..a9f80e59c 100644 --- a/grub-core/loader/efi/chainloader.c +++ b/grub-core/loader/efi/chainloader.c -@@ -596,7 +596,7 @@ handle_image (void *data, grub_efi_uint32_t datasize) +@@ -592,7 +592,7 @@ handle_image (void *data, grub_efi_uint32_t datasize) grub_dprintf ("chain", "reloc_base: %p reloc_base_end: %p\n", reloc_base, reloc_base_end); @@ -75,7 +75,7 @@ index d5ab21d09..7826e794a 100644 section = context.first_section; for (i = 0; i < context.number_of_sections; i++, section++) -@@ -645,12 +645,28 @@ handle_image (void *data, grub_efi_uint32_t datasize) +@@ -641,12 +641,28 @@ handle_image (void *data, grub_efi_uint32_t datasize) * made sense, and the VA and size match RelocDir's * versions, then we believe in this section table. */ if (section->raw_data_size && section->virtual_size && @@ -109,5 +109,5 @@ index d5ab21d09..7826e794a 100644 grub_dprintf ("chain", " section is not reloc section?\n"); grub_dprintf ("chain", " rds: 0x%08x, vs: %08x\n", -- -2.13.5 +2.14.3 diff --git a/0194-Don-t-guess-boot-efi-as-HFS-on-ppc-machines-in-grub-.patch b/0194-Don-t-guess-boot-efi-as-HFS-on-ppc-machines-in-grub-.patch deleted file mode 100644 index 843ecb5..0000000 --- a/0194-Don-t-guess-boot-efi-as-HFS-on-ppc-machines-in-grub-.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 5ca7869ea68cc03697596c106949f5636daef8d8 Mon Sep 17 00:00:00 2001 -From: Peter Jones -Date: Thu, 20 Apr 2017 13:29:06 -0400 -Subject: [PATCH 194/194] Don't guess /boot/efi/ as HFS+ on ppc machines in - grub-install - -This should never be trying this, and since we've consolidated the -grubenv to always be on /boot/efi/EFI/fedora/, this code causes it to -always make the wrong decision. - -Resolves: rhbz#1484474 - -Signed-off-by: Peter Jones ---- - util/grub-install.c | 12 +----------- - 1 file changed, 1 insertion(+), 11 deletions(-) - -diff --git a/util/grub-install.c b/util/grub-install.c -index cd84a72b9..48f2abc3e 100644 ---- a/util/grub-install.c -+++ b/util/grub-install.c -@@ -1159,18 +1159,8 @@ main (int argc, char *argv[]) - char *d; - - is_guess = 1; -- d = grub_util_path_concat (2, bootdir, "macppc"); -- if (!grub_util_is_directory (d)) -- { -- free (d); -- d = grub_util_path_concat (2, bootdir, "efi"); -- } - /* Find the Mac HFS(+) System Partition. */ -- if (!grub_util_is_directory (d)) -- { -- free (d); -- d = grub_util_path_concat (2, bootdir, "EFI"); -- } -+ d = grub_util_path_concat (2, bootdir, "macppc"); - if (!grub_util_is_directory (d)) - { - free (d); --- -2.13.5 - diff --git a/0166-linuxefi-minor-cleanups.patch b/0194-linuxefi-minor-cleanups.patch similarity index 96% rename from 0166-linuxefi-minor-cleanups.patch rename to 0194-linuxefi-minor-cleanups.patch index 954754e..a68439a 100644 --- a/0166-linuxefi-minor-cleanups.patch +++ b/0194-linuxefi-minor-cleanups.patch @@ -1,7 +1,7 @@ -From 93df822a82a37726833b977c4409141e1d8af3c9 Mon Sep 17 00:00:00 2001 +From f5a82dff64b319104ad255d8f6e50edd39f9fb1f Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Tue, 14 Feb 2017 16:31:52 -0500 -Subject: [PATCH 166/194] linuxefi: minor cleanups +Subject: [PATCH 194/225] linuxefi: minor cleanups Signed-off-by: Peter Jones --- @@ -85,5 +85,5 @@ index 010bf982d..8b5a817b9 100644 return grub_errno; } -- -2.13.5 +2.14.3 diff --git a/0167-Handle-multi-arch-64-on-32-boot-in-linuxefi-loader.patch b/0195-Handle-multi-arch-64-on-32-boot-in-linuxefi-loader.patch similarity index 98% rename from 0167-Handle-multi-arch-64-on-32-boot-in-linuxefi-loader.patch rename to 0195-Handle-multi-arch-64-on-32-boot-in-linuxefi-loader.patch index 32d4cfa..5a52e84 100644 --- a/0167-Handle-multi-arch-64-on-32-boot-in-linuxefi-loader.patch +++ b/0195-Handle-multi-arch-64-on-32-boot-in-linuxefi-loader.patch @@ -1,7 +1,7 @@ -From c78c850158eedb26c82b4dabccb8a4b1f7daf458 Mon Sep 17 00:00:00 2001 +From eae4731ca186923fe69682029519993f381e34b6 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Tue, 14 Feb 2017 16:18:54 -0500 -Subject: [PATCH 167/194] Handle multi-arch (64-on-32) boot in linuxefi loader. +Subject: [PATCH 195/225] Handle multi-arch (64-on-32) boot in linuxefi loader. Allow booting 64-bit kernels on 32-bit EFI on x86. @@ -274,5 +274,5 @@ index fc36bdaf3..110ecf806 100644 grub_uint32_t hardware_subarch; grub_uint64_t hardware_subarch_data; -- -2.13.5 +2.14.3 diff --git a/0168-Fix-up-linux-params-usage.patch b/0196-Fix-up-linux-params-usage.patch similarity index 91% rename from 0168-Fix-up-linux-params-usage.patch rename to 0196-Fix-up-linux-params-usage.patch index 8bb6ac5..3103f79 100644 --- a/0168-Fix-up-linux-params-usage.patch +++ b/0196-Fix-up-linux-params-usage.patch @@ -1,7 +1,7 @@ -From 54fec7b1d6e7240e3ab5740abe7b14ebc6cad047 Mon Sep 17 00:00:00 2001 +From d19575aed6376097073e5042899f074c89bad115 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Tue, 30 May 2017 14:16:07 -0400 -Subject: [PATCH 168/194] Fix up linux params usage... +Subject: [PATCH 196/225] Fix up linux params usage... Signed-off-by: Peter Jones --- @@ -39,5 +39,5 @@ index e4b8342f5..c9e89310b 100644 linux_params.type_of_loader = GRUB_LINUX_BOOT_LOADER_TYPE; -- -2.13.5 +2.14.3 diff --git a/0196-Use-grub-file-to-figure-out-whether-multiboot2-shoul.patch b/0196-Use-grub-file-to-figure-out-whether-multiboot2-shoul.patch deleted file mode 100644 index 4716cb9..0000000 --- a/0196-Use-grub-file-to-figure-out-whether-multiboot2-shoul.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 51950b35f078393fd60e0940d1764876da0def7f Mon Sep 17 00:00:00 2001 -From: Konrad Rzeszutek Wilk -Date: Mon, 28 Aug 2017 13:59:12 -0400 -Subject: [PATCH 196/197] 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 ---- - util/grub.d/20_linux_xen.in | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in -index 9b1bd7169..fae1ffe94 100644 ---- a/util/grub.d/20_linux_xen.in -+++ b/util/grub.d/20_linux_xen.in -@@ -216,6 +216,10 @@ while [ "x${xen_list}" != "x" ] ; do - else - xen_loader="multiboot" - module_loader="module" -+ if ($grub_file --is-x86-multiboot2 $current_xen); then -+ xen_loader="multiboot2" -+ module_loader="module2" -+ fi - fi - while [ "x$list" != "x" ] ; do - linux=`version_find_latest $list` --- -2.14.2 - diff --git a/0170-arm64-make-sure-fdt-has-address-cells-and-size-cells.patch b/0197-arm64-make-sure-fdt-has-address-cells-and-size-cells.patch similarity index 88% rename from 0170-arm64-make-sure-fdt-has-address-cells-and-size-cells.patch rename to 0197-arm64-make-sure-fdt-has-address-cells-and-size-cells.patch index 8a92587..d866963 100644 --- a/0170-arm64-make-sure-fdt-has-address-cells-and-size-cells.patch +++ b/0197-arm64-make-sure-fdt-has-address-cells-and-size-cells.patch @@ -1,7 +1,7 @@ -From b9e2b2aa41a486c550c5bb9849f4e7587d1493e4 Mon Sep 17 00:00:00 2001 +From 49171066b01b90a86297758715a76bcfc51fa4e5 Mon Sep 17 00:00:00 2001 From: Mark Salter Date: Mon, 17 Apr 2017 08:44:29 -0400 -Subject: [PATCH 170/194] arm64: make sure fdt has #address-cells and +Subject: [PATCH 197/225] arm64: make sure fdt has #address-cells and #size-cells properties Recent upstream changes to kexec-tools relies on #address-cells @@ -14,7 +14,7 @@ make sure they exist. 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/grub-core/loader/arm64/linux.c b/grub-core/loader/arm64/linux.c -index ad39a3015..59ff9cc05 100644 +index 34f34e65a..530c4ba2d 100644 --- a/grub-core/loader/arm64/linux.c +++ b/grub-core/loader/arm64/linux.c @@ -79,7 +79,21 @@ finalize_params_linux (void) @@ -41,5 +41,5 @@ index ad39a3015..59ff9cc05 100644 if (node < 1) goto failure; -- -2.13.5 +2.14.3 diff --git a/0171-Add-some-grub_dprintf-in-the-secure-boot-verify-code.patch b/0198-Add-some-grub_dprintf-in-the-secure-boot-verify-code.patch similarity index 90% rename from 0171-Add-some-grub_dprintf-in-the-secure-boot-verify-code.patch rename to 0198-Add-some-grub_dprintf-in-the-secure-boot-verify-code.patch index 2892907..5c7f639 100644 --- a/0171-Add-some-grub_dprintf-in-the-secure-boot-verify-code.patch +++ b/0198-Add-some-grub_dprintf-in-the-secure-boot-verify-code.patch @@ -1,7 +1,7 @@ -From 56b10ac84eb7f4e260ec6f6efecc35e9fabc6b95 Mon Sep 17 00:00:00 2001 +From 0645ca1fc027741ae0d258a810a2a340b22785fc Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Mon, 9 May 2016 14:15:17 -0400 -Subject: [PATCH 171/194] Add some grub_dprintf() in the secure boot verify +Subject: [PATCH 198/225] Add some grub_dprintf() in the secure boot verify code. Signed-off-by: Peter Jones @@ -40,5 +40,5 @@ index 2a7024134..7fe7201a3 100644 return -1; } -- -2.13.5 +2.14.3 diff --git a/0172-Make-our-info-pages-say-grub2-where-appropriate.patch b/0199-Make-our-info-pages-say-grub2-where-appropriate.patch similarity index 99% rename from 0172-Make-our-info-pages-say-grub2-where-appropriate.patch rename to 0199-Make-our-info-pages-say-grub2-where-appropriate.patch index dff116b..62afee7 100644 --- a/0172-Make-our-info-pages-say-grub2-where-appropriate.patch +++ b/0199-Make-our-info-pages-say-grub2-where-appropriate.patch @@ -1,7 +1,7 @@ -From 497e06f02e9576c9cbfd560e8fb25567aaff6e4e Mon Sep 17 00:00:00 2001 +From 76e4d59930d5f123be9bc9f58c883103b357d9a7 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Fri, 6 May 2016 18:43:08 -0400 -Subject: [PATCH 172/194] Make our info pages say "grub2" where appropriate. +Subject: [PATCH 199/225] Make our info pages say "grub2" where appropriate. This needs to be hooked up to --program-transform=, but I haven't had time. @@ -35,7 +35,7 @@ index a9f4de631..3ce827ab7 100644 @setchapternewpage odd diff --git a/docs/grub.texi b/docs/grub.texi -index 15a90b26e..f28c4cd52 100644 +index 121a1c1e8..983dddafe 100644 --- a/docs/grub.texi +++ b/docs/grub.texi @@ -1,7 +1,7 @@ @@ -1012,5 +1012,5 @@ index 15a90b26e..f28c4cd52 100644 @table @option @item --help -- -2.13.5 +2.14.3 diff --git a/0174-macos-just-build-chainloader-entries-don-t-try-any-x.patch b/0200-macos-just-build-chainloader-entries-don-t-try-any-x.patch similarity index 97% rename from 0174-macos-just-build-chainloader-entries-don-t-try-any-x.patch rename to 0200-macos-just-build-chainloader-entries-don-t-try-any-x.patch index f5fde3d..9606bb7 100644 --- a/0174-macos-just-build-chainloader-entries-don-t-try-any-x.patch +++ b/0200-macos-just-build-chainloader-entries-don-t-try-any-x.patch @@ -1,7 +1,7 @@ -From ebfc7bb290eb5be7919107d93ee6d03f3030d599 Mon Sep 17 00:00:00 2001 +From b0800d1291e5fd50d1c9e628c081d0d8077626fb Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Wed, 24 May 2017 12:42:32 -0400 -Subject: [PATCH 174/194] macos: just build chainloader entries, don't try any +Subject: [PATCH 200/225] macos: just build chainloader entries, don't try any xnu xnu. Since our bugs tell us that the xnu boot entries really just don't work @@ -124,5 +124,5 @@ index e40274fc0..d979de198 100644 hurd) onstr="$(gettext_printf "(on %s)" "${DEVICE}")" -- -2.13.5 +2.14.3 diff --git a/0175-grub2-btrfs-Add-ability-to-boot-from-subvolumes.patch b/0201-grub2-btrfs-Add-ability-to-boot-from-subvolumes.patch similarity index 98% rename from 0175-grub2-btrfs-Add-ability-to-boot-from-subvolumes.patch rename to 0201-grub2-btrfs-Add-ability-to-boot-from-subvolumes.patch index 404cec8..eef80fc 100644 --- a/0175-grub2-btrfs-Add-ability-to-boot-from-subvolumes.patch +++ b/0201-grub2-btrfs-Add-ability-to-boot-from-subvolumes.patch @@ -1,7 +1,7 @@ -From 6dc076ff0e9487566885473b9b65f56ef3e02a1b Mon Sep 17 00:00:00 2001 +From 0f3248dffbcccb2699753b960cd1b76864423dde Mon Sep 17 00:00:00 2001 From: Jeff Mahoney Date: Wed, 18 Dec 2013 09:57:04 +0000 -Subject: [PATCH 175/194] grub2/btrfs: Add ability to boot from subvolumes +Subject: [PATCH 201/225] grub2/btrfs: Add ability to boot from subvolumes This patch adds the ability to specify a different root on a btrfs filesystem too boot from other than the default one. @@ -166,10 +166,11 @@ index 4849c1ceb..38facf3cb 100644 return data; } -@@ -1233,6 +1318,91 @@ get_root (struct grub_btrfs_data *data, struct grub_btrfs_key *key, +@@ -1232,6 +1317,91 @@ get_root (struct grub_btrfs_data *data, struct grub_btrfs_key *key, + return GRUB_ERR_NONE; } - static grub_err_t ++static grub_err_t +find_pathname(struct grub_btrfs_data *data, grub_uint64_t objectid, + grub_uint64_t fs_root, const char *name, char **pathname) +{ @@ -254,10 +255,9 @@ index 4849c1ceb..38facf3cb 100644 + return 0; +} + -+static grub_err_t + static grub_err_t find_path (struct grub_btrfs_data *data, const char *path, struct grub_btrfs_key *key, - grub_uint64_t *tree, grub_uint8_t *type) @@ -1250,14 +1420,26 @@ find_path (struct grub_btrfs_data *data, char *origpath = NULL; unsigned symlinks_max = 32; @@ -697,5 +697,5 @@ index 9d93fb6c1..234ad9767 100644 }; -- -2.13.5 +2.14.3 diff --git a/0176-export-btrfs_subvol-and-btrfs_subvolid.patch b/0202-export-btrfs_subvol-and-btrfs_subvolid.patch similarity index 85% rename from 0176-export-btrfs_subvol-and-btrfs_subvolid.patch rename to 0202-export-btrfs_subvol-and-btrfs_subvolid.patch index c7a481e..def8b31 100644 --- a/0176-export-btrfs_subvol-and-btrfs_subvolid.patch +++ b/0202-export-btrfs_subvol-and-btrfs_subvolid.patch @@ -1,7 +1,7 @@ -From 28b70d9386749173ecfd3b153e6a8be36238405f Mon Sep 17 00:00:00 2001 +From 7f0aded5f86297087c3b90a3bed75e3b7737cfd2 Mon Sep 17 00:00:00 2001 From: Michael Chang Date: Wed, 18 Dec 2013 09:57:04 +0000 -Subject: [PATCH 176/194] export btrfs_subvol and btrfs_subvolid +Subject: [PATCH 202/225] export btrfs_subvol and btrfs_subvolid We should export btrfs_subvol and btrfs_subvolid to have both visible to subsidiary configuration files loaded using configfile. @@ -25,5 +25,5 @@ index 38facf3cb..396296166 100644 GRUB_MOD_FINI (btrfs) -- -2.13.5 +2.14.3 diff --git a/0177-grub2-btrfs-03-follow_default.patch b/0203-grub2-btrfs-03-follow_default.patch similarity index 97% rename from 0177-grub2-btrfs-03-follow_default.patch rename to 0203-grub2-btrfs-03-follow_default.patch index 5676ffc..e63923d 100644 --- a/0177-grub2-btrfs-03-follow_default.patch +++ b/0203-grub2-btrfs-03-follow_default.patch @@ -1,7 +1,7 @@ -From 33d2bbf28d14971e531276fce042dadd4239de4e Mon Sep 17 00:00:00 2001 +From 051b930f416195870fafd0d0733db8d39d746828 Mon Sep 17 00:00:00 2001 From: Michael Chang Date: Thu, 21 Aug 2014 03:39:11 +0000 -Subject: [PATCH 177/194] grub2-btrfs-03-follow_default +Subject: [PATCH 203/225] grub2-btrfs-03-follow_default --- grub-core/fs/btrfs.c | 107 ++++++++++++++++++++++++++++++++++++--------------- @@ -195,5 +195,5 @@ index 396296166..2c462584e 100644 GRUB_MOD_FINI (btrfs) -- -2.13.5 +2.14.3 diff --git a/0178-grub2-btrfs-04-grub2-install.patch b/0204-grub2-btrfs-04-grub2-install.patch similarity index 96% rename from 0178-grub2-btrfs-04-grub2-install.patch rename to 0204-grub2-btrfs-04-grub2-install.patch index 3c899fd..58bc537 100644 --- a/0178-grub2-btrfs-04-grub2-install.patch +++ b/0204-grub2-btrfs-04-grub2-install.patch @@ -1,7 +1,7 @@ -From ddf05a259df3e5c43ea0714abf227bdb82dd34a5 Mon Sep 17 00:00:00 2001 +From 0ce6b5257882f36b9d041b1ba778d1e28ea0493e Mon Sep 17 00:00:00 2001 From: Michael Chang Date: Thu, 21 Aug 2014 03:39:11 +0000 -Subject: [PATCH 178/194] grub2-btrfs-04-grub2-install +Subject: [PATCH 204/225] grub2-btrfs-04-grub2-install --- grub-core/osdep/linux/getroot.c | 7 +++++++ @@ -106,7 +106,7 @@ index ebcdd8f5e..f044a880a 100644 sizeof ("GRUB_DISTRIBUTOR=") - 1) == 0) { diff --git a/util/grub-install.c b/util/grub-install.c -index 75e3e5ba6..036fe1822 100644 +index 86756c884..1625c2ad8 100644 --- a/util/grub-install.c +++ b/util/grub-install.c @@ -816,6 +816,8 @@ fill_core_services (const char *core_services) @@ -128,7 +128,7 @@ index 75e3e5ba6..036fe1822 100644 if (!bootloader_id && config.grub_distributor) { char *ptr; -@@ -1321,6 +1326,16 @@ main (int argc, char *argv[]) +@@ -1311,6 +1316,16 @@ main (int argc, char *argv[]) fprintf (load_cfg_f, "set debug='%s'\n", debug_image); } @@ -173,5 +173,5 @@ index 47a241a39..5db7a9a7d 100644 if (state->arg_num == 0) arguments->pathname = xstrdup (arg); -- -2.13.5 +2.14.3 diff --git a/0179-grub2-btrfs-05-grub2-mkconfig.patch b/0205-grub2-btrfs-05-grub2-mkconfig.patch similarity index 95% rename from 0179-grub2-btrfs-05-grub2-mkconfig.patch rename to 0205-grub2-btrfs-05-grub2-mkconfig.patch index 9a50f20..8d0a51c 100644 --- a/0179-grub2-btrfs-05-grub2-mkconfig.patch +++ b/0205-grub2-btrfs-05-grub2-mkconfig.patch @@ -1,7 +1,7 @@ -From 8cc6f3420b5a42871cfc2bc7bdfed60b34eac4a8 Mon Sep 17 00:00:00 2001 +From 830532b02e55fd0a63cd9fce6c0a775efd8bd510 Mon Sep 17 00:00:00 2001 From: Michael Chang Date: Thu, 21 Aug 2014 03:39:11 +0000 -Subject: [PATCH 179/194] grub2-btrfs-05-grub2-mkconfig +Subject: [PATCH 205/225] grub2-btrfs-05-grub2-mkconfig --- util/grub-mkconfig.in | 3 ++- @@ -26,7 +26,7 @@ index e32de5ef3..3b0bfe403 100644 if test "x${grub_cfg}" != "x"; then rm -f "${grub_cfg}.new" diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in -index 9c410eae4..2fb4f4f81 100644 +index 113a41f94..b3aae534d 100644 --- a/util/grub-mkconfig_lib.in +++ b/util/grub-mkconfig_lib.in @@ -52,7 +52,11 @@ grub_warn () @@ -107,7 +107,7 @@ index c9bf223f2..7e78ad336 100644 xzfs) rpool=`${grub_probe} --device ${GRUB_DEVICE} --target=fs_label 2>/dev/null || true` diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in -index 54f1ec8a2..462f8e1f8 100644 +index b184fc904..abe4d7ef4 100644 --- a/util/grub.d/20_linux_xen.in +++ b/util/grub.d/20_linux_xen.in @@ -63,10 +63,14 @@ fi @@ -126,5 +126,5 @@ index 54f1ec8a2..462f8e1f8 100644 xzfs) rpool=`${grub_probe} --device ${GRUB_DEVICE} --target=fs_label 2>/dev/null || true` -- -2.13.5 +2.14.3 diff --git a/0180-grub2-btrfs-06-subvol-mount.patch b/0206-grub2-btrfs-06-subvol-mount.patch similarity index 98% rename from 0180-grub2-btrfs-06-subvol-mount.patch rename to 0206-grub2-btrfs-06-subvol-mount.patch index f949871..9681ef7 100644 --- a/0180-grub2-btrfs-06-subvol-mount.patch +++ b/0206-grub2-btrfs-06-subvol-mount.patch @@ -1,7 +1,7 @@ -From 67ac693c0da060226ab012074ee33156e7ebf338 Mon Sep 17 00:00:00 2001 +From 886c9f3487530155526e0777d00ecb132fb435e7 Mon Sep 17 00:00:00 2001 From: Michael Chang Date: Fri, 22 May 2015 11:45:25 +0000 -Subject: [PATCH 180/194] grub2-btrfs-06-subvol-mount +Subject: [PATCH 206/225] grub2-btrfs-06-subvol-mount --- grub-core/fs/btrfs.c | 195 +++++++++++++++++++++++++++++++++++++++- @@ -476,10 +476,10 @@ index 73fa2d34a..9c642ae3f 100644 void grub_util_pull_devmapper (const char *os_dev); diff --git a/util/grub-install.c b/util/grub-install.c -index 036fe1822..cd84a72b9 100644 +index 1625c2ad8..3b2717173 100644 --- a/util/grub-install.c +++ b/util/grub-install.c -@@ -1534,6 +1534,55 @@ main (int argc, char *argv[]) +@@ -1525,6 +1525,55 @@ main (int argc, char *argv[]) prefix_drive = xasprintf ("(%s)", grub_drives[0]); } @@ -536,5 +536,5 @@ index 036fe1822..cd84a72b9 100644 const char *core_name = NULL; -- -2.13.5 +2.14.3 diff --git a/0181-No-more-Bootable-Snapshot-submenu-in-grub.cfg.patch b/0207-No-more-Bootable-Snapshot-submenu-in-grub.cfg.patch similarity index 86% rename from 0181-No-more-Bootable-Snapshot-submenu-in-grub.cfg.patch rename to 0207-No-more-Bootable-Snapshot-submenu-in-grub.cfg.patch index 563f815..9416ef1 100644 --- a/0181-No-more-Bootable-Snapshot-submenu-in-grub.cfg.patch +++ b/0207-No-more-Bootable-Snapshot-submenu-in-grub.cfg.patch @@ -1,7 +1,7 @@ -From 36e3d3d7c8bc32cae3e3f86d3b89e0db5e9a330c Mon Sep 17 00:00:00 2001 +From 3d4cb8b35862033a38a817f07c3b1ab75a15baf2 Mon Sep 17 00:00:00 2001 From: Dusty Mabe Date: Sat, 18 Jul 2015 15:38:08 +0000 -Subject: [PATCH 181/194] No more "Bootable Snapshot" submenu in grub.cfg. +Subject: [PATCH 207/225] No more "Bootable Snapshot" submenu in grub.cfg. This breaks grubby (run on kernel upgrades) because grubby just does a search for "menuentry". @@ -30,5 +30,5 @@ index e2a533001..8a16fea34 100644 -EOF -fi -- -2.13.5 +2.14.3 diff --git a/0182-Fallback-to-old-subvol-name-scheme-to-support-old-sn.patch b/0208-Fallback-to-old-subvol-name-scheme-to-support-old-sn.patch similarity index 87% rename from 0182-Fallback-to-old-subvol-name-scheme-to-support-old-sn.patch rename to 0208-Fallback-to-old-subvol-name-scheme-to-support-old-sn.patch index 196bdc0..38f1a8f 100644 --- a/0182-Fallback-to-old-subvol-name-scheme-to-support-old-sn.patch +++ b/0208-Fallback-to-old-subvol-name-scheme-to-support-old-sn.patch @@ -1,7 +1,7 @@ -From f26ee91138d132c84068bc6afb362eabc5d0af13 Mon Sep 17 00:00:00 2001 +From accb9257cdb40436117d07fe9acf3cb00dc010c4 Mon Sep 17 00:00:00 2001 From: Andrei Borzenkov Date: Tue, 21 Jun 2016 16:44:17 +0000 -Subject: [PATCH 182/194] Fallback to old subvol name scheme to support old +Subject: [PATCH 208/225] Fallback to old subvol name scheme to support old snapshot config Ref: bsc#953538 @@ -13,10 +13,11 @@ diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c index d111147e8..a5c000805 100644 --- a/grub-core/fs/btrfs.c +++ b/grub-core/fs/btrfs.c -@@ -925,10 +925,40 @@ lookup_root_by_name(struct grub_btrfs_data *data, const char *path) +@@ -924,11 +924,41 @@ lookup_root_by_name(struct grub_btrfs_data *data, const char *path) + return GRUB_ERR_NONE; } - static grub_err_t ++static grub_err_t +lookup_root_by_name_fallback(struct grub_btrfs_data *data, const char *path) +{ + grub_err_t err; @@ -35,7 +36,7 @@ index d111147e8..a5c000805 100644 + return GRUB_ERR_NONE; +} + -+static grub_err_t + static grub_err_t btrfs_handle_subvol(struct grub_btrfs_data *data __attribute__ ((unused))) { if (btrfs_default_subvol) @@ -56,5 +57,5 @@ index d111147e8..a5c000805 100644 if (btrfs_default_subvolid) return lookup_root_by_id(data, btrfs_default_subvolid); -- -2.13.5 +2.14.3 diff --git a/0183-Grub-not-working-correctly-with-btrfs-snapshots-bsc-.patch b/0209-Grub-not-working-correctly-with-btrfs-snapshots-bsc-.patch similarity index 98% rename from 0183-Grub-not-working-correctly-with-btrfs-snapshots-bsc-.patch rename to 0209-Grub-not-working-correctly-with-btrfs-snapshots-bsc-.patch index c4b5a57..e270798 100644 --- a/0183-Grub-not-working-correctly-with-btrfs-snapshots-bsc-.patch +++ b/0209-Grub-not-working-correctly-with-btrfs-snapshots-bsc-.patch @@ -1,7 +1,7 @@ -From 2fd2c751861ecc2350d3bcb81228b3e663778dd1 Mon Sep 17 00:00:00 2001 +From 1bb58f51e37399784016c58971073665c7214b85 Mon Sep 17 00:00:00 2001 From: Michael Chang Date: Thu, 11 May 2017 08:56:57 +0000 -Subject: [PATCH 183/194] Grub not working correctly with btrfs snapshots +Subject: [PATCH 209/225] Grub not working correctly with btrfs snapshots (bsc#1026511) --- @@ -272,5 +272,5 @@ index a5c000805..3cd947219 100644 subvol_set_env); grub_register_variable_hook ("btrfs_subvolid", subvolid_get_env, -- -2.13.5 +2.14.3 diff --git a/0191-Clean-up-some-errors-in-the-linuxefi-loader.patch b/0210-Clean-up-some-errors-in-the-linuxefi-loader.patch similarity index 94% rename from 0191-Clean-up-some-errors-in-the-linuxefi-loader.patch rename to 0210-Clean-up-some-errors-in-the-linuxefi-loader.patch index 8139d8a..9ca18b2 100644 --- a/0191-Clean-up-some-errors-in-the-linuxefi-loader.patch +++ b/0210-Clean-up-some-errors-in-the-linuxefi-loader.patch @@ -1,7 +1,7 @@ -From 813a5703360d35260eae8f3916a66f1c1087320f Mon Sep 17 00:00:00 2001 +From a098798a39f621e7a0b81a1b9fa62ab2b1a66610 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Wed, 24 May 2017 15:58:18 -0400 -Subject: [PATCH 191/194] Clean up some errors in the linuxefi loader +Subject: [PATCH 210/225] Clean up some errors in the linuxefi loader Signed-off-by: Peter Jones --- @@ -65,5 +65,5 @@ index bed5919ca..6db5d0bf3 100644 linux_cmdline, BYTES_TO_PAGES(lh->cmdline_size + 1)); -- -2.13.5 +2.14.3 diff --git a/0211-Use-xid-to-match-DHCP-replies.patch b/0211-Use-xid-to-match-DHCP-replies.patch new file mode 100644 index 0000000..b778b92 --- /dev/null +++ b/0211-Use-xid-to-match-DHCP-replies.patch @@ -0,0 +1,68 @@ +From fb00639013211509890935dcb5dbf35f94f94ffc Mon Sep 17 00:00:00 2001 +From: Andrzej Kacprowski +Date: Fri, 21 Apr 2017 09:20:38 +0200 +Subject: [PATCH 211/225] Use xid to match DHCP replies + +Transaction identifier (xid) from DHCP request +packet is stored in network level interface and used +to match request with the responses it generates. + +Resolves: rhbz#1370642 + +Signed-off-by: Andrzej Kacprowski +--- + grub-core/net/bootp.c | 3 ++- + grub-core/net/ip.c | 1 + + include/grub/net.h | 3 ++- + 3 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/grub-core/net/bootp.c b/grub-core/net/bootp.c +index da3e45446..2869482fe 100644 +--- a/grub-core/net/bootp.c ++++ b/grub-core/net/bootp.c +@@ -777,7 +777,8 @@ grub_cmd_bootp (struct grub_command *cmd __attribute__ ((unused)), + grub_errno = GRUB_ERR_NONE; + t = 0; + } +- pack->ident = grub_cpu_to_be32 (t); ++ pack->xid = grub_cpu_to_be32 (t); ++ ifaces[j].dhcp_xid = pack->xid; + pack->seconds = grub_cpu_to_be16 (t); + + grub_memcpy (&pack->mac_addr, &ifaces[j].hwaddress.mac, 6); +diff --git a/grub-core/net/ip.c b/grub-core/net/ip.c +index 7c95cc746..8411e0ecc 100644 +--- a/grub-core/net/ip.c ++++ b/grub-core/net/ip.c +@@ -275,6 +275,7 @@ handle_dgram (struct grub_net_buff *nb, + FOR_NET_NETWORK_LEVEL_INTERFACES (inf) + if (inf->card == card + && inf->address.type == GRUB_NET_NETWORK_LEVEL_PROTOCOL_DHCP_RECV ++ && inf->dhcp_xid == bootp->xid + && inf->hwaddress.type == GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET + && grub_memcmp (inf->hwaddress.mac, &bootp->mac_addr, + sizeof (inf->hwaddress.mac)) == 0) +diff --git a/include/grub/net.h b/include/grub/net.h +index f8f3ec13a..de51894cb 100644 +--- a/include/grub/net.h ++++ b/include/grub/net.h +@@ -292,6 +292,7 @@ struct grub_net_network_level_interface + struct grub_net_bootp_packet *dhcp_ack; + grub_size_t dhcp_acklen; + grub_uint16_t vlantag; ++ grub_uint32_t dhcp_xid; + void *data; + }; + +@@ -429,7 +430,7 @@ struct grub_net_bootp_packet + grub_uint8_t hw_type; /* hardware type. */ + grub_uint8_t hw_len; /* hardware addr len. */ + grub_uint8_t gate_hops; /* zero it. */ +- grub_uint32_t ident; /* random number chosen by client. */ ++ grub_uint32_t xid; /* transaction id chosen by client. */ + grub_uint16_t seconds; /* seconds since did initial bootstrap. */ + grub_uint16_t flags; + grub_uint32_t client_ip; +-- +2.14.3 + diff --git a/0212-Add-support-for-non-Ethernet-network-cards.patch b/0212-Add-support-for-non-Ethernet-network-cards.patch new file mode 100644 index 0000000..ac420fb --- /dev/null +++ b/0212-Add-support-for-non-Ethernet-network-cards.patch @@ -0,0 +1,785 @@ +From 4cdce127550bf915e1aa408c67e58bd4f256a02f Mon Sep 17 00:00:00 2001 +From: Andrzej Kacprowski +Date: Fri, 21 Apr 2017 10:06:20 +0200 +Subject: [PATCH 212/225] Add support for non-Ethernet network cards + +This patch replaces fixed 6-byte link layer address with +up to 32-byte variable sized address. +This allows supporting Infiniband and Omni-Path fabric +which use 20-byte address, but other network card types +can also take advantage of this change. +The network card driver is responsible for replacing L2 +header provided by grub2 if needed. +This approach is compatible with UEFI network stack which +also allows up to 32-byte variable size link address. + +The BOOTP/DHCP packet format is limited to 16 byte client +hardware address, if link address is more that 16-bytes +then chaddr field in BOOTP it will be set to 0 as per rfc4390. + +Resolves: rhbz#1370642 + +Signed-off-by: Andrzej Kacprowski + +Conflicts: + grub-core/net/ip.c + +This also incorporates: + +* 972b23817 - Fix grub_net_hwaddr_to_str + +commit 5c3b78c92f8 introduced support for larger network hw addresses. +However, grub_net_hwaddr_to_str() relies on GRUB_NET_MAX_STR_ADDRESS_SIZE +to prevent a spurious ':' at the end of the string. So now, if actual +hwaddr size is less than max, an extra ':' appears at the end of the +string. So calculate max string size based on actual hwaddr length to +fix the problem. + +Signed-off-by: Mark Salter +--- + grub-core/net/arp.c | 157 +++++++++++++++++++++------------ + grub-core/net/bootp.c | 14 ++- + grub-core/net/drivers/efi/efinet.c | 8 +- + grub-core/net/drivers/emu/emunet.c | 1 + + grub-core/net/drivers/i386/pc/pxe.c | 13 +-- + grub-core/net/drivers/ieee1275/ofnet.c | 2 + + grub-core/net/drivers/uboot/ubootnet.c | 1 + + grub-core/net/ethernet.c | 87 +++++++++--------- + grub-core/net/icmp6.c | 15 ++-- + grub-core/net/ip.c | 4 +- + grub-core/net/net.c | 50 ++++++----- + include/grub/net.h | 19 ++-- + 12 files changed, 217 insertions(+), 154 deletions(-) + +diff --git a/grub-core/net/arp.c b/grub-core/net/arp.c +index d1c69ed2b..c23462880 100644 +--- a/grub-core/net/arp.c ++++ b/grub-core/net/arp.c +@@ -31,22 +31,12 @@ enum + ARP_REPLY = 2 + }; + +-enum +- { +- /* IANA ARP constant to define hardware type as ethernet. */ +- GRUB_NET_ARPHRD_ETHERNET = 1 +- }; +- +-struct arppkt { ++struct arphdr { + grub_uint16_t hrd; + grub_uint16_t pro; + grub_uint8_t hln; + grub_uint8_t pln; + grub_uint16_t op; +- grub_uint8_t sender_mac[6]; +- grub_uint32_t sender_ip; +- grub_uint8_t recv_mac[6]; +- grub_uint32_t recv_ip; + } GRUB_PACKED; + + static int have_pending; +@@ -57,12 +47,16 @@ grub_net_arp_send_request (struct grub_net_network_level_interface *inf, + const grub_net_network_level_address_t *proto_addr) + { + struct grub_net_buff nb; +- struct arppkt *arp_packet; ++ struct arphdr *arp_header; + grub_net_link_level_address_t target_mac_addr; + grub_err_t err; + int i; + grub_uint8_t *nbd; + grub_uint8_t arp_data[128]; ++ grub_uint8_t hln; ++ grub_uint8_t pln; ++ grub_uint8_t arp_packet_len; ++ grub_uint8_t *tmp_ptr; + + if (proto_addr->type != GRUB_NET_NETWORK_LEVEL_PROTOCOL_IPV4) + return grub_error (GRUB_ERR_BUG, "unsupported address family"); +@@ -73,23 +67,39 @@ grub_net_arp_send_request (struct grub_net_network_level_interface *inf, + grub_netbuff_clear (&nb); + grub_netbuff_reserve (&nb, 128); + +- err = grub_netbuff_push (&nb, sizeof (*arp_packet)); ++ hln = inf->card->default_address.len; ++ pln = sizeof (proto_addr->ipv4); ++ arp_packet_len = sizeof (*arp_header) + 2 * (hln + pln); ++ ++ err = grub_netbuff_push (&nb, arp_packet_len); + if (err) + return err; + +- arp_packet = (struct arppkt *) nb.data; +- arp_packet->hrd = grub_cpu_to_be16_compile_time (GRUB_NET_ARPHRD_ETHERNET); +- arp_packet->hln = 6; +- arp_packet->pro = grub_cpu_to_be16_compile_time (GRUB_NET_ETHERTYPE_IP); +- arp_packet->pln = 4; +- arp_packet->op = grub_cpu_to_be16_compile_time (ARP_REQUEST); +- /* Sender hardware address. */ +- grub_memcpy (arp_packet->sender_mac, &inf->hwaddress.mac, 6); +- arp_packet->sender_ip = inf->address.ipv4; +- grub_memset (arp_packet->recv_mac, 0, 6); +- arp_packet->recv_ip = proto_addr->ipv4; +- /* Target protocol address */ +- grub_memset (&target_mac_addr.mac, 0xff, 6); ++ arp_header = (struct arphdr *) nb.data; ++ arp_header->hrd = grub_cpu_to_be16 (inf->card->default_address.type); ++ arp_header->hln = hln; ++ arp_header->pro = grub_cpu_to_be16_compile_time (GRUB_NET_ETHERTYPE_IP); ++ arp_header->pln = pln; ++ arp_header->op = grub_cpu_to_be16_compile_time (ARP_REQUEST); ++ tmp_ptr = nb.data + sizeof (*arp_header); ++ ++ /* The source hardware address. */ ++ grub_memcpy (tmp_ptr, inf->hwaddress.mac, hln); ++ tmp_ptr += hln; ++ ++ /* The source protocol address. */ ++ grub_memcpy (tmp_ptr, &inf->address.ipv4, pln); ++ tmp_ptr += pln; ++ ++ /* The target hardware address. */ ++ grub_memset (tmp_ptr, 0, hln); ++ tmp_ptr += hln; ++ ++ /* The target protocol address */ ++ grub_memcpy (tmp_ptr, &proto_addr->ipv4, pln); ++ tmp_ptr += pln; ++ ++ grub_memset (&target_mac_addr.mac, 0xff, hln); + + nbd = nb.data; + send_ethernet_packet (inf, &nb, target_mac_addr, GRUB_NET_ETHERTYPE_ARP); +@@ -114,28 +124,53 @@ grub_err_t + grub_net_arp_receive (struct grub_net_buff *nb, struct grub_net_card *card, + grub_uint16_t *vlantag) + { +- struct arppkt *arp_packet = (struct arppkt *) nb->data; ++ struct arphdr *arp_header = (struct arphdr *) nb->data; + grub_net_network_level_address_t sender_addr, target_addr; + grub_net_link_level_address_t sender_mac_addr; + struct grub_net_network_level_interface *inf; +- +- if (arp_packet->pro != grub_cpu_to_be16_compile_time (GRUB_NET_ETHERTYPE_IP) +- || arp_packet->pln != 4 || arp_packet->hln != 6 +- || nb->tail - nb->data < (int) sizeof (*arp_packet)) ++ grub_uint16_t hw_type; ++ grub_uint8_t hln; ++ grub_uint8_t pln; ++ grub_uint8_t arp_packet_len; ++ grub_uint8_t *tmp_ptr; ++ ++ hw_type = card->default_address.type; ++ hln = card->default_address.len; ++ pln = sizeof(sender_addr.ipv4); ++ arp_packet_len = sizeof (*arp_header) + 2 * (pln + hln); ++ ++ if (arp_header->pro != grub_cpu_to_be16_compile_time (GRUB_NET_ETHERTYPE_IP) ++ || arp_header->hrd != grub_cpu_to_be16 (hw_type) ++ || arp_header->hln != hln || arp_header->pln != pln ++ || nb->tail - nb->data < (int) arp_packet_len) { + return GRUB_ERR_NONE; ++ } + ++ tmp_ptr = nb->data + sizeof (*arp_header); ++ ++ /* The source hardware address. */ ++ sender_mac_addr.type = hw_type; ++ sender_mac_addr.len = hln; ++ grub_memcpy (sender_mac_addr.mac, tmp_ptr, hln); ++ tmp_ptr += hln; ++ ++ /* The source protocol address. */ + sender_addr.type = GRUB_NET_NETWORK_LEVEL_PROTOCOL_IPV4; +- target_addr.type = GRUB_NET_NETWORK_LEVEL_PROTOCOL_IPV4; +- sender_addr.ipv4 = arp_packet->sender_ip; +- target_addr.ipv4 = arp_packet->recv_ip; +- if (arp_packet->sender_ip == pending_req) +- have_pending = 1; ++ grub_memcpy(&sender_addr.ipv4, tmp_ptr, pln); ++ tmp_ptr += pln; + +- sender_mac_addr.type = GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET; +- grub_memcpy (sender_mac_addr.mac, arp_packet->sender_mac, +- sizeof (sender_mac_addr.mac)); + grub_net_link_layer_add_address (card, &sender_addr, &sender_mac_addr, 1); + ++ /* The target hardware address. */ ++ tmp_ptr += hln; ++ ++ /* The target protocol address. */ ++ target_addr.type = GRUB_NET_NETWORK_LEVEL_PROTOCOL_IPV4; ++ grub_memcpy(&target_addr.ipv4, tmp_ptr, pln); ++ ++ if (sender_addr.ipv4 == pending_req) ++ have_pending = 1; ++ + FOR_NET_NETWORK_LEVEL_INTERFACES (inf) + { + /* Verify vlantag id */ +@@ -148,7 +183,7 @@ grub_net_arp_receive (struct grub_net_buff *nb, struct grub_net_card *card, + + /* Am I the protocol address target? */ + if (grub_net_addr_cmp (&inf->address, &target_addr) == 0 +- && arp_packet->op == grub_cpu_to_be16_compile_time (ARP_REQUEST)) ++ && arp_header->op == grub_cpu_to_be16_compile_time (ARP_REQUEST)) + { + if ((nb->tail - nb->data) > 50) + { +@@ -158,7 +193,7 @@ grub_net_arp_receive (struct grub_net_buff *nb, struct grub_net_card *card, + } + grub_net_link_level_address_t target; + struct grub_net_buff nb_reply; +- struct arppkt *arp_reply; ++ struct arphdr *arp_reply; + grub_uint8_t arp_data[128]; + grub_err_t err; + +@@ -167,25 +202,39 @@ grub_net_arp_receive (struct grub_net_buff *nb, struct grub_net_card *card, + grub_netbuff_clear (&nb_reply); + grub_netbuff_reserve (&nb_reply, 128); + +- err = grub_netbuff_push (&nb_reply, sizeof (*arp_packet)); ++ err = grub_netbuff_push (&nb_reply, arp_packet_len); + if (err) + return err; + +- arp_reply = (struct arppkt *) nb_reply.data; ++ arp_reply = (struct arphdr *) nb_reply.data; + +- arp_reply->hrd = grub_cpu_to_be16_compile_time (GRUB_NET_ARPHRD_ETHERNET); ++ arp_reply->hrd = grub_cpu_to_be16 (hw_type); + arp_reply->pro = grub_cpu_to_be16_compile_time (GRUB_NET_ETHERTYPE_IP); +- arp_reply->pln = 4; +- arp_reply->hln = 6; ++ arp_reply->pln = pln; ++ arp_reply->hln = hln; + arp_reply->op = grub_cpu_to_be16_compile_time (ARP_REPLY); +- arp_reply->sender_ip = arp_packet->recv_ip; +- arp_reply->recv_ip = arp_packet->sender_ip; +- arp_reply->hln = 6; +- +- target.type = GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET; +- grub_memcpy (target.mac, arp_packet->sender_mac, 6); +- grub_memcpy (arp_reply->sender_mac, inf->hwaddress.mac, 6); +- grub_memcpy (arp_reply->recv_mac, arp_packet->sender_mac, 6); ++ ++ tmp_ptr = nb_reply.data + sizeof (*arp_reply); ++ ++ /* The source hardware address. */ ++ grub_memcpy (tmp_ptr, inf->hwaddress.mac, hln); ++ tmp_ptr += hln; ++ ++ /* The source protocol address. */ ++ grub_memcpy (tmp_ptr, &target_addr.ipv4, pln); ++ tmp_ptr += pln; ++ ++ /* The target hardware address. */ ++ grub_memcpy (tmp_ptr, sender_mac_addr.mac, hln); ++ tmp_ptr += hln; ++ ++ /* The target protocol address */ ++ grub_memcpy (tmp_ptr, &sender_addr.ipv4, pln); ++ tmp_ptr += pln; ++ ++ target.type = hw_type; ++ target.len = hln; ++ grub_memcpy (target.mac, sender_mac_addr.mac, hln); + + /* Change operation to REPLY and send packet */ + send_ethernet_packet (inf, &nb_reply, target, GRUB_NET_ETHERTYPE_ARP); +diff --git a/grub-core/net/bootp.c b/grub-core/net/bootp.c +index 2869482fe..4e55adc55 100644 +--- a/grub-core/net/bootp.c ++++ b/grub-core/net/bootp.c +@@ -219,7 +219,6 @@ grub_net_configure_by_dhcp_ack (const char *name, + int is_def, char **device, char **path) + { + grub_net_network_level_address_t addr; +- grub_net_link_level_address_t hwaddr; + struct grub_net_network_level_interface *inter; + int mask = -1; + char server_ip[sizeof ("xxx.xxx.xxx.xxx")]; +@@ -232,12 +231,8 @@ grub_net_configure_by_dhcp_ack (const char *name, + if (path) + *path = 0; + +- grub_memcpy (hwaddr.mac, bp->mac_addr, +- bp->hw_len < sizeof (hwaddr.mac) ? bp->hw_len +- : sizeof (hwaddr.mac)); +- hwaddr.type = GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET; +- +- inter = grub_net_add_addr (name, card, &addr, &hwaddr, flags); ++ grub_dprintf("dhcp", "configuring dhcp for %s\n", name); ++ inter = grub_net_add_addr (name, card, &addr, &card->default_address, flags); + if (!inter) + return 0; + +@@ -770,7 +765,8 @@ grub_cmd_bootp (struct grub_command *cmd __attribute__ ((unused)), + grub_memset (pack, 0, sizeof (*pack) + 64); + pack->opcode = 1; + pack->hw_type = 1; +- pack->hw_len = 6; ++ pack->hw_len = ifaces[j].hwaddress.len > 16 ? 0 ++ : ifaces[j].hwaddress.len; + err = grub_get_datetime (&date); + if (err || !grub_datetime2unixtime (&date, &t)) + { +@@ -781,7 +777,7 @@ grub_cmd_bootp (struct grub_command *cmd __attribute__ ((unused)), + ifaces[j].dhcp_xid = pack->xid; + pack->seconds = grub_cpu_to_be16 (t); + +- grub_memcpy (&pack->mac_addr, &ifaces[j].hwaddress.mac, 6); ++ grub_memcpy (&pack->mac_addr, &ifaces[j].hwaddress.mac, pack->hw_len); + + grub_netbuff_push (nb, sizeof (*udph)); + +diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c +index 329024b6f..bf36b446d 100644 +--- a/grub-core/net/drivers/efi/efinet.c ++++ b/grub-core/net/drivers/efi/efinet.c +@@ -329,6 +329,9 @@ grub_efinet_find_snp_cards (int preferred_only, grub_efi_handle_t preferred, + /* This should not happen... Why? */ + continue; + ++ if (net->mode->hwaddr_size > GRUB_NET_MAX_LINK_ADDRESS_SIZE) ++ continue; ++ + if (net->mode->state == GRUB_EFI_NETWORK_STOPPED + && efi_call_1 (net->start, net) != GRUB_EFI_SUCCESS) + continue; +@@ -366,10 +369,11 @@ grub_efinet_find_snp_cards (int preferred_only, grub_efi_handle_t preferred, + *i = (*i)+1; + card->driver = &efidriver; + card->flags = 0; +- card->default_address.type = GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET; ++ card->default_address.type = net->mode->if_type; ++ card->default_address.len = net->mode->hwaddr_size; + grub_memcpy (card->default_address.mac, + net->mode->current_address, +- sizeof (card->default_address.mac)); ++ net->mode->hwaddr_size); + card->efi_net = net; + card->efi_handle = *handle; + +diff --git a/grub-core/net/drivers/emu/emunet.c b/grub-core/net/drivers/emu/emunet.c +index b19492086..5b6c5e16a 100644 +--- a/grub-core/net/drivers/emu/emunet.c ++++ b/grub-core/net/drivers/emu/emunet.c +@@ -46,6 +46,7 @@ static struct grub_net_card emucard = + .mtu = 1500, + .default_address = { + .type = GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET, ++ . len = 6, + {.mac = {0, 1, 2, 3, 4, 5}} + }, + .flags = 0 +diff --git a/grub-core/net/drivers/i386/pc/pxe.c b/grub-core/net/drivers/i386/pc/pxe.c +index 3f4152d03..9f8fb4b6d 100644 +--- a/grub-core/net/drivers/i386/pc/pxe.c ++++ b/grub-core/net/drivers/i386/pc/pxe.c +@@ -386,20 +386,21 @@ GRUB_MOD_INIT(pxe) + grub_memset (ui, 0, sizeof (*ui)); + grub_pxe_call (GRUB_PXENV_UNDI_GET_INFORMATION, ui, pxe_rm_entry); + ++ grub_pxe_card.default_address.len = 6; + grub_memcpy (grub_pxe_card.default_address.mac, ui->current_addr, +- sizeof (grub_pxe_card.default_address.mac)); +- for (i = 0; i < sizeof (grub_pxe_card.default_address.mac); i++) ++ grub_pxe_card.default_address.len); ++ for (i = 0; i < grub_pxe_card.default_address.len; i++) + if (grub_pxe_card.default_address.mac[i] != 0) + break; +- if (i != sizeof (grub_pxe_card.default_address.mac)) ++ if (i != grub_pxe_card.default_address.len) + { +- for (i = 0; i < sizeof (grub_pxe_card.default_address.mac); i++) ++ for (i = 0; i < grub_pxe_card.default_address.len; i++) + if (grub_pxe_card.default_address.mac[i] != 0xff) + break; + } +- if (i == sizeof (grub_pxe_card.default_address.mac)) ++ if (i == grub_pxe_card.default_address.len) + grub_memcpy (grub_pxe_card.default_address.mac, ui->permanent_addr, +- sizeof (grub_pxe_card.default_address.mac)); ++ grub_pxe_card.default_address.len); + grub_pxe_card.mtu = ui->mtu; + + grub_pxe_card.default_address.type = GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET; +diff --git a/grub-core/net/drivers/ieee1275/ofnet.c b/grub-core/net/drivers/ieee1275/ofnet.c +index 3df75357a..ba50415f5 100644 +--- a/grub-core/net/drivers/ieee1275/ofnet.c ++++ b/grub-core/net/drivers/ieee1275/ofnet.c +@@ -160,6 +160,7 @@ grub_ieee1275_parse_bootpath (const char *devpath, char *bootpath, + grub_uint16_t vlantag = 0; + + hw_addr.type = GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET; ++ hw_addr.len = 6; + + args = bootpath + grub_strlen (devpath) + 1; + do +@@ -503,6 +504,7 @@ search_net_devices (struct grub_ieee1275_devalias *alias) + grub_memcpy (&lla.mac, pprop, 6); + + lla.type = GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET; ++ lla.len = 6; + card->default_address = lla; + + card->txbufsize = ALIGN_UP (card->mtu, 64) + 256; +diff --git a/grub-core/net/drivers/uboot/ubootnet.c b/grub-core/net/drivers/uboot/ubootnet.c +index 056052e40..22ebcbf21 100644 +--- a/grub-core/net/drivers/uboot/ubootnet.c ++++ b/grub-core/net/drivers/uboot/ubootnet.c +@@ -131,6 +131,7 @@ GRUB_MOD_INIT (ubootnet) + + grub_memcpy (&(card->default_address.mac), &devinfo->di_net.hwaddr, 6); + card->default_address.type = GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET; ++ card->default_address.len = 6; + + card->txbufsize = ALIGN_UP (card->mtu, 64) + 256; + card->txbuf = grub_zalloc (card->txbufsize); +diff --git a/grub-core/net/ethernet.c b/grub-core/net/ethernet.c +index 4d7ceed6f..eacda64b5 100644 +--- a/grub-core/net/ethernet.c ++++ b/grub-core/net/ethernet.c +@@ -29,13 +29,6 @@ + + #define LLCADDRMASK 0x7f + +-struct etherhdr +-{ +- grub_uint8_t dst[6]; +- grub_uint8_t src[6]; +- grub_uint16_t type; +-} GRUB_PACKED; +- + struct llchdr + { + grub_uint8_t dsap; +@@ -55,13 +48,15 @@ send_ethernet_packet (struct grub_net_network_level_interface *inf, + grub_net_link_level_address_t target_addr, + grub_net_ethertype_t ethertype) + { +- struct etherhdr *eth; ++ grub_uint8_t *eth; + grub_err_t err; +- grub_uint8_t etherhdr_size; +- grub_uint16_t vlantag_id = VLANTAG_IDENTIFIER; ++ grub_uint32_t vlantag = 0; ++ grub_uint8_t hw_addr_len = inf->card->default_address.len; ++ grub_uint8_t etherhdr_size = 2 * hw_addr_len + 2; + +- etherhdr_size = sizeof (*eth); +- COMPILE_TIME_ASSERT (sizeof (*eth) + 4 < GRUB_NET_MAX_LINK_HEADER_SIZE); ++ /* Source and destination link addresses + ethertype + vlan tag */ ++ COMPILE_TIME_ASSERT ((GRUB_NET_MAX_LINK_ADDRESS_SIZE * 2 + 2 + 4) < ++ GRUB_NET_MAX_LINK_HEADER_SIZE); + + /* Increase ethernet header in case of vlantag */ + if (inf->vlantag != 0) +@@ -70,11 +65,22 @@ send_ethernet_packet (struct grub_net_network_level_interface *inf, + err = grub_netbuff_push (nb, etherhdr_size); + if (err) + return err; +- eth = (struct etherhdr *) nb->data; +- grub_memcpy (eth->dst, target_addr.mac, 6); +- grub_memcpy (eth->src, inf->hwaddress.mac, 6); ++ eth = nb->data; ++ grub_memcpy (eth, target_addr.mac, hw_addr_len); ++ eth += hw_addr_len; ++ grub_memcpy (eth, inf->hwaddress.mac, hw_addr_len); ++ eth += hw_addr_len; ++ ++ /* Check if a vlan-tag is present. */ ++ if (vlantag != 0) ++ { ++ *((grub_uint32_t *)eth) = grub_cpu_to_be32 (vlantag); ++ eth += sizeof (vlantag); ++ } ++ ++ /* Write ethertype */ ++ *((grub_uint16_t*) eth) = grub_cpu_to_be16 (ethertype); + +- eth->type = grub_cpu_to_be16 (ethertype); + if (!inf->card->opened) + { + err = GRUB_ERR_NONE; +@@ -85,18 +91,6 @@ send_ethernet_packet (struct grub_net_network_level_interface *inf, + inf->card->opened = 1; + } + +- /* Check and add a vlan-tag if needed. */ +- if (inf->vlantag != 0) +- { +- /* Move eth type to the right */ +- grub_memcpy ((char *) nb->data + etherhdr_size - 2, +- (char *) nb->data + etherhdr_size - 6, 2); +- +- /* Add the tag in the middle */ +- grub_memcpy ((char *) nb->data + etherhdr_size - 6, &vlantag_id, 2); +- grub_memcpy ((char *) nb->data + etherhdr_size - 4, (char *) &(inf->vlantag), 2); +- } +- + return inf->card->driver->send (inf->card, nb); + } + +@@ -104,31 +98,37 @@ grub_err_t + grub_net_recv_ethernet_packet (struct grub_net_buff *nb, + struct grub_net_card *card) + { +- struct etherhdr *eth; ++ grub_uint8_t *eth; + struct llchdr *llch; + struct snaphdr *snaph; + grub_net_ethertype_t type; + grub_net_link_level_address_t hwaddress; + grub_net_link_level_address_t src_hwaddress; + grub_err_t err; +- grub_uint8_t etherhdr_size = sizeof (*eth); +- grub_uint16_t vlantag = 0; ++ grub_uint8_t hw_addr_len = card->default_address.len; ++ grub_uint8_t etherhdr_size = 2 * hw_addr_len + 2; + ++ eth = nb->data; + +- /* Check if a vlan-tag is present. If so, the ethernet header is 4 bytes */ +- /* longer than the original one. The vlantag id is extracted and the header */ +- /* is reseted to the original size. */ +- if (grub_get_unaligned16 (nb->data + etherhdr_size - 2) == VLANTAG_IDENTIFIER) ++ hwaddress.type = card->default_address.type; ++ hwaddress.len = hw_addr_len; ++ grub_memcpy (hwaddress.mac, eth, hw_addr_len); ++ eth += hw_addr_len; ++ ++ src_hwaddress.type = card->default_address.type; ++ src_hwaddress.len = hw_addr_len; ++ grub_memcpy (src_hwaddress.mac, eth, hw_addr_len); ++ eth += hw_addr_len; ++ ++ type = grub_be_to_cpu16 (*(grub_uint16_t*)(eth)); ++ if (type == VLANTAG_IDENTIFIER) + { +- vlantag = grub_get_unaligned16 (nb->data + etherhdr_size); ++ /* Skip vlan tag */ + etherhdr_size += 4; +- /* Move eth type to the original position */ +- grub_memcpy((char *) nb->data + etherhdr_size - 6, +- (char *) nb->data + etherhdr_size - 2, 2); ++ eth += 4; ++ type = grub_be_to_cpu16 (*(grub_uint16_t*)(eth)); + } + +- eth = (struct etherhdr *) nb->data; +- type = grub_be_to_cpu16 (eth->type); + err = grub_netbuff_pull (nb, etherhdr_size); + if (err) + return err; +@@ -148,11 +148,6 @@ grub_net_recv_ethernet_packet (struct grub_net_buff *nb, + } + } + +- hwaddress.type = GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET; +- grub_memcpy (hwaddress.mac, eth->dst, sizeof (hwaddress.mac)); +- src_hwaddress.type = GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET; +- grub_memcpy (src_hwaddress.mac, eth->src, sizeof (src_hwaddress.mac)); +- + switch (type) + { + /* ARP packet. */ +diff --git a/grub-core/net/icmp6.c b/grub-core/net/icmp6.c +index 2cbd95dce..56a3ec5c8 100644 +--- a/grub-core/net/icmp6.c ++++ b/grub-core/net/icmp6.c +@@ -231,8 +231,9 @@ grub_net_recv_icmp6_packet (struct grub_net_buff *nb, + && ohdr->len == 1) + { + grub_net_link_level_address_t ll_address; +- ll_address.type = GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET; +- grub_memcpy (ll_address.mac, ohdr + 1, sizeof (ll_address.mac)); ++ ll_address.type = card->default_address.type; ++ ll_address.len = card->default_address.len; ++ grub_memcpy (ll_address.mac, ohdr + 1, ll_address.len); + grub_net_link_layer_add_address (card, source, &ll_address, 0); + } + } +@@ -335,8 +336,9 @@ grub_net_recv_icmp6_packet (struct grub_net_buff *nb, + && ohdr->len == 1) + { + grub_net_link_level_address_t ll_address; +- ll_address.type = GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET; +- grub_memcpy (ll_address.mac, ohdr + 1, sizeof (ll_address.mac)); ++ ll_address.type = card->default_address.type; ++ ll_address.len = card->default_address.len; ++ grub_memcpy (ll_address.mac, ohdr + 1, ll_address.len); + grub_net_link_layer_add_address (card, source, &ll_address, 0); + } + } +@@ -384,8 +386,9 @@ grub_net_recv_icmp6_packet (struct grub_net_buff *nb, + && ohdr->len == 1) + { + grub_net_link_level_address_t ll_address; +- ll_address.type = GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET; +- grub_memcpy (ll_address.mac, ohdr + 1, sizeof (ll_address.mac)); ++ ll_address.type = card->default_address.type; ++ ll_address.len = card->default_address.len; ++ grub_memcpy (ll_address.mac, ohdr + 1, ll_address.len); + grub_net_link_layer_add_address (card, source, &ll_address, 0); + } + if (ohdr->type == OPTION_PREFIX && ohdr->len == 4) +diff --git a/grub-core/net/ip.c b/grub-core/net/ip.c +index 8411e0ecc..b2ca74b6e 100644 +--- a/grub-core/net/ip.c ++++ b/grub-core/net/ip.c +@@ -277,8 +277,8 @@ handle_dgram (struct grub_net_buff *nb, + && inf->address.type == GRUB_NET_NETWORK_LEVEL_PROTOCOL_DHCP_RECV + && inf->dhcp_xid == bootp->xid + && inf->hwaddress.type == GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET +- && grub_memcmp (inf->hwaddress.mac, &bootp->mac_addr, +- sizeof (inf->hwaddress.mac)) == 0) ++ && (grub_memcmp (inf->hwaddress.mac, &bootp->mac_addr, ++ bootp->hw_len) == 0 || bootp->hw_len == 0)) + { + grub_net_process_dhcp (nb, inf->card); + grub_netbuff_free (nb); +diff --git a/grub-core/net/net.c b/grub-core/net/net.c +index fa3e29126..9700e2d09 100644 +--- a/grub-core/net/net.c ++++ b/grub-core/net/net.c +@@ -128,8 +128,9 @@ grub_net_link_layer_resolve (struct grub_net_network_level_interface *inf, + << 48) + && proto_addr->ipv6[1] == (grub_be_to_cpu64_compile_time (1)))) + { +- hw_addr->type = GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET; +- grub_memset (hw_addr->mac, -1, 6); ++ hw_addr->type = inf->card->default_address.type; ++ hw_addr->len = inf->card->default_address.len; ++ grub_memset (hw_addr->mac, -1, hw_addr->len); + return GRUB_ERR_NONE; + } + +@@ -137,6 +138,7 @@ grub_net_link_layer_resolve (struct grub_net_network_level_interface *inf, + && ((grub_be_to_cpu64 (proto_addr->ipv6[0]) >> 56) == 0xff)) + { + hw_addr->type = GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET; ++ hw_addr->len = inf->card->default_address.len; + hw_addr->mac[0] = 0x33; + hw_addr->mac[1] = 0x33; + hw_addr->mac[2] = ((grub_be_to_cpu64 (proto_addr->ipv6[1]) >> 24) & 0xff); +@@ -757,23 +759,23 @@ grub_net_addr_to_str (const grub_net_network_level_address_t *target, char *buf) + void + grub_net_hwaddr_to_str (const grub_net_link_level_address_t *addr, char *str) + { +- str[0] = 0; +- switch (addr->type) ++ char *ptr; ++ unsigned i; ++ int maxstr; ++ ++ if (addr->len > GRUB_NET_MAX_LINK_ADDRESS_SIZE) + { +- case GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET: +- { +- char *ptr; +- unsigned i; +- for (ptr = str, i = 0; i < ARRAY_SIZE (addr->mac); i++) +- { +- grub_snprintf (ptr, GRUB_NET_MAX_STR_HWADDR_LEN - (ptr - str), +- "%02x:", addr->mac[i] & 0xff); +- ptr += (sizeof ("XX:") - 1); +- } +- return; +- } ++ str[0] = 0; ++ grub_printf (_("Unsupported hw address type %d len %d\n"), ++ addr->type, addr->len); ++ return; ++ } ++ maxstr = addr->len * grub_strlen ("XX:"); ++ for (ptr = str, i = 0; i < addr->len; i++) ++ { ++ ptr += grub_snprintf (ptr, maxstr - (ptr - str), ++ "%02x:", addr->mac[i] & 0xff); + } +- grub_printf (_("Unsupported hw address type %d\n"), addr->type); + } + + int +@@ -784,13 +786,17 @@ grub_net_hwaddr_cmp (const grub_net_link_level_address_t *a, + return -1; + if (a->type > b->type) + return +1; +- switch (a->type) ++ if (a->len < b->len) ++ return -1; ++ if (a->len > b->len) ++ return +1; ++ if (a->len > GRUB_NET_MAX_LINK_ADDRESS_SIZE) + { +- case GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET: +- return grub_memcmp (a->mac, b->mac, sizeof (a->mac)); ++ grub_printf (_("Unsupported hw address type %d len %d\n"), ++ a->type, a->len); ++ return + 1; + } +- grub_printf (_("Unsupported hw address type %d\n"), a->type); +- return 1; ++ return grub_memcmp (a->mac, b->mac, a->len); + } + + int +diff --git a/include/grub/net.h b/include/grub/net.h +index de51894cb..e9ebc6a1b 100644 +--- a/include/grub/net.h ++++ b/include/grub/net.h +@@ -29,7 +29,8 @@ + + enum + { +- GRUB_NET_MAX_LINK_HEADER_SIZE = 64, ++ GRUB_NET_MAX_LINK_HEADER_SIZE = 96, ++ GRUB_NET_MAX_LINK_ADDRESS_SIZE = 32, + GRUB_NET_UDP_HEADER_SIZE = 8, + GRUB_NET_TCP_HEADER_SIZE = 20, + GRUB_NET_OUR_IPV4_HEADER_SIZE = 20, +@@ -42,15 +43,17 @@ enum + + typedef enum grub_link_level_protocol_id + { +- GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET ++ /* IANA ARP constant to define hardware type. */ ++ GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET = 1, + } grub_link_level_protocol_id_t; + + typedef struct grub_net_link_level_address + { + grub_link_level_protocol_id_t type; ++ grub_uint8_t len; + union + { +- grub_uint8_t mac[6]; ++ grub_uint8_t mac[GRUB_NET_MAX_LINK_ADDRESS_SIZE]; + }; + } grub_net_link_level_address_t; + +@@ -555,11 +558,13 @@ grub_net_addr_cmp (const grub_net_network_level_address_t *a, + #define GRUB_NET_MAX_STR_ADDR_LEN sizeof ("XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX") + + /* +- Currently suppoerted adresses: +- ethernet: XX:XX:XX:XX:XX:XX ++ Up to 32 byte hardware address supported, see GRUB_NET_MAX_LINK_ADDRESS_SIZE + */ +- +-#define GRUB_NET_MAX_STR_HWADDR_LEN (sizeof ("XX:XX:XX:XX:XX:XX")) ++#define GRUB_NET_MAX_STR_HWADDR_LEN (sizeof (\ ++ "XX:XX:XX:XX:XX:XX:XX:XX:"\ ++ "XX:XX:XX:XX:XX:XX:XX:XX:"\ ++ "XX:XX:XX:XX:XX:XX:XX:XX:"\ ++ "XX:XX:XX:XX:XX:XX:XX:XX")) + + void + grub_net_addr_to_str (const grub_net_network_level_address_t *target, +-- +2.14.3 + diff --git a/0213-Fix-crash-on-http.patch b/0213-Fix-crash-on-http.patch new file mode 100644 index 0000000..a17cb87 --- /dev/null +++ b/0213-Fix-crash-on-http.patch @@ -0,0 +1,28 @@ +From fa87210aabc8fb96e48c744b2f0d4422271a1fea Mon Sep 17 00:00:00 2001 +From: Gustavo Luiz Duarte +Date: Tue, 25 Sep 2012 18:40:55 -0400 +Subject: [PATCH 213/225] Fix crash on http + +Don't free file->data on receiving FIN flag since it is used all over without +checking. http_close() will be called later to free that memory. +https://bugzilla.redhat.com/show_bug.cgi?id=860834 +--- + grub-core/net/http.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/grub-core/net/http.c b/grub-core/net/http.c +index 5aa4ad3be..ec3647f9a 100644 +--- a/grub-core/net/http.c ++++ b/grub-core/net/http.c +@@ -392,7 +392,7 @@ http_establish (struct grub_file *file, grub_off_t offset, int initial) + + data->sock = grub_net_tcp_open (file->device->net->server, + HTTP_PORT, http_receive, +- http_err, http_err, ++ http_err, NULL, + file); + if (!data->sock) + { +-- +2.14.3 + diff --git a/0214-net-read-bracketed-ipv6-addrs-and-port-numbers.patch b/0214-net-read-bracketed-ipv6-addrs-and-port-numbers.patch new file mode 100644 index 0000000..ead813c --- /dev/null +++ b/0214-net-read-bracketed-ipv6-addrs-and-port-numbers.patch @@ -0,0 +1,268 @@ +From 6c2bd4c6e8ae4447441cc10acef494d7d7070254 Mon Sep 17 00:00:00 2001 +From: Aaron Miller +Date: Fri, 29 Jul 2016 17:41:38 +0800 +Subject: [PATCH 214/225] 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 +--- + grub-core/net/http.c | 25 ++++++++++++--- + grub-core/net/net.c | 87 +++++++++++++++++++++++++++++++++++++++++++++++++--- + grub-core/net/tftp.c | 6 +++- + include/grub/net.h | 1 + + 4 files changed, 108 insertions(+), 11 deletions(-) + +diff --git a/grub-core/net/http.c b/grub-core/net/http.c +index ec3647f9a..7dd4bef1d 100644 +--- a/grub-core/net/http.c ++++ b/grub-core/net/http.c +@@ -289,7 +289,9 @@ http_receive (grub_net_tcp_socket_t sock __attribute__ ((unused)), + nb2 = grub_netbuff_alloc (data->chunk_rem); + if (!nb2) + return grub_errno; +- grub_netbuff_put (nb2, data->chunk_rem); ++ err = grub_netbuff_put (nb2, data->chunk_rem); ++ if (err) ++ return grub_errno; + grub_memcpy (nb2->data, nb->data, data->chunk_rem); + if (file->device->net->packs.count >= 20) + { +@@ -312,12 +314,14 @@ http_establish (struct grub_file *file, grub_off_t offset, int initial) + int i; + struct grub_net_buff *nb; + grub_err_t err; ++ char* server = file->device->net->server; ++ int port = file->device->net->port; + + nb = grub_netbuff_alloc (GRUB_NET_TCP_RESERVE_SIZE + + sizeof ("GET ") - 1 + + grub_strlen (data->filename) + + sizeof (" HTTP/1.1\r\nHost: ") - 1 +- + grub_strlen (file->device->net->server) ++ + grub_strlen (server) + sizeof (":XXXXXXXXXX") + + sizeof ("\r\nUser-Agent: " PACKAGE_STRING + "\r\n") - 1 + + sizeof ("Range: bytes=XXXXXXXXXXXXXXXXXXXX" +@@ -356,7 +360,7 @@ http_establish (struct grub_file *file, grub_off_t offset, int initial) + sizeof (" HTTP/1.1\r\nHost: ") - 1); + + ptr = nb->tail; +- err = grub_netbuff_put (nb, grub_strlen (file->device->net->server)); ++ err = grub_netbuff_put (nb, grub_strlen (server)); + if (err) + { + grub_netbuff_free (nb); +@@ -365,6 +369,15 @@ http_establish (struct grub_file *file, grub_off_t offset, int initial) + grub_memcpy (ptr, file->device->net->server, + grub_strlen (file->device->net->server)); + ++ if (port) ++ { ++ ptr = nb->tail; ++ grub_snprintf ((char *) ptr, ++ sizeof (":xxxxxxxxxx"), ++ ":%d", ++ port); ++ } ++ + ptr = nb->tail; + err = grub_netbuff_put (nb, + sizeof ("\r\nUser-Agent: " PACKAGE_STRING "\r\n") +@@ -390,8 +403,10 @@ http_establish (struct grub_file *file, grub_off_t offset, int initial) + grub_netbuff_put (nb, 2); + grub_memcpy (ptr, "\r\n", 2); + +- data->sock = grub_net_tcp_open (file->device->net->server, +- HTTP_PORT, http_receive, ++ grub_dprintf ("http", "opening path %s on host %s TCP port %d\n", ++ data->filename, server, port ? port : HTTP_PORT); ++ data->sock = grub_net_tcp_open (server, ++ port ? port : HTTP_PORT, http_receive, + http_err, NULL, + file); + if (!data->sock) +diff --git a/grub-core/net/net.c b/grub-core/net/net.c +index 9700e2d09..191e8e41b 100644 +--- a/grub-core/net/net.c ++++ b/grub-core/net/net.c +@@ -439,6 +439,13 @@ parse_ip6 (const char *val, grub_uint64_t *ip, const char **rest) + grub_uint16_t newip[8]; + const char *ptr = val; + int word, quaddot = -1; ++ int bracketed = 0; ++ ++ if (ptr[0] == '[') ++ { ++ bracketed = 1; ++ ptr++; ++ } + + if (ptr[0] == ':' && ptr[1] != ':') + return 0; +@@ -477,6 +484,8 @@ parse_ip6 (const char *val, grub_uint64_t *ip, const char **rest) + grub_memset (&newip[quaddot], 0, (7 - word) * sizeof (newip[0])); + } + grub_memcpy (ip, newip, 16); ++ if (bracketed && *ptr == ']') ++ ptr++; + if (rest) + *rest = ptr; + return 1; +@@ -1338,8 +1347,10 @@ grub_net_open_real (const char *name) + { + grub_net_app_level_t proto; + const char *protname, *server; ++ char *host; + grub_size_t protnamelen; + int try; ++ int port = 0; + + if (grub_strncmp (name, "pxe:", sizeof ("pxe:") - 1) == 0) + { +@@ -1377,6 +1388,72 @@ grub_net_open_real (const char *name) + return NULL; + } + ++ char* port_start; ++ /* ipv6 or port specified? */ ++ if ((port_start = grub_strchr (server, ':'))) ++ { ++ char* ipv6_begin; ++ if((ipv6_begin = grub_strchr (server, '['))) ++ { ++ char* ipv6_end = grub_strchr (server, ']'); ++ if(!ipv6_end) ++ { ++ grub_error (GRUB_ERR_NET_BAD_ADDRESS, ++ N_("mismatched [ in address")); ++ return NULL; ++ } ++ /* port number after bracketed ipv6 addr */ ++ if(ipv6_end[1] == ':') ++ { ++ port = grub_strtoul (ipv6_end + 2, NULL, 10); ++ if(port > 65535) ++ { ++ grub_error (GRUB_ERR_NET_BAD_ADDRESS, ++ N_("bad port number")); ++ return NULL; ++ } ++ } ++ host = grub_strndup (ipv6_begin, (ipv6_end - ipv6_begin) + 1); ++ } ++ else ++ { ++ if (grub_strchr (port_start + 1, ':')) ++ { ++ int iplen = grub_strlen (server); ++ /* bracket bare ipv6 addrs */ ++ host = grub_malloc (iplen + 3); ++ if(!host) ++ { ++ return NULL; ++ } ++ host[0] = '['; ++ grub_memcpy (host + 1, server, iplen); ++ host[iplen + 1] = ']'; ++ host[iplen + 2] = '\0'; ++ } ++ else ++ { ++ /* hostname:port or ipv4:port */ ++ port = grub_strtol (port_start + 1, NULL, 10); ++ if(port > 65535) ++ { ++ grub_error (GRUB_ERR_NET_BAD_ADDRESS, ++ N_("bad port number")); ++ return NULL; ++ } ++ host = grub_strndup (server, port_start - server); ++ } ++ } ++ } ++ else ++ { ++ host = grub_strdup (server); ++ } ++ if (!host) ++ { ++ return NULL; ++ } ++ + for (try = 0; try < 2; try++) + { + FOR_NET_APP_LEVEL (proto) +@@ -1386,14 +1463,13 @@ grub_net_open_real (const char *name) + { + grub_net_t ret = grub_zalloc (sizeof (*ret)); + if (!ret) +- return NULL; +- ret->protocol = proto; +- ret->server = grub_strdup (server); +- if (!ret->server) + { +- grub_free (ret); ++ grub_free (host); + return NULL; + } ++ ret->protocol = proto; ++ ret->port = port; ++ ret->server = host; + ret->fs = &grub_net_fs; + return ret; + } +@@ -1468,6 +1544,7 @@ grub_net_open_real (const char *name) + grub_error (GRUB_ERR_UNKNOWN_DEVICE, N_("disk `%s' not found"), + name); + ++ grub_free (host); + return NULL; + } + +diff --git a/grub-core/net/tftp.c b/grub-core/net/tftp.c +index f90071353..4fd7d24db 100644 +--- a/grub-core/net/tftp.c ++++ b/grub-core/net/tftp.c +@@ -333,6 +333,7 @@ tftp_open (struct grub_file *file, const char *filename) + grub_err_t err; + grub_uint8_t *nbd; + grub_net_network_level_address_t addr; ++ int port = file->device->net->port; + + data = grub_zalloc (sizeof (*data)); + if (!data) +@@ -406,6 +407,9 @@ tftp_open (struct grub_file *file, const char *filename) + if (err) + { + grub_dprintf("tftp", "Address resolution failed: %d\n", err); ++ grub_dprintf ("tftp", "file_size is %llu, block_size is %llu\n", ++ (unsigned long long)data->file_size, ++ (unsigned long long)data->block_size); + destroy_pq (data); + grub_free (data); + return err; +@@ -413,7 +417,7 @@ tftp_open (struct grub_file *file, const char *filename) + + grub_dprintf("tftp", "opening connection\n"); + data->sock = grub_net_udp_open (addr, +- TFTP_SERVER_PORT, tftp_receive, ++ port ? port : TFTP_SERVER_PORT, tftp_receive, + file); + if (!data->sock) + { +diff --git a/include/grub/net.h b/include/grub/net.h +index e9ebc6a1b..f4cd86e58 100644 +--- a/include/grub/net.h ++++ b/include/grub/net.h +@@ -273,6 +273,7 @@ typedef struct grub_net + { + char *server; + char *name; ++ int port; + grub_net_app_level_t protocol; + grub_net_packets_t packs; + grub_off_t offset; +-- +2.14.3 + diff --git a/0215-bootp-New-net_bootp6-command.patch b/0215-bootp-New-net_bootp6-command.patch new file mode 100644 index 0000000..a58694f --- /dev/null +++ b/0215-bootp-New-net_bootp6-command.patch @@ -0,0 +1,1291 @@ +From 16abea508d4fa108ec681cdc0b13fea5f1cb4ab1 Mon Sep 17 00:00:00 2001 +From: Michael Chang +Date: Sun, 10 Jul 2016 23:46:06 +0800 +Subject: [PATCH 215/225] 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 +Signed-off-by: Ken Lin +--- + grub-core/net/bootp.c | 1016 ++++++++++++++++++++++++++++++++++++++++++------- + grub-core/net/ip.c | 39 ++ + include/grub/net.h | 91 +++-- + 3 files changed, 969 insertions(+), 177 deletions(-) + +diff --git a/grub-core/net/bootp.c b/grub-core/net/bootp.c +index 4e55adc55..ff1d7776e 100644 +--- a/grub-core/net/bootp.c ++++ b/grub-core/net/bootp.c +@@ -25,6 +25,98 @@ + #include + #include + #include ++#include ++#include ++ ++static int ++dissect_url (const char *url, char **proto, char **host, char **path) ++{ ++ const char *p, *ps; ++ grub_size_t l; ++ ++ *proto = *host = *path = NULL; ++ ps = p = url; ++ ++ while ((p = grub_strchr (p, ':'))) ++ { ++ if (grub_strlen (p) < sizeof ("://") - 1) ++ break; ++ if (grub_memcmp (p, "://", sizeof ("://") - 1) == 0) ++ { ++ l = p - ps; ++ *proto = grub_malloc (l + 1); ++ if (!*proto) ++ { ++ grub_print_error (); ++ return 0; ++ } ++ ++ grub_memcpy (*proto, ps, l); ++ (*proto)[l] = '\0'; ++ p += sizeof ("://") - 1; ++ break; ++ } ++ ++p; ++ } ++ ++ if (!*proto) ++ { ++ grub_dprintf ("bootp", "url: %s is not valid, protocol not found\n", url); ++ return 0; ++ } ++ ++ ps = p; ++ p = grub_strchr (p, '/'); ++ ++ if (!p) ++ { ++ grub_dprintf ("bootp", "url: %s is not valid, host/path not found\n", url); ++ grub_free (*proto); ++ *proto = NULL; ++ return 0; ++ } ++ ++ l = p - ps; ++ ++ if (l > 2 && ps[0] == '[' && ps[l - 1] == ']') ++ { ++ *host = grub_malloc (l - 1); ++ if (!*host) ++ { ++ grub_print_error (); ++ grub_free (*proto); ++ *proto = NULL; ++ return 0; ++ } ++ grub_memcpy (*host, ps + 1, l - 2); ++ (*host)[l - 2] = 0; ++ } ++ else ++ { ++ *host = grub_malloc (l + 1); ++ if (!*host) ++ { ++ grub_print_error (); ++ grub_free (*proto); ++ *proto = NULL; ++ return 0; ++ } ++ grub_memcpy (*host, ps, l); ++ (*host)[l] = 0; ++ } ++ ++ *path = grub_strdup (p); ++ if (!*path) ++ { ++ grub_print_error (); ++ grub_free (*host); ++ grub_free (*proto); ++ *host = NULL; ++ *proto = NULL; ++ return 0; ++ } ++ return 1; ++} + + static char * + grub_env_write_readonly (struct grub_env_var *var __attribute__ ((unused)), +@@ -345,178 +437,578 @@ grub_net_configure_by_dhcp_ack (const char *name, + return inter; + } + +-struct grub_net_network_level_interface * +-grub_net_configure_by_dhcpv6_ack (const char *name, +- struct grub_net_card *card, +- grub_net_interface_flags_t flags +- __attribute__((__unused__)), +- const grub_net_link_level_address_t *hwaddr, +- const struct grub_net_dhcpv6_packet *packet, +- int is_def, char **device, char **path) ++/* The default netbuff size for sending DHCPv6 packets which should be ++ large enough to hold the information */ ++#define GRUB_DHCP6_DEFAULT_NETBUFF_ALLOC_SIZE 512 ++ ++struct grub_dhcp6_options + { +- struct grub_net_network_level_interface *inter = NULL; +- struct grub_net_network_level_address addr; +- int mask = -1; ++ grub_uint8_t *client_duid; ++ grub_uint16_t client_duid_len; ++ grub_uint8_t *server_duid; ++ grub_uint16_t server_duid_len; ++ grub_uint32_t iaid; ++ grub_uint32_t t1; ++ grub_uint32_t t2; ++ grub_net_network_level_address_t *ia_addr; ++ grub_uint32_t preferred_lifetime; ++ grub_uint32_t valid_lifetime; ++ grub_net_network_level_address_t *dns_server_addrs; ++ grub_uint16_t num_dns_server; ++ char *boot_file_proto; ++ char *boot_file_server_ip; ++ char *boot_file_path; ++}; ++ ++typedef struct grub_dhcp6_options *grub_dhcp6_options_t; ++ ++struct grub_dhcp6_session ++{ ++ struct grub_dhcp6_session *next; ++ struct grub_dhcp6_session **prev; ++ grub_uint32_t iaid; ++ grub_uint32_t transaction_id:24; ++ grub_uint64_t start_time; ++ struct grub_net_dhcp6_option_duid_ll duid; ++ struct grub_net_network_level_interface *iface; + +- if (!device || !path) +- return NULL; ++ /* The associated dhcpv6 options */ ++ grub_dhcp6_options_t adv; ++ grub_dhcp6_options_t reply; ++}; + +- *device = 0; +- *path = 0; ++typedef struct grub_dhcp6_session *grub_dhcp6_session_t; + +- grub_dprintf ("net", "mac address is %02x:%02x:%02x:%02x:%02x:%02x\n", +- hwaddr->mac[0], hwaddr->mac[1], hwaddr->mac[2], +- hwaddr->mac[3], hwaddr->mac[4], hwaddr->mac[5]); ++typedef void (*dhcp6_option_hook_fn) (const struct grub_net_dhcp6_option *opt, void *data); + +- if (is_def) +- grub_net_default_server = 0; ++static void ++foreach_dhcp6_option (const struct grub_net_dhcp6_option *opt, grub_size_t size, ++ dhcp6_option_hook_fn hook, void *hook_data); ++ ++static void ++parse_dhcp6_iaaddr (const struct grub_net_dhcp6_option *opt, void *data) ++{ ++ grub_dhcp6_options_t dhcp6 = (grub_dhcp6_options_t )data; ++ ++ grub_uint16_t code = grub_be_to_cpu16 (opt->code); ++ grub_uint16_t len = grub_be_to_cpu16 (opt->len); + +- if (is_def && !grub_net_default_server && packet) ++ if (code == GRUB_NET_DHCP6_OPTION_IAADDR) + { +- const grub_uint8_t *options = packet->dhcp_options; +- unsigned int option_max = 1024 - OFFSET_OF (dhcp_options, packet); +- unsigned int i; ++ const struct grub_net_dhcp6_option_iaaddr *iaaddr; ++ iaaddr = (const struct grub_net_dhcp6_option_iaaddr *)opt->data; + +- for (i = 0; i < option_max - sizeof (grub_net_dhcpv6_option_t); ) ++ if (len < sizeof (*iaaddr)) ++ { ++ grub_dprintf ("bootp", "DHCPv6: code %u with insufficient length %u\n", code, len); ++ return; ++ } ++ if (!dhcp6->ia_addr) + { +- grub_uint16_t num, len; +- grub_net_dhcpv6_option_t *opt = +- (grub_net_dhcpv6_option_t *)(options + i); ++ dhcp6->ia_addr = grub_malloc (sizeof(*dhcp6->ia_addr)); ++ dhcp6->ia_addr->type = GRUB_NET_NETWORK_LEVEL_PROTOCOL_IPV6; ++ dhcp6->ia_addr->ipv6[0] = grub_get_unaligned64 (iaaddr->addr); ++ dhcp6->ia_addr->ipv6[1] = grub_get_unaligned64 (iaaddr->addr + 8); ++ dhcp6->preferred_lifetime = grub_be_to_cpu32 (iaaddr->preferred_lifetime); ++ dhcp6->valid_lifetime = grub_be_to_cpu32 (iaaddr->valid_lifetime); ++ } ++ } ++} + +- num = grub_be_to_cpu16(opt->option_num); +- len = grub_be_to_cpu16(opt->option_len); ++static void ++parse_dhcp6_option (const struct grub_net_dhcp6_option *opt, void *data) ++{ ++ grub_dhcp6_options_t dhcp6 = (grub_dhcp6_options_t)data; ++ grub_uint16_t code = grub_be_to_cpu16 (opt->code); ++ grub_uint16_t len = grub_be_to_cpu16 (opt->len); + +- grub_dprintf ("net", "got dhcpv6 option %d len %d\n", num, len); ++ switch (code) ++ { ++ case GRUB_NET_DHCP6_OPTION_CLIENTID: + +- if (len == 0) ++ if (dhcp6->client_duid || !len) ++ { ++ grub_dprintf ("bootp", "Skipped DHCPv6 CLIENTID with length %u\n", len); + break; ++ } ++ dhcp6->client_duid = grub_malloc (len); ++ grub_memcpy (dhcp6->client_duid, opt->data, len); ++ dhcp6->client_duid_len = len; ++ break; ++ ++ case GRUB_NET_DHCP6_OPTION_SERVERID: + +- if (len + i > 1024) ++ if (dhcp6->server_duid || !len) ++ { ++ grub_dprintf ("bootp", "Skipped DHCPv6 SERVERID with length %u\n", len); + break; ++ } ++ dhcp6->server_duid = grub_malloc (len); ++ grub_memcpy (dhcp6->server_duid, opt->data, len); ++ dhcp6->server_duid_len = len; ++ break; ++ ++ case GRUB_NET_DHCP6_OPTION_IA_NA: ++ { ++ const struct grub_net_dhcp6_option_iana *ia_na; ++ grub_uint16_t data_len; + +- if (num == GRUB_NET_DHCP6_BOOTFILE_URL) ++ if (dhcp6->iaid || len < sizeof (*ia_na)) + { +- char *scheme, *userinfo, *host, *file; +- char *tmp; +- int hostlen; +- int port; +- int rc = extract_url_info ((const char *)opt->option_data, +- (grub_size_t)len, +- &scheme, &userinfo, &host, &port, +- &file); +- if (rc < 0) +- continue; +- +- /* right now this only handles tftp. */ +- if (grub_strcmp("tftp", scheme)) +- { +- grub_free (scheme); +- grub_free (userinfo); +- grub_free (host); +- grub_free (file); +- continue; +- } +- grub_free (userinfo); +- +- hostlen = grub_strlen (host); +- if (hostlen > 2 && host[0] == '[' && host[hostlen-1] == ']') +- { +- tmp = host+1; +- host[hostlen-1] = '\0'; +- } +- else +- tmp = host; +- +- *device = grub_xasprintf ("%s,%s", scheme, tmp); +- grub_free (scheme); +- grub_free (host); +- +- if (file && *file) +- { +- tmp = grub_strrchr (file, '/'); +- if (tmp) +- *(tmp+1) = '\0'; +- else +- file[0] = '\0'; +- } +- else if (!file) +- file = grub_strdup (""); +- +- if (file[0] == '/') +- { +- *path = grub_strdup (file+1); +- grub_free (file); +- } +- else +- *path = file; ++ grub_dprintf ("bootp", "Skipped DHCPv6 IA_NA with length %u\n", len); ++ break; + } +- else if (num == GRUB_NET_DHCP6_IA_NA) ++ ia_na = (const struct grub_net_dhcp6_option_iana *)opt->data; ++ dhcp6->iaid = grub_be_to_cpu32 (ia_na->iaid); ++ dhcp6->t1 = grub_be_to_cpu32 (ia_na->t1); ++ dhcp6->t2 = grub_be_to_cpu32 (ia_na->t2); ++ ++ data_len = len - sizeof (*ia_na); ++ if (data_len) ++ foreach_dhcp6_option ((const struct grub_net_dhcp6_option *)ia_na->data, data_len, parse_dhcp6_iaaddr, dhcp6); ++ } ++ break; ++ ++ case GRUB_NET_DHCP6_OPTION_DNS_SERVERS: ++ { ++ const grub_uint8_t *po; ++ grub_uint16_t ln; ++ grub_net_network_level_address_t *la; ++ ++ if (!len || len & 0xf) + { +- const grub_net_dhcpv6_option_t *ia_na_opt; +- const grub_net_dhcpv6_opt_ia_na_t *ia_na = +- (const grub_net_dhcpv6_opt_ia_na_t *)opt; +- unsigned int left = len - OFFSET_OF (options, ia_na); +- unsigned int j; +- +- if ((grub_uint8_t *)ia_na + left > +- (grub_uint8_t *)options + option_max) +- left -= ((grub_uint8_t *)ia_na + left) +- - ((grub_uint8_t *)options + option_max); +- +- if (len < OFFSET_OF (option_data, opt) +- + sizeof (grub_net_dhcpv6_option_t)) +- { +- grub_dprintf ("net", +- "found dhcpv6 ia_na option with no address\n"); +- continue; +- } +- +- for (j = 0; left > sizeof (grub_net_dhcpv6_option_t); ) +- { +- ia_na_opt = (const grub_net_dhcpv6_option_t *) +- (ia_na->options + j); +- grub_uint16_t ia_na_opt_num, ia_na_opt_len; +- +- ia_na_opt_num = grub_be_to_cpu16 (ia_na_opt->option_num); +- ia_na_opt_len = grub_be_to_cpu16 (ia_na_opt->option_len); +- if (ia_na_opt_len == 0) +- break; +- if (j + ia_na_opt_len > left) +- break; +- if (ia_na_opt_num == GRUB_NET_DHCP6_IA_ADDRESS) +- { +- const grub_net_dhcpv6_opt_ia_address_t *ia_addr; +- +- ia_addr = (const grub_net_dhcpv6_opt_ia_address_t *) +- ia_na_opt; +- addr.type = GRUB_NET_NETWORK_LEVEL_PROTOCOL_IPV6; +- grub_memcpy(addr.ipv6, ia_addr->ipv6_address, +- sizeof (ia_addr->ipv6_address)); +- inter = grub_net_add_addr (name, card, &addr, hwaddr, 0); +- } +- +- j += ia_na_opt_len; +- left -= ia_na_opt_len; +- } ++ grub_dprintf ("bootp", "Skip invalid length DHCPv6 DNS_SERVERS \n"); ++ break; + } ++ dhcp6->num_dns_server = ln = len >> 4; ++ dhcp6->dns_server_addrs = la = grub_zalloc (ln * sizeof (*la)); + +- i += len + 4; ++ for (po = opt->data; ln > 0; po += 0x10, la++, ln--) ++ { ++ la->type = GRUB_NET_NETWORK_LEVEL_PROTOCOL_IPV6; ++ la->ipv6[0] = grub_get_unaligned64 (po); ++ la->ipv6[1] = grub_get_unaligned64 (po + 8); ++ la->option = DNS_OPTION_PREFER_IPV6; ++ } + } ++ break; + +- grub_print_error (); ++ case GRUB_NET_DHCP6_OPTION_BOOTFILE_URL: ++ dissect_url ((const char *)opt->data, ++ &dhcp6->boot_file_proto, ++ &dhcp6->boot_file_server_ip, ++ &dhcp6->boot_file_path); ++ break; ++ ++ default: ++ break; + } ++} + +- if (is_def) ++static void ++foreach_dhcp6_option (const struct grub_net_dhcp6_option *opt, grub_size_t size, dhcp6_option_hook_fn hook, void *hook_data) ++{ ++ while (size) + { ++ grub_uint16_t code, len; ++ ++ if (size < sizeof (*opt)) ++ { ++ grub_dprintf ("bootp", "DHCPv6: Options stopped with remaining size %" PRIxGRUB_SIZE "\n", size); ++ break; ++ } ++ size -= sizeof (*opt); ++ len = grub_be_to_cpu16 (opt->len); ++ code = grub_be_to_cpu16 (opt->code); ++ if (size < len) ++ { ++ grub_dprintf ("bootp", "DHCPv6: Options stopped at out of bound length %u for option %u\n", len, code); ++ break; ++ } ++ if (!len) ++ { ++ grub_dprintf ("bootp", "DHCPv6: Options stopped at zero length option %u\n", code); ++ break; ++ } ++ else ++ { ++ if (hook) ++ hook (opt, hook_data); ++ size -= len; ++ opt = (const struct grub_net_dhcp6_option *)((grub_uint8_t *)opt + len + sizeof (*opt)); ++ } ++ } ++} ++ ++static grub_dhcp6_options_t ++grub_dhcp6_options_get (const struct grub_net_dhcp6_packet *v6h, ++ grub_size_t size) ++{ ++ grub_dhcp6_options_t options; ++ ++ if (size < sizeof (*v6h)) ++ { ++ grub_error (GRUB_ERR_OUT_OF_RANGE, N_("DHCPv6 packet size too small")); ++ return NULL; ++ } ++ ++ options = grub_zalloc (sizeof(*options)); ++ if (!options) ++ return NULL; ++ ++ foreach_dhcp6_option ((const struct grub_net_dhcp6_option *)v6h->dhcp_options, ++ size - sizeof (*v6h), parse_dhcp6_option, options); ++ ++ return options; ++} ++ ++static void ++grub_dhcp6_options_free (grub_dhcp6_options_t options) ++{ ++ if (options->client_duid) ++ grub_free (options->client_duid); ++ if (options->server_duid) ++ grub_free (options->server_duid); ++ if (options->ia_addr) ++ grub_free (options->ia_addr); ++ if (options->dns_server_addrs) ++ grub_free (options->dns_server_addrs); ++ if (options->boot_file_proto) ++ grub_free (options->boot_file_proto); ++ if (options->boot_file_server_ip) ++ grub_free (options->boot_file_server_ip); ++ if (options->boot_file_path) ++ grub_free (options->boot_file_path); ++ ++ grub_free (options); ++} ++ ++static grub_dhcp6_session_t grub_dhcp6_sessions; ++#define FOR_DHCP6_SESSIONS_SAFE(var, next) FOR_LIST_ELEMENTS_SAFE (var, next, grub_dhcp6_sessions) ++#define FOR_DHCP6_SESSIONS(var) FOR_LIST_ELEMENTS (var, grub_dhcp6_sessions) ++ ++static void ++grub_net_configure_by_dhcp6_info (const char *name, ++ struct grub_net_card *card, ++ grub_dhcp6_options_t dhcp6, ++ int is_def, ++ int flags, ++ struct grub_net_network_level_interface **ret_inf) ++{ ++ grub_net_network_level_netaddress_t netaddr; ++ struct grub_net_network_level_interface *inf; ++ ++ if (dhcp6->ia_addr) ++ { ++ inf = grub_net_add_addr (name, card, dhcp6->ia_addr, &card->default_address, flags); ++ ++ netaddr.type = GRUB_NET_NETWORK_LEVEL_PROTOCOL_IPV6; ++ netaddr.ipv6.base[0] = dhcp6->ia_addr->ipv6[0]; ++ netaddr.ipv6.base[1] = 0; ++ netaddr.ipv6.masksize = 64; ++ grub_net_add_route (name, netaddr, inf); ++ ++ if (ret_inf) ++ *ret_inf = inf; ++ } ++ ++ if (dhcp6->dns_server_addrs) ++ { ++ grub_uint16_t i; ++ ++ for (i = 0; i < dhcp6->num_dns_server; ++i) ++ grub_net_add_dns_server (dhcp6->dns_server_addrs + i); ++ } ++ ++ if (dhcp6->boot_file_path) ++ grub_env_set_net_property (name, "boot_file", dhcp6->boot_file_path, ++ grub_strlen (dhcp6->boot_file_path)); ++ ++ if (is_def && dhcp6->boot_file_server_ip) ++ { ++ grub_net_default_server = grub_strdup (dhcp6->boot_file_server_ip); + grub_env_set ("net_default_interface", name); + grub_env_export ("net_default_interface"); + } ++} ++ ++static void ++grub_dhcp6_session_add (struct grub_net_network_level_interface *iface, ++ grub_uint32_t iaid) ++{ ++ grub_dhcp6_session_t se; ++ struct grub_datetime date; ++ grub_err_t err; ++ grub_int32_t t = 0; ++ ++ se = grub_malloc (sizeof (*se)); ++ ++ err = grub_get_datetime (&date); ++ if (err || !grub_datetime2unixtime (&date, &t)) ++ { ++ grub_errno = GRUB_ERR_NONE; ++ t = 0; ++ } + +- if (inter) +- grub_net_add_ipv6_local (inter, mask); +- return inter; ++ se->iface = iface; ++ se->iaid = iaid; ++ se->transaction_id = t; ++ se->start_time = grub_get_time_ms (); ++ se->duid.type = grub_cpu_to_be16_compile_time (3) ; ++ se->duid.hw_type = grub_cpu_to_be16_compile_time (1); ++ grub_memcpy (&se->duid.hwaddr, &iface->hwaddress.mac, sizeof (se->duid.hwaddr)); ++ se->adv = NULL; ++ se->reply = NULL; ++ grub_list_push (GRUB_AS_LIST_P (&grub_dhcp6_sessions), GRUB_AS_LIST (se)); + } + ++static void ++grub_dhcp6_session_remove (grub_dhcp6_session_t se) ++{ ++ grub_list_remove (GRUB_AS_LIST (se)); ++ if (se->adv) ++ grub_dhcp6_options_free (se->adv); ++ if (se->reply) ++ grub_dhcp6_options_free (se->reply); ++ grub_free (se); ++} ++ ++static void ++grub_dhcp6_session_remove_all (void) ++{ ++ grub_dhcp6_session_t se, next; ++ ++ FOR_DHCP6_SESSIONS_SAFE (se, next) ++ { ++ grub_dhcp6_session_remove (se); ++ } ++ grub_dhcp6_sessions = NULL; ++} ++ ++static grub_err_t ++grub_dhcp6_session_configure_network (grub_dhcp6_session_t se) ++{ ++ char *name; ++ ++ name = grub_xasprintf ("%s:dhcp6", se->iface->card->name); ++ if (!name) ++ return grub_errno; ++ ++ grub_net_configure_by_dhcp6_info (name, se->iface->card, se->reply, 1, 0, 0); ++ grub_free (name); ++ ++ return GRUB_ERR_NONE; ++} ++ ++static grub_err_t ++grub_dhcp6_session_send_request (grub_dhcp6_session_t se) ++{ ++ struct grub_net_buff *nb; ++ struct grub_net_dhcp6_option *opt; ++ struct grub_net_dhcp6_packet *v6h; ++ struct grub_net_dhcp6_option_iana *ia_na; ++ struct grub_net_dhcp6_option_iaaddr *iaaddr; ++ struct udphdr *udph; ++ grub_net_network_level_address_t multicast; ++ grub_net_link_level_address_t ll_multicast; ++ grub_uint64_t elapsed; ++ struct grub_net_network_level_interface *inf = se->iface; ++ grub_dhcp6_options_t dhcp6 = se->adv; ++ grub_err_t err = GRUB_ERR_NONE; ++ ++ multicast.type = GRUB_NET_NETWORK_LEVEL_PROTOCOL_IPV6; ++ multicast.ipv6[0] = grub_cpu_to_be64_compile_time (0xff02ULL << 48); ++ multicast.ipv6[1] = grub_cpu_to_be64_compile_time (0x10002ULL); ++ ++ err = grub_net_link_layer_resolve (inf, &multicast, &ll_multicast); ++ if (err) ++ return err; ++ ++ nb = grub_netbuff_alloc (GRUB_DHCP6_DEFAULT_NETBUFF_ALLOC_SIZE); ++ ++ if (!nb) ++ return grub_errno; ++ ++ err = grub_netbuff_reserve (nb, GRUB_DHCP6_DEFAULT_NETBUFF_ALLOC_SIZE); ++ if (err) ++ { ++ grub_netbuff_free (nb); ++ return err; ++ } ++ ++ err = grub_netbuff_push (nb, dhcp6->client_duid_len + sizeof (*opt)); ++ if (err) ++ { ++ grub_netbuff_free (nb); ++ return err; ++ } ++ opt = (struct grub_net_dhcp6_option *)nb->data; ++ opt->code = grub_cpu_to_be16_compile_time (GRUB_NET_DHCP6_OPTION_CLIENTID); ++ opt->len = grub_cpu_to_be16 (dhcp6->client_duid_len); ++ grub_memcpy (opt->data, dhcp6->client_duid , dhcp6->client_duid_len); ++ ++ err = grub_netbuff_push (nb, dhcp6->server_duid_len + sizeof (*opt)); ++ if (err) ++ { ++ grub_netbuff_free (nb); ++ return err; ++ } ++ opt = (struct grub_net_dhcp6_option *)nb->data; ++ opt->code = grub_cpu_to_be16_compile_time (GRUB_NET_DHCP6_OPTION_SERVERID); ++ opt->len = grub_cpu_to_be16 (dhcp6->server_duid_len); ++ grub_memcpy (opt->data, dhcp6->server_duid , dhcp6->server_duid_len); ++ ++ err = grub_netbuff_push (nb, sizeof (*ia_na) + sizeof (*opt)); ++ if (err) ++ { ++ grub_netbuff_free (nb); ++ return err; ++ } ++ ++ if (dhcp6->ia_addr) ++ { ++ err = grub_netbuff_push (nb, sizeof(*iaaddr) + sizeof (*opt)); ++ if (err) ++ { ++ grub_netbuff_free (nb); ++ return err; ++ } ++ } ++ opt = (struct grub_net_dhcp6_option *)nb->data; ++ opt->code = grub_cpu_to_be16_compile_time (GRUB_NET_DHCP6_OPTION_IA_NA); ++ opt->len = grub_cpu_to_be16 (sizeof (*ia_na)); ++ if (dhcp6->ia_addr) ++ opt->len += grub_cpu_to_be16 (sizeof(*iaaddr) + sizeof (*opt)); ++ ++ ia_na = (struct grub_net_dhcp6_option_iana *)opt->data; ++ ia_na->iaid = grub_cpu_to_be32 (dhcp6->iaid); ++ ++ ia_na->t1 = grub_cpu_to_be32 (dhcp6->t1); ++ ia_na->t2 = grub_cpu_to_be32 (dhcp6->t2); ++ ++ if (dhcp6->ia_addr) ++ { ++ opt = (struct grub_net_dhcp6_option *)ia_na->data; ++ opt->code = grub_cpu_to_be16_compile_time (GRUB_NET_DHCP6_OPTION_IAADDR); ++ opt->len = grub_cpu_to_be16 (sizeof (*iaaddr)); ++ iaaddr = (struct grub_net_dhcp6_option_iaaddr *)opt->data; ++ grub_set_unaligned64 (iaaddr->addr, dhcp6->ia_addr->ipv6[0]); ++ grub_set_unaligned64 (iaaddr->addr + 8, dhcp6->ia_addr->ipv6[1]); ++ ++ iaaddr->preferred_lifetime = grub_cpu_to_be32 (dhcp6->preferred_lifetime); ++ iaaddr->valid_lifetime = grub_cpu_to_be32 (dhcp6->valid_lifetime); ++ } ++ ++ err = grub_netbuff_push (nb, sizeof (*opt) + 2 * sizeof (grub_uint16_t)); ++ if (err) ++ { ++ grub_netbuff_free (nb); ++ return err; ++ } ++ ++ opt = (struct grub_net_dhcp6_option*) nb->data; ++ opt->code = grub_cpu_to_be16_compile_time (GRUB_NET_DHCP6_OPTION_ORO); ++ opt->len = grub_cpu_to_be16_compile_time (2 * sizeof (grub_uint16_t)); ++ grub_set_unaligned16 (opt->data, grub_cpu_to_be16_compile_time (GRUB_NET_DHCP6_OPTION_BOOTFILE_URL)); ++ grub_set_unaligned16 (opt->data + 2, grub_cpu_to_be16_compile_time (GRUB_NET_DHCP6_OPTION_DNS_SERVERS)); ++ ++ err = grub_netbuff_push (nb, sizeof (*opt) + sizeof (grub_uint16_t)); ++ if (err) ++ { ++ grub_netbuff_free (nb); ++ return err; ++ } ++ opt = (struct grub_net_dhcp6_option*) nb->data; ++ opt->code = grub_cpu_to_be16_compile_time (GRUB_NET_DHCP6_OPTION_ELAPSED_TIME); ++ opt->len = grub_cpu_to_be16_compile_time (sizeof (grub_uint16_t)); ++ ++ /* the time is expressed in hundredths of a second */ ++ elapsed = grub_divmod64 (grub_get_time_ms () - se->start_time, 10, 0); ++ ++ if (elapsed > 0xffff) ++ elapsed = 0xffff; ++ ++ grub_set_unaligned16 (opt->data, grub_cpu_to_be16 ((grub_uint16_t)elapsed)); ++ ++ err = grub_netbuff_push (nb, sizeof (*v6h)); ++ if (err) ++ { ++ grub_netbuff_free (nb); ++ return err; ++ } ++ ++ v6h = (struct grub_net_dhcp6_packet *) nb->data; ++ v6h->message_type = GRUB_NET_DHCP6_REQUEST; ++ v6h->transaction_id = se->transaction_id; ++ ++ err = grub_netbuff_push (nb, sizeof (*udph)); ++ if (err) ++ { ++ grub_netbuff_free (nb); ++ return err; ++ } ++ ++ udph = (struct udphdr *) nb->data; ++ udph->src = grub_cpu_to_be16_compile_time (DHCP6_CLIENT_PORT); ++ udph->dst = grub_cpu_to_be16_compile_time (DHCP6_SERVER_PORT); ++ udph->chksum = 0; ++ udph->len = grub_cpu_to_be16 (nb->tail - nb->data); ++ ++ udph->chksum = grub_net_ip_transport_checksum (nb, GRUB_NET_IP_UDP, ++ &inf->address, ++ &multicast); ++ err = grub_net_send_ip_packet (inf, &multicast, &ll_multicast, nb, ++ GRUB_NET_IP_UDP); ++ ++ grub_netbuff_free (nb); ++ ++ return err; ++} ++ ++struct grub_net_network_level_interface * ++grub_net_configure_by_dhcpv6_reply (const char *name, ++ struct grub_net_card *card, ++ grub_net_interface_flags_t flags, ++ const struct grub_net_dhcp6_packet *v6h, ++ grub_size_t size, ++ int is_def, ++ char **device, char **path) ++{ ++ struct grub_net_network_level_interface *inf; ++ grub_dhcp6_options_t dhcp6; ++ ++ dhcp6 = grub_dhcp6_options_get (v6h, size); ++ if (!dhcp6) ++ { ++ grub_print_error (); ++ return NULL; ++ } ++ ++ grub_net_configure_by_dhcp6_info (name, card, dhcp6, is_def, flags, &inf); ++ ++ if (device && dhcp6->boot_file_proto && dhcp6->boot_file_server_ip) ++ { ++ *device = grub_xasprintf ("%s,%s", dhcp6->boot_file_proto, dhcp6->boot_file_server_ip); ++ grub_print_error (); ++ } ++ if (path && dhcp6->boot_file_path) ++ { ++ *path = grub_strdup (dhcp6->boot_file_path); ++ grub_print_error (); ++ if (*path) ++ { ++ char *slash; ++ slash = grub_strrchr (*path, '/'); ++ if (slash) ++ *slash = 0; ++ else ++ **path = 0; ++ } ++ } ++ ++ grub_dhcp6_options_free (dhcp6); ++ return inf; ++} + + void + grub_net_process_dhcp (struct grub_net_buff *nb, +@@ -550,6 +1042,77 @@ grub_net_process_dhcp (struct grub_net_buff *nb, + } + } + ++grub_err_t ++grub_net_process_dhcp6 (struct grub_net_buff *nb, ++ struct grub_net_card *card __attribute__ ((unused))) ++{ ++ const struct grub_net_dhcp6_packet *v6h; ++ grub_dhcp6_session_t se; ++ grub_size_t size; ++ grub_dhcp6_options_t options; ++ ++ v6h = (const struct grub_net_dhcp6_packet *) nb->data; ++ size = nb->tail - nb->data; ++ ++ options = grub_dhcp6_options_get (v6h, size); ++ if (!options) ++ return grub_errno; ++ ++ if (!options->client_duid || !options->server_duid || !options->ia_addr) ++ { ++ grub_dhcp6_options_free (options); ++ return grub_error (GRUB_ERR_BAD_ARGUMENT, "Bad DHCPv6 Packet"); ++ } ++ ++ FOR_DHCP6_SESSIONS (se) ++ { ++ if (se->transaction_id == v6h->transaction_id && ++ grub_memcmp (options->client_duid, &se->duid, sizeof (se->duid)) == 0 && ++ se->iaid == options->iaid) ++ break; ++ } ++ ++ if (!se) ++ { ++ grub_dprintf ("bootp", "DHCPv6 session not found\n"); ++ grub_dhcp6_options_free (options); ++ return GRUB_ERR_NONE; ++ } ++ ++ if (v6h->message_type == GRUB_NET_DHCP6_ADVERTISE) ++ { ++ if (se->adv) ++ { ++ grub_dprintf ("bootp", "Skipped DHCPv6 Advertised .. \n"); ++ grub_dhcp6_options_free (options); ++ return GRUB_ERR_NONE; ++ } ++ ++ se->adv = options; ++ return grub_dhcp6_session_send_request (se); ++ } ++ else if (v6h->message_type == GRUB_NET_DHCP6_REPLY) ++ { ++ if (!se->adv) ++ { ++ grub_dprintf ("bootp", "Skipped DHCPv6 Reply .. \n"); ++ grub_dhcp6_options_free (options); ++ return GRUB_ERR_NONE; ++ } ++ ++ se->reply = options; ++ grub_dhcp6_session_configure_network (se); ++ grub_dhcp6_session_remove (se); ++ return GRUB_ERR_NONE; ++ } ++ else ++ { ++ grub_dhcp6_options_free (options); ++ } ++ ++ return GRUB_ERR_NONE; ++} ++ + static grub_err_t + grub_cmd_dhcpopt (struct grub_command *cmd __attribute__ ((unused)), + int argc, char **args) +@@ -824,7 +1387,174 @@ grub_cmd_bootp (struct grub_command *cmd __attribute__ ((unused)), + return err; + } + +-static grub_command_t cmd_getdhcp, cmd_bootp; ++static grub_err_t ++grub_cmd_bootp6 (struct grub_command *cmd __attribute__ ((unused)), ++ int argc, char **args) ++{ ++ struct grub_net_card *card; ++ grub_uint32_t iaid = 0; ++ int interval; ++ grub_err_t err; ++ grub_dhcp6_session_t se; ++ ++ err = GRUB_ERR_NONE; ++ ++ FOR_NET_CARDS (card) ++ { ++ struct grub_net_network_level_interface *iface; ++ ++ if (argc > 0 && grub_strcmp (card->name, args[0]) != 0) ++ continue; ++ ++ iface = grub_net_ipv6_get_link_local (card, &card->default_address); ++ if (!iface) ++ { ++ grub_dhcp6_session_remove_all (); ++ return grub_errno; ++ } ++ ++ grub_dhcp6_session_add (iface, iaid++); ++ } ++ ++ for (interval = 200; interval < 10000; interval *= 2) ++ { ++ int done = 1; ++ ++ FOR_DHCP6_SESSIONS (se) ++ { ++ struct grub_net_buff *nb; ++ struct grub_net_dhcp6_option *opt; ++ struct grub_net_dhcp6_packet *v6h; ++ struct grub_net_dhcp6_option_duid_ll *duid; ++ struct grub_net_dhcp6_option_iana *ia_na; ++ grub_net_network_level_address_t multicast; ++ grub_net_link_level_address_t ll_multicast; ++ struct udphdr *udph; ++ ++ multicast.type = GRUB_NET_NETWORK_LEVEL_PROTOCOL_IPV6; ++ multicast.ipv6[0] = grub_cpu_to_be64_compile_time (0xff02ULL << 48); ++ multicast.ipv6[1] = grub_cpu_to_be64_compile_time (0x10002ULL); ++ ++ err = grub_net_link_layer_resolve (se->iface, ++ &multicast, &ll_multicast); ++ if (err) ++ { ++ grub_dhcp6_session_remove_all (); ++ return err; ++ } ++ ++ nb = grub_netbuff_alloc (GRUB_DHCP6_DEFAULT_NETBUFF_ALLOC_SIZE); ++ ++ if (!nb) ++ { ++ grub_dhcp6_session_remove_all (); ++ return grub_errno; ++ } ++ ++ err = grub_netbuff_reserve (nb, GRUB_DHCP6_DEFAULT_NETBUFF_ALLOC_SIZE); ++ if (err) ++ { ++ grub_dhcp6_session_remove_all (); ++ grub_netbuff_free (nb); ++ return err; ++ } ++ ++ err = grub_netbuff_push (nb, sizeof (*opt) + sizeof (grub_uint16_t)); ++ if (err) ++ { ++ grub_dhcp6_session_remove_all (); ++ grub_netbuff_free (nb); ++ return err; ++ } ++ ++ opt = (struct grub_net_dhcp6_option *)nb->data; ++ opt->code = grub_cpu_to_be16_compile_time (GRUB_NET_DHCP6_OPTION_ELAPSED_TIME); ++ opt->len = grub_cpu_to_be16_compile_time (sizeof (grub_uint16_t)); ++ grub_set_unaligned16 (opt->data, 0); ++ ++ err = grub_netbuff_push (nb, sizeof (*opt) + sizeof (*duid)); ++ if (err) ++ { ++ grub_dhcp6_session_remove_all (); ++ grub_netbuff_free (nb); ++ return err; ++ } ++ ++ opt = (struct grub_net_dhcp6_option *)nb->data; ++ opt->code = grub_cpu_to_be16_compile_time (GRUB_NET_DHCP6_OPTION_CLIENTID); ++ opt->len = grub_cpu_to_be16 (sizeof (*duid)); ++ ++ duid = (struct grub_net_dhcp6_option_duid_ll *) opt->data; ++ grub_memcpy (duid, &se->duid, sizeof (*duid)); ++ ++ err = grub_netbuff_push (nb, sizeof (*opt) + sizeof (*ia_na)); ++ if (err) ++ { ++ grub_dhcp6_session_remove_all (); ++ grub_netbuff_free (nb); ++ return err; ++ } ++ ++ opt = (struct grub_net_dhcp6_option *)nb->data; ++ opt->code = grub_cpu_to_be16_compile_time (GRUB_NET_DHCP6_OPTION_IA_NA); ++ opt->len = grub_cpu_to_be16 (sizeof (*ia_na)); ++ ia_na = (struct grub_net_dhcp6_option_iana *)opt->data; ++ ia_na->iaid = grub_cpu_to_be32 (se->iaid); ++ ia_na->t1 = 0; ++ ia_na->t2 = 0; ++ ++ err = grub_netbuff_push (nb, sizeof (*v6h)); ++ if (err) ++ { ++ grub_dhcp6_session_remove_all (); ++ grub_netbuff_free (nb); ++ return err; ++ } ++ ++ v6h = (struct grub_net_dhcp6_packet *)nb->data; ++ v6h->message_type = GRUB_NET_DHCP6_SOLICIT; ++ v6h->transaction_id = se->transaction_id; ++ ++ grub_netbuff_push (nb, sizeof (*udph)); ++ ++ udph = (struct udphdr *) nb->data; ++ udph->src = grub_cpu_to_be16_compile_time (DHCP6_CLIENT_PORT); ++ udph->dst = grub_cpu_to_be16_compile_time (DHCP6_SERVER_PORT); ++ udph->chksum = 0; ++ udph->len = grub_cpu_to_be16 (nb->tail - nb->data); ++ ++ udph->chksum = grub_net_ip_transport_checksum (nb, GRUB_NET_IP_UDP, ++ &se->iface->address, &multicast); ++ ++ err = grub_net_send_ip_packet (se->iface, &multicast, ++ &ll_multicast, nb, GRUB_NET_IP_UDP); ++ done = 0; ++ grub_netbuff_free (nb); ++ ++ if (err) ++ { ++ grub_dhcp6_session_remove_all (); ++ return err; ++ } ++ } ++ if (!done) ++ grub_net_poll_cards (interval, 0); ++ } ++ ++ FOR_DHCP6_SESSIONS (se) ++ { ++ grub_error_push (); ++ err = grub_error (GRUB_ERR_FILE_NOT_FOUND, ++ N_("couldn't autoconfigure %s"), ++ se->iface->card->name); ++ } ++ ++ grub_dhcp6_session_remove_all (); ++ ++ return err; ++} ++ ++static grub_command_t cmd_getdhcp, cmd_bootp, cmd_bootp6; + + void + grub_bootp_init (void) +@@ -835,6 +1565,9 @@ grub_bootp_init (void) + cmd_getdhcp = grub_register_command ("net_get_dhcp_option", grub_cmd_dhcpopt, + N_("VAR INTERFACE NUMBER DESCRIPTION"), + N_("retrieve DHCP option and save it into VAR. If VAR is - then print the value.")); ++ cmd_bootp6 = grub_register_command ("net_bootp6", grub_cmd_bootp6, ++ N_("[CARD]"), ++ N_("perform a DHCPv6 autoconfiguration")); + } + + void +@@ -842,4 +1575,5 @@ grub_bootp_fini (void) + { + grub_unregister_command (cmd_getdhcp); + grub_unregister_command (cmd_bootp); ++ grub_unregister_command (cmd_bootp6); + } +diff --git a/grub-core/net/ip.c b/grub-core/net/ip.c +index b2ca74b6e..9a4e589aa 100644 +--- a/grub-core/net/ip.c ++++ b/grub-core/net/ip.c +@@ -239,6 +239,45 @@ handle_dgram (struct grub_net_buff *nb, + { + struct udphdr *udph; + udph = (struct udphdr *) nb->data; ++ ++ if (proto == GRUB_NET_IP_UDP && udph->dst == grub_cpu_to_be16_compile_time (DHCP6_CLIENT_PORT)) ++ { ++ if (udph->chksum) ++ { ++ grub_uint16_t chk, expected; ++ chk = udph->chksum; ++ udph->chksum = 0; ++ expected = grub_net_ip_transport_checksum (nb, ++ GRUB_NET_IP_UDP, ++ source, ++ dest); ++ if (expected != chk) ++ { ++ grub_dprintf ("net", "Invalid UDP checksum. " ++ "Expected %x, got %x\n", ++ grub_be_to_cpu16 (expected), ++ grub_be_to_cpu16 (chk)); ++ grub_netbuff_free (nb); ++ return GRUB_ERR_NONE; ++ } ++ udph->chksum = chk; ++ } ++ ++ err = grub_netbuff_pull (nb, sizeof (*udph)); ++ if (err) ++ { ++ grub_netbuff_free (nb); ++ return err; ++ } ++ ++ err = grub_net_process_dhcp6 (nb, card); ++ if (err) ++ grub_print_error (); ++ ++ grub_netbuff_free (nb); ++ return GRUB_ERR_NONE; ++ } ++ + if (proto == GRUB_NET_IP_UDP && grub_be_to_cpu16 (udph->dst) == 68) + { + const struct grub_net_bootp_packet *bootp; +diff --git a/include/grub/net.h b/include/grub/net.h +index f4cd86e58..5f78b22e1 100644 +--- a/include/grub/net.h ++++ b/include/grub/net.h +@@ -447,50 +447,65 @@ struct grub_net_bootp_packet + grub_uint8_t vendor[0]; + } GRUB_PACKED; + +-enum +- { +- GRUB_NET_DHCP6_IA_NA = 3, +- GRUB_NET_DHCP6_IA_ADDRESS = 5, +- GRUB_NET_DHCP6_BOOTFILE_URL = 59, +- }; +- +-struct grub_net_dhcpv6_option ++struct grub_net_dhcp6_packet + { +- grub_uint16_t option_num; +- grub_uint16_t option_len; +- grub_uint8_t option_data[]; ++ grub_uint32_t message_type:8; ++ grub_uint32_t transaction_id:24; ++ grub_uint8_t dhcp_options[0]; + } GRUB_PACKED; +-typedef struct grub_net_dhcpv6_option grub_net_dhcpv6_option_t; + +-struct grub_net_dhcpv6_opt_ia_na +-{ +- grub_uint16_t option_num; +- grub_uint16_t option_len; ++struct grub_net_dhcp6_option { ++ grub_uint16_t code; ++ grub_uint16_t len; ++ grub_uint8_t data[0]; ++} GRUB_PACKED; ++ ++struct grub_net_dhcp6_option_iana { + grub_uint32_t iaid; + grub_uint32_t t1; + grub_uint32_t t2; +- grub_uint8_t options[]; ++ grub_uint8_t data[0]; + } GRUB_PACKED; +-typedef struct grub_net_dhcpv6_opt_ia_na grub_net_dhcpv6_opt_ia_na_t; + +-struct grub_net_dhcpv6_opt_ia_address +-{ +- grub_uint16_t option_num; +- grub_uint16_t option_len; +- grub_uint64_t ipv6_address[2]; ++struct grub_net_dhcp6_option_iaaddr { ++ grub_uint8_t addr[16]; + grub_uint32_t preferred_lifetime; + grub_uint32_t valid_lifetime; +- grub_uint8_t options[]; ++ grub_uint8_t data[0]; + } GRUB_PACKED; +-typedef struct grub_net_dhcpv6_opt_ia_address grub_net_dhcpv6_opt_ia_address_t; + +-struct grub_net_dhcpv6_packet ++struct grub_net_dhcp6_option_duid_ll + { +- grub_uint32_t message_type:8; +- grub_uint32_t transaction_id:24; +- grub_uint8_t dhcp_options[1024]; ++ grub_uint16_t type; ++ grub_uint16_t hw_type; ++ grub_uint8_t hwaddr[6]; + } GRUB_PACKED; +-typedef struct grub_net_dhcpv6_packet grub_net_dhcpv6_packet_t; ++ ++enum ++ { ++ GRUB_NET_DHCP6_SOLICIT = 1, ++ GRUB_NET_DHCP6_ADVERTISE = 2, ++ GRUB_NET_DHCP6_REQUEST = 3, ++ GRUB_NET_DHCP6_REPLY = 7 ++ }; ++ ++enum ++ { ++ DHCP6_CLIENT_PORT = 546, ++ DHCP6_SERVER_PORT = 547 ++ }; ++ ++enum ++ { ++ GRUB_NET_DHCP6_OPTION_CLIENTID = 1, ++ GRUB_NET_DHCP6_OPTION_SERVERID = 2, ++ GRUB_NET_DHCP6_OPTION_IA_NA = 3, ++ GRUB_NET_DHCP6_OPTION_IAADDR = 5, ++ GRUB_NET_DHCP6_OPTION_ORO = 6, ++ GRUB_NET_DHCP6_OPTION_ELAPSED_TIME = 8, ++ GRUB_NET_DHCP6_OPTION_DNS_SERVERS = 23, ++ GRUB_NET_DHCP6_OPTION_BOOTFILE_URL = 59 ++ }; + + #define GRUB_NET_BOOTP_RFC1048_MAGIC_0 0x63 + #define GRUB_NET_BOOTP_RFC1048_MAGIC_1 0x82 +@@ -521,12 +536,12 @@ grub_net_configure_by_dhcp_ack (const char *name, + int is_def, char **device, char **path); + + struct grub_net_network_level_interface * +-grub_net_configure_by_dhcpv6_ack (const char *name, +- struct grub_net_card *card, +- grub_net_interface_flags_t flags, +- const grub_net_link_level_address_t *hwaddr, +- const struct grub_net_dhcpv6_packet *packet, +- int is_def, char **device, char **path); ++grub_net_configure_by_dhcpv6_reply (const char *name, ++ struct grub_net_card *card, ++ grub_net_interface_flags_t flags, ++ const struct grub_net_dhcp6_packet *v6, ++ grub_size_t size, ++ int is_def, char **device, char **path); + + int + grub_ipv6_get_masksize(grub_uint16_t *mask); +@@ -543,6 +558,10 @@ void + grub_net_process_dhcp (struct grub_net_buff *nb, + struct grub_net_card *card); + ++grub_err_t ++grub_net_process_dhcp6 (struct grub_net_buff *nb, ++ struct grub_net_card *card); ++ + int + grub_net_hwaddr_cmp (const grub_net_link_level_address_t *a, + const grub_net_link_level_address_t *b); +-- +2.14.3 + diff --git a/0216-efinet-UEFI-IPv6-PXE-support.patch b/0216-efinet-UEFI-IPv6-PXE-support.patch new file mode 100644 index 0000000..c2499c7 --- /dev/null +++ b/0216-efinet-UEFI-IPv6-PXE-support.patch @@ -0,0 +1,160 @@ +From 85d0c813f88ea79d0a4eca5889e1e27634d57c39 Mon Sep 17 00:00:00 2001 +From: Michael Chang +Date: Wed, 15 Apr 2015 14:48:30 +0800 +Subject: [PATCH 216/225] 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 +Signed-off-by: Ken Lin +--- + grub-core/net/drivers/efi/efinet.c | 23 +++++--------- + include/grub/efi/api.h | 64 ++++++++++++++++++++++++-------------- + 2 files changed, 48 insertions(+), 39 deletions(-) + +diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c +index bf36b446d..713dbd89d 100644 +--- a/grub-core/net/drivers/efi/efinet.c ++++ b/grub-core/net/drivers/efi/efinet.c +@@ -477,26 +477,19 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device, + pxe_mode = pxe->mode; + if (pxe_mode->using_ipv6) + { +- grub_net_link_level_address_t hwaddr; +- struct grub_net_network_level_interface *intf; +- + grub_dprintf ("efinet", "using ipv6 and dhcpv6\n"); + grub_dprintf ("efinet", "dhcp_ack_received: %s%s\n", + pxe_mode->dhcp_ack_received ? "yes" : "no", + pxe_mode->dhcp_ack_received ? "" : " cannot continue"); +- if (!pxe_mode->dhcp_ack_received) +- continue; +- +- hwaddr.type = GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET; +- grub_memcpy (hwaddr.mac, +- card->efi_net->mode->current_address, +- sizeof (hwaddr.mac)); +- +- intf = grub_net_configure_by_dhcpv6_ack (card->name, card, 0, &hwaddr, +- (const struct grub_net_dhcpv6_packet *)&pxe_mode->dhcp_ack.dhcpv6, +- 1, device, path); +- if (intf && device && path) ++ grub_net_configure_by_dhcpv6_reply (card->name, card, 0, ++ (struct grub_net_dhcp6_packet *) ++ &pxe_mode->dhcp_ack, ++ sizeof (pxe_mode->dhcp_ack), ++ 1, device, path); ++ if (device && path) + grub_dprintf ("efinet", "device: `%s' path: `%s'\n", *device, *path); ++ if (grub_errno) ++ grub_print_error (); + } + else + { +diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h +index ddc5ecfb0..3db8e0bc7 100644 +--- a/include/grub/efi/api.h ++++ b/include/grub/efi/api.h +@@ -1503,29 +1503,42 @@ typedef union + grub_efi_pxe_dhcpv6_packet_t dhcpv6; + } grub_efi_pxe_packet_t; + +-#define GRUB_EFI_PXE_MAX_IPCNT 8 +-#define GRUB_EFI_PXE_MAX_ARP_ENTRIES 8 +-#define GRUB_EFI_PXE_MAX_ROUTE_ENTRIES 8 + +-typedef struct grub_efi_pxe_ip_filter +-{ +- grub_efi_uint8_t filters; +- grub_efi_uint8_t ip_count; +- grub_efi_uint8_t reserved; +- grub_efi_ip_address_t ip_list[GRUB_EFI_PXE_MAX_IPCNT]; ++typedef struct { ++ grub_uint8_t addr[4]; ++} grub_efi_pxe_ipv4_address_t; ++ ++typedef struct { ++ grub_uint8_t addr[16]; ++} grub_efi_pxe_ipv6_address_t; ++ ++typedef struct { ++ grub_uint8_t addr[32]; ++} grub_efi_pxe_mac_address_t; ++ ++typedef union { ++ grub_uint32_t addr[4]; ++ grub_efi_pxe_ipv4_address_t v4; ++ grub_efi_pxe_ipv6_address_t v6; ++} grub_efi_pxe_ip_address_t; ++ ++#define GRUB_EFI_PXE_BASE_CODE_MAX_IPCNT 8 ++typedef struct { ++ grub_uint8_t filters; ++ grub_uint8_t ip_cnt; ++ grub_uint16_t reserved; ++ grub_efi_pxe_ip_address_t ip_list[GRUB_EFI_PXE_BASE_CODE_MAX_IPCNT]; + } grub_efi_pxe_ip_filter_t; + +-typedef struct grub_efi_pxe_arp_entry +-{ +- grub_efi_ip_address_t ip_addr; +- grub_efi_mac_address_t mac_addr; ++typedef struct { ++ grub_efi_pxe_ip_address_t ip_addr; ++ grub_efi_pxe_mac_address_t mac_addr; + } grub_efi_pxe_arp_entry_t; + +-typedef struct grub_efi_pxe_route_entry +-{ +- grub_efi_ip_address_t ip_addr; +- grub_efi_ip_address_t subnet_mask; +- grub_efi_ip_address_t gateway_addr; ++typedef struct { ++ grub_efi_pxe_ip_address_t ip_addr; ++ grub_efi_pxe_ip_address_t subnet_mask; ++ grub_efi_pxe_ip_address_t gw_addr; + } grub_efi_pxe_route_entry_t; + + typedef struct grub_efi_pxe_icmp_error +@@ -1539,10 +1552,10 @@ typedef struct grub_efi_pxe_icmp_error + grub_efi_uint32_t mtu; + grub_efi_uint32_t pointer; + struct +- { +- grub_efi_uint16_t identifier; +- grub_efi_uint16_t sequence; +- } echo; ++ { ++ grub_efi_uint16_t identifier; ++ grub_efi_uint16_t sequence; ++ } echo; + } u; + grub_efi_uint8_t data[494]; + } grub_efi_pxe_icmp_error_t; +@@ -1553,6 +1566,9 @@ typedef struct grub_efi_pxe_tftp_error + grub_efi_char8_t error_string[127]; + } grub_efi_pxe_tftp_error_t; + ++#define GRUB_EFI_PXE_BASE_CODE_MAX_ARP_ENTRIES 8 ++#define GRUB_EFI_PXE_BASE_CODE_MAX_ROUTE_ENTRIES 8 ++ + typedef struct grub_efi_pxe_mode + { + grub_efi_boolean_t started; +@@ -1584,9 +1600,9 @@ typedef struct grub_efi_pxe_mode + grub_efi_pxe_packet_t pxe_bis_reply; + grub_efi_pxe_ip_filter_t ip_filter; + grub_efi_uint32_t arp_cache_entries; +- grub_efi_pxe_arp_entry_t arp_cache[GRUB_EFI_PXE_MAX_ARP_ENTRIES]; ++ grub_efi_pxe_arp_entry_t arp_cache[GRUB_EFI_PXE_BASE_CODE_MAX_ARP_ENTRIES]; + grub_efi_uint32_t route_table_entries; +- grub_efi_pxe_route_entry_t route_table[GRUB_EFI_PXE_MAX_ROUTE_ENTRIES]; ++ grub_efi_pxe_route_entry_t route_table[GRUB_EFI_PXE_BASE_CODE_MAX_ROUTE_ENTRIES]; + grub_efi_pxe_icmp_error_t icmp_error; + grub_efi_pxe_tftp_error_t tftp_error; + } grub_efi_pxe_mode_t; +-- +2.14.3 + diff --git a/0217-grub.texi-Add-net_bootp6-doument.patch b/0217-grub.texi-Add-net_bootp6-doument.patch new file mode 100644 index 0000000..0bfd0e5 --- /dev/null +++ b/0217-grub.texi-Add-net_bootp6-doument.patch @@ -0,0 +1,51 @@ +From 250b45c1e4e3f53e90c75fdbada6e00dfe7d44c1 Mon Sep 17 00:00:00 2001 +From: Michael Chang +Date: Tue, 5 May 2015 14:19:24 +0800 +Subject: [PATCH 217/225] grub.texi: Add net_bootp6 doument + +Update grub documentation for net_bootp6 command. + +Signed-off-by: Michael Chang +Signed-off-by: Ken Lin +--- + docs/grub.texi | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + +diff --git a/docs/grub.texi b/docs/grub.texi +index 983dddafe..4fc999e6a 100644 +--- a/docs/grub.texi ++++ b/docs/grub.texi +@@ -5224,6 +5224,7 @@ This command is only available on AArch64 systems. + * net_add_dns:: Add a DNS server + * net_add_route:: Add routing entry + * net_bootp:: Perform a bootp autoconfiguration ++* net_bootp6:: Perform a DHCPv6 autoconfiguration + * net_del_addr:: Remove IP address from interface + * net_del_dns:: Remove a DNS server + * net_del_route:: Remove a route entry +@@ -5305,6 +5306,22 @@ Sets environment variable @samp{net_}@var{}@samp{_dhcp_extensionspath} + + @end deffn + ++@node net_bootp6 ++@subsection net_bootp6 ++ ++@deffn Command net_bootp6 [@var{card}] ++Perform configuration of @var{card} using DHCPv6 protocol. If no card name is ++specified, try to configure all existing cards. If configuration was ++successful, interface with name @var{card}@samp{:dhcp6} and configured address ++is added to @var{card}. ++ ++@table @samp ++@item 1 (Domain Name Server) ++Adds all servers from option value to the list of servers used during name ++resolution. ++@end table ++ ++@end deffn + + @node net_del_addr + @subsection net_del_addr +-- +2.14.3 + diff --git a/0218-bootp-Add-processing-DHCPACK-packet-from-HTTP-Boot.patch b/0218-bootp-Add-processing-DHCPACK-packet-from-HTTP-Boot.patch new file mode 100644 index 0000000..6af3eba --- /dev/null +++ b/0218-bootp-Add-processing-DHCPACK-packet-from-HTTP-Boot.patch @@ -0,0 +1,138 @@ +From c9a42ac13613a710e794d86870e42eb241fe7bf3 Mon Sep 17 00:00:00 2001 +From: Michael Chang +Date: Thu, 14 Jul 2016 18:45:14 +0800 +Subject: [PATCH 218/225] 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 +Signed-off-by: Ken Lin +--- + grub-core/net/bootp.c | 68 +++++++++++++++++++++++++++++++++++++++++++++++++-- + include/grub/net.h | 1 + + 2 files changed, 67 insertions(+), 2 deletions(-) + +diff --git a/grub-core/net/bootp.c b/grub-core/net/bootp.c +index ff1d7776e..2c8c90241 100644 +--- a/grub-core/net/bootp.c ++++ b/grub-core/net/bootp.c +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -254,6 +255,11 @@ parse_dhcp_vendor (const char *name, const void *vend, int limit, int *mask) + taglength); + break; + ++ case GRUB_NET_BOOTP_VENDOR_CLASS_IDENTIFIER: ++ grub_env_set_net_property (name, "vendor_class_identifier", (const char *) ptr, ++ taglength); ++ break; ++ + case GRUB_NET_BOOTP_EXTENSIONS_PATH: + grub_env_set_net_property (name, "extensionspath", (const char *) ptr, + taglength); +@@ -357,6 +363,66 @@ grub_net_configure_by_dhcp_ack (const char *name, + } + #endif + ++ if (size > OFFSET_OF (vendor, bp)) ++ { ++ char *cidvar; ++ const char *cid; ++ ++ parse_dhcp_vendor (name, &bp->vendor, size - OFFSET_OF (vendor, bp), &mask); ++ cidvar = grub_xasprintf ("net_%s_%s", name, "vendor_class_identifier"); ++ cid = grub_env_get (cidvar); ++ grub_free (cidvar); ++ ++ if (cid && grub_strcmp (cid, "HTTPClient") == 0) ++ { ++ char *proto, *ip, *pa; ++ ++ if (!dissect_url (bp->boot_file, &proto, &ip, &pa)) ++ return inter; ++ ++ grub_env_set_net_property (name, "boot_file", pa, grub_strlen (pa)); ++ if (is_def) ++ { ++ grub_net_default_server = grub_strdup (ip); ++ grub_env_set ("net_default_interface", name); ++ grub_env_export ("net_default_interface"); ++ } ++ if (device && !*device) ++ { ++ *device = grub_xasprintf ("%s,%s", proto, ip); ++ grub_print_error (); ++ } ++ if (path) ++ { ++ *path = grub_strdup (pa); ++ grub_print_error (); ++ if (*path) ++ { ++ char *slash; ++ slash = grub_strrchr (*path, '/'); ++ if (slash) ++ *slash = 0; ++ else ++ **path = 0; ++ } ++ } ++ grub_net_add_ipv4_local (inter, mask); ++ inter->dhcp_ack = grub_malloc (size); ++ if (inter->dhcp_ack) ++ { ++ grub_memcpy (inter->dhcp_ack, bp, size); ++ inter->dhcp_acklen = size; ++ } ++ else ++ grub_errno = GRUB_ERR_NONE; ++ ++ grub_free (proto); ++ grub_free (ip); ++ grub_free (pa); ++ return inter; ++ } ++ } ++ + if (size > OFFSET_OF (boot_file, bp)) + grub_env_set_net_property (name, "boot_file", bp->boot_file, + sizeof (bp->boot_file)); +@@ -421,8 +487,6 @@ grub_net_configure_by_dhcp_ack (const char *name, + **path = 0; + } + } +- if (size > OFFSET_OF (vendor, bp)) +- parse_dhcp_vendor (name, &bp->vendor, size - OFFSET_OF (vendor, bp), &mask); + grub_net_add_ipv4_local (inter, mask); + + inter->dhcp_ack = grub_malloc (size); +diff --git a/include/grub/net.h b/include/grub/net.h +index 5f78b22e1..957f0f31c 100644 +--- a/include/grub/net.h ++++ b/include/grub/net.h +@@ -522,6 +522,7 @@ enum + GRUB_NET_BOOTP_DOMAIN = 0x0f, + GRUB_NET_BOOTP_ROOT_PATH = 0x11, + GRUB_NET_BOOTP_EXTENSIONS_PATH = 0x12, ++ GRUB_NET_BOOTP_VENDOR_CLASS_IDENTIFIER = 0x3c, + GRUB_NET_BOOTP_CLIENT_ID = 0x3d, + GRUB_NET_BOOTP_CLIENT_UUID = 0x61, + GRUB_NET_BOOTP_END = 0xff +-- +2.14.3 + diff --git a/0219-efinet-Setting-network-from-UEFI-device-path.patch b/0219-efinet-Setting-network-from-UEFI-device-path.patch new file mode 100644 index 0000000..14f45db --- /dev/null +++ b/0219-efinet-Setting-network-from-UEFI-device-path.patch @@ -0,0 +1,416 @@ +From d43c5cd9ba87b8d6dfe46bc576d553f53859e4f0 Mon Sep 17 00:00:00 2001 +From: Michael Chang +Date: Sun, 10 Jul 2016 23:46:31 +0800 +Subject: [PATCH 219/225] 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 +Signed-off-by: Ken Lin +--- + grub-core/net/drivers/efi/efinet.c | 293 +++++++++++++++++++++++++++++++++++-- + include/grub/efi/api.h | 11 ++ + 2 files changed, 292 insertions(+), 12 deletions(-) + +diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c +index 713dbd89d..e0decb098 100644 +--- a/grub-core/net/drivers/efi/efinet.c ++++ b/grub-core/net/drivers/efi/efinet.c +@@ -27,6 +27,7 @@ + #include + #include + #include ++#include + + GRUB_MOD_LICENSE ("GPLv3+"); + +@@ -412,6 +413,244 @@ grub_efinet_findcards (void) + } + } + ++static struct grub_net_buff * ++grub_efinet_create_dhcp_ack_from_device_path (grub_efi_device_path_t *dp, int *use_ipv6) ++{ ++ grub_efi_uint16_t uri_len; ++ grub_efi_device_path_t *ldp, *ddp; ++ grub_efi_uri_device_path_t *uri_dp; ++ struct grub_net_buff *nb; ++ grub_err_t err; ++ ++ ddp = grub_efi_duplicate_device_path (dp); ++ if (!ddp) ++ return NULL; ++ ++ ldp = grub_efi_find_last_device_path (ddp); ++ ++ if (GRUB_EFI_DEVICE_PATH_TYPE (ldp) != GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE ++ || GRUB_EFI_DEVICE_PATH_SUBTYPE (ldp) != GRUB_EFI_URI_DEVICE_PATH_SUBTYPE) ++ { ++ grub_free (ddp); ++ grub_free (ldp); ++ return NULL; ++ } ++ ++ uri_len = GRUB_EFI_DEVICE_PATH_LENGTH (ldp) > 4 ? GRUB_EFI_DEVICE_PATH_LENGTH (ldp) - 4 : 0; ++ ++ if (!uri_len) ++ { ++ grub_free (ddp); ++ grub_free (ldp); ++ return NULL; ++ } ++ ++ uri_dp = (grub_efi_uri_device_path_t *) ldp; ++ ++ ldp->type = GRUB_EFI_END_DEVICE_PATH_TYPE; ++ ldp->subtype = GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE; ++ ldp->length = sizeof (*ldp); ++ ++ ldp = grub_efi_find_last_device_path (ddp); ++ ++ if (GRUB_EFI_DEVICE_PATH_TYPE (ldp) != GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE ++ || (GRUB_EFI_DEVICE_PATH_SUBTYPE (ldp) != GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE ++ && GRUB_EFI_DEVICE_PATH_SUBTYPE (ldp) != GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE)) ++ { ++ grub_free (ddp); ++ grub_free (ldp); ++ return NULL; ++ } ++ ++ nb = grub_netbuff_alloc (512); ++ if (!nb) ++ { ++ grub_free (ddp); ++ grub_free (ldp); ++ return NULL; ++ } ++ ++ if (GRUB_EFI_DEVICE_PATH_SUBTYPE (ldp) == GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE) ++ { ++ grub_efi_ipv4_device_path_t *ipv4 = (grub_efi_ipv4_device_path_t *) ldp; ++ struct grub_net_bootp_packet *bp; ++ grub_uint8_t *ptr; ++ ++ bp = (struct grub_net_bootp_packet *) nb->tail; ++ err = grub_netbuff_put (nb, sizeof (*bp) + 4); ++ if (err) ++ { ++ grub_free (ddp); ++ grub_free (ldp); ++ grub_netbuff_free (nb); ++ return NULL; ++ } ++ ++ if (sizeof(bp->boot_file) < uri_len) ++ { ++ grub_free (ddp); ++ grub_free (ldp); ++ grub_netbuff_free (nb); ++ return NULL; ++ } ++ grub_memcpy (bp->boot_file, uri_dp->uri, uri_len); ++ grub_memcpy (&bp->your_ip, ipv4->local_ip_address, sizeof (bp->your_ip)); ++ grub_memcpy (&bp->server_ip, ipv4->remote_ip_address, sizeof (bp->server_ip)); ++ ++ bp->vendor[0] = GRUB_NET_BOOTP_RFC1048_MAGIC_0; ++ bp->vendor[1] = GRUB_NET_BOOTP_RFC1048_MAGIC_1; ++ bp->vendor[2] = GRUB_NET_BOOTP_RFC1048_MAGIC_2; ++ bp->vendor[3] = GRUB_NET_BOOTP_RFC1048_MAGIC_3; ++ ++ ptr = nb->tail; ++ err = grub_netbuff_put (nb, sizeof (ipv4->subnet_mask) + 2); ++ if (err) ++ { ++ grub_free (ddp); ++ grub_free (ldp); ++ grub_netbuff_free (nb); ++ return NULL; ++ } ++ *ptr++ = GRUB_NET_BOOTP_NETMASK; ++ *ptr++ = sizeof (ipv4->subnet_mask); ++ grub_memcpy (ptr, ipv4->subnet_mask, sizeof (ipv4->subnet_mask)); ++ ++ ptr = nb->tail; ++ err = grub_netbuff_put (nb, sizeof (ipv4->gateway_ip_address) + 2); ++ if (err) ++ { ++ grub_free (ddp); ++ grub_free (ldp); ++ grub_netbuff_free (nb); ++ return NULL; ++ } ++ *ptr++ = GRUB_NET_BOOTP_ROUTER; ++ *ptr++ = sizeof (ipv4->gateway_ip_address); ++ grub_memcpy (ptr, ipv4->gateway_ip_address, sizeof (ipv4->gateway_ip_address)); ++ ++ ptr = nb->tail; ++ err = grub_netbuff_put (nb, sizeof ("HTTPClient") + 1); ++ if (err) ++ { ++ grub_free (ddp); ++ grub_free (ldp); ++ grub_netbuff_free (nb); ++ return NULL; ++ } ++ *ptr++ = GRUB_NET_BOOTP_VENDOR_CLASS_IDENTIFIER; ++ *ptr++ = sizeof ("HTTPClient") - 1; ++ grub_memcpy (ptr, "HTTPClient", sizeof ("HTTPClient") - 1); ++ ++ ptr = nb->tail; ++ err = grub_netbuff_put (nb, 1); ++ if (err) ++ { ++ grub_free (ddp); ++ grub_free (ldp); ++ grub_netbuff_free (nb); ++ return NULL; ++ } ++ *ptr = GRUB_NET_BOOTP_END; ++ *use_ipv6 = 0; ++ ++ ldp->type = GRUB_EFI_END_DEVICE_PATH_TYPE; ++ ldp->subtype = GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE; ++ ldp->length = sizeof (*ldp); ++ ldp = grub_efi_find_last_device_path (ddp); ++ ++ if (GRUB_EFI_DEVICE_PATH_SUBTYPE (ldp) == GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE) ++ { ++ grub_efi_mac_address_device_path_t *mac = (grub_efi_mac_address_device_path_t *) ldp; ++ bp->hw_type = mac->if_type; ++ bp->hw_len = sizeof (bp->mac_addr); ++ grub_memcpy (bp->mac_addr, mac->mac_address, bp->hw_len); ++ } ++ } ++ else ++ { ++ grub_efi_ipv6_device_path_t *ipv6 = (grub_efi_ipv6_device_path_t *) ldp; ++ ++ struct grub_net_dhcp6_packet *d6p; ++ struct grub_net_dhcp6_option *opt; ++ struct grub_net_dhcp6_option_iana *iana; ++ struct grub_net_dhcp6_option_iaaddr *iaaddr; ++ ++ d6p = (struct grub_net_dhcp6_packet *)nb->tail; ++ err = grub_netbuff_put (nb, sizeof(*d6p)); ++ if (err) ++ { ++ grub_free (ddp); ++ grub_free (ldp); ++ grub_netbuff_free (nb); ++ return NULL; ++ } ++ d6p->message_type = GRUB_NET_DHCP6_REPLY; ++ ++ opt = (struct grub_net_dhcp6_option *)nb->tail; ++ err = grub_netbuff_put (nb, sizeof(*opt)); ++ if (err) ++ { ++ grub_free (ddp); ++ grub_free (ldp); ++ grub_netbuff_free (nb); ++ return NULL; ++ } ++ opt->code = grub_cpu_to_be16_compile_time (GRUB_NET_DHCP6_OPTION_IA_NA); ++ opt->len = grub_cpu_to_be16_compile_time (sizeof(*iana) + sizeof(*opt) + sizeof(*iaaddr)); ++ ++ err = grub_netbuff_put (nb, sizeof(*iana)); ++ if (err) ++ { ++ grub_free (ddp); ++ grub_free (ldp); ++ grub_netbuff_free (nb); ++ return NULL; ++ } ++ ++ opt = (struct grub_net_dhcp6_option *)nb->tail; ++ err = grub_netbuff_put (nb, sizeof(*opt)); ++ if (err) ++ { ++ grub_free (ddp); ++ grub_free (ldp); ++ grub_netbuff_free (nb); ++ return NULL; ++ } ++ opt->code = grub_cpu_to_be16_compile_time (GRUB_NET_DHCP6_OPTION_IAADDR); ++ opt->len = grub_cpu_to_be16_compile_time (sizeof (*iaaddr)); ++ ++ iaaddr = (struct grub_net_dhcp6_option_iaaddr *)nb->tail; ++ err = grub_netbuff_put (nb, sizeof(*iaaddr)); ++ if (err) ++ { ++ grub_free (ddp); ++ grub_free (ldp); ++ grub_netbuff_free (nb); ++ return NULL; ++ } ++ grub_memcpy (iaaddr->addr, ipv6->local_ip_address, sizeof(ipv6->local_ip_address)); ++ ++ opt = (struct grub_net_dhcp6_option *)nb->tail; ++ err = grub_netbuff_put (nb, sizeof(*opt) + uri_len); ++ if (err) ++ { ++ grub_free (ddp); ++ grub_free (ldp); ++ grub_netbuff_free (nb); ++ return NULL; ++ } ++ opt->code = grub_cpu_to_be16_compile_time (GRUB_NET_DHCP6_OPTION_BOOTFILE_URL); ++ opt->len = grub_cpu_to_be16 (uri_len); ++ grub_memcpy (opt->data, uri_dp->uri, uri_len); ++ ++ *use_ipv6 = 1; ++ } ++ ++ grub_free (ldp); ++ grub_free (ddp); ++ return nb; ++} ++ + static void + grub_efi_net_config_real (grub_efi_handle_t hnd, char **device, + char **path) +@@ -428,6 +667,10 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device, + grub_efi_device_path_t *cdp; + struct grub_efi_pxe *pxe; + struct grub_efi_pxe_mode *pxe_mode; ++ grub_uint8_t *packet_buf; ++ grub_size_t packet_bufsz ; ++ int ipv6; ++ struct grub_net_buff *nb = NULL; + + if (card->driver != &efidriver) + continue; +@@ -454,11 +697,21 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device, + */ + if (GRUB_EFI_DEVICE_PATH_TYPE (ldp) != GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE + || (GRUB_EFI_DEVICE_PATH_SUBTYPE (ldp) != GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE +- && GRUB_EFI_DEVICE_PATH_SUBTYPE (ldp) != GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE)) ++ && GRUB_EFI_DEVICE_PATH_SUBTYPE (ldp) != GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE ++ && GRUB_EFI_DEVICE_PATH_SUBTYPE (ldp) != GRUB_EFI_URI_DEVICE_PATH_SUBTYPE)) + continue; + dup_dp = grub_efi_duplicate_device_path (dp); + if (!dup_dp) + continue; ++ ++ if (GRUB_EFI_DEVICE_PATH_SUBTYPE (ldp) == GRUB_EFI_URI_DEVICE_PATH_SUBTYPE) ++ { ++ dup_ldp = grub_efi_find_last_device_path (dup_dp); ++ dup_ldp->type = GRUB_EFI_END_DEVICE_PATH_TYPE; ++ dup_ldp->subtype = GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE; ++ dup_ldp->length = sizeof (*dup_ldp); ++ } ++ + dup_ldp = grub_efi_find_last_device_path (dup_dp); + dup_ldp->type = GRUB_EFI_END_DEVICE_PATH_TYPE; + dup_ldp->subtype = GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE; +@@ -471,20 +724,32 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device, + + pxe = grub_efi_open_protocol (hnd, &pxe_io_guid, + GRUB_EFI_OPEN_PROTOCOL_GET_PROTOCOL); +- if (! pxe) +- continue; ++ if (!pxe) ++ { ++ nb = grub_efinet_create_dhcp_ack_from_device_path (dp, &ipv6); ++ if (!nb) ++ { ++ grub_print_error (); ++ continue; ++ } ++ packet_buf = nb->head; ++ packet_bufsz = nb->tail - nb->head; ++ } ++ else ++ { ++ pxe_mode = pxe->mode; ++ packet_buf = (grub_uint8_t *) &pxe_mode->dhcp_ack; ++ packet_bufsz = sizeof (pxe_mode->dhcp_ack); ++ ipv6 = pxe_mode->using_ipv6; ++ } + +- pxe_mode = pxe->mode; +- if (pxe_mode->using_ipv6) ++ if (ipv6) + { + grub_dprintf ("efinet", "using ipv6 and dhcpv6\n"); +- grub_dprintf ("efinet", "dhcp_ack_received: %s%s\n", +- pxe_mode->dhcp_ack_received ? "yes" : "no", +- pxe_mode->dhcp_ack_received ? "" : " cannot continue"); + grub_net_configure_by_dhcpv6_reply (card->name, card, 0, + (struct grub_net_dhcp6_packet *) +- &pxe_mode->dhcp_ack, +- sizeof (pxe_mode->dhcp_ack), ++ packet_buf, ++ packet_bufsz, + 1, device, path); + if (device && path) + grub_dprintf ("efinet", "device: `%s' path: `%s'\n", *device, *path); +@@ -496,11 +761,15 @@ grub_efi_net_config_real (grub_efi_handle_t hnd, char **device, + grub_dprintf ("efinet", "using ipv4 and dhcp\n"); + grub_net_configure_by_dhcp_ack (card->name, card, 0, + (struct grub_net_bootp_packet *) +- &pxe_mode->dhcp_ack, +- sizeof (pxe_mode->dhcp_ack), ++ packet_buf, ++ packet_bufsz, + 1, device, path); + grub_dprintf ("efinet", "device: `%s' path: `%s'\n", *device, *path); + } ++ ++ if (nb) ++ grub_netbuff_free (nb); ++ + return; + } + } +diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h +index 3db8e0bc7..2f3ba3de3 100644 +--- a/include/grub/efi/api.h ++++ b/include/grub/efi/api.h +@@ -843,6 +843,8 @@ struct grub_efi_ipv4_device_path + grub_efi_uint16_t remote_port; + grub_efi_uint16_t protocol; + grub_efi_uint8_t static_ip_address; ++ grub_efi_ipv4_address_t gateway_ip_address; ++ grub_efi_ipv4_address_t subnet_mask; + } GRUB_PACKED; + typedef struct grub_efi_ipv4_device_path grub_efi_ipv4_device_path_t; + +@@ -897,6 +899,15 @@ struct grub_efi_sata_device_path + } GRUB_PACKED; + typedef struct grub_efi_sata_device_path grub_efi_sata_device_path_t; + ++#define GRUB_EFI_URI_DEVICE_PATH_SUBTYPE 24 ++ ++struct grub_efi_uri_device_path ++{ ++ grub_efi_device_path_t header; ++ grub_efi_uint8_t uri[0]; ++} GRUB_PACKED; ++typedef struct grub_efi_uri_device_path grub_efi_uri_device_path_t; ++ + #define GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE 10 + + /* Media Device Path. */ +-- +2.14.3 + diff --git a/0220-efinet-Setting-DNS-server-from-UEFI-protocol.patch b/0220-efinet-Setting-DNS-server-from-UEFI-protocol.patch new file mode 100644 index 0000000..da711d8 --- /dev/null +++ b/0220-efinet-Setting-DNS-server-from-UEFI-protocol.patch @@ -0,0 +1,342 @@ +From 5ad04b380d711ffe012cccabc0d3de8aef083da5 Mon Sep 17 00:00:00 2001 +From: Michael Chang +Date: Thu, 14 Jul 2016 17:48:45 +0800 +Subject: [PATCH 220/225] 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 +Signed-off-by: Ken Lin +--- + grub-core/net/drivers/efi/efinet.c | 165 +++++++++++++++++++++++++++++++++++++ + include/grub/efi/api.h | 76 +++++++++++++++++ + 2 files changed, 241 insertions(+) + +diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c +index e0decb098..7f9e189ea 100644 +--- a/grub-core/net/drivers/efi/efinet.c ++++ b/grub-core/net/drivers/efi/efinet.c +@@ -34,6 +34,8 @@ GRUB_MOD_LICENSE ("GPLv3+"); + /* GUID. */ + static grub_efi_guid_t net_io_guid = GRUB_EFI_SIMPLE_NETWORK_GUID; + static grub_efi_guid_t pxe_io_guid = GRUB_EFI_PXE_GUID; ++static grub_efi_guid_t ip4_config_guid = GRUB_EFI_IP4_CONFIG2_PROTOCOL_GUID; ++static grub_efi_guid_t ip6_config_guid = GRUB_EFI_IP6_CONFIG_PROTOCOL_GUID; + + static grub_err_t + send_card_buffer (struct grub_net_card *dev, +@@ -413,6 +415,125 @@ grub_efinet_findcards (void) + } + } + ++static grub_efi_handle_t ++grub_efi_locate_device_path (grub_efi_guid_t *protocol, grub_efi_device_path_t *device_path, ++ grub_efi_device_path_t **r_device_path) ++{ ++ grub_efi_handle_t handle; ++ grub_efi_status_t status; ++ ++ status = efi_call_3 (grub_efi_system_table->boot_services->locate_device_path, ++ protocol, &device_path, &handle); ++ ++ if (status != GRUB_EFI_SUCCESS) ++ return 0; ++ ++ if (r_device_path) ++ *r_device_path = device_path; ++ ++ return handle; ++} ++ ++static grub_efi_ipv4_address_t * ++grub_dns_server_ip4_address (grub_efi_device_path_t *dp, grub_efi_uintn_t *num_dns) ++{ ++ grub_efi_handle_t hnd; ++ grub_efi_status_t status; ++ grub_efi_ip4_config2_protocol_t *conf; ++ grub_efi_ipv4_address_t *addrs; ++ grub_efi_uintn_t data_size = 1 * sizeof (grub_efi_ipv4_address_t); ++ ++ hnd = grub_efi_locate_device_path (&ip4_config_guid, dp, NULL); ++ ++ if (!hnd) ++ return 0; ++ ++ conf = grub_efi_open_protocol (hnd, &ip4_config_guid, ++ GRUB_EFI_OPEN_PROTOCOL_GET_PROTOCOL); ++ ++ if (!conf) ++ return 0; ++ ++ addrs = grub_malloc (data_size); ++ if (!addrs) ++ return 0; ++ ++ status = efi_call_4 (conf->get_data, conf, ++ GRUB_EFI_IP4_CONFIG2_DATA_TYPE_DNSSERVER, ++ &data_size, addrs); ++ ++ if (status == GRUB_EFI_BUFFER_TOO_SMALL) ++ { ++ grub_free (addrs); ++ addrs = grub_malloc (data_size); ++ if (!addrs) ++ return 0; ++ ++ status = efi_call_4 (conf->get_data, conf, ++ GRUB_EFI_IP4_CONFIG2_DATA_TYPE_DNSSERVER, ++ &data_size, addrs); ++ } ++ ++ if (status != GRUB_EFI_SUCCESS) ++ { ++ grub_free (addrs); ++ return 0; ++ } ++ ++ *num_dns = data_size / sizeof (grub_efi_ipv4_address_t); ++ return addrs; ++} ++ ++static grub_efi_ipv6_address_t * ++grub_dns_server_ip6_address (grub_efi_device_path_t *dp, grub_efi_uintn_t *num_dns) ++{ ++ grub_efi_handle_t hnd; ++ grub_efi_status_t status; ++ grub_efi_ip6_config_protocol_t *conf; ++ grub_efi_ipv6_address_t *addrs; ++ grub_efi_uintn_t data_size = 1 * sizeof (grub_efi_ipv6_address_t); ++ ++ hnd = grub_efi_locate_device_path (&ip6_config_guid, dp, NULL); ++ ++ if (!hnd) ++ return 0; ++ ++ conf = grub_efi_open_protocol (hnd, &ip6_config_guid, ++ GRUB_EFI_OPEN_PROTOCOL_GET_PROTOCOL); ++ ++ if (!conf) ++ return 0; ++ ++ addrs = grub_malloc (data_size); ++ if (!addrs) ++ return 0; ++ ++ status = efi_call_4 (conf->get_data, conf, ++ GRUB_EFI_IP6_CONFIG_DATA_TYPE_DNSSERVER, ++ &data_size, addrs); ++ ++ if (status == GRUB_EFI_BUFFER_TOO_SMALL) ++ { ++ grub_free (addrs); ++ addrs = grub_malloc (data_size); ++ if (!addrs) ++ return 0; ++ ++ status = efi_call_4 (conf->get_data, conf, ++ GRUB_EFI_IP6_CONFIG_DATA_TYPE_DNSSERVER, ++ &data_size, addrs); ++ } ++ ++ if (status != GRUB_EFI_SUCCESS) ++ { ++ grub_free (addrs); ++ return 0; ++ } ++ ++ *num_dns = data_size / sizeof (grub_efi_ipv6_address_t); ++ return addrs; ++} ++ + static struct grub_net_buff * + grub_efinet_create_dhcp_ack_from_device_path (grub_efi_device_path_t *dp, int *use_ipv6) + { +@@ -475,6 +596,8 @@ grub_efinet_create_dhcp_ack_from_device_path (grub_efi_device_path_t *dp, int *u + grub_efi_ipv4_device_path_t *ipv4 = (grub_efi_ipv4_device_path_t *) ldp; + struct grub_net_bootp_packet *bp; + grub_uint8_t *ptr; ++ grub_efi_ipv4_address_t *dns; ++ grub_efi_uintn_t num_dns; + + bp = (struct grub_net_bootp_packet *) nb->tail; + err = grub_netbuff_put (nb, sizeof (*bp) + 4); +@@ -541,6 +664,26 @@ grub_efinet_create_dhcp_ack_from_device_path (grub_efi_device_path_t *dp, int *u + *ptr++ = sizeof ("HTTPClient") - 1; + grub_memcpy (ptr, "HTTPClient", sizeof ("HTTPClient") - 1); + ++ dns = grub_dns_server_ip4_address (dp, &num_dns); ++ if (dns) ++ { ++ grub_efi_uintn_t size_dns = sizeof (*dns) * num_dns; ++ ++ ptr = nb->tail; ++ err = grub_netbuff_put (nb, size_dns + 2); ++ if (err) ++ { ++ grub_free (ddp); ++ grub_free (ldp); ++ grub_netbuff_free (nb); ++ return NULL; ++ } ++ *ptr++ = GRUB_NET_BOOTP_DNS; ++ *ptr++ = size_dns; ++ grub_memcpy (ptr, dns, size_dns); ++ grub_free (dns); ++ } ++ + ptr = nb->tail; + err = grub_netbuff_put (nb, 1); + if (err) +@@ -574,6 +717,8 @@ grub_efinet_create_dhcp_ack_from_device_path (grub_efi_device_path_t *dp, int *u + struct grub_net_dhcp6_option *opt; + struct grub_net_dhcp6_option_iana *iana; + struct grub_net_dhcp6_option_iaaddr *iaaddr; ++ grub_efi_ipv6_address_t *dns; ++ grub_efi_uintn_t num_dns; + + d6p = (struct grub_net_dhcp6_packet *)nb->tail; + err = grub_netbuff_put (nb, sizeof(*d6p)); +@@ -643,6 +788,26 @@ grub_efinet_create_dhcp_ack_from_device_path (grub_efi_device_path_t *dp, int *u + opt->len = grub_cpu_to_be16 (uri_len); + grub_memcpy (opt->data, uri_dp->uri, uri_len); + ++ dns = grub_dns_server_ip6_address (dp, &num_dns); ++ if (dns) ++ { ++ grub_efi_uintn_t size_dns = sizeof (*dns) * num_dns; ++ ++ opt = (struct grub_net_dhcp6_option *)nb->tail; ++ err = grub_netbuff_put (nb, sizeof(*opt) + size_dns); ++ if (err) ++ { ++ grub_free (ddp); ++ grub_free (ldp); ++ grub_netbuff_free (nb); ++ return NULL; ++ } ++ opt->code = grub_cpu_to_be16_compile_time (GRUB_NET_DHCP6_OPTION_DNS_SERVERS); ++ opt->len = grub_cpu_to_be16 (size_dns); ++ grub_memcpy (opt->data, dns, size_dns); ++ grub_free (dns); ++ } ++ + *use_ipv6 = 1; + } + +diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h +index 2f3ba3de3..28a47c44f 100644 +--- a/include/grub/efi/api.h ++++ b/include/grub/efi/api.h +@@ -334,6 +334,16 @@ + { 0x8B, 0x8C, 0xE2, 0x1B, 0x01, 0xAE, 0xF2, 0xB7 } \ + } + ++#define GRUB_EFI_IP4_CONFIG2_PROTOCOL_GUID \ ++ { 0x5b446ed1, 0xe30b, 0x4faa, \ ++ { 0x87, 0x1a, 0x36, 0x54, 0xec, 0xa3, 0x60, 0x80 } \ ++ } ++ ++#define GRUB_EFI_IP6_CONFIG_PROTOCOL_GUID \ ++ { 0x937fe521, 0x95ae, 0x4d1a, \ ++ { 0x89, 0x29, 0x48, 0xbc, 0xd9, 0x0a, 0xd3, 0x1a } \ ++ } ++ + struct grub_efi_sal_system_table + { + grub_uint32_t signature; +@@ -1841,6 +1851,72 @@ struct grub_efi_block_io + }; + typedef struct grub_efi_block_io grub_efi_block_io_t; + ++enum grub_efi_ip4_config2_data_type { ++ GRUB_EFI_IP4_CONFIG2_DATA_TYPE_INTERFACEINFO, ++ GRUB_EFI_IP4_CONFIG2_DATA_TYPE_POLICY, ++ GRUB_EFI_IP4_CONFIG2_DATA_TYPE_MANUAL_ADDRESS, ++ GRUB_EFI_IP4_CONFIG2_DATA_TYPE_GATEWAY, ++ GRUB_EFI_IP4_CONFIG2_DATA_TYPE_DNSSERVER, ++ GRUB_EFI_IP4_CONFIG2_DATA_TYPE_MAXIMUM ++}; ++typedef enum grub_efi_ip4_config2_data_type grub_efi_ip4_config2_data_type_t; ++ ++struct grub_efi_ip4_config2_protocol ++{ ++ grub_efi_status_t (*set_data) (struct grub_efi_ip4_config2_protocol *this, ++ grub_efi_ip4_config2_data_type_t data_type, ++ grub_efi_uintn_t data_size, ++ void *data); ++ ++ grub_efi_status_t (*get_data) (struct grub_efi_ip4_config2_protocol *this, ++ grub_efi_ip4_config2_data_type_t data_type, ++ grub_efi_uintn_t *data_size, ++ void *data); ++ ++ grub_efi_status_t (*register_data_notify) (struct grub_efi_ip4_config2_protocol *this, ++ grub_efi_ip4_config2_data_type_t data_type, ++ grub_efi_event_t event); ++ ++ grub_efi_status_t (*unregister_datanotify) (struct grub_efi_ip4_config2_protocol *this, ++ grub_efi_ip4_config2_data_type_t data_type, ++ grub_efi_event_t event); ++}; ++typedef struct grub_efi_ip4_config2_protocol grub_efi_ip4_config2_protocol_t; ++ ++enum grub_efi_ip6_config_data_type { ++ GRUB_EFI_IP6_CONFIG_DATA_TYPE_INTERFACEINFO, ++ GRUB_EFI_IP6_CONFIG_DATA_TYPE_ALT_INTERFACEID, ++ GRUB_EFI_IP6_CONFIG_DATA_TYPE_POLICY, ++ GRUB_EFI_IP6_CONFIG_DATA_TYPE_DUP_ADDR_DETECT_TRANSMITS, ++ GRUB_EFI_IP6_CONFIG_DATA_TYPE_MANUAL_ADDRESS, ++ GRUB_EFI_IP6_CONFIG_DATA_TYPE_GATEWAY, ++ GRUB_EFI_IP6_CONFIG_DATA_TYPE_DNSSERVER, ++ GRUB_EFI_IP6_CONFIG_DATA_TYPE_MAXIMUM ++}; ++typedef enum grub_efi_ip6_config_data_type grub_efi_ip6_config_data_type_t; ++ ++struct grub_efi_ip6_config_protocol ++{ ++ grub_efi_status_t (*set_data) (struct grub_efi_ip6_config_protocol *this, ++ grub_efi_ip6_config_data_type_t data_type, ++ grub_efi_uintn_t data_size, ++ void *data); ++ ++ grub_efi_status_t (*get_data) (struct grub_efi_ip6_config_protocol *this, ++ grub_efi_ip6_config_data_type_t data_type, ++ grub_efi_uintn_t *data_size, ++ void *data); ++ ++ grub_efi_status_t (*register_data_notify) (struct grub_efi_ip6_config_protocol *this, ++ grub_efi_ip6_config_data_type_t data_type, ++ grub_efi_event_t event); ++ ++ grub_efi_status_t (*unregister_datanotify) (struct grub_efi_ip6_config_protocol *this, ++ grub_efi_ip6_config_data_type_t data_type, ++ grub_efi_event_t event); ++}; ++typedef struct grub_efi_ip6_config_protocol grub_efi_ip6_config_protocol_t; ++ + #if (GRUB_TARGET_SIZEOF_VOID_P == 4) || defined (__ia64__) \ + || defined (__aarch64__) || defined (__MINGW64__) || defined (__CYGWIN__) + +-- +2.14.3 + diff --git a/0221-set-rootpath.patch b/0221-set-rootpath.patch new file mode 100644 index 0000000..d9ff2a6 --- /dev/null +++ b/0221-set-rootpath.patch @@ -0,0 +1,49 @@ +From f508e7d5fdc37453c552e655d49bba6c6287cde2 Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Wed, 24 May 2017 15:02:40 -0400 +Subject: [PATCH 221/225] set rootpath + +Signed-off-by: Peter Jones +--- + grub-core/net/bootp.c | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) + +diff --git a/grub-core/net/bootp.c b/grub-core/net/bootp.c +index 2c8c90241..e73d66d50 100644 +--- a/grub-core/net/bootp.c ++++ b/grub-core/net/bootp.c +@@ -399,11 +399,31 @@ grub_net_configure_by_dhcp_ack (const char *name, + if (*path) + { + char *slash; ++ int root_path_len; + slash = grub_strrchr (*path, '/'); + if (slash) + *slash = 0; + else + **path = 0; ++ root_path_len = grub_strlen (*path); ++ if (root_path_len >= 9 && ++ !grub_strcasecmp (&(*path)[root_path_len - 9], "/efi/boot")) ++ { ++ char *root_path; ++ grub_print_error (); ++ if (root_path_len - 9 == 0) ++ { ++ root_path_len = 1; ++ root_path = grub_xasprintf ("/"); ++ } ++ else ++ { ++ root_path_len -= 9; ++ root_path = grub_strndup (*path, root_path_len); ++ } ++ grub_env_set_net_property (name, "rootpath", ++ root_path, root_path_len); ++ } + } + } + grub_net_add_ipv4_local (inter, mask); +-- +2.14.3 + diff --git a/0222-Fix-one-more-coverity-complaint.patch b/0222-Fix-one-more-coverity-complaint.patch new file mode 100644 index 0000000..264c84c --- /dev/null +++ b/0222-Fix-one-more-coverity-complaint.patch @@ -0,0 +1,30 @@ +From 431ac7037adfc4c7a9feaa1e1e65ea3d998a3a14 Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Thu, 25 May 2017 11:27:40 -0400 +Subject: [PATCH 222/225] Fix one more coverity complaint + +No idea why covscan thinks this is an "added" bug, since the file hasn't +changed in 3 years, but... yeah. + +Signed-off-by: Peter Jones +--- + grub-core/normal/completion.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/grub-core/normal/completion.c b/grub-core/normal/completion.c +index 2c9b9e931..93aa0d8ed 100644 +--- a/grub-core/normal/completion.c ++++ b/grub-core/normal/completion.c +@@ -284,7 +284,8 @@ complete_file (void) + + /* Cut away the filename part. */ + dirfile = grub_strrchr (dir, '/'); +- dirfile[1] = '\0'; ++ if (dirfile) ++ dirfile[1] = '\0'; + + /* Iterate the directory. */ + (fs->dir) (dev, dir, iterate_dir, NULL); +-- +2.14.3 + diff --git a/0223-Make-module-directory-specifiable-on-the-configure-c.patch b/0223-Make-module-directory-specifiable-on-the-configure-c.patch new file mode 100644 index 0000000..5496d5f --- /dev/null +++ b/0223-Make-module-directory-specifiable-on-the-configure-c.patch @@ -0,0 +1,101 @@ +From 91d8520f85a4288e786fedb9141b7d1980a8f63a Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Thu, 25 May 2017 13:45:01 -0400 +Subject: [PATCH 223/225] Make module directory specifiable on the configure + command line. + +Currently ppc, ppc64, and ppc64le all wind up with modules in +/usr/lib/grub/powerpc-ieee1275, because powerpc is the target cpu in +grub's eyes. This causes file conflicts between "noarch" module +packages. + +This patch allows --with-moduledir=%{arch} to be specified on the +configure command line to override the directory name for a specific +build, to disambiguate the various ppc directories. + +Resolves: rhbz#1455243 + +Signed-off-by: Peter Jones +--- + conf/Makefile.common | 2 +- + config.h.in | 2 ++ + configure.ac | 9 +++++++++ + grub-core/osdep/aros/config.c | 2 +- + grub-core/osdep/unix/config.c | 2 +- + 5 files changed, 14 insertions(+), 3 deletions(-) + +diff --git a/conf/Makefile.common b/conf/Makefile.common +index 044ab3abe..004a5ce44 100644 +--- a/conf/Makefile.common ++++ b/conf/Makefile.common +@@ -62,7 +62,7 @@ CCASFLAGS_LIBRARY = + # Other variables + + grubconfdir = $(sysconfdir)/grub.d +-platformdir = $(pkglibdir)/$(target_cpu)-$(platform) ++platformdir = $(pkglibdir)/$(moduledirname) + starfielddir = $(pkgdatadir)/themes/starfield + + CFLAGS_GNULIB = -Wno-undef -Wno-sign-compare -Wno-unused -Wno-unused-parameter -Wno-redundant-decls -Wno-unreachable-code -Wno-conversion +diff --git a/config.h.in b/config.h.in +index 9e8f9911b..c7fc6efa1 100644 +--- a/config.h.in ++++ b/config.h.in +@@ -46,6 +46,8 @@ + #define END_SYMBOL @END_SYMBOL@ + /* Name of package. */ + #define PACKAGE "@PACKAGE@" ++/* Name of the default module directory. */ ++#define MODULE_DIR_NAME "@MODULE_DIR_NAME@" + /* Version number of package. */ + #define VERSION "@VERSION@" + /* Define to the full name and version of this package. */ +diff --git a/configure.ac b/configure.ac +index f69f89867..7e93bef03 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -327,6 +327,15 @@ AS_IF([$($PKG_CONFIG --exists bash-completion)], [ + ]) + AC_SUBST(bashcompletiondir) + ++AC_ARG_WITH([moduledir], ++ AS_HELP_STRING([--with-moduledir=NAME], ++ [set the name of the module directory [[guessed]]]), ++ [moduledirname="$with_moduledir"], ++ [moduledirname="$target_cpu-$platform"]) ++AC_SUBST(moduledirname) ++AC_DEFINE_UNQUOTED(MODULE_DIR_NAME, "$moduledirname", ++ [Default module directory name]) ++ + # + # Checks for build programs. + # +diff --git a/grub-core/osdep/aros/config.c b/grub-core/osdep/aros/config.c +index c82d0ea8e..bf3593d97 100644 +--- a/grub-core/osdep/aros/config.c ++++ b/grub-core/osdep/aros/config.c +@@ -52,7 +52,7 @@ grub_util_get_pkgdatadir (void) + const char * + grub_util_get_pkglibdir (void) + { +- return GRUB_LIBDIR "/" PACKAGE; ++ return GRUB_LIBDIR "/" MODULE_DIR_NAME; + } + + const char * +diff --git a/grub-core/osdep/unix/config.c b/grub-core/osdep/unix/config.c +index b637c58ef..403eee565 100644 +--- a/grub-core/osdep/unix/config.c ++++ b/grub-core/osdep/unix/config.c +@@ -52,7 +52,7 @@ grub_util_get_pkgdatadir (void) + const char * + grub_util_get_pkglibdir (void) + { +- return GRUB_LIBDIR "/" PACKAGE; ++ return GRUB_LIBDIR "/" MODULE_DIR_NAME; + } + + const char * +-- +2.14.3 + diff --git a/0197-20_linux_xen-load-xen-or-multiboot-2-modules-as-need.patch b/0224-20_linux_xen-load-xen-or-multiboot-2-modules-as-need.patch similarity index 85% rename from 0197-20_linux_xen-load-xen-or-multiboot-2-modules-as-need.patch rename to 0224-20_linux_xen-load-xen-or-multiboot-2-modules-as-need.patch index 4d88875..3f4021c 100644 --- a/0197-20_linux_xen-load-xen-or-multiboot-2-modules-as-need.patch +++ b/0224-20_linux_xen-load-xen-or-multiboot-2-modules-as-need.patch @@ -1,7 +1,7 @@ -From 5eb993630ba5349eef2bcd22680219cdb851cc73 Mon Sep 17 00:00:00 2001 +From d4b8aba4197221db7224527c0faf7547856c69e6 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Thu, 19 Oct 2017 11:29:11 -0400 -Subject: [PATCH 197/197] 20_linux_xen: load xen or multiboot{,2} modules as +Subject: [PATCH 224/225] 20_linux_xen: load xen or multiboot{,2} modules as needed. Signed-off-by: Peter Jones @@ -10,7 +10,7 @@ Signed-off-by: Peter Jones 1 file changed, 3 insertions(+) diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in -index fae1ffe94..fc53bd542 100644 +index abe4d7ef4..f00e7b7e2 100644 --- a/util/grub.d/20_linux_xen.in +++ b/util/grub.d/20_linux_xen.in @@ -126,6 +126,8 @@ linux_entry () @@ -31,5 +31,5 @@ index fae1ffe94..fc53bd542 100644 EOF fi -- -2.14.2 +2.14.3 diff --git a/0225-Make-pmtimer-tsc-calibration-not-take-51-seconds-to-.patch b/0225-Make-pmtimer-tsc-calibration-not-take-51-seconds-to-.patch new file mode 100644 index 0000000..d717637 --- /dev/null +++ b/0225-Make-pmtimer-tsc-calibration-not-take-51-seconds-to-.patch @@ -0,0 +1,96 @@ +From 91aa0ca83d63528180be67be5833542cfb358812 Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Tue, 7 Nov 2017 17:12:17 -0500 +Subject: [PATCH 225/225] Make pmtimer tsc calibration not take 51 seconds to + fail. + +On my laptop running at 2.4GHz, if I run a VM where tsc calibration +using pmtimer will fail presuming a broken pmtimer, it takes ~51 seconds +to do so (as measured with the stopwatch on my phone), with a tsc delta +of 0x1cd1c85300, or around 125 billion cycles. + +If instead of trying to wait for 5-200ms to show up on the pmtimer, we try +to wait for 5-200us, it decides it's broken in ~0x7998f9e TSCs, aka ~2 +million cycles, or more or less instantly. + +Additionally, this reading the pmtimer was returning 0xffffffff anyway, +and that's obviously an invalid return. I've added a check for that and +0 so we don't bother waiting for the test if what we're seeing is dead +pins with no response at all. + +Signed-off-by: Peter Jones +--- + grub-core/kern/i386/tsc_pmtimer.c | 43 ++++++++++++++++++++++++++++++--------- + 1 file changed, 33 insertions(+), 10 deletions(-) + +diff --git a/grub-core/kern/i386/tsc_pmtimer.c b/grub-core/kern/i386/tsc_pmtimer.c +index c9c361699..609402b83 100644 +--- a/grub-core/kern/i386/tsc_pmtimer.c ++++ b/grub-core/kern/i386/tsc_pmtimer.c +@@ -38,30 +38,53 @@ grub_pmtimer_wait_count_tsc (grub_port_t pmtimer, + grub_uint64_t start_tsc; + grub_uint64_t end_tsc; + int num_iter = 0; ++ int bad_reads = 0; + +- start = grub_inl (pmtimer) & 0xffffff; ++ start = grub_inl (pmtimer) & 0x3fff; + last = start; + end = start + num_pm_ticks; + start_tsc = grub_get_tsc (); + while (1) + { +- cur = grub_inl (pmtimer) & 0xffffff; ++ cur = grub_inl (pmtimer); ++ ++ /* If we get 10 reads in a row that are obviously dead pins, there's no ++ reason to do this thousands of times. ++ */ ++ if (cur == 0xffffffff || cur == 0) ++ { ++ bad_reads++; ++ grub_dprintf ("pmtimer", "cur: 0x%08x bad_reads: %d\n", cur, bad_reads); ++ ++ if (bad_reads == 10) ++ return 0; ++ } ++ else if (bad_reads) ++ bad_reads = 0; ++ ++ cur &= 0x3fff; ++ + if (cur < last) +- cur |= 0x1000000; ++ cur |= 0x4000; + num_iter++; + if (cur >= end) + { + end_tsc = grub_get_tsc (); ++ grub_dprintf ("pmtimer", "tsc delta is 0x%016lx\n", ++ end_tsc - start_tsc); + return end_tsc - start_tsc; + } +- /* Check for broken PM timer. +- 50000000 TSCs is between 5 ms (10GHz) and 200 ms (250 MHz) +- if after this time we still don't have 1 ms on pmtimer, then +- pmtimer is broken. ++ /* Check for broken PM timer. 5000 TSCs is between 5us (10GHz) and ++ 200us (250 MHz). If after this time we still don't have 1us on ++ pmtimer, then pmtimer is broken. + */ +- if ((num_iter & 0xffffff) == 0 && grub_get_tsc () - start_tsc > 5000000) { +- return 0; +- } ++ end_tsc = grub_get_tsc(); ++ if ((num_iter & 0x3fff) == 0 && end_tsc - start_tsc > 5000) ++ { ++ grub_dprintf ("pmtimer", "tsc delta is 0x%016lx\n", ++ end_tsc - start_tsc); ++ return 0; ++ } + } + } + +-- +2.14.3 + diff --git a/grub.patches b/grub.patches index 1bba569..f66e4a8 100644 --- a/grub.patches +++ b/grub.patches @@ -61,137 +61,165 @@ Patch0060: 0060-arm64-linux-loader-improve-type-portability.patch Patch0061: 0061-efi-change-heap-allocation-type-to-GRUB_EFI_LOADER_C.patch Patch0062: 0062-core-use-GRUB_TERM_-definitions-when-handling-term-c.patch Patch0063: 0063-io-add-a-GRUB_GZ-prefix-to-gzio-specific-defines.patch -Patch0064: 0064-info-in-builddir.patch -Patch0065: 0065-re-write-.gitignore.patch -Patch0066: 0066-IBM-client-architecture-CAS-reboot-support.patch -Patch0067: 0067-for-ppc-reset-console-display-attr-when-clear-screen.patch -Patch0068: 0068-Disable-GRUB-video-support-for-IBM-power-machines.patch -Patch0069: 0069-Honor-a-symlink-when-generating-configuration-by-gru.patch -Patch0070: 0070-Move-bash-completion-script-922997.patch -Patch0071: 0071-Update-to-minilzo-2.08.patch -Patch0072: 0072-Allow-fallback-to-include-entries-by-title-not-just-.patch -Patch0073: 0073-Add-GRUB_DISABLE_UUID.patch -Patch0074: 0074-Make-exit-take-a-return-code.patch -Patch0075: 0075-Mark-po-exclude.pot-as-binary-so-git-won-t-try-to-di.patch -Patch0076: 0076-Make-efi-machines-load-an-env-block-from-a-variable.patch -Patch0077: 0077-DHCP-client-ID-and-UUID-options-added.patch -Patch0078: 0078-trim-arp-packets-with-abnormal-size.patch -Patch0079: 0079-Fix-bad-test-on-GRUB_DISABLE_SUBMENU.patch -Patch0080: 0080-Add-support-for-UEFI-operating-systems-returned-by-o.patch -Patch0081: 0081-Migrate-PPC-from-Yaboot-to-Grub2.patch -Patch0082: 0082-Add-fw_path-variable-revised.patch -Patch0083: 0083-Add-support-for-linuxefi.patch -Patch0084: 0084-Use-linuxefi-and-initrdefi-where-appropriate.patch -Patch0085: 0085-Don-t-allow-insmod-when-secure-boot-is-enabled.patch -Patch0086: 0086-Pass-x-hex-hex-straight-through-unmolested.patch -Patch0087: 0087-Add-X-option-to-printf-functions.patch -Patch0088: 0088-Search-for-specific-config-file-for-netboot.patch -Patch0089: 0089-blscfg-add-blscfg-module-to-parse-Boot-Loader-Specif.patch -Patch0090: 0090-Don-t-write-messages-to-the-screen.patch -Patch0091: 0091-Don-t-print-GNU-GRUB-header.patch -Patch0092: 0092-Don-t-add-to-highlighted-row.patch -Patch0093: 0093-Message-string-cleanups.patch -Patch0094: 0094-Fix-border-spacing-now-that-we-aren-t-displaying-it.patch -Patch0095: 0095-Use-the-correct-indentation-for-the-term-help-text.patch -Patch0096: 0096-Indent-menu-entries.patch -Patch0097: 0097-Fix-margins.patch -Patch0098: 0098-Use-2-instead-of-1-for-our-right-hand-margin-so-line.patch -Patch0099: 0099-Use-linux16-when-appropriate-880840.patch -Patch0100: 0100-Enable-pager-by-default.-985860.patch -Patch0101: 0101-F10-doesn-t-work-on-serial-so-don-t-tell-the-user-to.patch -Patch0102: 0102-Don-t-say-GNU-Linux-in-generated-menus.patch -Patch0103: 0103-Don-t-draw-a-border-around-the-menu.patch -Patch0104: 0104-Use-the-standard-margin-for-the-timeout-string.patch -Patch0105: 0105-Add-.eh_frame-to-list-of-relocations-stripped.patch -Patch0106: 0106-Make-10_linux-work-with-our-changes-for-linux16-and-.patch -Patch0107: 0107-Don-t-print-during-fdt-loading-method.patch -Patch0108: 0108-Don-t-munge-raw-spaces-when-we-re-doing-our-cmdline-.patch -Patch0109: 0109-Don-t-require-a-password-to-boot-entries-generated-b.patch -Patch0110: 0110-Don-t-emit-Booting-.-message.patch -Patch0111: 0111-Replace-a-lot-of-man-pages-with-slightly-nicer-ones.patch -Patch0112: 0112-use-fw_path-prefix-when-fallback-searching-for-grub-.patch -Patch0113: 0113-Try-mac-guid-etc-before-grub.cfg-on-tftp-config-file.patch -Patch0114: 0114-Fix-convert-function-to-support-NVMe-devices.patch -Patch0115: 0115-Switch-to-use-APM-Mustang-device-tree-for-hardware-t.patch -Patch0116: 0116-Use-the-default-device-tree-from-the-grub-default-fi.patch -Patch0117: 0117-reopen-SNP-protocol-for-exclusive-use-by-grub.patch -Patch0118: 0118-Revert-reopen-SNP-protocol-for-exclusive-use-by-grub.patch -Patch0119: 0119-Add-grub_util_readlink.patch -Patch0120: 0120-Make-editenv-chase-symlinks-including-those-across-d.patch -Patch0121: 0121-Generate-OS-and-CLASS-in-10_linux-from-etc-os-releas.patch -Patch0122: 0122-Minimize-the-sort-ordering-for-.debug-and-rescue-ker.patch -Patch0123: 0123-Load-arm-with-SB-enabled.patch -Patch0124: 0124-Try-prefix-if-fw_path-doesn-t-work.patch -Patch0125: 0125-Update-info-with-grub.cfg-netboot-selection-order-11.patch -Patch0126: 0126-Use-Distribution-Package-Sort-for-grub2-mkconfig-112.patch -Patch0127: 0127-Handle-rssd-storage-devices.patch -Patch0128: 0128-Try-to-emit-linux16-initrd16-and-linuxefi-initrdefi-.patch -Patch0129: 0129-Make-grub2-mkconfig-construct-titles-that-look-like-.patch -Patch0130: 0130-Add-friendly-grub2-password-config-tool-985962.patch -Patch0131: 0131-calibrate_tsc-use-the-Stall-EFI-boot-service-on-GRUB.patch -Patch0132: 0132-Make-grub2-mkconfig-construct-titles-that-look-like-.patch -Patch0133: 0133-Try-to-make-sure-configure.ac-and-grub-rpm-sort-play.patch -Patch0134: 0134-tcp-add-window-scaling-support.patch -Patch0135: 0135-efinet-retransmit-if-our-device-is-busy.patch -Patch0136: 0136-Be-more-aggro-about-actually-using-the-configured-ne.patch -Patch0137: 0137-efinet-add-filter-for-the-first-exclusive-reopen-of-.patch -Patch0138: 0138-Fix-security-issue-when-reading-username-and-passwor.patch -Patch0139: 0139-Warn-if-grub-password-will-not-be-read-1290803.patch -Patch0140: 0140-Clean-up-grub-setpassword-documentation-1290799.patch -Patch0141: 0141-Fix-locale-issue-in-grub-setpassword-1294243.patch -Patch0142: 0142-efiemu-Handle-persistent-RAM-and-unknown-possible-fu.patch -Patch0143: 0143-efiemu-Fix-compilation-failure.patch -Patch0144: 0144-Revert-reopen-SNP-protocol-for-exclusive-use-by-grub.patch -Patch0145: 0145-Add-a-url-parser.patch -Patch0146: 0146-efinet-and-bootp-add-support-for-dhcpv6.patch -Patch0147: 0147-Add-grub-get-kernel-settings-and-use-it-in-10_linux.patch -Patch0148: 0148-Normalize-slashes-in-tftp-paths.patch -Patch0149: 0149-Fix-malformed-tftp-packets.patch -Patch0150: 0150-Fix-race-in-EFI-validation.patch -Patch0151: 0151-bz1374141-fix-incorrect-mask-for-ppc64.patch -Patch0152: 0152-Use-device-part-of-chainloader-target-if-present.patch -Patch0153: 0153-Add-secureboot-support-on-efi-chainloader.patch -Patch0154: 0154-Make-any-of-the-loaders-that-link-in-efi-mode-honor-.patch -Patch0155: 0155-Make-grub_fatal-also-backtrace.patch -Patch0156: 0156-Rework-linux-command.patch -Patch0157: 0157-Rework-linux16-command.patch -Patch0158: 0158-Make-grub-editenv-build-again.patch -Patch0159: 0159-Fix-up-some-man-pages-rpmdiff-noticed.patch -Patch0160: 0160-Re-work-some-intricacies-of-PE-loading.patch -Patch0161: 0161-Rework-even-more-of-efi-chainload-so-non-sb-cases-wo.patch -Patch0162: 0162-linuxefi-fix-double-free-on-verification-failure.patch -Patch0163: 0163-fix-machine-type-test-in-30_os-prober.in.patch -Patch0164: 0164-efi-chainloader-fix-wrong-sanity-check-in-relocate_c.patch -Patch0165: 0165-efi-chainloader-truncate-overlong-relocation-section.patch -Patch0166: 0166-linuxefi-minor-cleanups.patch -Patch0167: 0167-Handle-multi-arch-64-on-32-boot-in-linuxefi-loader.patch -Patch0168: 0168-Fix-up-linux-params-usage.patch -Patch0169: 0169-Make-exit-take-a-return-code.patch -Patch0170: 0170-arm64-make-sure-fdt-has-address-cells-and-size-cells.patch -Patch0171: 0171-Add-some-grub_dprintf-in-the-secure-boot-verify-code.patch -Patch0172: 0172-Make-our-info-pages-say-grub2-where-appropriate.patch -Patch0173: 0173-print-more-debug-info-in-our-module-loader.patch -Patch0174: 0174-macos-just-build-chainloader-entries-don-t-try-any-x.patch -Patch0175: 0175-grub2-btrfs-Add-ability-to-boot-from-subvolumes.patch -Patch0176: 0176-export-btrfs_subvol-and-btrfs_subvolid.patch -Patch0177: 0177-grub2-btrfs-03-follow_default.patch -Patch0178: 0178-grub2-btrfs-04-grub2-install.patch -Patch0179: 0179-grub2-btrfs-05-grub2-mkconfig.patch -Patch0180: 0180-grub2-btrfs-06-subvol-mount.patch -Patch0181: 0181-No-more-Bootable-Snapshot-submenu-in-grub.cfg.patch -Patch0182: 0182-Fallback-to-old-subvol-name-scheme-to-support-old-sn.patch -Patch0183: 0183-Grub-not-working-correctly-with-btrfs-snapshots-bsc-.patch -Patch0184: 0184-Add-grub_efi_allocate_pool-and-grub_efi_free_pool-wr.patch -Patch0185: 0185-Use-grub_efi_.-memory-helpers-where-reasonable.patch -Patch0186: 0186-Add-PRIxGRUB_EFI_STATUS-and-use-it.patch -Patch0187: 0187-Don-t-use-dynamic-sized-arrays-since-we-don-t-build-.patch -Patch0188: 0188-don-t-ignore-const.patch -Patch0189: 0189-don-t-use-int-for-efi-status.patch -Patch0190: 0190-make-GRUB_MOD_INIT-declare-its-function-prototypes.patch -Patch0191: 0191-Clean-up-some-errors-in-the-linuxefi-loader.patch -Patch0192: 0192-editenv-handle-relative-symlinks.patch -Patch0193: 0193-Make-libgrub.pp-depend-on-config-util.h.patch -Patch0194: 0194-Don-t-guess-boot-efi-as-HFS-on-ppc-machines-in-grub-.patch -Patch0195: 0195-Fix-util-grub.d-20_linux_xen.in-Add-xen_boot-command.patch -Patch0196: 0196-Use-grub-file-to-figure-out-whether-multiboot2-shoul.patch -Patch0197: 0197-20_linux_xen-load-xen-or-multiboot-2-modules-as-need.patch +Patch0064: 0064-grub.texi-Fix-typo.patch +Patch0065: 0065-hdparm-Depend-on-hexdump-rather-than-having-a-second.patch +Patch0066: 0066-multiboot-disentangle-multiboot-and-multiboot2.patch +Patch0067: 0067-Fix-symbols-appearing-in-several-modules-in-linux.patch +Patch0068: 0068-genmoddep-Check-that-no-modules-provide-the-same-sym.patch +Patch0069: 0069-yylex-Explicilty-cast-fprintf-to-void.patch +Patch0070: 0070-linux-fixup.patch +Patch0071: 0071-multiboot-fixup.patch +Patch0072: 0072-enforcing-fixup.patch +Patch0073: 0073-Set-have_exec-to-y-on-cygwin-so-we-have-grub_mkrescu.patch +Patch0074: 0074-arc-Do-not-create-spurious-variable-grub_arc_memory_.patch +Patch0075: 0075-unix-exec-avoid-atexit-handlers-when-child-exits.patch +Patch0076: 0076-xfs-Don-t-attempt-to-iterate-over-empty-directory.patch +Patch0077: 0077-Implement-checksum-verification-for-gunzip.patch +Patch0078: 0078-qemu-coreboot-multiboot-Change-linking-address-to-0x.patch +Patch0079: 0079-printf_unit_test-Disable-Wformat-truncation-on-GCC-7.patch +Patch0080: 0080-Regenerate-checksum.h-with-newer-unifont.patch +Patch0081: 0081-grub-fs-tester-Fix-bashism.patch +Patch0082: 0082-gzio-fix-unaligned-access.patch +Patch0083: 0083-Add-a-file-missing-in-multiboot2-commit.patch +Patch0084: 0084-Fix-compilation-for-x86_64-efi.patch +Patch0085: 0085-Fix-util-grub.d-20_linux_xen.in-Add-xen_boot-command.patch +Patch0086: 0086-Use-grub-file-to-figure-out-whether-multiboot2-shoul.patch +Patch0087: 0087-efi-Move-grub_reboot-into-kernel.patch +Patch0088: 0088-efi-Free-malloc-regions-on-exit.patch +Patch0089: 0089-tsc-Change-default-tsc-calibration-method-to-pmtimer.patch +Patch0090: 0090-ls-prevent-double-open.patch +Patch0091: 0091-grub-install-Fix-memory-leak.patch +Patch0092: 0092-ieee1275-Fix-segfault-in-grub-ofpathname.patch +Patch0093: 0093-grub-mkconfig-Fix-detecting-.sig-files-as-system-ima.patch +Patch0094: 0094-arm64-xen-Add-missing-address-cells-and-size-cells-p.patch +Patch0095: 0095-Re-write-.gitignore.patch +Patch0096: 0096-git-Mark-po-exclude.pot-as-binary-so-git-won-t-diff-.patch +Patch0097: 0097-docs-Makefile.am-use-info-in-builddir.patch +Patch0098: 0098-Trivial-fix-for-an-error-message-in-get_header_from_.patch +Patch0099: 0099-IBM-client-architecture-CAS-reboot-support.patch +Patch0100: 0100-ppc-Use-x0c-instead-of-a-literal-L-for-terminfo-s-cl.patch +Patch0101: 0101-Disable-GRUB-video-support-for-IBM-power-machines.patch +Patch0102: 0102-Honor-a-symlink-when-generating-configuration-by-gru.patch +Patch0103: 0103-Move-bash-completion-script-922997.patch +Patch0104: 0104-Update-to-minilzo-2.08.patch +Patch0105: 0105-Make-exit-take-a-return-code.patch +Patch0106: 0106-Add-grub_efi_allocate_pool-and-grub_efi_free_pool-wr.patch +Patch0107: 0107-Use-grub_efi_.-memory-helpers-where-reasonable.patch +Patch0108: 0108-Don-t-escape-x-hex-hex-in-command-line-wildcard-pars.patch +Patch0109: 0109-Add-X-option-to-printf-functions.patch +Patch0110: 0110-Make-grub_fatal-dump-a-backtrace.patch +Patch0111: 0111-Allow-fallback-to-include-entries-by-title-not-just-.patch +Patch0112: 0112-bz1374141-fix-incorrect-mask-for-ppc64.patch +Patch0113: 0113-efi-Better-grub_dprintf-in-our-module-loader.patch +Patch0114: 0114-make-GRUB_MOD_INIT-declare-its-function-prototypes.patch +Patch0115: 0115-Make-libgrub.pp-depend-on-config-util.h.patch +Patch0116: 0116-Normalize-slashes-in-tftp-paths.patch +Patch0117: 0117-Add-GRUB_DISABLE_UUID.patch +Patch0118: 0118-Make-efi-machines-load-an-env-block-from-a-variable.patch +Patch0119: 0119-DHCP-client-ID-and-UUID-options-added.patch +Patch0120: 0120-trim-arp-packets-with-abnormal-size.patch +Patch0121: 0121-Fix-bad-test-on-GRUB_DISABLE_SUBMENU.patch +Patch0122: 0122-Add-grub_util_readlink.patch +Patch0123: 0123-Make-editenv-chase-symlinks-including-those-across-d.patch +Patch0124: 0124-grub-install-Don-t-mark-PPC-machines-as-EFI-when-boo.patch +Patch0125: 0125-Add-support-for-UEFI-operating-systems-returned-by-o.patch +Patch0126: 0126-Migrate-PPC-from-Yaboot-to-Grub2.patch +Patch0127: 0127-Add-fw_path-variable-revised.patch +Patch0128: 0128-Add-support-for-linuxefi.patch +Patch0129: 0129-Use-linuxefi-and-initrdefi-where-appropriate.patch +Patch0130: 0130-Don-t-allow-insmod-when-secure-boot-is-enabled.patch +Patch0131: 0131-Search-for-specific-config-file-for-netboot.patch +Patch0132: 0132-blscfg-add-blscfg-module-to-parse-Boot-Loader-Specif.patch +Patch0133: 0133-Don-t-write-messages-to-the-screen.patch +Patch0134: 0134-Don-t-print-GNU-GRUB-header.patch +Patch0135: 0135-Don-t-add-to-highlighted-row.patch +Patch0136: 0136-Message-string-cleanups.patch +Patch0137: 0137-Fix-border-spacing-now-that-we-aren-t-displaying-it.patch +Patch0138: 0138-Use-the-correct-indentation-for-the-term-help-text.patch +Patch0139: 0139-Indent-menu-entries.patch +Patch0140: 0140-Fix-margins.patch +Patch0141: 0141-Use-2-instead-of-1-for-our-right-hand-margin-so-line.patch +Patch0142: 0142-Use-linux16-when-appropriate-880840.patch +Patch0143: 0143-Enable-pager-by-default.-985860.patch +Patch0144: 0144-F10-doesn-t-work-on-serial-so-don-t-tell-the-user-to.patch +Patch0145: 0145-Don-t-say-GNU-Linux-in-generated-menus.patch +Patch0146: 0146-Don-t-draw-a-border-around-the-menu.patch +Patch0147: 0147-Use-the-standard-margin-for-the-timeout-string.patch +Patch0148: 0148-Add-.eh_frame-to-list-of-relocations-stripped.patch +Patch0149: 0149-Make-10_linux-work-with-our-changes-for-linux16-and-.patch +Patch0150: 0150-Don-t-print-during-fdt-loading-method.patch +Patch0151: 0151-Don-t-require-a-password-to-boot-entries-generated-b.patch +Patch0152: 0152-Don-t-emit-Booting-.-message.patch +Patch0153: 0153-Replace-a-lot-of-man-pages-with-slightly-nicer-ones.patch +Patch0154: 0154-use-fw_path-prefix-when-fallback-searching-for-grub-.patch +Patch0155: 0155-Try-mac-guid-etc-before-grub.cfg-on-tftp-config-file.patch +Patch0156: 0156-Fix-convert-function-to-support-NVMe-devices.patch +Patch0157: 0157-Switch-to-use-APM-Mustang-device-tree-for-hardware-t.patch +Patch0158: 0158-Use-the-default-device-tree-from-the-grub-default-fi.patch +Patch0159: 0159-Generate-OS-and-CLASS-in-10_linux-from-etc-os-releas.patch +Patch0160: 0160-Minimize-the-sort-ordering-for-.debug-and-rescue-ker.patch +Patch0161: 0161-Load-arm-with-SB-enabled.patch +Patch0162: 0162-Try-prefix-if-fw_path-doesn-t-work.patch +Patch0163: 0163-Update-info-with-grub.cfg-netboot-selection-order-11.patch +Patch0164: 0164-Use-Distribution-Package-Sort-for-grub2-mkconfig-112.patch +Patch0165: 0165-Handle-rssd-storage-devices.patch +Patch0166: 0166-Try-to-emit-linux16-initrd16-and-linuxefi-initrdefi-.patch +Patch0167: 0167-Make-grub2-mkconfig-construct-titles-that-look-like-.patch +Patch0168: 0168-Add-friendly-grub2-password-config-tool-985962.patch +Patch0169: 0169-tcp-add-window-scaling-support.patch +Patch0170: 0170-efinet-retransmit-if-our-device-is-busy.patch +Patch0171: 0171-Be-more-aggro-about-actually-using-the-configured-ne.patch +Patch0172: 0172-Fix-security-issue-when-reading-username-and-passwor.patch +Patch0173: 0173-Warn-if-grub-password-will-not-be-read-1290803.patch +Patch0174: 0174-Clean-up-grub-setpassword-documentation-1290799.patch +Patch0175: 0175-Fix-locale-issue-in-grub-setpassword-1294243.patch +Patch0176: 0176-Add-a-url-parser.patch +Patch0177: 0177-efinet-and-bootp-add-support-for-dhcpv6.patch +Patch0178: 0178-Add-grub-get-kernel-settings-and-use-it-in-10_linux.patch +Patch0179: 0179-Fix-race-in-EFI-validation.patch +Patch0180: 0180-Use-device-part-of-chainloader-target-if-present.patch +Patch0181: 0181-Add-secureboot-support-on-efi-chainloader.patch +Patch0182: 0182-Make-any-of-the-loaders-that-link-in-efi-mode-honor-.patch +Patch0183: 0183-Rework-linux-command.patch +Patch0184: 0184-Rework-linux16-command.patch +Patch0185: 0185-Make-grub-editenv-build-again.patch +Patch0186: 0186-Fix-up-some-man-pages-rpmdiff-noticed.patch +Patch0187: 0187-Add-PRIxGRUB_EFI_STATUS-and-use-it.patch +Patch0188: 0188-Re-work-some-intricacies-of-PE-loading.patch +Patch0189: 0189-Rework-even-more-of-efi-chainload-so-non-sb-cases-wo.patch +Patch0190: 0190-linuxefi-fix-double-free-on-verification-failure.patch +Patch0191: 0191-fix-machine-type-test-in-30_os-prober.in.patch +Patch0192: 0192-efi-chainloader-fix-wrong-sanity-check-in-relocate_c.patch +Patch0193: 0193-efi-chainloader-truncate-overlong-relocation-section.patch +Patch0194: 0194-linuxefi-minor-cleanups.patch +Patch0195: 0195-Handle-multi-arch-64-on-32-boot-in-linuxefi-loader.patch +Patch0196: 0196-Fix-up-linux-params-usage.patch +Patch0197: 0197-arm64-make-sure-fdt-has-address-cells-and-size-cells.patch +Patch0198: 0198-Add-some-grub_dprintf-in-the-secure-boot-verify-code.patch +Patch0199: 0199-Make-our-info-pages-say-grub2-where-appropriate.patch +Patch0200: 0200-macos-just-build-chainloader-entries-don-t-try-any-x.patch +Patch0201: 0201-grub2-btrfs-Add-ability-to-boot-from-subvolumes.patch +Patch0202: 0202-export-btrfs_subvol-and-btrfs_subvolid.patch +Patch0203: 0203-grub2-btrfs-03-follow_default.patch +Patch0204: 0204-grub2-btrfs-04-grub2-install.patch +Patch0205: 0205-grub2-btrfs-05-grub2-mkconfig.patch +Patch0206: 0206-grub2-btrfs-06-subvol-mount.patch +Patch0207: 0207-No-more-Bootable-Snapshot-submenu-in-grub.cfg.patch +Patch0208: 0208-Fallback-to-old-subvol-name-scheme-to-support-old-sn.patch +Patch0209: 0209-Grub-not-working-correctly-with-btrfs-snapshots-bsc-.patch +Patch0210: 0210-Clean-up-some-errors-in-the-linuxefi-loader.patch +Patch0211: 0211-Use-xid-to-match-DHCP-replies.patch +Patch0212: 0212-Add-support-for-non-Ethernet-network-cards.patch +Patch0213: 0213-Fix-crash-on-http.patch +Patch0214: 0214-net-read-bracketed-ipv6-addrs-and-port-numbers.patch +Patch0215: 0215-bootp-New-net_bootp6-command.patch +Patch0216: 0216-efinet-UEFI-IPv6-PXE-support.patch +Patch0217: 0217-grub.texi-Add-net_bootp6-doument.patch +Patch0218: 0218-bootp-Add-processing-DHCPACK-packet-from-HTTP-Boot.patch +Patch0219: 0219-efinet-Setting-network-from-UEFI-device-path.patch +Patch0220: 0220-efinet-Setting-DNS-server-from-UEFI-protocol.patch +Patch0221: 0221-set-rootpath.patch +Patch0222: 0222-Fix-one-more-coverity-complaint.patch +Patch0223: 0223-Make-module-directory-specifiable-on-the-configure-c.patch +Patch0224: 0224-20_linux_xen-load-xen-or-multiboot-2-modules-as-need.patch +Patch0225: 0225-Make-pmtimer-tsc-calibration-not-take-51-seconds-to-.patch diff --git a/grub2.spec b/grub2.spec index 8d907ea..35d34da 100644 --- a/grub2.spec +++ b/grub2.spec @@ -7,7 +7,7 @@ Name: grub2 Epoch: 1 Version: 2.02 -Release: 19%{?dist} +Release: 20%{?dist} Summary: Bootloader with support for Linux, Multiboot and more Group: System Environment/Base License: GPLv3+ @@ -454,6 +454,11 @@ fi %endif %changelog +* Wed Jan 17 2018 Peter Jones - 2.02-20 +- Update to newer upstream for F28 +- Pull in patches for Apollo Lake hardware + Resolves: rhbz#1519311 + * Tue Oct 24 2017 Peter Jones - 2.02-19 - Handle xen module loading (somewhat) better Resolves: rhbz#1486002