This patch adds RISC-V to the COMPATIBLE_HOST. Since GRUB 2.04,
the source code supports the RISC-V, thanks to Alexander Graf.

Adding the GRUBPLATFORM for RISC-V prevents autoconf problems.
Also, the patch appends the __anonymous method with RISC-V architecture.

Signed-off-by: Norbert Kaminski <[email protected]>
---
 meta/recipes-bsp/grub/grub-efi_2.04.bb | 4 ++++
 meta/recipes-bsp/grub/grub2.inc        | 4 +++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-bsp/grub/grub-efi_2.04.bb 
b/meta/recipes-bsp/grub/grub-efi_2.04.bb
index 30d95f95e0..f80afd95cb 100644
--- a/meta/recipes-bsp/grub/grub-efi_2.04.bb
+++ b/meta/recipes-bsp/grub/grub-efi_2.04.bb
@@ -26,6 +26,10 @@ python __anonymous () {
         grubtarget = 'arm64'
     elif re.match('arm', target):
         grubtarget = 'arm'
+    elif re.match('riscv64', target):
+        grubtarget = 'riscv64'
+    elif re.match('riscv32', target):
+        grubtarget = 'riscv32'
     else:
         raise bb.parse.SkipRecipe("grub-efi is incompatible with target %s" % 
target)
     grubimage = prefix + d.getVar("EFI_BOOT_IMAGE")
diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc
index ff17dbe8b7..d020103605 100644
--- a/meta/recipes-bsp/grub/grub2.inc
+++ b/meta/recipes-bsp/grub/grub2.inc
@@ -33,7 +33,7 @@ SRC_URI[sha256sum] = 
"f10c85ae3e204dbaec39ae22fa3c5e99f0665417e91c2cb49b7e503165
 
 DEPENDS = "flex-native bison-native gettext-native"
 
-COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*)-(linux.*|freebsd.*)'
+COMPATIBLE_HOST = 
'(x86_64.*|i.86.*|arm.*|aarch64.*|riscv.*)-(linux.*|freebsd.*)'
 COMPATIBLE_HOST_armv7a = 'null'
 COMPATIBLE_HOST_armv7ve = 'null'
 
@@ -42,6 +42,8 @@ COMPATIBLE_HOST_armv7ve = 'null'
 
 GRUBPLATFORM_arm = "efi"
 GRUBPLATFORM_aarch64 = "efi"
+GRUBPLATFORM_riscv32 = "efi"
+GRUBPLATFORM_riscv64 = "efi"
 GRUBPLATFORM ??= "pc"
 
 inherit autotools gettext texinfo pkgconfig
-- 
2.25.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#144989): 
https://lists.openembedded.org/g/openembedded-core/message/144989
Mute This Topic: https://lists.openembedded.org/mt/78504567/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to