[systemd-devel] [gummiboot][PATCH 5/5] Makefile.am: Add support for AARCH64

David Herrmann dh.herrmann at gmail.com
Sat Apr 11 03:09:28 PDT 2015


Hi

On Sat, Apr 11, 2015 at 10:23 AM, Koen Kooi <koen.kooi at linaro.org> wrote:
> Aarch64 and ARM32 lack an EFI capable objcopy, so use the ldflags + -O
> binary trick gnu-efi and the Red Hat shimloader are using.
>
> Signed-off-by: Koen Kooi <koen.kooi at linaro.org>
> ---
>  Makefile.am | 15 +++++++++++++--
>  1 file changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/Makefile.am b/Makefile.am
> index 2cca313..eba5ec4 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -121,6 +121,17 @@ efi_ldflags = \
>         -L $(EFI_LIB_DIR) \
>         $(EFI_LDS_DIR)/crt0-efi-$(ARCH).o
>
> +# Aarch64 and ARM32 don't have an EFI capable objcopy
> +if ARCH_AARCH64
> +efi_ldflags += \
> +       --defsym=EFI_SUBSYSTEM=0xa
> +
> +FORMAT = -O binary
> +else
> +FORMAT = --target=efi-app-$(ARCH)

Trailing whitespace, dropped.
Also, this is "EFI_ARCH" now, fixed.

> +endif
> +
> +

Double newline, dropped.

>  # ------------------------------------------------------------------------------
>  gummiboot_headers = \
>         src/efi/util.h \
> @@ -156,7 +167,7 @@ $(gummiboot_solib): $(gummiboot_objects)
>  $(gummiboot): $(gummiboot_solib)
>         $(AM_V_GEN) objcopy -j .text -j .sdata -j .data -j .dynamic \
>           -j .dynsym -j .rel -j .rela -j .reloc \
> -         --target=efi-app-$(ARCH) $< $@
> +         $(FORMAT) $< $@
>
>  # ------------------------------------------------------------------------------
>  stub_headers = \
> @@ -191,7 +202,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-$(ARCH) $< $@
> +         $(FORMAT) $< $@

Both merged with the previous line, as they're pretty short now.

Applied, thanks!
David

>
>  # ------------------------------------------------------------------------------
>  CLEANFILES += test-disk.img
> --
> 2.0.1
>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel


More information about the systemd-devel mailing list