The following are required to be able to build the EDK:
Name |
Version |
URL |
---|---|---|
TortoiseSVN |
1.3.3 |
http://prdownloads.sourceforge.net/tortoisesvn/ |
Ant |
1.6.5 |
|
Ant Contrib |
1.0b2 |
http://prdownloads.sourceforge.net/ant-contrib/ant-contrib-1.0b2-bin.zip?download |
Java JDK |
1.5.x |
|
Saxon-B |
8.1.1 for Java |
|
XMLBeans |
2.1.0 |
The following tools are optional:
Name |
Version |
URL |
---|---|---|
Cygwin |
Current |
|
Intel C++ Compiler for Windows |
9.0 |
|
Intel C Compiler for EFI Byte Code |
1.2 |
http://www.intel.com/cd/software/products |
Microsoft Driver Development Kit |
3790.1830 |
|
Microsoft ACPI Source Language Assembler |
1.0.13NT |
http://download.microsoft.com/download/0/e/2/0e2 |
Intel ACPI Component Architecture |
20060113 |
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
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.
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:
build.xml:45: java.lang.RuntimeException: Trying XBeans path engine... Trying XQRL... Trying Saxon... FAILED on declare namespace sans='http://www.TianoCore.org/2006/Edk2.0'; $this/sans:FrameworkPlatformDescription/sans:Flash/sans:FvImages/sans:FvImage[@Type='ValidImageNames']/sans:FvImageNames |
The Ant and XMLBean tools are required to be in the path.
set PATH=%PATH%;%ANT_HOME%\bin;%XMLBEANS_HOME%\bin
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 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 EDK II workspace.
You will need to edit the text file, msft_tools_def.txt, located in the Tools/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).
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.
cd to %WORKSPACE%
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.)
cd EdkNt32Pkg
type build