Add RISC-V (riscv64) support to grub.macros

Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
This commit is contained in:
David Abdurachmanov 2019-08-23 13:38:09 -07:00 committed by Javier Martinez Canillas
parent 89bc295877
commit b888fb3a32
No known key found for this signature in database
GPG key ID: C751E590D63F3D69

View file

@ -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} \