diff options
-rw-r--r-- | meta/recipes-bsp/grub/files/fix.build.with.squashfs.patch | 24 | ||||
-rw-r--r-- | meta/recipes-bsp/grub/grub2.inc | 1 |
2 files changed, 25 insertions, 0 deletions
diff --git a/meta/recipes-bsp/grub/files/fix.build.with.squashfs.patch b/meta/recipes-bsp/grub/files/fix.build.with.squashfs.patch new file mode 100644 index 0000000000..2c2d2ea0b1 --- /dev/null +++ b/meta/recipes-bsp/grub/files/fix.build.with.squashfs.patch | |||
@@ -0,0 +1,24 @@ | |||
1 | When squashfs support is enabled, the build fails with: | ||
2 | |||
3 | ../grub-2.02/grub-core/fs/squash4.c: In function 'direct_read': | ||
4 | ../grub-2.02/grub-core/fs/squash4.c:868:10: error: 'err' may be used uninitialized in this function [-Werror=maybe-uninitialized] | ||
5 | if (err) | ||
6 | ^ | ||
7 | cc1: all warnings being treated as errors | ||
8 | Makefile:7272: recipe for target 'grub-core/fs/libgrubmods_a-squash4.o' failed | ||
9 | |||
10 | Upstream-Status: Pending (should be fixed in gnulib which is then rarely updated in grub) | ||
11 | |||
12 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
13 | |||
14 | --- grub-2.02/grub-core/fs/squash4.c 2019-03-10 20:00:14.070468728 +0000 | ||
15 | +++ grub-2.02.fixed/grub-core/fs/squash4.c 2019-03-10 19:58:31.382477818 +0000 | ||
16 | @@ -746,7 +746,7 @@ | ||
17 | struct grub_squash_cache_inode *ino, | ||
18 | grub_off_t off, char *buf, grub_size_t len) | ||
19 | { | ||
20 | - grub_err_t err; | ||
21 | + grub_err_t err = 0; | ||
22 | grub_off_t cumulated_uncompressed_size = 0; | ||
23 | grub_uint64_t a = 0; | ||
24 | grub_size_t i; | ||
diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc index 3f3165c264..c6994723f9 100644 --- a/meta/recipes-bsp/grub/grub2.inc +++ b/meta/recipes-bsp/grub/grub2.inc | |||
@@ -22,6 +22,7 @@ SRC_URI = "https://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \ | |||
22 | file://0001-x86-64-Treat-R_X86_64_PLT32-as-R_X86_64_PC32.patch \ | 22 | file://0001-x86-64-Treat-R_X86_64_PLT32-as-R_X86_64_PC32.patch \ |
23 | file://0001-grub-setup-Debug-message-cleanup.patch \ | 23 | file://0001-grub-setup-Debug-message-cleanup.patch \ |
24 | file://disable-address-of-packed-member.patch \ | 24 | file://disable-address-of-packed-member.patch \ |
25 | file://fix.build.with.squashfs.patch \ | ||
25 | " | 26 | " |
26 | SRC_URI[md5sum] = "1116d1f60c840e6dbd67abbc99acb45d" | 27 | SRC_URI[md5sum] = "1116d1f60c840e6dbd67abbc99acb45d" |
27 | SRC_URI[sha256sum] = "660ee136fbcee08858516ed4de2ad87068bfe1b6b8b37896ce3529ff054a726d" | 28 | SRC_URI[sha256sum] = "660ee136fbcee08858516ed4de2ad87068bfe1b6b8b37896ce3529ff054a726d" |