Getting and Installing the Required Tools for Building EDK II

Table of Contents


The one of the following is required to be able to obtain the EDK II.






Windows SVN Command Line Tool


Mac OS/X SVN Command Line Tool


Linux SVN Command Line Tool


 Back to Top

Third Party Tools

3rdParty Tools must include: a C pre-processor, C compiler, static linker, dynamic linker, and an assembler and assembly linker. For creating ACPI tables required by platforms, an ACPI assembler is also required.

The compiler tool chains are not provided as part of EDK II. Before purchasing a compiler tool chain, make sure to review the End User License Agreement (EULA) that comes with the software to ensure that creating EFI firmware and applications (for commercial purposes) for the target architecture is permitted.

At least one of the following 3rd party compiler tool chain is required:






Microsoft Visual Studio2

2005 Professional

Microsoft Visual Studio3

2005 Team Suite

Microsoft Visual Studio4

2003 .NET

Intel C++ Compiler for Windows5>


Intel C Compiler for EFI Byte Code


Microsoft Windows Driver Development Kit6 (DDK)


Windows Server 2003 SP1 DDK

Microsoft ACPI Source Language Assembler

3.0.0NT or later

Intel ACPI Component Architecture

20060113 or later


1 Instructions for installation of GCC are included in the BaseTools\gcc directory.
2 The default tool chain for the IA32 and X64 builds.
3 Needed for building IPF targets if the DDK is not installed.
4 May only be available through a MSDN subscription. If the DDK is not available, MASM 6.15 can be used for the assembler.
5 The Intel Compiler requires a Microsoft Visual Studio installation.
6 The default tool chain for IPF builds. To download and use the DDK, you must burn the ISO file to a CD or DVD.

 Back to Top

Install and Configure Tools on Windows XP or Windows Vista

Software Installation Order

After installing the compiler tools and your Subversion client, download the edk2, read the BuildNotes2.txt file and you will be ready to build an image.

All builds are started from a command prompt window.


If you optionally install cygwin (for gcc support) you should install it in "Unix" mode. The gcc tool chain will not compile in "DOS" mode.


 Back to Top

Environment Variables

Environment variables are case sensitive. You must use the exact case as in the examples of this document. Even though windows does not care about case, other operating systems that are supported do care about case.

You need to set WORKSPACE to the location of the edk2 directory that you pulled from Subversion. For example:

set WORKSPACE=c:\workspace\edk2

It is recommended that you wrap up all the environment variables above into a script that you can launch each time you begin to do development in your EDK II workspace.


 Back to Top

First Build

You will need to edit the text file, tools_def.txt which is created the first time you run the edksetup script7. The file is located in the %WORKSPACE%\Conf directory. This file contains the names of the compiler tool chains and the location of the compiler binaries. It has been pre-populated with the standard location for the Microsoft tool chains and includes the standard location of the Intel C Compiler for EFI Byte Code (EBC).

The default tool chain (named MYTOOLS) is pre-configured to use VS2005 for IA32 and X64 target architectures and the DDK for IPF target architectures. To use a different tool chain, either modify the tools_def.txt file's MYTOOLS entries, or modify the %WORKSPACE%\Conf\target.txt file's TOOL_CHAIN_TAG.

Once the external tools are installed and the environment variables are set, you can try a build.

  1. cd %WORKSPACE%
  2. edksetup.bat --nt32
      This will set the PATH to point to the directory containing the Win32 binaries of the EDK II tools used in edk2 development. It will fail if the external tools above are not properly installed.
      Using the --nt32 switch will run "%VS80COMNTOOLS%\vsvars32" (VS2005) or "%VS71COMNTOOLS%\vsvars32" (VS2003 .NET) to setup standard C FLAGS, Library and Include locations to build the Nt32 emulation environment.
      Note: If you do not want to build the Nt32 emulation environment, you do not need to use the --nt32 switch or run vsvars32.bat.
  3. Modify Conf/tools_def.txt8
  4. cd Nt32Pkg
  5. build

    The default build output directory is: %WORKSPACE%\Build\NT32\DEBUG_MYTOOLS\


7 The first time the edksetup script is executed, it creates three files in the %WORKSPACE%\Conf directory. The files tools_def.txt, target.txt and build_rule.txt are only created if they do not exist, if they exist, then they are not touched.
8 The tools_def.txt file only needs to be modified the first time, or if you modify the location of the 3rd party tool chains after having setup the file.

 Back to Top