blob: 0efa80764ade564aa957e69168762c5edddd8e76 [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
196builds, such as the EdkNt32Pkg, will not compile with gcc.
197
198----------------------------
199A Word on compiling on Linux
200----------------------------
201
202In order to compile on Linux, you will need to have the e2fsprogs-dev package
203installed. Check your distribution for the rpm, deb or other package format.
204This package contains the uuid library and header that are used by some of the
205host tools.
206
207If you are running on x86_64 Linux, then you should install a 64 bit version of
208the Java JDK. The version that was used was jdk-1_5_0_07-linux-amd64-rpm.bin.
209It may be downloaded from sun.com.
michaelx_kraudcfa7b12006-07-12 20:39:54 +0000210
211-----------------------
michaelx_krau561e4a72006-07-13 18:37:28 +0000212Notes on Documentation
michaelx_kraudcfa7b12006-07-12 20:39:54 +0000213-----------------------
214The documents are being managed by the Subversion Source Control on
215Tianocore.org. The document repository is "docs" and must be checked out
216separately from the EDK II source tree. Refer to the checkout procedures on
michaelx_krau561e4a72006-07-13 18:37:28 +0000217the Tianocore.org Web site for EDK II.
michaelx_kraudcfa7b12006-07-12 20:39:54 +0000218
219The URL of the document repository is:
220 https://edk2.tianocore.org/svn/edk2/trunk/docs
221
lhauchaa0bf4f2006-04-26 17:54:57 +0000222
223-------------------------------------------------------------------------------
michaelx_krau561e4a72006-07-13 18:37:28 +0000224Quick Start
lhauchaa0bf4f2006-04-26 17:54:57 +0000225-----------
michaelx_krau561e4a72006-07-13 18:37:28 +0000226(assumes Microsoft Tools and OS environment, for GCC Tools or Linux, see
michaelx_kraudcfa7b12006-07-12 20:39:54 +0000227"Detailed Starting Instructions" below)
228
229Follow the instructions at https://edk2.tianocore.org/servlets/ProjectSource to
michaelx_krau561e4a72006-07-13 18:37:28 +0000230check out the entire EDK II source tree.
michaelx_kraudcfa7b12006-07-12 20:39:54 +0000231
michaelx_krau561e4a72006-07-13 18:37:28 +0000232In a command window, change to the top-level directory of the EDK II source.
michaelx_kraudcfa7b12006-07-12 20:39:54 +0000233
michaelx_krau561e4a72006-07-13 18:37:28 +0000234To test your tool chain setup and to build the supplied tools, execute:
michaelx_kraudcfa7b12006-07-12 20:39:54 +0000235 c:\MyWork\edkii\> edksetup ForceBuild
236
michaelx_krau561e4a72006-07-13 18:37:28 +0000237(The edksetup script is referred to as the setup command throughout the
michaelx_kraudcfa7b12006-07-12 20:39:54 +0000238rest of this document.)
239 NOTE: You should run the setup command at the start of every session.
240 This configures the environment to include the TianoTools and the
241 Java applications and libraries.
242
243You will need to set the WORKSPACE environment variable, or run the edksetup
michaelx_krau561e4a72006-07-13 18:37:28 +0000244script (without any arguments), any time you want to build.
michaelx_kraudcfa7b12006-07-12 20:39:54 +0000245
246 Set the WORKSPACE environment variable, e.g.:
247
248 c:\> set WORKSPACE=C:\MyWork\edkii
249
michaelx_krau561e4a72006-07-13 18:37:28 +0000250You may need to edit the text files Tools/Conf/target.txt and
251Tools/Conf/tools_def.txt (created by edksetup) using your favorite
michaelx_kraudcfa7b12006-07-12 20:39:54 +0000252text editor to ensure that the paths to the tools you want to use
253to build EDK II binaries are correct. These files contain the default
254paths (as per the default installation of the tools), so a customized
255install may require this manual process.
256
michaelx_krau561e4a72006-07-13 18:37:28 +0000257Once this is completed, you are ready to test the build, by executing:
michaelx_kraudcfa7b12006-07-12 20:39:54 +0000258 c:\MyWork\edkii\> build
259
michaelx_krau561e4a72006-07-13 18:37:28 +0000260This command builds the active platform specified in text file target.txt. If
261the active platform is not specified target.txt, you must execute the build
262command from the sub-directory that contains FPD files. For more information
263about the active platform policy, see the “EDK II Build and Packaging
264Architecture Specification.”
michaelx_kraudcfa7b12006-07-12 20:39:54 +0000265
266-------------------------------------------------------------------------------
michaelx_krau561e4a72006-07-13 18:37:28 +0000267Detailed Starting Instructions
268------------------------------
michaelx_kraudcfa7b12006-07-12 20:39:54 +0000269
lhauchaa0bf4f2006-04-26 17:54:57 +0000270Follow the instructions at https://edk2.tianocore.org/servlets/ProjectSource to
michaelx_krau561e4a72006-07-13 18:37:28 +0000271check out the entire EDK II source tree.
lhauchaa0bf4f2006-04-26 17:54:57 +0000272
michaelx_krau561e4a72006-07-13 18:37:28 +0000273In a command window, change to the top-level directory of the EDK II source.
lhauchaa0bf4f2006-04-26 17:54:57 +0000274
lhauch65a1d8a2006-07-12 06:40:42 +0000275If the active compiler tool chain is GCC, you must set the
276environment variable, TOOL_CHAIN to "gcc" before running the
277edksetup script. Example: export TOOL_CHAIN=gcc
lhauchaa0bf4f2006-04-26 17:54:57 +0000278
michaelx_krau561e4a72006-07-13 18:37:28 +0000279To test your tool chain setup and to build the supplied tools, execute:
lhauch65a1d8a2006-07-12 06:40:42 +0000280 c:\MyWork\edkii\> edksetup ForceBuild
lhauchaa0bf4f2006-04-26 17:54:57 +0000281
michaelx_krau561e4a72006-07-13 18:37:28 +0000282On Linux systems, you must source the edksetup.sh file to load the correct
bbahnsen61324292006-07-07 23:39:10 +0000283settings into your shell.
284
285 . edksetup.sh # Note the dot.
286
michaelx_krau561e4a72006-07-13 18:37:28 +0000287The edksetup script is referred to as the setup command throughout the
288rest of this document.
lhauchaa0bf4f2006-04-26 17:54:57 +0000289 NOTE: You should run the setup command at the start of every session.
290 This configures the environment to include the TianoTools and the
291 Java applications and libraries.
292
michaelx_krau561e4a72006-07-13 18:37:28 +0000293Any changes to the tool source code or XML Schema documents require that
294you execute the following:
lhauch65a1d8a2006-07-12 06:40:42 +0000295 c:\MyWork\edkii\> edksetup ForceBuild
296
michaelx_krau561e4a72006-07-13 18:37:28 +0000297You must set the WORKSPACE environment variable, or run the edksetup
298script (without any arguments), any time you want to build.
lhauch65a1d8a2006-07-12 06:40:42 +0000299
300 Set the WORKSPACE environment variable, e.g.:
301
302 c:\> set WORKSPACE=C:\MyWork\edkii
303
michaelx_krau561e4a72006-07-13 18:37:28 +0000304You may need to edit the text files Tools/Conf/target.txt and
305Tools/Conf/tools_def.txt (created by edksetup) using your favorite
michaelx_kraudcfa7b12006-07-12 20:39:54 +0000306text editor to ensure that the paths to the tools you want to use
307to build EDK II binaries are correct. These files contain the default
308paths (as per the default installation of the tools), so a customized
309tool installation may require this manual process.
lhaucha032fb42006-07-06 14:13:56 +0000310
michaelx_krau561e4a72006-07-13 18:37:28 +0000311Once this is completed, you are ready to test the build, by executing:
lhauch65a1d8a2006-07-12 06:40:42 +0000312 c:\MyWork\edkii\> build
lhauchaa0bf4f2006-04-26 17:54:57 +0000313
michaelx_krau561e4a72006-07-13 18:37:28 +0000314This command builds the active platform specified in text file target.txt. If
315the active platform is not specified, go to the sub-directory that contains FPD
316files and execute the build command. For more information about the active
317platform policy, see the “EDK II Build and Packaging Architecture
318Specification.”
bbahnsen90f7b6a2006-06-22 23:19:41 +0000319
michaelx_krau561e4a72006-07-13 18:37:28 +0000320--------------------------
wuyizhonge3f236c2006-07-06 07:22:25 +0000321Individual Platform Builds
michaelx_krau561e4a72006-07-13 18:37:28 +0000322--------------------------
wuyizhonge3f236c2006-07-06 07:22:25 +0000323After running the setup command, you can build individual platforms.
michaelx_krau561e4a72006-07-13 18:37:28 +0000324In the command window:
325 Set the active platform in target.txt, and execute this command:
326 c:\<directory>\> build
327or
328 cd to the platform (FPD file) that you want to build and execute this command:
lhauch65a1d8a2006-07-12 06:40:42 +0000329 c:\MyWork\edkii\EdkNt32Pkg\> build
lhauchaa0bf4f2006-04-26 17:54:57 +0000330
michaelx_krau561e4a72006-07-13 18:37:28 +0000331 Note that the active platform specified in target.txt overrides the platform
332 specified by any FPD file in the current directory. For more information
333 about active platform policy, see the “EDK II Build and Packaging Architecture
334 Specification.”
wuyizhonge3f236c2006-07-06 07:22:25 +0000335
lhauch70edbc32006-07-14 06:46:15 +0000336To run the Nt32 emulation platform under Microsoft Windows, go to
337<full build path>\DEBUG\MSFT\IA32 and execute SecMain.exe
lhauchaa0bf4f2006-04-26 17:54:57 +0000338
michaelx_krau561e4a72006-07-13 18:37:28 +0000339To exit the Nt32 emulation platform, type “reset” at the EFI Shell>
340command prompt. Alternatively, from the graphical interface, select the Boot
341Maintenance Manager's “Reset System” command.
342
michaelx_krau020fa452006-07-18 16:31:13 +0000343 NOTE: When creating a new platform, the Platform Name is restricted
344 to a single word containing alphanumeric characters, underscore, dash,
345 and period. The space character and other special characters are
346 not allowed.
lhauch70edbc32006-07-14 06:46:15 +0000347
michaelx_krau561e4a72006-07-13 18:37:28 +0000348-----------------------
349Notes on Symbolic Debug
350-----------------------
351To enable EFI Symbolic Debugging, make sure the target output is set to DEBUG
352in the text file Tools/Conf/target.txt and then modify the FPD <BuildOptions>
353<Options><Option BuildTargets="DEBUG" ToolCode="CC"> and append the following
354compiler options to the string:
355"/D EFI_GENERATE_SYM_FILE", "/D EFI_SYMBOLIC_DEBUG"
356
357(If the Option line does not contain "/D EFI_DEBUG", you must add that
358option as well.)
lhauch03fed932006-05-24 19:51:36 +0000359
lhauchaa0bf4f2006-04-26 17:54:57 +0000360------------------------
361Individual Module Builds
362------------------------
363After running the setup command, you can build individual modules.
michaelx_krau561e4a72006-07-13 18:37:28 +0000364 In the command window, cd to the module that you want to build, and
365 execute the build command:
lhauch65a1d8a2006-07-12 06:40:42 +0000366 c:\MyWork\edkii\MdePkg\Library\BaseLib\> build
wuyizhonge3f236c2006-07-06 07:22:25 +0000367
michaelx_krau561e4a72006-07-13 18:37:28 +0000368 You must set the active platform in target.txt for individual module builds.
lhauchaa0bf4f2006-04-26 17:54:57 +0000369
370-------------------------------------------------------------------------------
lhauchaa0bf4f2006-04-26 17:54:57 +0000371
372General Information:
373===============================================================
michaelx_krau561e4a72006-07-13 18:37:28 +0000374Mechanisms
lhauchaa0bf4f2006-04-26 17:54:57 +0000375----------
bbahnsen8fb9e6b2006-05-03 22:45:39 +0000376A brief overview:
lhauchaa0bf4f2006-04-26 17:54:57 +0000377
michaelx_krau561e4a72006-07-13 18:37:28 +0000378A) The Surface Area Package Description (SPD) file contains information about
379the modules that the package contains, including the location of all MSA files,
380and public library names and headers that might be provided by a module in the
lhauchaa0bf4f2006-04-26 17:54:57 +0000381package. Packages are defined by SPD files. (Found in the root of the Package
michaelx_krau561e4a72006-07-13 18:37:28 +0000382subdirectory (i.e. EdkNt32Pkg).) The SPD file is further explained in “EDK II
383Build and Packaging Architecture Specification.”
lhauchaa0bf4f2006-04-26 17:54:57 +0000384
385B) Module Surface Area Definition (MSA) files. A description of a module's
386surface area, with all module specific default flags and features specified.
michaelx_krau561e4a72006-07-13 18:37:28 +0000387For additional details, see the "EDK II Module Surface Area Specification" and
388the "EDK II Build and Packaging Architecture Specification."
lhaucha032fb42006-07-06 14:13:56 +0000389
390C) Framework Platform Description (FPD) files. A description of a platform's
391surface are, including a list of modules that are needed by the platform. To
392support individual module builds, developers are not required to provide
michaelx_krau561e4a72006-07-13 18:37:28 +0000393information about specific flash devices, nor flash device layout.
394Specific sections in the FPD file control aspects of the build, such
lhaucha032fb42006-07-06 14:13:56 +0000395as the Supported Architectures and Build Targets, as well as the tool flags
396that are used to create the binary files. A valid platform file can specify
397zero or more modules, so individual modules can be compiled within the context
398of a platform (FPD) definition.
399
michaelx_krau561e4a72006-07-13 18:37:28 +0000400D) Platform Configuration Database (PCD). A platform database that contains a
401variety of current platform settings or directives that can be accessed by a
402driver or application. The PCD is defined by the PCD_Protocol (This is
403further explained in the "EDK II Platform Configuration Database Infrastructure
404Description."
lhauchaa0bf4f2006-04-26 17:54:57 +0000405
lhaucha032fb42006-07-06 14:13:56 +0000406E) Library Class. A library class is a logical grouping of similar functions.
lhauchaa0bf4f2006-04-26 17:54:57 +0000407When developing components, the module surface area declares the class of
lhaucha032fb42006-07-06 14:13:56 +0000408libraries that can be used by the component. The MSA and SPD files can specify
michaelx_krau561e4a72006-07-13 18:37:28 +0000409a recommended instance of the library that a platform integrator (PI) may
410select, however this is only a recommendation. The PI may choose to select a
411different library instance to be used during compilation and linking. All
412library type modules must include header files in their distribution package,
413as well as their MSA files. Components, on the other hand, need provide only an
414MSA file and either source or binary files when distributing packages. The
415Library Classes are further explained in the "EDK II Build and Packaging
416Architecture Specification."
lhauchaa0bf4f2006-04-26 17:54:57 +0000417
418=========================================================================
419The common operations by developers of new modules are:
michaelx_krau561e4a72006-07-13 18:37:28 +0000420-----------------------------------------------
4211) Manually creating a new module in a package:
lhauchaa0bf4f2006-04-26 17:54:57 +0000422 - The module source code must first be created in an appropriate directory
423 (under the package the module is to be a part of.)
424 - An MSA file must be created, spelling out all aspects of the module.
425 - The MSA must be added to the SPD for the package to include the module.
426
michaelx_krau561e4a72006-07-13 18:37:28 +0000427-----------------------------------------------------
4282) Adding and Removing modules to and from a package:
lhauchaa0bf4f2006-04-26 17:54:57 +0000429
michaelx_krau561e4a72006-07-13 18:37:28 +0000430 - Set up environment as Build
431 - Adding a module to a package:
432 - Generate the MSA file
433 - Add a new <Filename> element under <MsaFiles> into
434 <PackageDir>\<PackageName>.spd, using arelative path to the package
435 - Add a new <ModuleSA> entry under each <FrameworkModules> into the
wuyizhonge3f236c2006-07-06 07:22:25 +0000436 <PackageDir>\<PackageName>.fpd file if necessary.
lhauchaa0bf4f2006-04-26 17:54:57 +0000437
michaelx_krau561e4a72006-07-13 18:37:28 +0000438 - Removing a module from a package:
439 - Comment out or remove the corresponding <Filename> element under
440 <MsaFiles> from <PackageDir>\<PackageName>.spd
441 - Comment out or remove the corresponding <ModuleSA> entry under each
wuyizhonge3f236c2006-07-06 07:22:25 +0000442 <FrameworkModules> from <PackageDir>\<PackageName>.fpd if necessary.
lhauchaa0bf4f2006-04-26 17:54:57 +0000443
michaelx_krau561e4a72006-07-13 18:37:28 +0000444-------------------------------
4453) Manually creating a package:
lhauchaa0bf4f2006-04-26 17:54:57 +0000446 - Identify the modules that are to be members of the project.
447 - Identify the Variables and Guids required in and of the Package (including
michaelx_krau561e4a72006-07-13 18:37:28 +0000448 consumption and production information).
lhauchaa0bf4f2006-04-26 17:54:57 +0000449 - Create an SPD file defining these modules and calling out their MSA files.
michaelx_krau561e4a72006-07-13 18:37:28 +0000450 - Add a new <Filename> element under <PackageList> into
451 Tools\Conf\FrameworkDatabase.db, using the relative path to the workspace.
lhauchaa0bf4f2006-04-26 17:54:57 +0000452
michaelx_krau561e4a72006-07-13 18:37:28 +0000453-----------------------------------------
4544) Declaring a new Protocol in a package:
lhauchaa0bf4f2006-04-26 17:54:57 +0000455 - This release requires manual editing of the SPD file, adding the protocol
456 to the ProtocolDeclarations section of the file.
457 - Add the Protocol .h file to the Include\Protocol directory.
lhauch64fcaea2006-04-27 22:47:57 +0000458 - Add an <Entry> to the <ProtocolDeclarations> element in the
459 <PackageName>.spd file
michaelx_krau561e4a72006-07-13 18:37:28 +0000460 - Each line contains Protocol base name, followed by the global variable
461 name, and the hex value of the Protocol GUID.
lhauchaa0bf4f2006-04-26 17:54:57 +0000462
michaelx_krau561e4a72006-07-13 18:37:28 +0000463Example Protocol Entries (NOTE: The Guid entry is a single line in the SPD
464file):
lhauch64fcaea2006-04-27 22:47:57 +0000465<ProtocolDeclarations>
wuyizhonge3f236c2006-07-06 07:22:25 +0000466 <Entry Name="Bds">
467 <C_Name>gEfiBdsArchProtocolGuid</C_Name>
468 <GuidValue>665E3FF6-46CC-11D4-9A38-0090273FC14D</GuidValue>
469 <HelpText/>
470 </Entry>
471 <Entry Name="Cpu">
472 <C_Name>gEfiCpuArchProtocolGuid</C_Name>
473 <GuidValue>26BACCB1-6F42-11D4-BCE7-0080C73C8881</GuidValue>
474 <HelpText/>
475 </Entry>
476</ProtocolDeclarations>
lhauchaa0bf4f2006-04-26 17:54:57 +0000477
michaelx_krau561e4a72006-07-13 18:37:28 +0000478------------------------------------
4795) Declaring a new PPI in a package:
480 - This release requires manual editing of the SPD file
lhauchaa0bf4f2006-04-26 17:54:57 +0000481 - Add the PPI .h file to the Include\Ppi directory.
lhauch64fcaea2006-04-27 22:47:57 +0000482 - Add an <Entry> to the package <PpiDeclarations> element in the
483 <PackageName>.spd file
michaelx_krau561e4a72006-07-13 18:37:28 +0000484 - Each line contains the PPI base name, followed by the global variable
485 name and the hex value of the PPI GUID.
lhauchaa0bf4f2006-04-26 17:54:57 +0000486
lhauch64fcaea2006-04-27 22:47:57 +0000487Example Ppi Entries (NOTE: The Guid entry is a single line in the SPD file):
488<PpiDeclarations>
wuyizhonge3f236c2006-07-06 07:22:25 +0000489 <Entry Name="BootInRecoveryMode">
490 <C_Name>gEfiPeiBootInRecoveryModePpiGuid</C_Name>
491 <GuidValue>17EE496A-D8E4-4B9A-94D1-CE8272300850</GuidValue>
492 <HelpText/>
lhauch64fcaea2006-04-27 22:47:57 +0000493 </Entry>
wuyizhonge3f236c2006-07-06 07:22:25 +0000494 <Entry Name="CpuIo">
495 <C_Name>gEfiPeiCpuIoPpiInServiceTableGuid</C_Name>
496 <GuidValue>E6AF1F7B-FC3F-46DA-A828-A3B457A44282</GuidValue>
497 <HelpText/>
lhauch64fcaea2006-04-27 22:47:57 +0000498 </Entry>
499</PpiDeclarations>
500
michaelx_krau561e4a72006-07-13 18:37:28 +0000501-------------------------------------
5026) Declaring a new GUID in a package:
lhauchaa0bf4f2006-04-26 17:54:57 +0000503 - This release requires manual editing of the SPD file to include the new
lhauch64fcaea2006-04-27 22:47:57 +0000504 Guid. This is identical to adding a ProtocolDeclaration or PpiDeclaration
michaelx_krau561e4a72006-07-13 18:37:28 +0000505 element, as described above.
lhauchaa0bf4f2006-04-26 17:54:57 +0000506
michaelx_krau561e4a72006-07-13 18:37:28 +0000507------------------------------------------
5087) Declaring a new PCD entry in a package:
lhauchaa0bf4f2006-04-26 17:54:57 +0000509 - This release requires manual editing of the SPD file to include the new
lhauch64fcaea2006-04-27 22:47:57 +0000510 PCD. New Pcd entries are added to the PcdDefinitions section of the
michaelx_krau561e4a72006-07-13 18:37:28 +0000511 <PackageName>.spd file using the following example for the format
512 (NOTE: The hex <Token> value must be unique):
lhauch64fcaea2006-04-27 22:47:57 +0000513
klu254c9f9e2006-07-07 06:19:08 +0000514<PcdDeclarations>
lhauch64fcaea2006-04-27 22:47:57 +0000515 <PcdEntry ItemType="FIXED_AT_BUILD">
516 <C_Name>PcdMaximumUnicodeStringLength</C_Name>
517 <Token>0x00000001</Token>
klu254c9f9e2006-07-07 06:19:08 +0000518 <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
lhauch64fcaea2006-04-27 22:47:57 +0000519 <DatumType>UINT32</DatumType>
klu254c9f9e2006-07-07 06:19:08 +0000520 <ValidUsage>FIXED_AT_BUILD</ValidUsage>
lhauch64fcaea2006-04-27 22:47:57 +0000521 <DefaultValue>1000000</DefaultValue>
klu254c9f9e2006-07-07 06:19:08 +0000522 <HelpText>The maximum lengh for unicode string.</HelpText>
lhauch64fcaea2006-04-27 22:47:57 +0000523 </PcdEntry>
klu254c9f9e2006-07-07 06:19:08 +0000524</PcdDeclarations>
lhauchaa0bf4f2006-04-26 17:54:57 +0000525
526------------------------------
michaelx_krau561e4a72006-07-13 18:37:28 +00005278) Declaring a new Library Class:
lhauchaa0bf4f2006-04-26 17:54:57 +0000528 - This release requires manual editing of the SPD file to include the new
lhauch64fcaea2006-04-27 22:47:57 +0000529 Library Class. New Library Class entries are added to the
michaelx_krau561e4a72006-07-13 18:37:28 +0000530 LibraryClassDeclarations section of the <PackageName>.spd file using
lhauch64fcaea2006-04-27 22:47:57 +0000531 the following example for the format:
532
533<LibraryClassDeclarations>
wuyizhonge3f236c2006-07-06 07:22:25 +0000534 <LibraryClass Name="BaseLib">
lhauch64fcaea2006-04-27 22:47:57 +0000535 <IncludeHeader>Include/Library/BaseLib.h</IncludeHeader>
wuyizhonge3f236c2006-07-06 07:22:25 +0000536 <HelpText/>
537 </LibraryClass>
538 <LibraryClass Name="BaseMemoryLib">
539 <IncludeHeader>Include/Library/BaseMemoryLib.h</IncludeHeader>
540 <HelpText/>
541 </LibraryClass>
lhauch64fcaea2006-04-27 22:47:57 +0000542</LibraryClassDeclarations>
lhauchaa0bf4f2006-04-26 17:54:57 +0000543
lhauchaa0bf4f2006-04-26 17:54:57 +0000544=======================================================
michaelx_krau561e4a72006-07-13 18:37:28 +0000545EDK II Changes Relative to the original EDK:
546--------------------------------------------
michaelx_krau13421852006-07-05 20:41:25 +0000547The EDK II represents significant changes in the structure of the EDK.
michaelx_krau561e4a72006-07-13 18:37:28 +0000548Therefore, it is very difficult to isolate all of the changes of this version of
549the EDK with the original EDK.
lhauchaa0bf4f2006-04-26 17:54:57 +0000550
551Of particular note:
552
michaelx_krau13421852006-07-05 20:41:25 +00005531) EDK II contains new hardware feature support for the ICH SMBUS Libraries.
lhauchaa0bf4f2006-04-26 17:54:57 +0000554 These libraries are provided to make Memory Reference Code (MRC) development
555 easier.
michaelx_krau561e4a72006-07-13 18:37:28 +00005562) The MDE libraries represent significant changes in source
lhauchaa0bf4f2006-04-26 17:54:57 +0000557 (with only limited changes in functionality.) These new libraries conform
michaelx_krau561e4a72006-07-13 18:37:28 +0000558 to the "EDK II Module Development Environment Library Specification.”
lhauchaa0bf4f2006-04-26 17:54:57 +00005593) The Fat Binary and the EDK Shell Binary Packages are functionally identical
michaelx_krau561e4a72006-07-13 18:37:28 +0000560 to the original EDK.
lhauchaa0bf4f2006-04-26 17:54:57 +00005614) The EDK tools directory has been expanded to include more tools and more
562 tool functionality.
5635) The EDK NT32 section has been ported to the new build process, but
michaelx_krau561e4a72006-07-13 18:37:28 +0000564 functionally remains the same as the original EDK.
michaelx_krau13421852006-07-05 20:41:25 +00005656) The Application "HelloWorld" has been ported to EDK II as well.
lhauchaa0bf4f2006-04-26 17:54:57 +0000566
567=======================================================
568Virus scanned by McAfee VirusScan Enterprise 8.0.0, Virus Definitions 4718, no
569virus detected.
570