Files
u-boot/lib/efi/Makefile
Caleb Connolly e0a8bf6f45 efi: stub: support running U-Boot as an EFI payload on ARM64
Implement support for launching U-Boot via an EFI stub app on ARM64.

This is more or less a straight port of the x86 implementation, but due
to the highly x86/qemu specific nature of that implementation I decided
to just split it out to its own file.

Unlike the x86 implementation, there is no debug UART here since ARM
platforms don't have a standard UART interface. However it is usually
possible to port over the debug uart implementation for you platform for
bringup purposes.

Currently this implementation doesn't provide a DTB to U-Boot and
expects U-Boot to use a built-in one, however this ought to be a fairly
trivial addition in the future.

The other significant difference to the x86 version is that rather than
copying U-Boot to CONFIG_TEXT_OFFSET, we require that U-Boot is built
position independent and copy it to EFI allocated memory.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2025-02-03 04:43:48 -07:00

28 lines
749 B
Makefile

# SPDX-License-Identifier: GPL-2.0+
#
# (C) Copyright 2015 Google, Inc
obj-$(CONFIG_EFI_APP) += efi_app.o efi.o efi_app_init.o efi_vars.o efi_dtb.o
obj-$(CONFIG_EFI_STUB) += efi_info.o
ifeq ($(CONFIG_ARM64),y)
efi_stub.o := efi_stub_arm64.o
else
efi_stub.o := efi_stub_x86.o
ifeq ($(CONFIG_EFI_STUB_64BIT),y) # && !CONFIG_ARM64
CFLAGS_REMOVE_$(efi_stub.o) := -march=i386 -m32
CFLAGS_$(efi_stub.o) := -m64
CFLAGS_REMOVE_efi.o := -march=i386 -m32
CFLAGS_efi.o := -fpic -m64
endif
endif
CFLAGS_REMOVE_$(efi_stub.o) += -mregparm=3
CFLAGS_$(efi_stub.o) += -fpic -fshort-wchar
CFLAGS_REMOVE_efi.o += -mregparm=3
CFLAGS_efi.o += -fpic -fshort-wchar
$(info removing flags $(CFLAGS_REMOVE_$(efi_stub.o)))
extra-$(CONFIG_EFI_STUB) += $(efi_stub.o) efi.o