diff --git a/meson.build b/meson.build index cc312b2de46..81db2d27ab7 100644 --- a/meson.build +++ b/meson.build @@ -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 = '' diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build index 2a37b0a9ac6..574feedb98d 100644 --- a/src/boot/efi/meson.build +++ b/src/boot/efi/meson.build @@ -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