boot/efi: compile on riscv64

This makes systemd-boot compile against the latest gnu-efi which
just added support for riscv64.
This commit is contained in:
Emil Renner Berthing 2021-04-22 09:33:51 +02:00 committed by Lennart Poettering
parent c1737506f3
commit a00ff2e1b5
2 changed files with 6 additions and 3 deletions

View File

@ -1585,6 +1585,9 @@ if get_option('efi')
elif efi_arch == 'aarch64'
EFI_MACHINE_TYPE_NAME = 'aa64'
gnu_efi_arch = 'aarch64'
elif efi_arch == 'riscv64'
EFI_MACHINE_TYPE_NAME = 'riscv64'
gnu_efi_arch = 'riscv64'
else
EFI_MACHINE_TYPE_NAME = ''
gnu_efi_arch = ''

View File

@ -190,9 +190,9 @@ if have_gnu_efi
'-znocombreloc',
'-L', efi_libdir,
efi_crt0]
if efi_arch == 'aarch64' or efi_arch == 'arm'
# Aarch64 and ARM32 don't have an EFI capable objcopy. Use 'binary'
# instead, and add required symbols manually.
if efi_arch == 'aarch64' or efi_arch == 'arm' or efi_arch == 'riscv64'
# Aarch64, ARM32 and 64bit RISC-V don't have an EFI capable objcopy.
# Use 'binary' instead, and add required symbols manually.
efi_ldflags += ['--defsym=EFI_SUBSYSTEM=0xa']
efi_format = ['-O', 'binary']
else