blob: b9da6c308069e353e7c97f51ac34e6826fc211b9 [file] [log] [blame]
lhauchaa0bf4f2006-04-26 17:54:57 +00001Intel(R) Platform Innovation Framework for EFI
yshi8362271d2006-07-06 10:42:42 +00002EFI Development Kit II (EDK II)
3Root Package 1.00
michaelx_krau020fa452006-07-18 16:31:13 +000042006-07-18
lhauchaa0bf4f2006-04-26 17:54:57 +00005
michaelx_krau561e4a72006-07-13 18:37:28 +00006Intel is a trademark or registered trademark of Intel Corporation or its
7subsidiaries in the United States and other countries.
8* Other names and brands may be claimed as the property of others.
lhauchaa0bf4f2006-04-26 17:54:57 +00009Copyright (c) 2006, Intel Corporation
10
11This document provides updates to documentation, along with a description on
yshi8362271d2006-07-06 10:42:42 +000012how to install and build the EDK II.
lhauchaa0bf4f2006-04-26 17:54:57 +000013
14Package Contents
15----------------
16 ReleaseNote.txt- These release notes for the package.
michaelx_krau561e4a72006-07-13 18:37:28 +000017 MdePkg - Industry-standard headers and libraries
18 Tools - Build -specific tools that are designed to help the
19 developer create and modify drivers and libraries
20 EdkModulePkg - Reference drivers
21 EdkFatBinPkg - Binary DXE drivers for the Fat 32 file system
22 EdkShellBinPkg - Binary Shell applications and commands
23 EdkNt32Pkg - NT32 Emulation platform reference
lhauchaa0bf4f2006-04-26 17:54:57 +000024
25Note: MDE and MDK that appear in other documentation refer to the MdePkg and
michaelx_krau561e4a72006-07-13 18:37:28 +000026Tools packages, respectively. While, these two packages are the minimum
27requirement for developing EDK II Packageswe recommend that you download all
28of the top-level files listed above.
lhauchaa0bf4f2006-04-26 17:54:57 +000029
michaelx_krau561e4a72006-07-13 18:37:28 +000030The following package is available as a separate project, under a separate
31license, on the TianoCore.org website: https://fat-driver2.tianocore.org
lhauchc6c00392006-07-13 01:45:03 +000032
33 EdkFatPkg - A package containing source DXE drivers for the Fat 32 file
34 system
35
michaelx_krau561e4a72006-07-13 18:37:28 +000036Documents have the following filenames (to download these documents, see “Notes
37on Documentation” later in these Release Notes):
38 EDK II Module Development Environment Library Specification, v0.58
39 (MDE_Library_Spec_0_58.rtf)
40 EDK II Build and Packaging Architecture Specification, v0.53
41 (Build_Packaging_Spec_0_53.rtf)
42 EDK II Platform Configuration Database Infrastructure Description, v0.54
43 (PCD_Infrastructure_0_54.rtf)
44 EDK II Module Surface Area Specification, v0.51
lhauchaa0bf4f2006-04-26 17:54:57 +000045 (Module_Surface_Area_0_50.rtf)
michaelx_krau561e4a72006-07-13 18:37:28 +000046 EDK II Module Development Environment Package Specification, v0.51
47 (MDE_Package_Spec_0_51.rtf)
48 EDK II C Coding Standards Specification v0.51
49 (C_Coding_Standards_Specification_ 0_51.rtf)
michaelx_kraudcfa7b12006-07-12 20:39:54 +000050 EDK II Subversion Setup Guide
51 (edk2-subversion-setup.rtf)
lhauchaa0bf4f2006-04-26 17:54:57 +000052
53Pre-Requisites
54--------------
55The following list of tools must be installed on the development workstation
michaelx_krau561e4a72006-07-13 18:37:28 +000056prior to using the EDK II.
lhauchaa0bf4f2006-04-26 17:54:57 +000057
58Compiler Tool Chain
59 Microsoft* Visual Studio .NET 2003* (http://www.microsoft.com)
60 or
bbahnsen43475442006-06-07 00:21:44 +000061 A special GCC version 4.x or later (http://gcc.gnu.org). See below.
lhauchaa0bf4f2006-04-26 17:54:57 +000062
63Assembler Tool Chain
64 Microsoft Macro Assembler, version 6.15 or later
65 or
bbahnsen8fb9e6b2006-05-03 22:45:39 +000066 GNU binutils 2.16.1 or later
lhauchaa0bf4f2006-04-26 17:54:57 +000067
68Java Development Kit ( Java 5.0 or later)
hche10xef6e2ef2006-07-13 12:13:23 +000069 Sun* jdk-1.5.0_06 or later (http://java.sun.com)
lhauchaa0bf4f2006-04-26 17:54:57 +000070 or
71 Bea Systems* jrockit-25.2.0-jdk1.5.0_03 or later (http://www.bea.com)
72
73Java Tools
74 Apache-ANT, version 1.6.5 or later (http://ant.apache.org)
bbahnsen50518882006-05-03 18:10:56 +000075 Ant-contrib, version 1.0b2 or later
yshi8782eb162006-07-07 09:38:58 +000076 (http://prdownloads.sourceforge.net/ant-contrib/ant-contrib-1.0b2-bin.zip?download)
lhauchaa0bf4f2006-04-26 17:54:57 +000077 Saxon8, version 8.1.1
78 (http://prdownloads.sourceforge.net/saxon/saxonb8-1-1.zip?download)
yshi8782eb162006-07-07 09:38:58 +000079 XMLBeans, version 2.1.0 (http://xmlbeans.apache.org)
michaelx_krau561e4a72006-07-13 18:37:28 +000080 DO NOT download the latest XMLBeans, version 2.2.0. It is not compatible
81 with Saxon8, version 8.1.1.
lhauchaa0bf4f2006-04-26 17:54:57 +000082
83Other Tools
84 TortoiseSVN version 1.3.3. (http://tortoisesvn.tigris.org/)
85
86Optional Tools
87--------------
88Compiler Tool Chains:
michaelx_krau561e4a72006-07-13 18:37:28 +000089 Intel(R) C++ Compiler for Windows*, ver. 9.0 or later (http://www.intel.com)
90 Intel(R) C Compiler for EFI Byte Code, ver. 1.2 or later
bbahnsen8fb9e6b2006-05-03 22:45:39 +000091 (http://www.intel.com/cd/software/products/asmo-na/eng/compilers/efibc/index.htm)
lhauchaa0bf4f2006-04-26 17:54:57 +000092 Microsoft Driver Development Kit, version 3790.1830 or later
bbahnsen8fb9e6b2006-05-03 22:45:39 +000093 (http://www.microsoft.com/whdc/devtools/ddk/orderddkcd.mspx)
lhauchaa0bf4f2006-04-26 17:54:57 +000094 Microsoft ACPI Source Language Assembler, Version 1.0.13NT or later
95 Intel ACPI Component Architecture, version 20060113
96
michaelx_krau561e4a72006-07-13 18:37:28 +000097-----------------------------------------------
98Notes on Required Tools (Source Control System)
99-----------------------------------------------
michaelx_krau13421852006-07-05 20:41:25 +0000100The EDK II is being managed by the Subversion Source Control on Tianocore.org.
michaelx_krau561e4a72006-07-13 18:37:28 +0000101Subversion provides speed, security, and additional features. The
lhauchaa0bf4f2006-04-26 17:54:57 +0000102recommended client is TortoiseSVN version 1.3.3.
103 (Available at http://tortoisesvn.tigris.org/)
104
michaelx_krau561e4a72006-07-13 18:37:28 +0000105The checkout procedures on the Tianocore.org Web site include
106instructions for the use of Subversion Source Control.
lhauchaa0bf4f2006-04-26 17:54:57 +0000107
michaelx_krau13421852006-07-05 20:41:25 +0000108The URL of the EDK II repository is:
lhauchaa0bf4f2006-04-26 17:54:57 +0000109 https://edk2.tianocore.org/svn/edk2/trunk/edk2
110
lhauchaa0bf4f2006-04-26 17:54:57 +0000111
michaelx_krau561e4a72006-07-13 18:37:28 +0000112--------------------------------------------------------------------
113Notes On Required Tools (With examples for Windows, OS X, and Linux*)
114--------------------------------------------------------------------
lhauchaa0bf4f2006-04-26 17:54:57 +0000115Software Installation Order:
michaelx_krau561e4a72006-07-13 18:37:28 +0000116 After installing the compiler tools and your Subversion client, install the
117 following required tools in this order:
118 1. Java JDK
119 2. Apache-Ant
120 3. ant-contrib
121 4. xmlbeans
122 5. saxon8
lhauchaa0bf4f2006-04-26 17:54:57 +0000123
124Java Development Kit:
125
126 The Java Environment Variable must be set before attempting to build.
michaelx_krau561e4a72006-07-13 18:37:28 +0000127 For Sun JDK (see note below†):
bbahnsen61324292006-07-07 23:39:10 +0000128 set JAVA_HOME=c:\Java\jdk1.5.0_06 (Windows example)
129 export JAVA_HOME=/Library/Java/Home/ (OS X example)
130 export JAVA_HOME=/usr/lib/j2sdk1.5-sun/ (Linux example)
131 For Bea Systems:
yshi8782eb162006-07-07 09:38:58 +0000132 set JAVA_HOME=c:\Java\jrockit-R26.0.0-jdk1.5.0_04
lhauchaa0bf4f2006-04-26 17:54:57 +0000133
michaelx_krau561e4a72006-07-13 18:37:28 +0000134 † When using the Sun JDK5.0:
lhauchaa0bf4f2006-04-26 17:54:57 +0000135 During installation, you should specify the install directory as C:\Java
136 instead of C:\Program Files\(or some other drive letter.) While installing
michaelx_krau561e4a72006-07-13 18:37:28 +0000137 to this non-standard location is not required, in practice, it seems to work
lhauchaa0bf4f2006-04-26 17:54:57 +0000138 more reliably.
michaelx_krau561e4a72006-07-13 18:37:28 +0000139 For the JDK, the install path is C:\Java\jdk1.5.0_06
140 For the JRE, the install path is C:\Java\jre1.5.0_06
lhauchaa0bf4f2006-04-26 17:54:57 +0000141 Alternatively, you can specify C:\sunjavajdk and C:\sunjavajre.
lhauch01d2ed52006-04-27 15:09:06 +0000142
michaelx_krau561e4a72006-07-13 18:37:28 +0000143 NOTE: You cannot combine the location for the JDK and the JRE, because the
144 JRE install removes most of the binaries and libraries installed by the JDK
lhauchaa0bf4f2006-04-26 17:54:57 +0000145 install.
146
147Java Tools:
148 The Apache-ANT requires the ANT_HOME environment variable to be set before
149 attempting to build:
michaelx_krau561e4a72006-07-13 18:37:28 +0000150 set ANT_HOME=c:\<full path to where ant was installed>
bbahnsen61324292006-07-07 23:39:10 +0000151 export ANT_HOME=~/ExternalTools/apache-ant (OS X and Linux example)
lhauchaa0bf4f2006-04-26 17:54:57 +0000152
153 The ant-contrib.jar file should be installed in the %ANT_HOME%\lib
154 directory.
155
michaelx_krau561e4a72006-07-13 18:37:28 +0000156 XMLBeans, requires the XMLBEANS_HOME environment variable to be set
lhauchaa0bf4f2006-04-26 17:54:57 +0000157 before attempting to build:
michaelx_krau561e4a72006-07-13 18:37:28 +0000158 set XMLBEANS_HOME=C:\<full path to where xmlbeans was installed>
bbahnsen61324292006-07-07 23:39:10 +0000159 export XMLBEANS_HOME=~/ExternalTools/xmlbeans (OS X and Linux example)
lhauchaa0bf4f2006-04-26 17:54:57 +0000160
michaelx_krau561e4a72006-07-13 18:37:28 +0000161 Copy the saxon8.jar file to the %XMLBEANS_HOME%\lib directory.
lhauchaa0bf4f2006-04-26 17:54:57 +0000162
michaelx_krau561e4a72006-07-13 18:37:28 +0000163 The Ant and XMLBean tools must be in the path.
lhauchaa0bf4f2006-04-26 17:54:57 +0000164 MS system example:
165 set PATH=%PATH%;%ANT_HOME%\bin;%XMLBEANS_HOME%\bin
166 Linux/OS X bash shell example:
167 export PATH=$PATH:${ANT_HOME}/bin:${XMLBEANS_HOME}/bin
michaelx_kraudcfa7b12006-07-12 20:39:54 +0000168
169--------------------
170A Word on Apache-ANT
171--------------------
172The Apache-ANT program is a build tool that uses XML-based project files.
173Similar to Makefiles, these project files may contain multiple targets. Most
174build.xml files in EDK II are auto-generated; any edits performed on the
michaelx_krau561e4a72006-07-13 18:37:28 +0000175build.xml files will be overwritten by the next build.
michaelx_kraudcfa7b12006-07-12 20:39:54 +0000176
177Pre-defined targets in the build.xml file include:
michaelx_krau561e4a72006-07-13 18:37:28 +0000178 all - This target builds binaries for defined architectures.
179 clean - This target removes object files generated by commands.
michaelx_kraudcfa7b12006-07-12 20:39:54 +0000180 cleanall - This target removes all generated files and directories.
181
michaelx_krau561e4a72006-07-13 18:37:28 +0000182----------------------------
183A Word on the GCC Tool Chain
184----------------------------
michaelx_kraudcfa7b12006-07-12 20:39:54 +0000185EDK II will not compile with a standard Linux gcc tool chain. While Linux
186distributions are usually based on ELF, EDK II requires a version of gcc
187that is configured to produce PE-COFF images. You will find a script in
188edk2/Tools/gcc that will download, configure, compile, and install a gcc
michaelx_krau561e4a72006-07-13 18:37:28 +00001894.X cross-compile tool chain for EDK II development. This custom tool chain
190supports the IA-32 architecture. It can be built and run on Cygwin, Linux, and
191many other POSIX-compliant host operating environments. To compile the custom
192gcc tool chain, you need the following tools on your host computer: bash, gcc,
193gmake, curl (or wget).
michaelx_kraudcfa7b12006-07-12 20:39:54 +0000194
bbahnsen6329bec2006-07-25 22:08:33 +0000195Only the MdePkg and EdkModulePkg are currently supported by gcc builds. Other
bbahnsenaf9a0f82006-07-27 15:55:59 +0000196builds, such as the EdkNt32Pkg, will not compile with gcc. By default, the edk2
197will try to build the NT32.fpd, which is not supported by gcc. So, you need to
198change the Tools/Conf/target.txt.
199
200The platform to be built is identified by the Tools/Conf/target.txt file:
201
202#
203# PROPERTY Type Use Description
204# ---------------- -------- -------- -----------------------------------------------------------
205# ACTIVE_PLATFORM Filename Recommended Specify the WORKSPACE relative Path and Filename
206# of the platform FPD file that will be used for the build
207# This line is required if and only if the current working
208# directory does not contain one or more FPD files.
209
210ACTIVE_PLATFORM =
211
212You can leave it black, as above, or set it to any .fpd file in the workspace.
213If you leave it blank, then you just cd to the dir that contains the .fpd that
214you would like to build (MdePkg/ or EdkModulePkg/) and then type build.
bbahnsen6329bec2006-07-25 22:08:33 +0000215
216----------------------------
217A Word on compiling on Linux
218----------------------------
219
220In order to compile on Linux, you will need to have the e2fsprogs-dev package
221installed. Check your distribution for the rpm, deb or other package format.
222This package contains the uuid library and header that are used by some of the
223host tools.
224
225If you are running on x86_64 Linux, then you should install a 64 bit version of
226the Java JDK. The version that was used was jdk-1_5_0_07-linux-amd64-rpm.bin.
227It may be downloaded from sun.com.
michaelx_kraudcfa7b12006-07-12 20:39:54 +0000228
bbahnsen0a754282006-07-26 18:31:53 +0000229-----------------------------------------
230A Word on compiling under Cygwin with gcc
231-----------------------------------------
232
233Cygwin is a POSIX style operating environment for Windows. It is possible to
234compile the EDK 2 using gcc and cygwin. There are a few extra steps necessary
235to make this happen. There is a JNI (Java Native Interface) library in the
236Tools. In order to compile this under Cygwin, the 'linux' java headers must be
237installed to the $JAVA_HOME dir on the windows system. To accomplish this, you
238must install the JDK on a linux system, and then copy
239linux:$JAVA_HOME/include/linux/ to windows:$JAVA_HOME/include. These are really
240typedefs needed by gcc.
241
242Compiling under cygwin is slow, because the underlying file accesses are slow
243in cygwin. For this reason, we do not encourage the use of cygwin. A true unix
244system will be a superior choice for those wishing to compile with gcc.
245
246Make sure that you select the e2fsprogs development package when you install
247cygwin. It is necessary for the GenFvImage tool.
248
michaelx_krauea5254e2006-08-01 20:18:19 +0000249----------------------------------------
250A Word on gcc for Processor Architectures
251----------------------------------------
252
253Currently gcc support is limited to IA-32 builds, generating IA-32 PE32 images.
254
255The X64 bit (Intel 64, etc.) support under the gcc compiler does not support the EFIAPI calling convention (as defined in the UEFI 2.0 specification Chapter 2), so it is not possible to build a working EFI image for an X64 environment. Since the x64 gcc does not support the EFIAPI calling convention the x64 tools do not support generating a PE32+ image. The EFIAPI calling convention is very similar to the Microsoft x64 calling convention.
256
257On Itanium® Processors the gcc compiler does not support generating a PE32+ image.
258
michaelx_kraudcfa7b12006-07-12 20:39:54 +0000259-----------------------
michaelx_krau561e4a72006-07-13 18:37:28 +0000260Notes on Documentation
michaelx_kraudcfa7b12006-07-12 20:39:54 +0000261-----------------------
262The documents are being managed by the Subversion Source Control on
263Tianocore.org. The document repository is "docs" and must be checked out
264separately from the EDK II source tree. Refer to the checkout procedures on
michaelx_krau561e4a72006-07-13 18:37:28 +0000265the Tianocore.org Web site for EDK II.
michaelx_kraudcfa7b12006-07-12 20:39:54 +0000266
267The URL of the document repository is:
268 https://edk2.tianocore.org/svn/edk2/trunk/docs
269
lhauchaa0bf4f2006-04-26 17:54:57 +0000270
271-------------------------------------------------------------------------------
michaelx_krau561e4a72006-07-13 18:37:28 +0000272Quick Start
lhauchaa0bf4f2006-04-26 17:54:57 +0000273-----------
michaelx_krau561e4a72006-07-13 18:37:28 +0000274(assumes Microsoft Tools and OS environment, for GCC Tools or Linux, see
michaelx_kraudcfa7b12006-07-12 20:39:54 +0000275"Detailed Starting Instructions" below)
276
277Follow the instructions at https://edk2.tianocore.org/servlets/ProjectSource to
michaelx_krau561e4a72006-07-13 18:37:28 +0000278check out the entire EDK II source tree.
michaelx_kraudcfa7b12006-07-12 20:39:54 +0000279
michaelx_krau561e4a72006-07-13 18:37:28 +0000280In a command window, change to the top-level directory of the EDK II source.
michaelx_kraudcfa7b12006-07-12 20:39:54 +0000281
michaelx_krau561e4a72006-07-13 18:37:28 +0000282To test your tool chain setup and to build the supplied tools, execute:
bbahnsena5760d02006-07-27 22:02:59 +0000283 c:\MyWork\edkii\> edksetup ForceRebuild
michaelx_kraudcfa7b12006-07-12 20:39:54 +0000284
michaelx_krau561e4a72006-07-13 18:37:28 +0000285(The edksetup script is referred to as the setup command throughout the
michaelx_kraudcfa7b12006-07-12 20:39:54 +0000286rest of this document.)
287 NOTE: You should run the setup command at the start of every session.
288 This configures the environment to include the TianoTools and the
289 Java applications and libraries.
290
291You will need to set the WORKSPACE environment variable, or run the edksetup
michaelx_krau561e4a72006-07-13 18:37:28 +0000292script (without any arguments), any time you want to build.
michaelx_kraudcfa7b12006-07-12 20:39:54 +0000293
294 Set the WORKSPACE environment variable, e.g.:
295
296 c:\> set WORKSPACE=C:\MyWork\edkii
297
michaelx_krau561e4a72006-07-13 18:37:28 +0000298You may need to edit the text files Tools/Conf/target.txt and
299Tools/Conf/tools_def.txt (created by edksetup) using your favorite
michaelx_kraudcfa7b12006-07-12 20:39:54 +0000300text editor to ensure that the paths to the tools you want to use
301to build EDK II binaries are correct. These files contain the default
302paths (as per the default installation of the tools), so a customized
303install may require this manual process.
304
michaelx_krau561e4a72006-07-13 18:37:28 +0000305Once this is completed, you are ready to test the build, by executing:
michaelx_kraudcfa7b12006-07-12 20:39:54 +0000306 c:\MyWork\edkii\> build
307
michaelx_krau561e4a72006-07-13 18:37:28 +0000308This command builds the active platform specified in text file target.txt. If
309the active platform is not specified target.txt, you must execute the build
310command from the sub-directory that contains FPD files. For more information
311about the active platform policy, see the “EDK II Build and Packaging
312Architecture Specification.”
michaelx_kraudcfa7b12006-07-12 20:39:54 +0000313
314-------------------------------------------------------------------------------
michaelx_krau561e4a72006-07-13 18:37:28 +0000315Detailed Starting Instructions
316------------------------------
michaelx_kraudcfa7b12006-07-12 20:39:54 +0000317
lhauchaa0bf4f2006-04-26 17:54:57 +0000318Follow the instructions at https://edk2.tianocore.org/servlets/ProjectSource to
michaelx_krau561e4a72006-07-13 18:37:28 +0000319check out the entire EDK II source tree.
lhauchaa0bf4f2006-04-26 17:54:57 +0000320
michaelx_krau561e4a72006-07-13 18:37:28 +0000321In a command window, change to the top-level directory of the EDK II source.
lhauchaa0bf4f2006-04-26 17:54:57 +0000322
lhauch65a1d8a2006-07-12 06:40:42 +0000323If the active compiler tool chain is GCC, you must set the
324environment variable, TOOL_CHAIN to "gcc" before running the
325edksetup script. Example: export TOOL_CHAIN=gcc
lhauchaa0bf4f2006-04-26 17:54:57 +0000326
michaelx_krau561e4a72006-07-13 18:37:28 +0000327To test your tool chain setup and to build the supplied tools, execute:
bbahnsena5760d02006-07-27 22:02:59 +0000328 c:\MyWork\edkii\> edksetup ForceRebuild
lhauchaa0bf4f2006-04-26 17:54:57 +0000329
michaelx_krau561e4a72006-07-13 18:37:28 +0000330On Linux systems, you must source the edksetup.sh file to load the correct
bbahnsen61324292006-07-07 23:39:10 +0000331settings into your shell.
332
333 . edksetup.sh # Note the dot.
334
bbahnsena5760d02006-07-27 22:02:59 +0000335If you have recently updated your code from subversion, the tools will need to
336be rebuilt if there were any code changes made to them. You can request that
337the tools get rebuilt by typing:
338
339 . edksetup.sh Rebuild # Unix-like systems
340 edksetup.bat Rebuild # Windows
341
michaelx_krau561e4a72006-07-13 18:37:28 +0000342The edksetup script is referred to as the setup command throughout the
343rest of this document.
lhauchaa0bf4f2006-04-26 17:54:57 +0000344 NOTE: You should run the setup command at the start of every session.
345 This configures the environment to include the TianoTools and the
346 Java applications and libraries.
347
michaelx_krau561e4a72006-07-13 18:37:28 +0000348Any changes to the tool source code or XML Schema documents require that
349you execute the following:
bbahnsena5760d02006-07-27 22:02:59 +0000350 c:\MyWork\edkii\> edksetup ForceRebuild
lhauch65a1d8a2006-07-12 06:40:42 +0000351
michaelx_krau561e4a72006-07-13 18:37:28 +0000352You must set the WORKSPACE environment variable, or run the edksetup
353script (without any arguments), any time you want to build.
lhauch65a1d8a2006-07-12 06:40:42 +0000354
355 Set the WORKSPACE environment variable, e.g.:
356
357 c:\> set WORKSPACE=C:\MyWork\edkii
358
michaelx_krau561e4a72006-07-13 18:37:28 +0000359You may need to edit the text files Tools/Conf/target.txt and
360Tools/Conf/tools_def.txt (created by edksetup) using your favorite
michaelx_kraudcfa7b12006-07-12 20:39:54 +0000361text editor to ensure that the paths to the tools you want to use
362to build EDK II binaries are correct. These files contain the default
363paths (as per the default installation of the tools), so a customized
364tool installation may require this manual process.
lhaucha032fb42006-07-06 14:13:56 +0000365
michaelx_krau561e4a72006-07-13 18:37:28 +0000366Once this is completed, you are ready to test the build, by executing:
lhauch65a1d8a2006-07-12 06:40:42 +0000367 c:\MyWork\edkii\> build
lhauchaa0bf4f2006-04-26 17:54:57 +0000368
michaelx_krau561e4a72006-07-13 18:37:28 +0000369This command builds the active platform specified in text file target.txt. If
370the active platform is not specified, go to the sub-directory that contains FPD
371files and execute the build command. For more information about the active
372platform policy, see the “EDK II Build and Packaging Architecture
373Specification.”
bbahnsen90f7b6a2006-06-22 23:19:41 +0000374
michaelx_krau561e4a72006-07-13 18:37:28 +0000375--------------------------
wuyizhonge3f236c2006-07-06 07:22:25 +0000376Individual Platform Builds
michaelx_krau561e4a72006-07-13 18:37:28 +0000377--------------------------
wuyizhonge3f236c2006-07-06 07:22:25 +0000378After running the setup command, you can build individual platforms.
michaelx_krau561e4a72006-07-13 18:37:28 +0000379In the command window:
380 Set the active platform in target.txt, and execute this command:
381 c:\<directory>\> build
382or
383 cd to the platform (FPD file) that you want to build and execute this command:
lhauch65a1d8a2006-07-12 06:40:42 +0000384 c:\MyWork\edkii\EdkNt32Pkg\> build
lhauchaa0bf4f2006-04-26 17:54:57 +0000385
michaelx_krau561e4a72006-07-13 18:37:28 +0000386 Note that the active platform specified in target.txt overrides the platform
387 specified by any FPD file in the current directory. For more information
388 about active platform policy, see the “EDK II Build and Packaging Architecture
389 Specification.”
wuyizhonge3f236c2006-07-06 07:22:25 +0000390
lhauch70edbc32006-07-14 06:46:15 +0000391To run the Nt32 emulation platform under Microsoft Windows, go to
392<full build path>\DEBUG\MSFT\IA32 and execute SecMain.exe
lhauchaa0bf4f2006-04-26 17:54:57 +0000393
michaelx_krau561e4a72006-07-13 18:37:28 +0000394To exit the Nt32 emulation platform, type “reset” at the EFI Shell>
395command prompt. Alternatively, from the graphical interface, select the Boot
396Maintenance Manager's “Reset System” command.
397
michaelx_krau020fa452006-07-18 16:31:13 +0000398 NOTE: When creating a new platform, the Platform Name is restricted
399 to a single word containing alphanumeric characters, underscore, dash,
400 and period. The space character and other special characters are
401 not allowed.
lhauch70edbc32006-07-14 06:46:15 +0000402
michaelx_krau561e4a72006-07-13 18:37:28 +0000403-----------------------
404Notes on Symbolic Debug
405-----------------------
406To enable EFI Symbolic Debugging, make sure the target output is set to DEBUG
407in the text file Tools/Conf/target.txt and then modify the FPD <BuildOptions>
408<Options><Option BuildTargets="DEBUG" ToolCode="CC"> and append the following
409compiler options to the string:
410"/D EFI_GENERATE_SYM_FILE", "/D EFI_SYMBOLIC_DEBUG"
411
412(If the Option line does not contain "/D EFI_DEBUG", you must add that
413option as well.)
lhauch03fed932006-05-24 19:51:36 +0000414
lhauchaa0bf4f2006-04-26 17:54:57 +0000415------------------------
416Individual Module Builds
417------------------------
418After running the setup command, you can build individual modules.
michaelx_krau561e4a72006-07-13 18:37:28 +0000419 In the command window, cd to the module that you want to build, and
420 execute the build command:
lhauch65a1d8a2006-07-12 06:40:42 +0000421 c:\MyWork\edkii\MdePkg\Library\BaseLib\> build
wuyizhonge3f236c2006-07-06 07:22:25 +0000422
michaelx_krau561e4a72006-07-13 18:37:28 +0000423 You must set the active platform in target.txt for individual module builds.
lhauchaa0bf4f2006-04-26 17:54:57 +0000424
425-------------------------------------------------------------------------------
lhauchaa0bf4f2006-04-26 17:54:57 +0000426
427General Information:
428===============================================================
michaelx_krau561e4a72006-07-13 18:37:28 +0000429Mechanisms
lhauchaa0bf4f2006-04-26 17:54:57 +0000430----------
bbahnsen8fb9e6b2006-05-03 22:45:39 +0000431A brief overview:
lhauchaa0bf4f2006-04-26 17:54:57 +0000432
michaelx_krau561e4a72006-07-13 18:37:28 +0000433A) The Surface Area Package Description (SPD) file contains information about
434the modules that the package contains, including the location of all MSA files,
435and public library names and headers that might be provided by a module in the
lhauchaa0bf4f2006-04-26 17:54:57 +0000436package. Packages are defined by SPD files. (Found in the root of the Package
michaelx_krau561e4a72006-07-13 18:37:28 +0000437subdirectory (i.e. EdkNt32Pkg).) The SPD file is further explained in “EDK II
438Build and Packaging Architecture Specification.”
lhauchaa0bf4f2006-04-26 17:54:57 +0000439
440B) Module Surface Area Definition (MSA) files. A description of a module's
441surface area, with all module specific default flags and features specified.
michaelx_krau561e4a72006-07-13 18:37:28 +0000442For additional details, see the "EDK II Module Surface Area Specification" and
443the "EDK II Build and Packaging Architecture Specification."
lhaucha032fb42006-07-06 14:13:56 +0000444
445C) Framework Platform Description (FPD) files. A description of a platform's
446surface are, including a list of modules that are needed by the platform. To
447support individual module builds, developers are not required to provide
michaelx_krau561e4a72006-07-13 18:37:28 +0000448information about specific flash devices, nor flash device layout.
449Specific sections in the FPD file control aspects of the build, such
lhaucha032fb42006-07-06 14:13:56 +0000450as the Supported Architectures and Build Targets, as well as the tool flags
451that are used to create the binary files. A valid platform file can specify
452zero or more modules, so individual modules can be compiled within the context
453of a platform (FPD) definition.
454
michaelx_krau561e4a72006-07-13 18:37:28 +0000455D) Platform Configuration Database (PCD). A platform database that contains a
456variety of current platform settings or directives that can be accessed by a
457driver or application. The PCD is defined by the PCD_Protocol (This is
458further explained in the "EDK II Platform Configuration Database Infrastructure
459Description."
lhauchaa0bf4f2006-04-26 17:54:57 +0000460
lhaucha032fb42006-07-06 14:13:56 +0000461E) Library Class. A library class is a logical grouping of similar functions.
lhauchaa0bf4f2006-04-26 17:54:57 +0000462When developing components, the module surface area declares the class of
lhaucha032fb42006-07-06 14:13:56 +0000463libraries that can be used by the component. The MSA and SPD files can specify
michaelx_krau561e4a72006-07-13 18:37:28 +0000464a recommended instance of the library that a platform integrator (PI) may
465select, however this is only a recommendation. The PI may choose to select a
466different library instance to be used during compilation and linking. All
467library type modules must include header files in their distribution package,
468as well as their MSA files. Components, on the other hand, need provide only an
469MSA file and either source or binary files when distributing packages. The
470Library Classes are further explained in the "EDK II Build and Packaging
471Architecture Specification."
lhauchaa0bf4f2006-04-26 17:54:57 +0000472
473=========================================================================
474The common operations by developers of new modules are:
michaelx_krau561e4a72006-07-13 18:37:28 +0000475-----------------------------------------------
4761) Manually creating a new module in a package:
lhauchaa0bf4f2006-04-26 17:54:57 +0000477 - The module source code must first be created in an appropriate directory
478 (under the package the module is to be a part of.)
479 - An MSA file must be created, spelling out all aspects of the module.
480 - The MSA must be added to the SPD for the package to include the module.
481
michaelx_krau561e4a72006-07-13 18:37:28 +0000482-----------------------------------------------------
4832) Adding and Removing modules to and from a package:
lhauchaa0bf4f2006-04-26 17:54:57 +0000484
michaelx_krau561e4a72006-07-13 18:37:28 +0000485 - Set up environment as Build
486 - Adding a module to a package:
487 - Generate the MSA file
488 - Add a new <Filename> element under <MsaFiles> into
489 <PackageDir>\<PackageName>.spd, using arelative path to the package
490 - Add a new <ModuleSA> entry under each <FrameworkModules> into the
wuyizhonge3f236c2006-07-06 07:22:25 +0000491 <PackageDir>\<PackageName>.fpd file if necessary.
lhauchaa0bf4f2006-04-26 17:54:57 +0000492
michaelx_krau561e4a72006-07-13 18:37:28 +0000493 - Removing a module from a package:
494 - Comment out or remove the corresponding <Filename> element under
495 <MsaFiles> from <PackageDir>\<PackageName>.spd
496 - Comment out or remove the corresponding <ModuleSA> entry under each
wuyizhonge3f236c2006-07-06 07:22:25 +0000497 <FrameworkModules> from <PackageDir>\<PackageName>.fpd if necessary.
lhauchaa0bf4f2006-04-26 17:54:57 +0000498
michaelx_krau561e4a72006-07-13 18:37:28 +0000499-------------------------------
5003) Manually creating a package:
lhauchaa0bf4f2006-04-26 17:54:57 +0000501 - Identify the modules that are to be members of the project.
502 - Identify the Variables and Guids required in and of the Package (including
michaelx_krau561e4a72006-07-13 18:37:28 +0000503 consumption and production information).
lhauchaa0bf4f2006-04-26 17:54:57 +0000504 - Create an SPD file defining these modules and calling out their MSA files.
michaelx_krau561e4a72006-07-13 18:37:28 +0000505 - Add a new <Filename> element under <PackageList> into
506 Tools\Conf\FrameworkDatabase.db, using the relative path to the workspace.
lhauchaa0bf4f2006-04-26 17:54:57 +0000507
michaelx_krau561e4a72006-07-13 18:37:28 +0000508-----------------------------------------
5094) Declaring a new Protocol in a package:
lhauchaa0bf4f2006-04-26 17:54:57 +0000510 - This release requires manual editing of the SPD file, adding the protocol
511 to the ProtocolDeclarations section of the file.
512 - Add the Protocol .h file to the Include\Protocol directory.
lhauch64fcaea2006-04-27 22:47:57 +0000513 - Add an <Entry> to the <ProtocolDeclarations> element in the
514 <PackageName>.spd file
michaelx_krau561e4a72006-07-13 18:37:28 +0000515 - Each line contains Protocol base name, followed by the global variable
516 name, and the hex value of the Protocol GUID.
lhauchaa0bf4f2006-04-26 17:54:57 +0000517
michaelx_krau561e4a72006-07-13 18:37:28 +0000518Example Protocol Entries (NOTE: The Guid entry is a single line in the SPD
519file):
lhauch64fcaea2006-04-27 22:47:57 +0000520<ProtocolDeclarations>
wuyizhonge3f236c2006-07-06 07:22:25 +0000521 <Entry Name="Bds">
522 <C_Name>gEfiBdsArchProtocolGuid</C_Name>
523 <GuidValue>665E3FF6-46CC-11D4-9A38-0090273FC14D</GuidValue>
524 <HelpText/>
525 </Entry>
526 <Entry Name="Cpu">
527 <C_Name>gEfiCpuArchProtocolGuid</C_Name>
528 <GuidValue>26BACCB1-6F42-11D4-BCE7-0080C73C8881</GuidValue>
529 <HelpText/>
530 </Entry>
531</ProtocolDeclarations>
lhauchaa0bf4f2006-04-26 17:54:57 +0000532
michaelx_krau561e4a72006-07-13 18:37:28 +0000533------------------------------------
5345) Declaring a new PPI in a package:
535 - This release requires manual editing of the SPD file
lhauchaa0bf4f2006-04-26 17:54:57 +0000536 - Add the PPI .h file to the Include\Ppi directory.
lhauch64fcaea2006-04-27 22:47:57 +0000537 - Add an <Entry> to the package <PpiDeclarations> element in the
538 <PackageName>.spd file
michaelx_krau561e4a72006-07-13 18:37:28 +0000539 - Each line contains the PPI base name, followed by the global variable
540 name and the hex value of the PPI GUID.
lhauchaa0bf4f2006-04-26 17:54:57 +0000541
lhauch64fcaea2006-04-27 22:47:57 +0000542Example Ppi Entries (NOTE: The Guid entry is a single line in the SPD file):
543<PpiDeclarations>
wuyizhonge3f236c2006-07-06 07:22:25 +0000544 <Entry Name="BootInRecoveryMode">
545 <C_Name>gEfiPeiBootInRecoveryModePpiGuid</C_Name>
546 <GuidValue>17EE496A-D8E4-4B9A-94D1-CE8272300850</GuidValue>
547 <HelpText/>
lhauch64fcaea2006-04-27 22:47:57 +0000548 </Entry>
wuyizhonge3f236c2006-07-06 07:22:25 +0000549 <Entry Name="CpuIo">
550 <C_Name>gEfiPeiCpuIoPpiInServiceTableGuid</C_Name>
551 <GuidValue>E6AF1F7B-FC3F-46DA-A828-A3B457A44282</GuidValue>
552 <HelpText/>
lhauch64fcaea2006-04-27 22:47:57 +0000553 </Entry>
554</PpiDeclarations>
555
michaelx_krau561e4a72006-07-13 18:37:28 +0000556-------------------------------------
5576) Declaring a new GUID in a package:
lhauchaa0bf4f2006-04-26 17:54:57 +0000558 - This release requires manual editing of the SPD file to include the new
lhauch64fcaea2006-04-27 22:47:57 +0000559 Guid. This is identical to adding a ProtocolDeclaration or PpiDeclaration
michaelx_krau561e4a72006-07-13 18:37:28 +0000560 element, as described above.
lhauchaa0bf4f2006-04-26 17:54:57 +0000561
michaelx_krau561e4a72006-07-13 18:37:28 +0000562------------------------------------------
5637) Declaring a new PCD entry in a package:
lhauchaa0bf4f2006-04-26 17:54:57 +0000564 - This release requires manual editing of the SPD file to include the new
lhauch64fcaea2006-04-27 22:47:57 +0000565 PCD. New Pcd entries are added to the PcdDefinitions section of the
michaelx_krau561e4a72006-07-13 18:37:28 +0000566 <PackageName>.spd file using the following example for the format
567 (NOTE: The hex <Token> value must be unique):
lhauch64fcaea2006-04-27 22:47:57 +0000568
klu254c9f9e2006-07-07 06:19:08 +0000569<PcdDeclarations>
lhauch64fcaea2006-04-27 22:47:57 +0000570 <PcdEntry ItemType="FIXED_AT_BUILD">
571 <C_Name>PcdMaximumUnicodeStringLength</C_Name>
572 <Token>0x00000001</Token>
klu254c9f9e2006-07-07 06:19:08 +0000573 <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
lhauch64fcaea2006-04-27 22:47:57 +0000574 <DatumType>UINT32</DatumType>
klu254c9f9e2006-07-07 06:19:08 +0000575 <ValidUsage>FIXED_AT_BUILD</ValidUsage>
lhauch64fcaea2006-04-27 22:47:57 +0000576 <DefaultValue>1000000</DefaultValue>
klu254c9f9e2006-07-07 06:19:08 +0000577 <HelpText>The maximum lengh for unicode string.</HelpText>
lhauch64fcaea2006-04-27 22:47:57 +0000578 </PcdEntry>
klu254c9f9e2006-07-07 06:19:08 +0000579</PcdDeclarations>
lhauchaa0bf4f2006-04-26 17:54:57 +0000580
581------------------------------
michaelx_krau561e4a72006-07-13 18:37:28 +00005828) Declaring a new Library Class:
lhauchaa0bf4f2006-04-26 17:54:57 +0000583 - This release requires manual editing of the SPD file to include the new
lhauch64fcaea2006-04-27 22:47:57 +0000584 Library Class. New Library Class entries are added to the
michaelx_krau561e4a72006-07-13 18:37:28 +0000585 LibraryClassDeclarations section of the <PackageName>.spd file using
lhauch64fcaea2006-04-27 22:47:57 +0000586 the following example for the format:
587
588<LibraryClassDeclarations>
wuyizhonge3f236c2006-07-06 07:22:25 +0000589 <LibraryClass Name="BaseLib">
lhauch64fcaea2006-04-27 22:47:57 +0000590 <IncludeHeader>Include/Library/BaseLib.h</IncludeHeader>
wuyizhonge3f236c2006-07-06 07:22:25 +0000591 <HelpText/>
592 </LibraryClass>
593 <LibraryClass Name="BaseMemoryLib">
594 <IncludeHeader>Include/Library/BaseMemoryLib.h</IncludeHeader>
595 <HelpText/>
596 </LibraryClass>
lhauch64fcaea2006-04-27 22:47:57 +0000597</LibraryClassDeclarations>
lhauchaa0bf4f2006-04-26 17:54:57 +0000598
lhauchaa0bf4f2006-04-26 17:54:57 +0000599=======================================================
michaelx_krau561e4a72006-07-13 18:37:28 +0000600EDK II Changes Relative to the original EDK:
601--------------------------------------------
michaelx_krau13421852006-07-05 20:41:25 +0000602The EDK II represents significant changes in the structure of the EDK.
michaelx_krau561e4a72006-07-13 18:37:28 +0000603Therefore, it is very difficult to isolate all of the changes of this version of
604the EDK with the original EDK.
lhauchaa0bf4f2006-04-26 17:54:57 +0000605
606Of particular note:
607
michaelx_krau13421852006-07-05 20:41:25 +00006081) EDK II contains new hardware feature support for the ICH SMBUS Libraries.
lhauchaa0bf4f2006-04-26 17:54:57 +0000609 These libraries are provided to make Memory Reference Code (MRC) development
610 easier.
michaelx_krau561e4a72006-07-13 18:37:28 +00006112) The MDE libraries represent significant changes in source
lhauchaa0bf4f2006-04-26 17:54:57 +0000612 (with only limited changes in functionality.) These new libraries conform
michaelx_krau561e4a72006-07-13 18:37:28 +0000613 to the "EDK II Module Development Environment Library Specification.”
lhauchaa0bf4f2006-04-26 17:54:57 +00006143) The Fat Binary and the EDK Shell Binary Packages are functionally identical
michaelx_krau561e4a72006-07-13 18:37:28 +0000615 to the original EDK.
lhauchaa0bf4f2006-04-26 17:54:57 +00006164) The EDK tools directory has been expanded to include more tools and more
617 tool functionality.
6185) The EDK NT32 section has been ported to the new build process, but
michaelx_krau561e4a72006-07-13 18:37:28 +0000619 functionally remains the same as the original EDK.
michaelx_krau13421852006-07-05 20:41:25 +00006206) The Application "HelloWorld" has been ported to EDK II as well.
lhauchaa0bf4f2006-04-26 17:54:57 +0000621
622=======================================================
623Virus scanned by McAfee VirusScan Enterprise 8.0.0, Virus Definitions 4718, no
624virus detected.
625