Commit Graph

1 Commits

Author SHA1 Message Date
Andrea Bolognani
bdd2637ad2 Add basic support for RISC-V 64-bit EFI objects
Using current binutils, attempting to build shim eventually
results in the following failure:

  objcopy -D -j .text -j .sdata -j .data -j .data.ident \
          -j .dynamic -j .rodata -j .rel* \
          -j .rela* -j .dyn -j .reloc -j .eh_frame \
          -j .vendor_cert -j .sbat -j .sbatlevel \
          --target efi-app-riscv64 shimriscv64.so shimriscv64.efi
  objcopy: shimriscv64.so: invalid bfd target
  make: *** [Makefile:269: shimriscv64.efi] Error 1

Address the problem by backporting two upstream commits:

  1b183017aa2f (Add basic support for RISC-V 64-bit EFI objects)
  c53b543736cd (Handle "efi-app-riscv64" and similar targets in objcopy.)

With these changes, shim can be successfully built on riscv64.

Resolves: RHEL-88815

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2025-04-29 10:05:15 +02:00