2 # Copyright (c) 2011-2015, ARM Limited. All rights reserved.
4 # SPDX-License-Identifier: BSD-2-Clause-Patent
8 # Define the following variable to specify an alternative toolchain to the one located in your PATH:
9 # - RVCT_TOOLS_PATH: for RVCT and RVCTLINUX toolchains
11 EDK2_TOOLCHAIN ?
= RVCTLINUX
16 $(error The Makfile macro
'EDK2_DSC' must be defined with an EDK2 DSC file.
)
18 ifeq ("$(EDK2_DSC)","ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.dsc")
20 BUILD_PATH
=$(WORKSPACE
)/Build
/ArmVExpress-FVP-AArch64
21 UEFI_BIN
=FVP_AARCH64_EFI.fd
24 ifeq ("$(OS)","Windows_NT")
25 export WORKSPACE?
=$(PWD
)
26 export EDK_TOOLS_PATH ?
= $(WORKSPACE
)\BaseTools
37 EDK2_CONF
= Conf
/BuildEnv.sh Conf
/build_rule.txt Conf
/target.txt Conf
/tools_def.txt
42 ifeq ($(BUILD_FIP
),"1")
44 $(info Define location of the FIP to automatically update the package after building UEFI.
)
49 ifeq ("$(OS)","Windows_NT")
50 build
-a
$(EDK2_ARCH
) -p
$(EDK2_DSC
) -t
$(EDK2_TOOLCHAIN
) -b
$(EDK2_BUILD
) $(EDK2_MACROS
)
52 . .
/edksetup.sh
; build
-a
$(EDK2_ARCH
) -p
$(EDK2_DSC
) -t
$(EDK2_TOOLCHAIN
) -b
$(EDK2_BUILD
) $(EDK2_MACROS
)
54 ifeq ("$(BUILD_FIP)","1")
56 $(SILENT
)which fip_create
; \
57 if
[ $$?
-ne
0 ]; then \
58 $(ECHO
) "Warning: 'fip_create' tool is not in the PATH. The UEFI binary will not be added in the Firmware Image Package (FIP)."; \
60 fip_create
--bl33
$(BUILD_PATH
)/$(EDK2_BUILD
)_
$(EDK2_TOOLCHAIN
)/FV
/$(UEFI_BIN
) --dump
$(FIP_BIN
); \
66 ifeq ("$(OS)","Windows_NT")
67 copy
$(EDK_TOOLS_PATH
)\Conf
\build_rule.template Conf
\build_rule.txt
68 copy
$(EDK_TOOLS_PATH
)\Conf\FrameworkDatabase.template Conf\FrameworkDatabase.txt
69 copy
$(EDK_TOOLS_PATH
)\Conf
\target.template Conf
\target.txt
70 copy
$(EDK_TOOLS_PATH
)\Conf
\tools_def.template Conf
\tools_def.txt
72 . .
/edksetup.sh
; $(MAKE
) -C BaseTools
76 ifeq ("$(OS)","Windows_NT")
77 build
-a
$(EDK2_ARCH
) -p
$(EDK2_DSC
) -t
$(EDK2_TOOLCHAIN
) -b
$(EDK2_BUILD
) $(EDK2_MACROS
) cleanall
79 . .
/edksetup.sh
; build
-a
$(EDK2_ARCH
) -p
$(EDK2_DSC
) -t
$(EDK2_TOOLCHAIN
) -b
$(EDK2_BUILD
) $(EDK2_MACROS
) cleanall
; \
80 rm -Rf
$(EDK2_CONF
) Conf
/.cache