mirror of
https://github.com/systemd/systemd.git
synced 2025-01-10 05:18:17 +03:00
build: add support for AARCH64 EFI
Aarch64 and ARM32 lack an EFI capable objcopy, so use the ldflags + -O binary trick gnu-efi and the Red Hat shimloader are using. (David: rebase to systemd-git and added EFI_ prefixes)
This commit is contained in:
parent
0d8d368907
commit
684edf2e19
15
Makefile.am
15
Makefile.am
@ -2591,6 +2591,15 @@ efi_ldflags = \
|
||||
-L $(EFI_LIB_DIR) \
|
||||
$(EFI_LDS_DIR)/crt0-efi-$(EFI_ARCH).o
|
||||
|
||||
# Aarch64 and ARM32 don't have an EFI capable objcopy. Use 'binary' instead,
|
||||
# and add required symbols manually.
|
||||
if ARCH_AARCH64
|
||||
efi_ldflags += --defsym=EFI_SUBSYSTEM=0xa
|
||||
EFI_FORMAT = -O binary
|
||||
else
|
||||
EFI_FORMAT = --target=efi-app-$(EFI_ARCH)
|
||||
endif
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
systemd_boot_headers = \
|
||||
src/boot/efi/util.h \
|
||||
@ -2624,8 +2633,7 @@ $(systemd_boot_solib): $(systemd_boot_objects)
|
||||
|
||||
$(systemd_boot): $(systemd_boot_solib)
|
||||
$(AM_V_GEN) objcopy -j .text -j .sdata -j .data -j .dynamic \
|
||||
-j .dynsym -j .rel -j .rela -j .reloc \
|
||||
--target=efi-app-$(EFI_ARCH) $< $@
|
||||
-j .dynsym -j .rel -j .rela -j .reloc $(EFI_FORMAT) $< $@
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
stub_headers = \
|
||||
@ -2662,8 +2670,7 @@ $(stub_solib): $(stub_objects)
|
||||
|
||||
$(stub): $(stub_solib)
|
||||
$(AM_V_GEN) objcopy -j .text -j .sdata -j .data -j .dynamic \
|
||||
-j .dynsym -j .rel -j .rela -j .reloc \
|
||||
--target=efi-app-$(EFI_ARCH) $< $@
|
||||
-j .dynsym -j .rel -j .rela -j .reloc $(EFI_FORMAT) $< $@
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
CLEANFILES += test-efi-disk.img
|
||||
|
Loading…
Reference in New Issue
Block a user