summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp
diff options
context:
space:
mode:
authorShan Hai <shan.hai@windriver.com>2015-04-29 16:53:09 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-04-30 23:04:14 +0100
commitaa389373d8b36bbb8baa82e7c1fce060ac3f00fb (patch)
tree672184acbfd2cf8bde0d3b1cb7f6e37eb2515ed3 /meta/recipes-bsp
parent7fc174f180cb08a4147118a89b68a593637a0c7a (diff)
downloadpoky-aa389373d8b36bbb8baa82e7c1fce060ac3f00fb.tar.gz
grub2: fix initrd size restriction bug
The current grub2 fails on loading large initrd file (> 500M) since the initrd size is added to the addr_min and causes the failure. Fix it by picking a patch from grub2 upstream. (From OE-Core rev: 156d8fecf31a7a9dc257e55e25645c561d5ba0b8) Signed-off-by: Shan Hai <shan.hai@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-bsp')
-rw-r--r--meta/recipes-bsp/grub/files/grub2-fix-initrd-size-bug.patch48
-rw-r--r--meta/recipes-bsp/grub/grub2.inc1
2 files changed, 49 insertions, 0 deletions
diff --git a/meta/recipes-bsp/grub/files/grub2-fix-initrd-size-bug.patch b/meta/recipes-bsp/grub/files/grub2-fix-initrd-size-bug.patch
new file mode 100644
index 0000000000..d114f4847b
--- /dev/null
+++ b/meta/recipes-bsp/grub/files/grub2-fix-initrd-size-bug.patch
@@ -0,0 +1,48 @@
1From 8fbb150a56966edde4dc07b8d01be5eb149b65ab Mon Sep 17 00:00:00 2001
2From: Colin Watson <cjwatson@ubuntu.com>
3Date: Sun, 20 Jan 2013 23:03:35 +0000
4Subject: [PATCH 1/1] * grub-core/loader/i386/linux.c (grub_cmd_initrd): Don't
5 add the initrd size to addr_min, since the initrd will be allocated after
6 this address.
7
8commit 6a0debbd9167e8f79cdef5497a73d23e580c0cd4 upstream
9
10Upstream-Status: Backport
11
12Signed-off-by: Shan Hai <shan.hai@windriver.com>
13---
14 ChangeLog | 6 ++++++
15 grub-core/loader/i386/linux.c | 3 +--
16 2 files changed, 7 insertions(+), 2 deletions(-)
17
18diff --git a/ChangeLog b/ChangeLog
19index c2f42d5..40cb508 100644
20--- a/ChangeLog
21+++ b/ChangeLog
22@@ -1,3 +1,9 @@
23+2013-01-20 Colin Watson <cjwatson@ubuntu.com>
24+
25+ * grub-core/loader/i386/linux.c (grub_cmd_initrd): Don't add the
26+ initrd size to addr_min, since the initrd will be allocated after
27+ this address.
28+
29 2012-07-02 Vladimir Serbinenko <phcoder@gmail.com>
30
31 * grub-core/net/tftp.c (ack): Fix endianness problem.
32diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c
33index 62087cf..e2425c8 100644
34--- a/grub-core/loader/i386/linux.c
35+++ b/grub-core/loader/i386/linux.c
36@@ -1098,8 +1098,7 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
37 worse than that of Linux 2.3.xx, so avoid the last 64kb. */
38 addr_max -= 0x10000;
39
40- addr_min = (grub_addr_t) prot_mode_target + prot_init_space
41- + page_align (size);
42+ addr_min = (grub_addr_t) prot_mode_target + prot_init_space;
43
44 /* Put the initrd as high as possible, 4KiB aligned. */
45 addr = (addr_max - size) & ~0xFFF;
46--
471.8.5.2.233.g932f7e4
48
diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc
index add45864d1..312771b47f 100644
--- a/meta/recipes-bsp/grub/grub2.inc
+++ b/meta/recipes-bsp/grub/grub2.inc
@@ -26,6 +26,7 @@ SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
26 file://grub-efi-fix-with-glibc-2.20.patch \ 26 file://grub-efi-fix-with-glibc-2.20.patch \
27 file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ 27 file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
28 file://0001-parse_dhcp_vendor-Add-missing-const-qualifiers.patch \ 28 file://0001-parse_dhcp_vendor-Add-missing-const-qualifiers.patch \
29 file://grub2-fix-initrd-size-bug.patch \
29 " 30 "
30 31
31DEPENDS = "flex-native bison-native xz" 32DEPENDS = "flex-native bison-native xz"