diff options
author | Khem Raj <raj.khem@gmail.com> | 2021-03-28 19:22:09 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-03-31 00:06:23 +0100 |
commit | eba2ca9aef130535fede2a6dfcaea16fcb860f50 (patch) | |
tree | 3136f56ba225705bc0349893a2e6a1119afabaf5 /meta/recipes-bsp/grub | |
parent | 9eddd432da17a3160faa185b65dac61c91daa506 (diff) | |
download | poky-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')
-rw-r--r-- | meta/recipes-bsp/grub/files/0001-RISC-V-Restore-the-typcast-to-long.patch | 22 | ||||
-rw-r--r-- | meta/recipes-bsp/grub/grub2.inc | 2 |
2 files changed, 17 insertions, 7 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 @@ | |||
1 | From bf248231cb4f9f966f0d57821dd0491af54d4a0b Mon Sep 17 00:00:00 2001 | 1 | From e4c41db74b8972285cbdfe614c95c1ffd97d70e1 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Fri, 26 Mar 2021 11:59:43 -0700 | 3 | Date: Fri, 26 Mar 2021 11:59:43 -0700 |
4 | Subject: [PATCH] RISC-V: Restore the typcast to long | 4 | Subject: [PATCH] RISC-V: Restore the typcast to 64bit type |
5 | 5 | ||
6 | this makes the type promotions clear and explicit | 6 | this makes the type promotions clear and explicit |
7 | It was already typecasted to long but was accidentally dropped in [1] | ||
8 | which stated to cause failures on riscv32 as reported in [2] | ||
7 | 9 | ||
8 | Upstream-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 | |||
13 | Upstream-Status: Submitted | ||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
15 | Cc: Andreas Schwab <schwab@suse.de> | ||
16 | Cc: Daniel Kiper <daniel.kiper@oracle.com> | ||
17 | Cc: Chester Lin <clin@suse.com> | ||
18 | Cc: Nikita Ermakov <arei@altlinux.org> | ||
19 | Cc: 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 | ||
14 | diff --git a/util/grub-mkimagexx.c b/util/grub-mkimagexx.c | 24 | diff --git a/util/grub-mkimagexx.c b/util/grub-mkimagexx.c |
15 | index 00f49cc..ab5523d 100644 | 25 | index 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 | -- |
28 | 2.31.0 | 38 | 2.31.1 |
29 | 39 | ||
diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc index 0e431ac008..590deb8d92 100644 --- a/meta/recipes-bsp/grub/grub2.inc +++ b/meta/recipes-bsp/grub/grub2.inc | |||
@@ -34,7 +34,7 @@ UPSTREAM_CHECK_REGEX = "grub-(?P<pver>\d+(\.\d+)+)\.tar\.(gz|xz)" | |||
34 | 34 | ||
35 | DEPENDS = "flex-native bison-native gettext-native" | 35 | DEPENDS = "flex-native bison-native gettext-native" |
36 | 36 | ||
37 | COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|riscv64)-(linux.*|freebsd.*)' | 37 | COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|riscv.*)-(linux.*|freebsd.*)' |
38 | COMPATIBLE_HOST_armv7a = 'null' | 38 | COMPATIBLE_HOST_armv7a = 'null' |
39 | COMPATIBLE_HOST_armv7ve = 'null' | 39 | COMPATIBLE_HOST_armv7ve = 'null' |
40 | 40 | ||