diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2019-11-07 10:05:17 +0300 |
---|---|---|
committer | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2019-11-13 01:13:54 +0300 |
commit | 3b4847cbee7cf5c2a6ea19c25003876d0cba4ced (patch) | |
tree | 9a3ce2aad6d03b5bb61018611e9d8314f70f036f /Makefile | |
parent | 7264e21fdead677687934eecda6ac98f37851acf (diff) | |
download | u-boot-3b4847cbee7cf5c2a6ea19c25003876d0cba4ced.tar.xz |
efi_loader: support building UEFI binaries on sandbox
On the sandbox the UEFI binaries must match the host architectures.
Adjust the Makefiles. Provide the PE/COFF header and relocation files.
Allow building helloworld.efi on the sandbox.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -17,6 +17,25 @@ NAME = # o Look for make include files relative to root of kernel src MAKEFLAGS += -rR --include-dir=$(CURDIR) +# Determine host architecture +include include/host_arch.h +MK_ARCH="${shell uname -m}" +unexport HOST_ARCH +ifeq ("x86_64", $(MK_ARCH)) + export HOST_ARCH=$(HOST_ARCH_X86_64) +else ifneq (,$(findstring $(MK_ARCH), "i386" "i486" "i586" "i686")) + export HOST_ARCH=$(HOST_ARCH_X86) +else ifneq (,$(findstring $(MK_ARCH), "aarch64" "armv8l")) + export HOST_ARCH=$(HOST_ARCH_AARCH64) +else ifeq ("armv7l", $(MK_ARCH)) + export HOST_ARCH=$(HOST_ARCH_ARM) +else ifeq ("riscv32", $(MK_ARCH)) + export HOST_ARCH=$(HOST_ARCH_RISCV32) +else ifeq ("riscv64", $(MK_ARCH)) + export HOST_ARCH=$(HOST_ARCH_RISCV64) +endif +undefine MK_ARCH + # Avoid funny character set dependencies unexport LC_ALL LC_COLLATE=C |