From 004dae234a0703b544eaeec0bb80bd0f5bd05777 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 25 Jun 2019 20:35:19 +0300 Subject: [PATCH] Grub: Added patch. --- core/grub/build | 4 ++- core/grub/checksums | 1 + .../patches/grub-2.02-relocation_fix-1.patch | 31 +++++++++++++++++++ core/grub/sources | 1 + 4 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 core/grub/patches/grub-2.02-relocation_fix-1.patch diff --git a/core/grub/build b/core/grub/build index fd152ce6..8fae9bc4 100755 --- a/core/grub/build +++ b/core/grub/build @@ -1,6 +1,8 @@ #!/bin/sh -e -(cd grub; patch -p1 < 0008-Fix-packed-not-aligned-error-on-GCC-8.patch) +(cd grub + patch -p1 < 0008-Fix-packed-not-aligned-error-on-GCC-8.patch + patch -p1 < grub-2.02-relocation_fix-1.patch) # Grub is built in a function so the script argument needs to be stored. pkg_dir=$1 diff --git a/core/grub/checksums b/core/grub/checksums index 2a76c5bd..b1c07eba 100644 --- a/core/grub/checksums +++ b/core/grub/checksums @@ -1,2 +1,3 @@ 810b3798d316394f94096ec2797909dbf23c858e48f7b3830826b8daa06b7b0f grub-2.02.tar.xz dd64709462eb8218e88c1c4298fb6c0f3c5a741438509226c641b60cbd7818bd 0008-Fix-packed-not-aligned-error-on-GCC-8.patch +55802405cfd186ce9a0f4f166c82538dbd71fb2526af2217e023789c208f26d3 grub-2.02-relocation_fix-1.patch diff --git a/core/grub/patches/grub-2.02-relocation_fix-1.patch b/core/grub/patches/grub-2.02-relocation_fix-1.patch new file mode 100644 index 00000000..daf45e47 --- /dev/null +++ b/core/grub/patches/grub-2.02-relocation_fix-1.patch @@ -0,0 +1,31 @@ +Submitted By: Xi Ruoyao +Date: 2019-01-10 +Initial Package Version: 2.02 +Upstream Status: Comitted +Origin: Upstream git repository +Description: x86_64 assembler in binutils-2.31 generates + R_X86_64_PLT32. Grub2 should treat it as + R_X86_64_PC32. + +diff -Naur grub-2.02.old/util/grub-mkimagexx.c grub-2.02.new/util/grub-mkimagexx.c +--- grub-2.02.old/util/grub-mkimagexx.c 2017-04-24 17:16:00.000000000 +0800 ++++ grub-2.02.new/util/grub-mkimagexx.c 2019-01-10 01:09:53.027377424 +0800 +@@ -832,6 +832,7 @@ + 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 -Naur grub-2.02.old/util/grub-module-verifier.c grub-2.02.new/util/grub-module-verifier.c +--- grub-2.02.old/util/grub-module-verifier.c 2017-04-24 17:16:00.000000000 +0800 ++++ grub-2.02.new/util/grub-module-verifier.c 2019-01-10 01:10:07.617378227 +0800 +@@ -19,6 +19,7 @@ + -1 + }, (int[]){ + R_X86_64_PC32, ++ R_X86_64_PLT32, + -1 + } + }, diff --git a/core/grub/sources b/core/grub/sources index 215e6f07..9aacffa0 100644 --- a/core/grub/sources +++ b/core/grub/sources @@ -1,2 +1,3 @@ ftp://ftp.gnu.org/gnu/grub/grub-2.02.tar.xz grub/ patches/0008-Fix-packed-not-aligned-error-on-GCC-8.patch grub/ +patches/grub-2.02-relocation_fix-1.patch