summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2014-08-12 10:54:05 -0400
committerPeter Jones <pjones@redhat.com>2014-08-12 10:54:05 -0400
commit9196c7cfbc974dcfdc4f3bde09bf56f1a92723e9 (patch)
tree450436b525eb7ef30b80abd6492ca449014dda6b /Makefile
parentf7a182154e19e99e1eb88f5fe8111a37e68cda8e (diff)
downloadefi-boot-shim-9196c7cfbc974dcfdc4f3bde09bf56f1a92723e9.tar.gz
efi-boot-shim-9196c7cfbc974dcfdc4f3bde09bf56f1a92723e9.zip
Add support for 64-bit ARM (AArch64)
This adds support for building the shim for a 64-bit ARM UEFI environment. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 10 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index f65bb3b8..3529b454 100644
--- a/Makefile
+++ b/Makefile
@@ -37,6 +37,10 @@ ifeq ($(ARCH),ia32)
CFLAGS += -mno-mmx -mno-sse -mno-red-zone -nostdinc -maccumulate-outgoing-args -m32
endif
+ifeq ($(ARCH),aarch64)
+ CFLAGS += -ffreestanding -I$(shell $(CC) -print-file-name=include)
+endif
+
ifneq ($(origin VENDOR_CERT_FILE), undefined)
CFLAGS += -DVENDOR_CERT_FILE=\"$(VENDOR_CERT_FILE)\"
endif
@@ -108,6 +112,12 @@ Cryptlib/OpenSSL/libopenssl.a:
lib/lib.a:
$(MAKE) -C lib
+ifeq ($(ARCH),aarch64)
+FORMAT := -O binary
+SUBSYSTEM := 0xa
+LDFLAGS += --defsym=EFI_SUBSYSTEM=$(SUBSYSTEM)
+endif
+
FORMAT ?= --target efi-app-$(ARCH)
%.efi: %.so