Getting and installing the required tools for building the EDK2

Table of Contents

Requirements

The following are required to be able to build the EDK:

Name

Version

URL

TortoiseSVN

1.3.3

http://prdownloads.sourceforge.net/tortoisesvn/
TortoiseSVN-1.3.3.6219-svn-1.3.1.msi?download

Ant

1.6.5

http://ant.apache.org/bindownload.cgi

Ant Contrib

1.0b2

http://sourceforge.net/project/showfiles.php?group_id=36177

Java JDK

1.5.x

http://java.sun.com/j2se/1.5.0/download.jsp

Saxon-B

8.1.1 for Java

http://prdownloads.sourceforge.net/saxon/saxonb8-1-1.zip

XMLBeans

2.1.0

http://www.apache.org/dyn/closer.cgi/xmlbeans/binaries



The following tools are optional:

Name

Version

URL

Cygwin

Current

http://www.cygwin.com

Intel C++ Compiler for Windows

9.0

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 Driver Development Kit

3790.1830

http://www.microsoft.com/whdc/devtools/ddk/orderddkcd.mspx

Microsoft ACPI Source Language Assembler

1.0.13NT

http://download.microsoft.com/download/0/e/2/0e2
58da3-dd7a-4d3b-9b48-8673b6b5897c/ASL.exe

Intel ACPI Component Architecture

20060113

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

Install and Configure Tools on Windows XP

Software Installation Order

After installing the compiler tools and your Subversion client, the following required tools should be installed in this order:
Java JDK, Apache-Ant, ant-contrib, xmlbeans, saxon8

Java Development Kit

The Java Environment Variable must be set before attempting to build.
e.g. For Sun JDK:

set JAVA_HOME=c:\Java\jdk1.5.0_06

During installation, you should specify the install directory as C:\Java instead of C:\Program Files (or some other drive letter.)  While installing to this non-standard location is not required. In use, it seems to work more reliably.

NOTE: You cannot combine the location for the JDK and the JRE, as the JRE install removes most of the binaries and libraries installed by the JDK install.

Java Tools

The Apache-ANT requires the ANT_HOME environment variable to be set before attempting to build:

Unzip apache-ant-1.6.5-bin.zip to a directory. We need to set an environment variable ANT_HOME to this location:

set ANT_HOME=<full path to where ant was unzipped>

Unzip the ant-contrib-1.0b2-bin.zip file. The ant-contrib.jar file should be copied into the %ANT_HOME%\lib directory.

Unzip xmlbeans-2.1.0.zip to a directory. XMLBeans requires the XMLBEANS_HOME environment variable to be set before attempting to build:

set XMLBEANS_HOME=<full path to where xmlbeans was unzipped>

Unzip the saxonb8-1-1.zip file. The saxon8.jar file should be copied to the %XMLBEANS_HOME%\lib directory. Do not download a later version of saxon 8. You will get the following error message if you do:

The Ant and XMLBean tools are required to be in the path.

set PATH=%PATH%;%ANT_HOME%\bin;%XMLBEANS_HOME%\bin

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.

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, Java does.

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 EDK2 workspace.

The first build

Once the external tools are installed, the environment variables are set, and you have the ant executable in your path, you can try a build.

  1. cd to %WORKSPACE%

  2. run edksetup.bat (this will build several tools that are used in edk2 development. It will fail if the external tools above are not properly installed.)

  3. cd MdePkg

  4. type ant