From b888fb3a328c665133f293240e26718973998f1c Mon Sep 17 00:00:00 2001 From: David Abdurachmanov Date: Fri, 23 Aug 2019 13:38:09 -0700 Subject: [PATCH] Add RISC-V (riscv64) support to grub.macros Signed-off-by: David Abdurachmanov --- grub.macros | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/grub.macros b/grub.macros index 9ac42a2..bb560e5 100644 --- a/grub.macros +++ b/grub.macros @@ -94,7 +94,7 @@ %endif -%global efi_only aarch64 %{arm} +%global efi_only aarch64 %{arm} riscv64 %global efi_arch x86_64 ia64 %{efi_only} %ifarch %{efi_arch} %global with_efi_arch 1 @@ -112,13 +112,13 @@ %{?with_efi_only:%global without_efi_only 1} ### fixme -%ifarch aarch64 %{arm} +%ifarch aarch64 %{arm} riscv64 %global efi_modules " " %else %global efi_modules " backtrace chain usb usbserial_common usbserial_pl2303 usbserial_ftdi usbserial_usbdebug " %endif -%ifarch aarch64 %{arm} +%ifarch aarch64 %{arm} riscv64 %global legacy_provides -l %endif @@ -165,6 +165,14 @@ %global package_arch efi-aa64 %endif +%ifarch riscv64 +%global emuarch riscv64 +%global efiarch riscv64 +%global target_cpu_name riscv64 +%global grub_target_name riscv64-efi +%global package_arch efi-riscv64 +%endif + %ifarch %{arm} %global efiarch arm %global target_cpu_name arm @@ -362,7 +370,7 @@ for x in grub-mkimage ; do \\\ done \ %{nil} -%ifarch x86_64 aarch64 %{arm} +%ifarch x86_64 aarch64 %{arm} riscv64 %define mkimage() \ %{4}./grub-mkimage -O %{1} -o %{2}.orig \\\ -p /EFI/%{efi_vendor} -d grub-core ${GRUB_MODULES} \