Build EDK2 development environment
2026年2月7日小于 1 分钟
Build EDK2 development environment
Clone edk2 repository:
git clone https://github.com/tianocore/edk2.gitAfter clone completed successfully, we need to build BaseTools. Before building, we must to update submodules. In edk2 directory,
git submodule update --initthen build BaseTools.
make -C BaseToolsSet environment variables for building, it will generate some configuration files in Conf directory.
export EDK_TOOLS_PATH=$HOME/src/edk2/BaseTools
source edksetup.sh BaseToolsModify Conf/target.txt, according to the following example:
ACTIVE_PLATFORM = MdeModulePkg/MdeModulePkg.dsc
# Also you can use RELEASE
TARGET = DEBUG
# For X64 Architecture.
TARGET_ARCH = X64
# GCC tool chain
TOOL_CHAIN_TAG = GCC5After all done, use build command to execute build testing, all modules in MdeModulePkg/MdeModulePkg.dsc will be built.
build