mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
grub: update to 2.04
fixes: #12463 Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org> Acked-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -10,7 +10,7 @@ etc/grub.d/20_linux_xen
|
||||
etc/grub.d/30_os-prober
|
||||
etc/grub.d/40_custom
|
||||
etc/grub.d/41_custom
|
||||
etc/grub.d/README
|
||||
#etc/grub.d/README
|
||||
usr/bin/grub-editenv
|
||||
usr/bin/grub-file
|
||||
usr/bin/grub-fstest
|
||||
@@ -123,8 +123,11 @@ usr/lib/grub/arm64-efi/ext2.mod
|
||||
usr/lib/grub/arm64-efi/ext2.module
|
||||
usr/lib/grub/arm64-efi/extcmd.mod
|
||||
usr/lib/grub/arm64-efi/extcmd.module
|
||||
usr/lib/grub/arm64-efi/f2fs.mod
|
||||
usr/lib/grub/arm64-efi/f2fs.module
|
||||
usr/lib/grub/arm64-efi/fat.mod
|
||||
usr/lib/grub/arm64-efi/fat.module
|
||||
usr/lib/grub/arm64-efi/fdt.lst
|
||||
usr/lib/grub/arm64-efi/fdt.mod
|
||||
usr/lib/grub/arm64-efi/fdt.module
|
||||
usr/lib/grub/arm64-efi/file.mod
|
||||
@@ -342,6 +345,8 @@ usr/lib/grub/arm64-efi/pbkdf2.mod
|
||||
usr/lib/grub/arm64-efi/pbkdf2.module
|
||||
usr/lib/grub/arm64-efi/pbkdf2_test.mod
|
||||
usr/lib/grub/arm64-efi/pbkdf2_test.module
|
||||
usr/lib/grub/arm64-efi/pgp.mod
|
||||
usr/lib/grub/arm64-efi/pgp.module
|
||||
usr/lib/grub/arm64-efi/png.mod
|
||||
usr/lib/grub/arm64-efi/png.module
|
||||
usr/lib/grub/arm64-efi/priority_queue.mod
|
||||
@@ -394,6 +399,8 @@ usr/lib/grub/arm64-efi/sleep_test.mod
|
||||
usr/lib/grub/arm64-efi/sleep_test.module
|
||||
usr/lib/grub/arm64-efi/squash4.mod
|
||||
usr/lib/grub/arm64-efi/squash4.module
|
||||
usr/lib/grub/arm64-efi/strtoull_test.mod
|
||||
usr/lib/grub/arm64-efi/strtoull_test.module
|
||||
usr/lib/grub/arm64-efi/syslinuxcfg.mod
|
||||
usr/lib/grub/arm64-efi/syslinuxcfg.module
|
||||
usr/lib/grub/arm64-efi/tar.mod
|
||||
@@ -431,8 +438,8 @@ usr/lib/grub/arm64-efi/ufs1_be.mod
|
||||
usr/lib/grub/arm64-efi/ufs1_be.module
|
||||
usr/lib/grub/arm64-efi/ufs2.mod
|
||||
usr/lib/grub/arm64-efi/ufs2.module
|
||||
usr/lib/grub/arm64-efi/verify.mod
|
||||
usr/lib/grub/arm64-efi/verify.module
|
||||
usr/lib/grub/arm64-efi/verifiers.mod
|
||||
usr/lib/grub/arm64-efi/verifiers.module
|
||||
usr/lib/grub/arm64-efi/video.lst
|
||||
usr/lib/grub/arm64-efi/video.mod
|
||||
usr/lib/grub/arm64-efi/video.module
|
||||
@@ -462,6 +469,8 @@ usr/lib/grub/arm64-efi/zfscrypt.mod
|
||||
usr/lib/grub/arm64-efi/zfscrypt.module
|
||||
usr/lib/grub/arm64-efi/zfsinfo.mod
|
||||
usr/lib/grub/arm64-efi/zfsinfo.module
|
||||
usr/lib/grub/arm64-efi/zstd.mod
|
||||
usr/lib/grub/arm64-efi/zstd.module
|
||||
usr/sbin/grub-bios-setup
|
||||
usr/sbin/grub-install
|
||||
usr/sbin/grub-macbless
|
||||
@@ -524,7 +533,9 @@ usr/share/grub/unicode.pf2
|
||||
#usr/share/locale/pa/LC_MESSAGES
|
||||
#usr/share/locale/pa/LC_MESSAGES/grub.mo
|
||||
#usr/share/locale/pl/LC_MESSAGES/grub.mo
|
||||
#usr/share/locale/pt/LC_MESSAGES/grub.mo
|
||||
#usr/share/locale/pt_BR/LC_MESSAGES/grub.mo
|
||||
#usr/share/locale/ro/LC_MESSAGES/grub.mo
|
||||
#usr/share/locale/ru/LC_MESSAGES/grub.mo
|
||||
#usr/share/locale/sl/LC_MESSAGES/grub.mo
|
||||
#usr/share/locale/sr/LC_MESSAGES/grub.mo
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4,7 +4,7 @@ boot/grub/splash.png
|
||||
#etc/bash_completion.d
|
||||
#etc/bash_completion.d/grub
|
||||
etc/default/grub
|
||||
etc/grub.d
|
||||
#etc/grub.d
|
||||
etc/grub.d/00_header
|
||||
etc/grub.d/10_linux
|
||||
etc/grub.d/20_linux_xen
|
||||
@@ -30,7 +30,7 @@ usr/bin/grub-render-label
|
||||
usr/bin/grub-script-check
|
||||
usr/bin/grub-syslinux2cfg
|
||||
#usr/lib/grub
|
||||
usr/lib/grub/i386-pc
|
||||
#usr/lib/grub/i386-pc
|
||||
usr/lib/grub/i386-pc/acpi.mod
|
||||
usr/lib/grub/i386-pc/acpi.module
|
||||
usr/lib/grub/i386-pc/adler32.mod
|
||||
@@ -162,8 +162,11 @@ usr/lib/grub/i386-pc/ext2.mod
|
||||
usr/lib/grub/i386-pc/ext2.module
|
||||
usr/lib/grub/i386-pc/extcmd.mod
|
||||
usr/lib/grub/i386-pc/extcmd.module
|
||||
usr/lib/grub/i386-pc/f2fs.mod
|
||||
usr/lib/grub/i386-pc/f2fs.module
|
||||
usr/lib/grub/i386-pc/fat.mod
|
||||
usr/lib/grub/i386-pc/fat.module
|
||||
usr/lib/grub/i386-pc/fdt.lst
|
||||
usr/lib/grub/i386-pc/file.mod
|
||||
usr/lib/grub/i386-pc/file.module
|
||||
usr/lib/grub/i386-pc/font.mod
|
||||
@@ -415,6 +418,8 @@ usr/lib/grub/i386-pc/pci.mod
|
||||
usr/lib/grub/i386-pc/pci.module
|
||||
usr/lib/grub/i386-pc/pcidump.mod
|
||||
usr/lib/grub/i386-pc/pcidump.module
|
||||
usr/lib/grub/i386-pc/pgp.mod
|
||||
usr/lib/grub/i386-pc/pgp.module
|
||||
usr/lib/grub/i386-pc/plan9.mod
|
||||
usr/lib/grub/i386-pc/plan9.module
|
||||
usr/lib/grub/i386-pc/play.mod
|
||||
@@ -441,6 +446,8 @@ usr/lib/grub/i386-pc/raid6rec.mod
|
||||
usr/lib/grub/i386-pc/raid6rec.module
|
||||
usr/lib/grub/i386-pc/random.mod
|
||||
usr/lib/grub/i386-pc/random.module
|
||||
usr/lib/grub/i386-pc/rdmsr.mod
|
||||
usr/lib/grub/i386-pc/rdmsr.module
|
||||
usr/lib/grub/i386-pc/read.mod
|
||||
usr/lib/grub/i386-pc/read.module
|
||||
usr/lib/grub/i386-pc/reboot.mod
|
||||
@@ -487,6 +494,8 @@ usr/lib/grub/i386-pc/spkmodem.mod
|
||||
usr/lib/grub/i386-pc/spkmodem.module
|
||||
usr/lib/grub/i386-pc/squash4.mod
|
||||
usr/lib/grub/i386-pc/squash4.module
|
||||
usr/lib/grub/i386-pc/strtoull_test.mod
|
||||
usr/lib/grub/i386-pc/strtoull_test.module
|
||||
usr/lib/grub/i386-pc/syslinuxcfg.mod
|
||||
usr/lib/grub/i386-pc/syslinuxcfg.module
|
||||
usr/lib/grub/i386-pc/tar.mod
|
||||
@@ -546,8 +555,8 @@ usr/lib/grub/i386-pc/usbtest.mod
|
||||
usr/lib/grub/i386-pc/usbtest.module
|
||||
usr/lib/grub/i386-pc/vbe.mod
|
||||
usr/lib/grub/i386-pc/vbe.module
|
||||
usr/lib/grub/i386-pc/verify.mod
|
||||
usr/lib/grub/i386-pc/verify.module
|
||||
usr/lib/grub/i386-pc/verifiers.mod
|
||||
usr/lib/grub/i386-pc/verifiers.module
|
||||
usr/lib/grub/i386-pc/vga.mod
|
||||
usr/lib/grub/i386-pc/vga.module
|
||||
usr/lib/grub/i386-pc/vga_text.mod
|
||||
@@ -569,6 +578,8 @@ usr/lib/grub/i386-pc/videotest.mod
|
||||
usr/lib/grub/i386-pc/videotest.module
|
||||
usr/lib/grub/i386-pc/videotest_checksum.mod
|
||||
usr/lib/grub/i386-pc/videotest_checksum.module
|
||||
usr/lib/grub/i386-pc/wrmsr.mod
|
||||
usr/lib/grub/i386-pc/wrmsr.module
|
||||
usr/lib/grub/i386-pc/xfs.mod
|
||||
usr/lib/grub/i386-pc/xfs.module
|
||||
usr/lib/grub/i386-pc/xnu.mod
|
||||
@@ -585,7 +596,9 @@ usr/lib/grub/i386-pc/zfscrypt.mod
|
||||
usr/lib/grub/i386-pc/zfscrypt.module
|
||||
usr/lib/grub/i386-pc/zfsinfo.mod
|
||||
usr/lib/grub/i386-pc/zfsinfo.module
|
||||
usr/lib/grub/x86_64-efi
|
||||
usr/lib/grub/i386-pc/zstd.mod
|
||||
usr/lib/grub/i386-pc/zstd.module
|
||||
#usr/lib/grub/x86_64-efi
|
||||
usr/lib/grub/x86_64-efi/acpi.mod
|
||||
usr/lib/grub/x86_64-efi/acpi.module
|
||||
usr/lib/grub/x86_64-efi/adler32.mod
|
||||
@@ -709,8 +722,11 @@ usr/lib/grub/x86_64-efi/ext2.mod
|
||||
usr/lib/grub/x86_64-efi/ext2.module
|
||||
usr/lib/grub/x86_64-efi/extcmd.mod
|
||||
usr/lib/grub/x86_64-efi/extcmd.module
|
||||
usr/lib/grub/x86_64-efi/f2fs.mod
|
||||
usr/lib/grub/x86_64-efi/f2fs.module
|
||||
usr/lib/grub/x86_64-efi/fat.mod
|
||||
usr/lib/grub/x86_64-efi/fat.module
|
||||
usr/lib/grub/x86_64-efi/fdt.lst
|
||||
usr/lib/grub/x86_64-efi/file.mod
|
||||
usr/lib/grub/x86_64-efi/file.module
|
||||
usr/lib/grub/x86_64-efi/fixvideo.mod
|
||||
@@ -958,6 +974,8 @@ usr/lib/grub/x86_64-efi/pbkdf2_test.mod
|
||||
usr/lib/grub/x86_64-efi/pbkdf2_test.module
|
||||
usr/lib/grub/x86_64-efi/pcidump.mod
|
||||
usr/lib/grub/x86_64-efi/pcidump.module
|
||||
usr/lib/grub/x86_64-efi/pgp.mod
|
||||
usr/lib/grub/x86_64-efi/pgp.module
|
||||
usr/lib/grub/x86_64-efi/play.mod
|
||||
usr/lib/grub/x86_64-efi/play.module
|
||||
usr/lib/grub/x86_64-efi/png.mod
|
||||
@@ -976,6 +994,8 @@ usr/lib/grub/x86_64-efi/raid6rec.mod
|
||||
usr/lib/grub/x86_64-efi/raid6rec.module
|
||||
usr/lib/grub/x86_64-efi/random.mod
|
||||
usr/lib/grub/x86_64-efi/random.module
|
||||
usr/lib/grub/x86_64-efi/rdmsr.mod
|
||||
usr/lib/grub/x86_64-efi/rdmsr.module
|
||||
usr/lib/grub/x86_64-efi/read.mod
|
||||
usr/lib/grub/x86_64-efi/read.module
|
||||
usr/lib/grub/x86_64-efi/reboot.mod
|
||||
@@ -1010,6 +1030,8 @@ usr/lib/grub/x86_64-efi/sfs.mod
|
||||
usr/lib/grub/x86_64-efi/sfs.module
|
||||
usr/lib/grub/x86_64-efi/shift_test.mod
|
||||
usr/lib/grub/x86_64-efi/shift_test.module
|
||||
usr/lib/grub/x86_64-efi/shim_lock.mod
|
||||
usr/lib/grub/x86_64-efi/shim_lock.module
|
||||
usr/lib/grub/x86_64-efi/signature_test.mod
|
||||
usr/lib/grub/x86_64-efi/signature_test.module
|
||||
usr/lib/grub/x86_64-efi/sleep.mod
|
||||
@@ -1020,6 +1042,8 @@ usr/lib/grub/x86_64-efi/spkmodem.mod
|
||||
usr/lib/grub/x86_64-efi/spkmodem.module
|
||||
usr/lib/grub/x86_64-efi/squash4.mod
|
||||
usr/lib/grub/x86_64-efi/squash4.module
|
||||
usr/lib/grub/x86_64-efi/strtoull_test.mod
|
||||
usr/lib/grub/x86_64-efi/strtoull_test.module
|
||||
usr/lib/grub/x86_64-efi/syslinuxcfg.mod
|
||||
usr/lib/grub/x86_64-efi/syslinuxcfg.module
|
||||
usr/lib/grub/x86_64-efi/tar.mod
|
||||
@@ -1043,6 +1067,8 @@ usr/lib/grub/x86_64-efi/tga.mod
|
||||
usr/lib/grub/x86_64-efi/tga.module
|
||||
usr/lib/grub/x86_64-efi/time.mod
|
||||
usr/lib/grub/x86_64-efi/time.module
|
||||
usr/lib/grub/x86_64-efi/tpm.mod
|
||||
usr/lib/grub/x86_64-efi/tpm.module
|
||||
usr/lib/grub/x86_64-efi/tr.mod
|
||||
usr/lib/grub/x86_64-efi/tr.module
|
||||
usr/lib/grub/x86_64-efi/trig.mod
|
||||
@@ -1075,8 +1101,8 @@ usr/lib/grub/x86_64-efi/usbserial_usbdebug.mod
|
||||
usr/lib/grub/x86_64-efi/usbserial_usbdebug.module
|
||||
usr/lib/grub/x86_64-efi/usbtest.mod
|
||||
usr/lib/grub/x86_64-efi/usbtest.module
|
||||
usr/lib/grub/x86_64-efi/verify.mod
|
||||
usr/lib/grub/x86_64-efi/verify.module
|
||||
usr/lib/grub/x86_64-efi/verifiers.mod
|
||||
usr/lib/grub/x86_64-efi/verifiers.module
|
||||
usr/lib/grub/x86_64-efi/video.lst
|
||||
usr/lib/grub/x86_64-efi/video.mod
|
||||
usr/lib/grub/x86_64-efi/video.module
|
||||
@@ -1094,6 +1120,8 @@ usr/lib/grub/x86_64-efi/videotest.mod
|
||||
usr/lib/grub/x86_64-efi/videotest.module
|
||||
usr/lib/grub/x86_64-efi/videotest_checksum.mod
|
||||
usr/lib/grub/x86_64-efi/videotest_checksum.module
|
||||
usr/lib/grub/x86_64-efi/wrmsr.mod
|
||||
usr/lib/grub/x86_64-efi/wrmsr.module
|
||||
usr/lib/grub/x86_64-efi/xfs.mod
|
||||
usr/lib/grub/x86_64-efi/xfs.module
|
||||
usr/lib/grub/x86_64-efi/xnu.mod
|
||||
@@ -1110,6 +1138,8 @@ usr/lib/grub/x86_64-efi/zfscrypt.mod
|
||||
usr/lib/grub/x86_64-efi/zfscrypt.module
|
||||
usr/lib/grub/x86_64-efi/zfsinfo.mod
|
||||
usr/lib/grub/x86_64-efi/zfsinfo.module
|
||||
usr/lib/grub/x86_64-efi/zstd.mod
|
||||
usr/lib/grub/x86_64-efi/zstd.module
|
||||
usr/sbin/grub-bios-setup
|
||||
usr/sbin/grub-install
|
||||
usr/sbin/grub-macbless
|
||||
@@ -1172,7 +1202,9 @@ usr/share/grub/unicode.pf2
|
||||
#usr/share/locale/pa/LC_MESSAGES
|
||||
#usr/share/locale/pa/LC_MESSAGES/grub.mo
|
||||
#usr/share/locale/pl/LC_MESSAGES/grub.mo
|
||||
#usr/share/locale/pt/LC_MESSAGES/grub.mo
|
||||
#usr/share/locale/pt_BR/LC_MESSAGES/grub.mo
|
||||
#usr/share/locale/ro/LC_MESSAGES/grub.mo
|
||||
#usr/share/locale/ru/LC_MESSAGES/grub.mo
|
||||
#usr/share/locale/sl/LC_MESSAGES/grub.mo
|
||||
#usr/share/locale/sr/LC_MESSAGES/grub.mo
|
||||
|
||||
10
lfs/grub
10
lfs/grub
@@ -1,7 +1,7 @@
|
||||
###############################################################################
|
||||
# #
|
||||
# IPFire.org - A linux based firewall #
|
||||
# Copyright (C) 2007-2018 IPFire Team <info@ipfire.org> #
|
||||
# Copyright (C) 2007-2020 IPFire Team <info@ipfire.org> #
|
||||
# #
|
||||
# This program is free software: you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
include Config
|
||||
|
||||
VER = 2.02
|
||||
VER = 2.04
|
||||
|
||||
THISAPP = grub-$(VER)
|
||||
DL_FILE = $(THISAPP).tar.xz
|
||||
@@ -66,7 +66,7 @@ objects = $(DL_FILE) \
|
||||
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
|
||||
unifont-7.0.03.pcf.gz = $(DL_FROM)/unifont-7.0.03.pcf.gz
|
||||
|
||||
$(DL_FILE)_MD5 = 8a4a2a95aac551fb0fba860ceabfa1d3
|
||||
$(DL_FILE)_MD5 = 5aaca6713b47ca2456d8324a58755ac7
|
||||
unifont-7.0.03.pcf.gz_MD5 = f6903ac8c1caeeb30c1e9a2975028401
|
||||
|
||||
install : $(TARGET)
|
||||
@@ -98,10 +98,8 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
@$(PREBUILD)
|
||||
@rm -rf $(DIR_APP) $(DIR_APP_EFI) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
|
||||
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/grub/grub-2.04-BootHole.patch
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/grub-2.02_disable_vga_fallback.patch
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/grub-2.02-xfs-accept-filesystem-with-sparse-inodes.patch
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/grub-2.02-fix-packed-not-aligned-error-on-gcc-8.patch
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/grub-2.02-X86_64_PLT32.patch
|
||||
|
||||
# Install unifont
|
||||
cp -v $(DIR_DL)/unifont-7.0.03.pcf.gz $(DIR_APP)/unifont.pcf.gz
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
From 02702bdfe14d8a04643a45b03715f734ae34dbac Mon Sep 17 00:00:00 2001
|
||||
From: "H.J. Lu" <hjl.tools@gmail.com>
|
||||
Date: Sat, 17 Feb 2018 06:47:28 -0800
|
||||
Subject: x86-64: Treat R_X86_64_PLT32 as R_X86_64_PC32
|
||||
|
||||
Starting from binutils commit bd7ab16b4537788ad53521c45469a1bdae84ad4a:
|
||||
|
||||
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=bd7ab16b4537788ad53521c45469a1bdae84ad4a
|
||||
|
||||
x86-64 assembler generates R_X86_64_PLT32, instead of R_X86_64_PC32, for
|
||||
32-bit PC-relative branches. Grub2 should treat R_X86_64_PLT32 as
|
||||
R_X86_64_PC32.
|
||||
|
||||
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
|
||||
Origin: upstream, https://git.savannah.gnu.org/cgit/grub.git/commit/?id=842c390469e2c2e10b5aa36700324cd3bde25875
|
||||
Last-Update: 2018-07-30
|
||||
|
||||
Patch-Name: R_X86_64_PLT32.patch
|
||||
---
|
||||
grub-core/efiemu/i386/loadcore64.c | 1 +
|
||||
grub-core/kern/x86_64/dl.c | 1 +
|
||||
util/grub-mkimagexx.c | 1 +
|
||||
util/grub-module-verifier.c | 1 +
|
||||
4 files changed, 4 insertions(+)
|
||||
|
||||
diff --git a/grub-core/efiemu/i386/loadcore64.c b/grub-core/efiemu/i386/loadcore64.c
|
||||
index e49d0b6ff..18facf47f 100644
|
||||
--- a/grub-core/efiemu/i386/loadcore64.c
|
||||
+++ b/grub-core/efiemu/i386/loadcore64.c
|
||||
@@ -98,6 +98,7 @@ grub_arch_efiemu_relocate_symbols64 (grub_efiemu_segment_t segs,
|
||||
break;
|
||||
|
||||
case R_X86_64_PC32:
|
||||
+ case R_X86_64_PLT32:
|
||||
err = grub_efiemu_write_value (addr,
|
||||
*addr32 + rel->r_addend
|
||||
+ sym.off
|
||||
diff --git a/grub-core/kern/x86_64/dl.c b/grub-core/kern/x86_64/dl.c
|
||||
index 440690673..3a73e6e6c 100644
|
||||
--- a/grub-core/kern/x86_64/dl.c
|
||||
+++ b/grub-core/kern/x86_64/dl.c
|
||||
@@ -70,6 +70,7 @@ grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr,
|
||||
break;
|
||||
|
||||
case R_X86_64_PC32:
|
||||
+ case R_X86_64_PLT32:
|
||||
{
|
||||
grub_int64_t value;
|
||||
value = ((grub_int32_t) *addr32) + rel->r_addend + sym->st_value -
|
||||
diff --git a/util/grub-mkimagexx.c b/util/grub-mkimagexx.c
|
||||
index e63f148e4..f20255a28 100644
|
||||
--- a/util/grub-mkimagexx.c
|
||||
+++ b/util/grub-mkimagexx.c
|
||||
@@ -832,6 +832,7 @@ SUFFIX (relocate_addresses) (Elf_Ehdr *e, Elf_Shdr *sections,
|
||||
break;
|
||||
|
||||
case R_X86_64_PC32:
|
||||
+ case R_X86_64_PLT32:
|
||||
{
|
||||
grub_uint32_t *t32 = (grub_uint32_t *) target;
|
||||
*t32 = grub_host_to_target64 (grub_target_to_host32 (*t32)
|
||||
diff --git a/util/grub-module-verifier.c b/util/grub-module-verifier.c
|
||||
index 9179285a5..a79271f66 100644
|
||||
--- a/util/grub-module-verifier.c
|
||||
+++ b/util/grub-module-verifier.c
|
||||
@@ -19,6 +19,7 @@ struct grub_module_verifier_arch archs[] = {
|
||||
-1
|
||||
}, (int[]){
|
||||
R_X86_64_PC32,
|
||||
+ R_X86_64_PLT32,
|
||||
-1
|
||||
}
|
||||
},
|
||||
@@ -1,72 +0,0 @@
|
||||
From 563b1da6e6ae7af46cc8354cadb5dab416989f0a Mon Sep 17 00:00:00 2001
|
||||
From: Michael Chang <mchang@suse.com>
|
||||
Date: Mon, 26 Mar 2018 16:52:34 +0800
|
||||
Subject: Fix packed-not-aligned error on GCC 8
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
When building with GCC 8, there are several errors regarding packed-not-aligned.
|
||||
|
||||
./include/grub/gpt_partition.h:79:1: error: alignment 1 of ‘struct grub_gpt_partentry’ is less than 8 [-Werror=packed-not-aligned]
|
||||
|
||||
This patch fixes the build error by cleaning up the ambiguity of placing
|
||||
aligned structure in a packed one. In "struct grub_btrfs_time" and "struct
|
||||
grub_gpt_part_type", the aligned attribute seems to be superfluous, and also
|
||||
has to be packed, to ensure the structure is bit-to-bit mapped to the format
|
||||
laid on disk. I think we could blame to copy and paste error here for the
|
||||
mistake. In "struct efi_variable", we have to use grub_efi_packed_guid_t, as
|
||||
the name suggests. :)
|
||||
|
||||
Signed-off-by: Michael Chang <mchang@suse.com>
|
||||
Tested-by: Michael Chang <mchang@suse.com>
|
||||
Tested-by: Paul Menzel <paulepanter@users.sourceforge.net>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
---
|
||||
grub-core/fs/btrfs.c | 2 +-
|
||||
include/grub/efiemu/runtime.h | 2 +-
|
||||
include/grub/gpt_partition.h | 2 +-
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c
|
||||
index 4849c1c..be19544 100644
|
||||
--- a/grub-core/fs/btrfs.c
|
||||
+++ b/grub-core/fs/btrfs.c
|
||||
@@ -175,7 +175,7 @@ struct grub_btrfs_time
|
||||
{
|
||||
grub_int64_t sec;
|
||||
grub_uint32_t nanosec;
|
||||
-} __attribute__ ((aligned (4)));
|
||||
+} GRUB_PACKED;
|
||||
|
||||
struct grub_btrfs_inode
|
||||
{
|
||||
diff --git a/include/grub/efiemu/runtime.h b/include/grub/efiemu/runtime.h
|
||||
index 9b6b729..36d2ded 100644
|
||||
--- a/include/grub/efiemu/runtime.h
|
||||
+++ b/include/grub/efiemu/runtime.h
|
||||
@@ -29,7 +29,7 @@ struct grub_efiemu_ptv_rel
|
||||
|
||||
struct efi_variable
|
||||
{
|
||||
- grub_efi_guid_t guid;
|
||||
+ grub_efi_packed_guid_t guid;
|
||||
grub_uint32_t namelen;
|
||||
grub_uint32_t size;
|
||||
grub_efi_uint32_t attributes;
|
||||
diff --git a/include/grub/gpt_partition.h b/include/grub/gpt_partition.h
|
||||
index 1b32f67..9668a68 100644
|
||||
--- a/include/grub/gpt_partition.h
|
||||
+++ b/include/grub/gpt_partition.h
|
||||
@@ -28,7 +28,7 @@ struct grub_gpt_part_type
|
||||
grub_uint16_t data2;
|
||||
grub_uint16_t data3;
|
||||
grub_uint8_t data4[8];
|
||||
-} __attribute__ ((aligned(8)));
|
||||
+} GRUB_PACKED;
|
||||
typedef struct grub_gpt_part_type grub_gpt_part_type_t;
|
||||
|
||||
#define GRUB_GPT_PARTITION_TYPE_EMPTY \
|
||||
--
|
||||
cgit v1.0-41-gc330
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
From cda0a857dd7a27cd5d621747464bfe71e8727fff Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
Date: Tue, 29 May 2018 16:16:02 +0200
|
||||
Subject: xfs: Accept filesystem with sparse inodes
|
||||
|
||||
The sparse inode metadata format became a mkfs.xfs default in
|
||||
xfsprogs-4.16.0, and such filesystems are now rejected by grub as
|
||||
containing an incompatible feature.
|
||||
|
||||
In essence, this feature allows xfs to allocate inodes into fragmented
|
||||
freespace. (Without this feature, if xfs could not allocate contiguous
|
||||
space for 64 new inodes, inode creation would fail.)
|
||||
|
||||
In practice, the disk format change is restricted to the inode btree,
|
||||
which as far as I can tell is not used by grub. If all you're doing
|
||||
today is parsing a directory, reading an inode number, and converting
|
||||
that inode number to a disk location, then ignoring this feature
|
||||
should be fine, so I've added it to XFS_SB_FEAT_INCOMPAT_SUPPORTED
|
||||
|
||||
I did some brief testing of this patch by hacking up the regression
|
||||
tests to completely fragment freespace on the test xfs filesystem, and
|
||||
then write a large-ish number of inodes to consume any existing
|
||||
contiguous 64-inode chunk. This way any files the grub tests add and
|
||||
traverse would be in such a fragmented inode allocation. Tests passed,
|
||||
but I'm not sure how to cleanly integrate that into the test harness.
|
||||
|
||||
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
|
||||
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||
Tested-by: Chris Murphy <lists@colorremedies.com>
|
||||
---
|
||||
grub-core/fs/xfs.c | 11 ++++++++++-
|
||||
1 file changed, 10 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/grub-core/fs/xfs.c b/grub-core/fs/xfs.c
|
||||
index c6031bd..3b00c74 100644
|
||||
--- a/grub-core/fs/xfs.c
|
||||
+++ b/grub-core/fs/xfs.c
|
||||
@@ -79,9 +79,18 @@ GRUB_MOD_LICENSE ("GPLv3+");
|
||||
#define XFS_SB_FEAT_INCOMPAT_SPINODES (1 << 1) /* sparse inode chunks */
|
||||
#define XFS_SB_FEAT_INCOMPAT_META_UUID (1 << 2) /* metadata UUID */
|
||||
|
||||
-/* We do not currently verify metadata UUID so it is safe to read such filesystem */
|
||||
+/*
|
||||
+ * Directory entries with ftype are explicitly handled by GRUB code.
|
||||
+ *
|
||||
+ * We do not currently read the inode btrees, so it is safe to read filesystems
|
||||
+ * with the XFS_SB_FEAT_INCOMPAT_SPINODES feature.
|
||||
+ *
|
||||
+ * We do not currently verify metadata UUID, so it is safe to read filesystems
|
||||
+ * with the XFS_SB_FEAT_INCOMPAT_META_UUID feature.
|
||||
+ */
|
||||
#define XFS_SB_FEAT_INCOMPAT_SUPPORTED \
|
||||
(XFS_SB_FEAT_INCOMPAT_FTYPE | \
|
||||
+ XFS_SB_FEAT_INCOMPAT_SPINODES | \
|
||||
XFS_SB_FEAT_INCOMPAT_META_UUID)
|
||||
|
||||
struct grub_xfs_sblock
|
||||
--
|
||||
cgit v1.0-41-gc330
|
||||
|
||||
5936
src/patches/grub/grub-2.04-BootHole.patch
Normal file
5936
src/patches/grub/grub-2.04-BootHole.patch
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user