diff options
| -rw-r--r-- | meta/recipes-bsp/grub/files/grub2-fix-initrd-size-bug.patch | 48 | ||||
| -rw-r--r-- | meta/recipes-bsp/grub/grub2.inc | 1 |
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 @@ | |||
| 1 | From 8fbb150a56966edde4dc07b8d01be5eb149b65ab Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Colin Watson <cjwatson@ubuntu.com> | ||
| 3 | Date: Sun, 20 Jan 2013 23:03:35 +0000 | ||
| 4 | Subject: [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 | |||
| 8 | commit 6a0debbd9167e8f79cdef5497a73d23e580c0cd4 upstream | ||
| 9 | |||
| 10 | Upstream-Status: Backport | ||
| 11 | |||
| 12 | Signed-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 | |||
| 18 | diff --git a/ChangeLog b/ChangeLog | ||
| 19 | index 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. | ||
| 32 | diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c | ||
| 33 | index 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 | -- | ||
| 47 | 1.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 | ||
| 31 | DEPENDS = "flex-native bison-native xz" | 32 | DEPENDS = "flex-native bison-native xz" |
