summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-02-03 16:40:02 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-02-03 21:45:49 +0000
commit39c454a1df4c66b0dc5f724db259f21f9b338ddd (patch)
tree4c2475a18bb3033b48d05fdcbf3135bd7efb0ab5 /meta
parent5d248cfc91e9a09947f21c2eb7f87cb9bf2760b3 (diff)
downloadpoky-39c454a1df4c66b0dc5f724db259f21f9b338ddd.tar.gz
grub: Backport fix to work with new binutils
New versions of binutils caused object files to be 128MB in size, backporting this fix reduced them back to a sensible size, e.g. 1024 bytes. This avoids initramfix size issues! (From OE-Core rev: b72b9e81268719436e4bad5062cb0e1781da0395) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-bsp/grub/files/6643507ce30f775008e093580f0c9499dfb2c485.patch47
-rw-r--r--meta/recipes-bsp/grub/grub2.inc1
2 files changed, 48 insertions, 0 deletions
diff --git a/meta/recipes-bsp/grub/files/6643507ce30f775008e093580f0c9499dfb2c485.patch b/meta/recipes-bsp/grub/files/6643507ce30f775008e093580f0c9499dfb2c485.patch
new file mode 100644
index 0000000000..8aa2091444
--- /dev/null
+++ b/meta/recipes-bsp/grub/files/6643507ce30f775008e093580f0c9499dfb2c485.patch
@@ -0,0 +1,47 @@
1From 6643507ce30f775008e093580f0c9499dfb2c485 Mon Sep 17 00:00:00 2001
2From: Simon Hardy <simon.hardy@itdev.co.uk>
3Date: Tue, 24 Mar 2020 13:29:12 +0000
4Subject: build: Fix GRUB i386-pc build with Ubuntu gcc
5
6With recent versions of gcc on Ubuntu a very large lzma_decompress.img file is
7output. (e.g. 134479600 bytes instead of 2864.) This causes grub-mkimage to
8fail with: "error: Decompressor is too big."
9
10This seems to be caused by a section .note.gnu.property that is placed at an
11offset such that objcopy needs to pad the img file with zeros.
12
13This issue is present on:
14Ubuntu 19.10 with gcc (Ubuntu 8.3.0-26ubuntu1~19.10) 8.3.0
15Ubuntu 19.10 with gcc (Ubuntu 9.2.1-9ubuntu2) 9.2.1 20191008
16
17This issue is not present on:
18Ubuntu 19.10 with gcc (Ubuntu 7.5.0-3ubuntu1~19.10) 7.5.0
19RHEL 8.0 with gcc 8.3.1 20190507 (Red Hat 8.3.1-4)
20
21The issue can be fixed by removing the section using objcopy as shown in
22this patch.
23
24Signed-off-by: Simon Hardy <simon.hardy@itdev.co.uk>
25Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
26---
27 gentpl.py | 2 +-
28 1 file changed, 1 insertion(+), 1 deletion(-)
29
30Upstream-Status: Backport
31
32diff --git a/gentpl.py b/gentpl.py
33index 387588c05..c86550d4f 100644
34--- a/gentpl.py
35+++ b/gentpl.py
36@@ -766,7 +766,7 @@ def image(defn, platform):
37 if test x$(TARGET_APPLE_LINKER) = x1; then \
38 $(MACHO2IMG) $< $@; \
39 else \
40- $(TARGET_OBJCOPY) $(""" + cname(defn) + """_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; \
41+ $(TARGET_OBJCOPY) $(""" + cname(defn) + """_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; \
42 fi
43 """)
44
45--
46cgit v1.2.1
47
diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc
index 49c869b5dc..f870d41f6a 100644
--- a/meta/recipes-bsp/grub/grub2.inc
+++ b/meta/recipes-bsp/grub/grub2.inc
@@ -27,6 +27,7 @@ SRC_URI = "${GNU_MIRROR}/grub/grub-${PV}.tar.gz \
27 file://script-Remove-unused-fields-from-grub_script_functio.patch \ 27 file://script-Remove-unused-fields-from-grub_script_functio.patch \
28 file://CVE-2020-15706-script-Avoid-a-use-after-free-when-redefining-a-func.patch \ 28 file://CVE-2020-15706-script-Avoid-a-use-after-free-when-redefining-a-func.patch \
29 file://CVE-2020-15707-linux-Fix-integer-overflows-in-initrd-size-handling.patch \ 29 file://CVE-2020-15707-linux-Fix-integer-overflows-in-initrd-size-handling.patch \
30 file://6643507ce30f775008e093580f0c9499dfb2c485.patch \
30 file://determinism.patch \ 31 file://determinism.patch \
31" 32"
32SRC_URI[md5sum] = "5ce674ca6b2612d8939b9e6abed32934" 33SRC_URI[md5sum] = "5ce674ca6b2612d8939b9e6abed32934"