summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp/grub
diff options
context:
space:
mode:
authorNorbert Kaminski <norbert.kaminski@3mdeb.com>2020-11-25 18:22:49 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-11-29 20:24:32 +0000
commitce1ba908da06fe492d6d1a074c6f529c9eba745a (patch)
tree7fbf3d5c13918b9630f0bac46966e628bd90eb47 /meta/recipes-bsp/grub
parent355ca8732cce63ea2ecb6506212b0615a9acf45b (diff)
downloadpoky-ce1ba908da06fe492d6d1a074c6f529c9eba745a.tar.gz
grub: Add support for RISC-V
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. (From OE-Core rev: 42ea75d441ae38cdffed3b1cd671af886c19fbb6) Signed-off-by: Norbert Kaminski <norbert.kaminski@3mdeb.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-bsp/grub')
-rw-r--r--meta/recipes-bsp/grub/grub-efi_2.04.bb4
-rw-r--r--meta/recipes-bsp/grub/grub2.inc4
2 files changed, 7 insertions, 1 deletions
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 () {
26 grubtarget = 'arm64' 26 grubtarget = 'arm64'
27 elif re.match('arm', target): 27 elif re.match('arm', target):
28 grubtarget = 'arm' 28 grubtarget = 'arm'
29 elif re.match('riscv64', target):
30 grubtarget = 'riscv64'
31 elif re.match('riscv32', target):
32 grubtarget = 'riscv32'
29 else: 33 else:
30 raise bb.parse.SkipRecipe("grub-efi is incompatible with target %s" % target) 34 raise bb.parse.SkipRecipe("grub-efi is incompatible with target %s" % target)
31 grubimage = prefix + d.getVar("EFI_BOOT_IMAGE") 35 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
33 33
34DEPENDS = "flex-native bison-native gettext-native" 34DEPENDS = "flex-native bison-native gettext-native"
35 35
36COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*)-(linux.*|freebsd.*)' 36COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|riscv.*)-(linux.*|freebsd.*)'
37COMPATIBLE_HOST_armv7a = 'null' 37COMPATIBLE_HOST_armv7a = 'null'
38COMPATIBLE_HOST_armv7ve = 'null' 38COMPATIBLE_HOST_armv7ve = 'null'
39 39
@@ -42,6 +42,8 @@ COMPATIBLE_HOST_armv7ve = 'null'
42 42
43GRUBPLATFORM_arm = "efi" 43GRUBPLATFORM_arm = "efi"
44GRUBPLATFORM_aarch64 = "efi" 44GRUBPLATFORM_aarch64 = "efi"
45GRUBPLATFORM_riscv32 = "efi"
46GRUBPLATFORM_riscv64 = "efi"
45GRUBPLATFORM ??= "pc" 47GRUBPLATFORM ??= "pc"
46 48
47inherit autotools gettext texinfo pkgconfig 49inherit autotools gettext texinfo pkgconfig