Getting and Installing the Required Tools for Building EDK II

Table of Contents


Requirements

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

Name

Version

URL

TortoiseSVN

1.4.5

http://tortoisesvn.net/downloads

Windows SVN Command Line Tool

1.4.5

http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91

Mac OS/X SVN Command Line Tool

1.4.4

http://downloads.open.collab.net/binaries.html

Linux SVN Command Line Tool

1.4.5

http://subversion.tigris.org/project_packages.html

 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:

Name

Version

URL

Cygwin1

4.1.2

http://www.cygwin.com

Microsoft Visual Studio2

2005 Professional

http://msdn2.microsoft.com/en-us/vstudio

Microsoft Visual Studio3

2005 Team Suite

http://msdn2.microsoft.com/en-us/vstudio

Microsoft Visual Studio4

2003 .NET

http://msdn2.microsoft.com/en-us/vstudio

Intel C++ Compiler for Windows5>

9.1

http://www.intel.com

Intel C Compiler for EFI Byte Code

1.2

http://www.intel.com/cd/software/products
/asmo-na/eng/compilers/efibc/index.htm

Microsoft Windows Driver Development Kit6 (DDK)

3790.1830

Windows Server 2003 SP1 DDK

Microsoft ACPI Source Language Assembler

3.0.0NT or later

http://www.microsoft.com/whdc/system/pnppwr/powermgmt/default.mspx

Intel ACPI Component Architecture

20060113 or later

http://www.intel.com/technology/iapc/acpi/downloads.htm

________________________

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.

Cygwin

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