summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp/grub/files
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2021-03-28 19:22:09 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-03-31 00:06:23 +0100
commiteba2ca9aef130535fede2a6dfcaea16fcb860f50 (patch)
tree3136f56ba225705bc0349893a2e6a1119afabaf5 /meta/recipes-bsp/grub/files
parent9eddd432da17a3160faa185b65dac61c91daa506 (diff)
downloadpoky-eba2ca9aef130535fede2a6dfcaea16fcb860f50.tar.gz
grub2: Enable on riscv32
Update the patch as submitted upstream to grub2 (From OE-Core rev: a1ce702bb5317712083ae32332051c36923c4a50) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-bsp/grub/files')
-rw-r--r--meta/recipes-bsp/grub/files/0001-RISC-V-Restore-the-typcast-to-long.patch22
1 files changed, 16 insertions, 6 deletions
diff --git a/meta/recipes-bsp/grub/files/0001-RISC-V-Restore-the-typcast-to-long.patch b/meta/recipes-bsp/grub/files/0001-RISC-V-Restore-the-typcast-to-long.patch
index f0ffb3d954..2f15a91f68 100644
--- a/meta/recipes-bsp/grub/files/0001-RISC-V-Restore-the-typcast-to-long.patch
+++ b/meta/recipes-bsp/grub/files/0001-RISC-V-Restore-the-typcast-to-long.patch
@@ -1,18 +1,28 @@
1From bf248231cb4f9f966f0d57821dd0491af54d4a0b Mon Sep 17 00:00:00 2001 1From e4c41db74b8972285cbdfe614c95c1ffd97d70e1 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 26 Mar 2021 11:59:43 -0700 3Date: Fri, 26 Mar 2021 11:59:43 -0700
4Subject: [PATCH] RISC-V: Restore the typcast to long 4Subject: [PATCH] RISC-V: Restore the typcast to 64bit type
5 5
6this makes the type promotions clear and explicit 6this makes the type promotions clear and explicit
7It was already typecasted to long but was accidentally dropped in [1]
8which stated to cause failures on riscv32 as reported in [2]
7 9
8Upstream-Status: Pending 10[1] https://git.savannah.gnu.org/cgit/grub.git/commit/?id=2bf40e9e5be9808b17852e688eead87acff14420
11[2] https://savannah.gnu.org/bugs/index.php?60283
12
13Upstream-Status: Submitted
9Signed-off-by: Khem Raj <raj.khem@gmail.com> 14Signed-off-by: Khem Raj <raj.khem@gmail.com>
15Cc: Andreas Schwab <schwab@suse.de>
16Cc: Daniel Kiper <daniel.kiper@oracle.com>
17Cc: Chester Lin <clin@suse.com>
18Cc: Nikita Ermakov <arei@altlinux.org>
19Cc: Alistair Francis <alistair.francis@wdc.com>
10--- 20---
11 util/grub-mkimagexx.c | 2 +- 21 util/grub-mkimagexx.c | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-) 22 1 file changed, 1 insertion(+), 1 deletion(-)
13 23
14diff --git a/util/grub-mkimagexx.c b/util/grub-mkimagexx.c 24diff --git a/util/grub-mkimagexx.c b/util/grub-mkimagexx.c
15index 00f49cc..ab5523d 100644 25index 00f49ccaa..ac677d03d 100644
16--- a/util/grub-mkimagexx.c 26--- a/util/grub-mkimagexx.c
17+++ b/util/grub-mkimagexx.c 27+++ b/util/grub-mkimagexx.c
18@@ -1242,7 +1242,7 @@ SUFFIX (relocate_addrs) (Elf_Ehdr *e, struct section_metadata *smd, 28@@ -1242,7 +1242,7 @@ SUFFIX (relocate_addrs) (Elf_Ehdr *e, struct section_metadata *smd,
@@ -20,10 +30,10 @@ index 00f49cc..ab5523d 100644
20 30
21 sym_addr += addend; 31 sym_addr += addend;
22- off = sym_addr - target_section_addr - offset - image_target->vaddr_offset; 32- off = sym_addr - target_section_addr - offset - image_target->vaddr_offset;
23+ off = (long)sym_addr - target_section_addr - offset - image_target->vaddr_offset; 33+ off = (grub_int64_t)sym_addr - target_section_addr - offset - image_target->vaddr_offset;
24 34
25 switch (ELF_R_TYPE (info)) 35 switch (ELF_R_TYPE (info))
26 { 36 {
27-- 37--
282.31.0 382.31.1
29 39