]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - BuildNotes.txt
Remove Driver Health sample driver from OptionRomPkg.
[mirror_edk2.git] / BuildNotes.txt
... / ...
CommitLineData
1Intel(R) Platform Innovation Framework for EFI\r
2EFI Development Kit II (EDK II)\r
3Root Package 1.00\r
42006-11-08\r
5\r
6Intel is a trademark or registered trademark of Intel Corporation or its\r
7subsidiaries in the United States and other countries.\r
8* Other names and brands may be claimed as the property of others.\r
9Copyright (c) 2006 - 2007, Intel Corporation\r
10\r
11This document provides updates to documentation, along with a description on\r
12how to install and build the EDK II.\r
13\r
14Package Contents\r
15----------------\r
16 BuildNotes.txt - The build notes for this package.\r
17 OldMdePkg - Industry-standard headers and libraries\r
18 Tools - Build -specific tools that are designed to help the\r
19 developer create and modify drivers and libraries\r
20 EdkModulePkg - Reference drivers\r
21 EdkFatBinPkg - Binary DXE drivers for the Fat 32 file system\r
22 EdkShellBinPkg - Binary Shell applications and commands\r
23 EdkNt32Pkg - NT32 Emulation platform reference\r
24 EdkUnixPkg - Posix/Unix Emulation platform reference (Currently this\r
25 builds only on ia32 Linux, but is meant to be portable.)\r
26\r
27Note: MDE and MDK that appear in other documentation refer to the OldMdePkg and\r
28Tools packages, respectively. While, these two packages are the minimum\r
29requirement for developing EDK II Packages we recommend that you download all\r
30of the top-level files listed above.\r
31\r
32The following package is available as a separate project, under a separate\r
33license, on the TianoCore.org website: https://fat-driver2.tianocore.org\r
34\r
35 EdkFatPkg - A package containing source DXE drivers for the Fat 32 file\r
36 system\r
37\r
38Documents have the following filenames (to download these documents, see "Notes\r
39on Documentation" later in these Release Notes):\r
40 EDK II Module Development Environment Library Specification, v0.58\r
41 (MDE_Library_Spec_0_58.rtf)\r
42 EDK II Build and Packaging Architecture Specification, v0.53\r
43 (Build_Packaging_Spec_0_53.rtf)\r
44 EDK II Platform Configuration Database Infrastructure Description, v0.54\r
45 (PCD_Infrastructure_0_54.rtf)\r
46 EDK II Module Surface Area Specification, v0.51\r
47 (Module_Surface_Area_0_50.rtf)\r
48 EDK II Module Development Environment Package Specification, v0.51\r
49 (MDE_Package_Spec_0_51.rtf)\r
50 EDK II C Coding Standards Specification v0.51\r
51 (C_Coding_Standards_Specification_ 0_51.rtf)\r
52 EDK II Subversion Setup Guide\r
53 (edk2-subversion-setup.rtf)\r
54\r
55Pre-Requisites\r
56--------------\r
57The following list of tools must be installed on the development workstation\r
58prior to using the EDK II.\r
59\r
60Compiler Tool Chain\r
61 Microsoft* Visual Studio .NET 2003* (http://www.microsoft.com)\r
62 or\r
63 A special GCC version 4.x or later (http://gcc.gnu.org). See below.\r
64\r
65Assembler Tool Chain\r
66 Microsoft Macro Assembler, version 6.15 or later\r
67 or\r
68 GNU binutils 2.16.1 or later\r
69 (Http://ftp.gnu.org/gnu/binutils)\r
70\r
71Java Development Kit ( Java 5.0 or later)\r
72 Sun* jdk-1.5.0_06 or later (http://java.sun.com)\r
73 or\r
74 Bea Systems* jrockit-25.2.0-jdk1.5.0_03 or later (http://www.bea.com)\r
75\r
76Java Tools\r
77 Apache-ANT, version 1.6.5 or later (http://ant.apache.org)\r
78 Ant-contrib, version 1.0b2 or later\r
79 (http://prdownloads.sourceforge.net/ant-contrib/ant-contrib-1.0b2-bin.zip?download)\r
80 Saxon8, version 8.1.1\r
81 (http://prdownloads.sourceforge.net/saxon/saxonb8-1-1.zip?download)\r
82 XMLBeans, version 2.1.0 (http://xmlbeans.apache.org)\r
83 DO NOT download the latest XMLBeans, version 2.2.0. It is not compatible\r
84 with Saxon8, version 8.1.1.\r
85\r
86Other Tools\r
87 TortoiseSVN version 1.3.3. (http://tortoisesvn.tigris.org/)\r
88\r
89Optional Tools\r
90--------------\r
91Compiler Tool Chains:\r
92 Intel(R) C++ Compiler for Windows*, ver. 9.0 or later (http://www.intel.com)\r
93 Intel(R) C Compiler for EFI Byte Code, ver. 1.2 or later\r
94 (http://www.intel.com/cd/software/products/asmo-na/eng/compilers/efibc/index.htm)\r
95 Microsoft Driver Development Kit, version 3790.1830 or later\r
96 (http://www.microsoft.com/whdc/devtools/ddk/orderddkcd.mspx)\r
97 Microsoft ACPI Source Language Assembler, Version 1.0.13NT or later\r
98 Intel ACPI Component Architecture, version 20060113\r
99\r
100Python\r
101\r
102 There are several tools implemented in Python and wxPython Widgets in the\r
103 Tools/Python directory. These are optional tools, and are not necessary in\r
104 order to use or build the edk2 code. In order to use them you must\r
105 install Python 2.4.x and wxWidgets 2.8.x for your platform. The tools\r
106 have been tested and work correctly on OS X, Linux and Windows.\r
107\r
108 There is a script called Install_Python_OSX.sh that will download and\r
109 install the correct versions for OS X. For other platforms, please find\r
110 the installers for your platform at the following sites:\r
111\r
112 - http://www.python.org/download/releases/2.4.4/ (Python interpreter)\r
113 - http://www.wxpython.org/download.php#binaries (Python GUI extensions)\r
114\r
115 Your linux distribution may contain packages of python and wxPython, which\r
116 should work, provided they are are compatible with the above specified\r
117 versions.\r
118\r
119-----------------------------------------------\r
120Notes on Required Tools (Source Control System)\r
121-----------------------------------------------\r
122The EDK II is being managed by the Subversion Source Control on Tianocore.org.\r
123Subversion provides speed, security, and additional features. The\r
124recommended client is TortoiseSVN version 1.3.3.\r
125 (Available at http://tortoisesvn.tigris.org/)\r
126\r
127The checkout procedures on the Tianocore.org Web site include\r
128instructions for the use of Subversion Source Control.\r
129\r
130The URL of the EDK II repository is:\r
131 https://edk2.tianocore.org/svn/edk2/trunk/edk2\r
132\r
133\r
134--------------------------------------------------------------------\r
135Notes On Required Tools (With examples for Windows, OS X, and Linux*)\r
136--------------------------------------------------------------------\r
137Software Installation Order:\r
138 After installing the compiler tools and your Subversion client, install the\r
139 following required tools in this order:\r
140 1. Java JDK\r
141 2. Apache-Ant\r
142 3. ant-contrib\r
143 4. xmlbeans\r
144 5. saxon8\r
145\r
146Java Development Kit:\r
147\r
148 The Java Environment Variable must be set before attempting to build.\r
149 For Sun JDK (see note below?:\r
150 set JAVA_HOME=c:\Java\jdk1.5.0_06 (Windows example)\r
151 export JAVA_HOME=/Library/Java/Home/ (OS X example)\r
152 export JAVA_HOME=/usr/lib/j2sdk1.5-sun/ (Linux example)\r
153 For Bea Systems:\r
154 set JAVA_HOME=c:\Java\jrockit-R26.0.0-jdk1.5.0_04\r
155\r
156 When using the Sun JDK5.0:\r
157 During installation, you should specify the install directory as C:\Java\r
158 instead of C:\Program Files\(or some other drive letter.) While installing\r
159 to this non-standard location is not required, in practice, it seems to work\r
160 more reliably.\r
161 For the JDK, the install path is C:\Java\jdk1.5.0_06\r
162 For the JRE, the install path is C:\Java\jre1.5.0_06\r
163 Alternatively, you can specify C:\sunjavajdk and C:\sunjavajre.\r
164\r
165 NOTE: You cannot combine the location for the JDK and the JRE, because the\r
166 JRE install removes most of the binaries and libraries installed by the JDK\r
167 install.\r
168\r
169Java Tools:\r
170 The Apache-ANT requires the ANT_HOME environment variable to be set before\r
171 attempting to build:\r
172 set ANT_HOME=c:\<full path to where ant was installed>\r
173 export ANT_HOME=~/ExternalTools/apache-ant (OS X and Linux example)\r
174\r
175 The ant-contrib.jar file should be installed in the %ANT_HOME%\lib\r
176 directory.\r
177\r
178 XMLBeans, requires the XMLBEANS_HOME environment variable to be set\r
179 before attempting to build:\r
180 set XMLBEANS_HOME=C:\<full path to where xmlbeans was installed>\r
181 export XMLBEANS_HOME=~/ExternalTools/xmlbeans (OS X and Linux example)\r
182\r
183 Copy the saxon8.jar file to the %XMLBEANS_HOME%\lib directory.\r
184\r
185 The Ant and XMLBean tools must be in the path.\r
186 MS system example:\r
187 set PATH=%PATH%;%ANT_HOME%\bin;%XMLBEANS_HOME%\bin\r
188 Linux/OS X bash shell example:\r
189 export PATH=$PATH:${ANT_HOME}/bin:${XMLBEANS_HOME}/bin\r
190\r
191--------------------\r
192A Word on Apache-ANT\r
193--------------------\r
194The Apache-ANT program is a build tool that uses XML-based project files.\r
195Similar to Makefiles, these project files may contain multiple targets. Most\r
196build.xml files in EDK II are auto-generated; any edits performed on the\r
197build.xml files will be overwritten by the next build.\r
198\r
199Pre-defined targets in the build.xml file include:\r
200 all - This target builds binaries for defined architectures.\r
201 clean - This target removes object files generated by commands.\r
202 cleanall - This target removes all generated files and directories.\r
203\r
204Use the ANT option, -emacs, to remove the [cc] characters when an error occurs\r
205to provide a method for the Visual Studio IDE to open a file by double\r
206clicking the mouse on the file. Add -emacs to the end of the build command.\r
207----------------------------\r
208A Word on the GCC Tool Chain\r
209----------------------------\r
210\r
211EDK II will not compile with a standard Linux gcc tool chain. While Linux\r
212distributions are usually based on ELF, EDK II requires a version of gcc that\r
213is configured to produce PE-COFF images. You will find a script in <Root of\r
214EDK2 tree>/Tools/gcc/tianoCross-gcc-4.1 that will download, configure, compile,\r
215and install a gcc 4.1 cross-compile tool chain for EDK II development. This\r
216custom tool chain supports the IA-32 architecture. It can be built and run on\r
217Cygwin, Linux, and many other POSIX-compliant host operating environments. To\r
218compile the custom gcc tool chain, you need the following tools on your host\r
219computer: bash, gcc, gmake, curl (or wget).\r
220\r
221Only the OldMdePkg, EdkModulePkg and EdkUnixPkg are currently supported by gcc\r
222builds. Other builds, such as the EdkNt32Pkg, will not compile with gcc. By\r
223default, the edk2 will try to build the NT32.fpd, which is not supported by\r
224gcc. So, you need to change the Tools/Conf/target.txt.\r
225\r
226The cross-compile build script has been tested on Cygwin, OS X and Linux. You\r
227should expect to hack on these scripts to make them work on your system. You\r
228may need to install additional tools on your system to make the scripts work.\r
229\r
230You will need\r
231\r
232 A recent version (3.0 or later should be fine) of gcc that is able to produce\r
233 executables for the machine that you want to run this compiler on (the host\r
234 machine).\r
235 wget or curl (which enables the download of the gcc compiler source code)\r
236 tar\r
237 bzip\r
238 gzip\r
239 bash\r
240 and possibly others\r
241\r
242CYGWIN Notes\r
243\r
244You should setup cygwin to use binmode on all mounts. When you initially\r
245install cygwin it gives you the choice of Unix file mode (recommended) or DOS\r
246file mode. Unix mode will cause all the cygwin directories to be mounted in\r
247binmode, while DOS will mount the dirs in textmode. Here is an example of a\r
248cygwin install where the dirs are (properly) mounted in binmode.\r
249To view mount information, type:\r
250 mount\r
251\r
252C:\cygwin\bin on /usr/bin type user (binmode)\r
253C:\cygwin\lib on /usr/lib type user (binmode)\r
254c:\workspace on /workspace type system (binmode)\r
255C:\cygwin on / type user (binmode)\r
256\r
257If you use textmode, it is likely that the build will fail in a way that is\r
258hard to debug. Textmode is required to retain or add the DOS ^M characters\r
259in DOS batch files during file editing sessions.\r
260\r
261You can switch from textmode to binmode for compilation by executing the\r
262following:\r
263 mount -b --change-cygdrive-prefix cygdrive\r
264\r
265Cygwin is pretty slow, so it is not recommended for large builds.\r
266\r
267\r
268\r
269\r
270\r
271The platform to be built is identified by the Tools/Conf/target.txt file:\r
272\r
273#\r
274# PROPERTY Type Use Description\r
275# ---------------- -------- -------- -----------------------------------------------------------\r
276# ACTIVE_PLATFORM Filename Recommended Specify the WORKSPACE relative Path and Filename\r
277# of the platform FPD file that will be used for the build\r
278# This line is required if and only if the current working\r
279# directory does not contain one or more FPD files.\r
280\r
281ACTIVE_PLATFORM =\r
282\r
283You can leave it black, as above, or set it to any .fpd file in the workspace.\r
284If you leave it blank, then you just cd to the dir that contains the .fpd that\r
285you would like to build (OldMdePkg/ or EdkModulePkg/) and then type build.\r
286\r
287----------------------------\r
288A Word on compiling on Linux\r
289----------------------------\r
290\r
291In order to compile on Linux, you will need to have the e2fsprogs-devel package\r
292installed. Check your distribution for the rpm, deb or other package format.\r
293This package contains the uuid library and header that are used by some of the\r
294host tools.\r
295\r
296If you are running on x86_64 Linux, then you should install a 64 bit version of\r
297the Java JDK. The version that was used was jdk-1_5_0_07-linux-amd64-rpm.bin.\r
298It may be downloaded from sun.com.\r
299\r
300-----------------------------------------\r
301A Word on compiling under Cygwin with gcc\r
302-----------------------------------------\r
303\r
304Cygwin is a POSIX style operating environment for Windows. It is possible to\r
305compile the EDK 2 using gcc and cygwin. Compiling under cygwin is slow, because\r
306the underlying file accesses are slow in cygwin. For this reason, we do not\r
307encourage the use of cygwin. A true unix system will be a superior choice for\r
308those wishing to compile with gcc.\r
309\r
310Make sure that you select the e2fsprogs development package when you install\r
311cygwin. It is necessary for the GenFvImage tool.\r
312\r
313----------------------------------------\r
314A Word on gcc for Processor Architectures\r
315----------------------------------------\r
316\r
317Currently gcc support is limited to IA-32 builds, generating IA-32 PE32 images.\r
318\r
319The X64 bit (Intel 64, etc.) support under the gcc compiler does not support the EFIAPI\r
320calling convention (as defined in the UEFI 2.0 specification Chapter 2), so it is not\r
321possible to build a working EFI image for an X64 environment. Since the x64 gcc does\r
322not support the EFIAPI calling convention the x64 tools do not support generating a\r
323PE32+ image. The EFIAPI calling convention is very similar to the Microsoft x64\r
324calling convention.\r
325\r
326We have added prelinary support for the MinGW64 Tool chain. This gcc tool\r
327chain is ported to follow the Microsft X64 ABI, and therefore is compatible\r
328with the EFI specification.\r
329\r
330On Itanium?Processors the gcc compiler does not support generating a PE32+ image.\r
331\r
332----------------------------------------\r
333A Word on EdkUnixPkg -- The Unix simulator\r
334----------------------------------------\r
335\r
336A unix port of the Nt32 simulator has been added to the project. It currently\r
337builds and runs on 32 bit Linux, but should be portable to other Unix\r
338variants. In order to build it, you should use the ELFGCC tool chain defintion\r
339in tools_def.txt, which is set in target.txt. These are two settings to make\r
340in Tools/Conf/target.txt:\r
341\r
342ACTIVE_PLATFORM = EdkUnixPkg/Unix.fpd\r
343TOOL_CHAIN_TAG = ELFGCC\r
344\r
345Once that is setup, type build, and then you will end up with the simulator in\r
346Build/Unix/DEBUG_ELFGCC/IA32/SecMain.exe.\r
347\r
348In order to use the gdb debugger with the simulator, you may need to load the\r
349correct symbol file for the various modules that are loaded. For example,\r
350\r
351add-symbol-file EdkModulePkg/Bus/Pci/PciBus/Dxe/PciBus/DEBUG/./PciBus.dll\r
3520x45dc6000\r
353\r
354You can see the names of the symbol files (they are in ELF format even though\r
355the extension is .dll) printed on the screen as the simulator comes up.\r
356\r
357-----------------------\r
358Notes on Documentation\r
359-----------------------\r
360The documents are being managed by the Subversion Source Control on\r
361Tianocore.org. The document repository is "docs" and must be checked out\r
362separately from the EDK II source tree. Refer to the checkout procedures on\r
363the Tianocore.org Web site for EDK II.\r
364\r
365The URL of the document repository is:\r
366 https://edk2.tianocore.org/svn/edk2/trunk/docs\r
367\r
368\r
369-------------------------------------------------------------------------------\r
370Quick Start\r
371-----------\r
372(assumes Microsoft Tools and OS environment, for GCC Tools or Linux, see\r
373"Detailed Starting Instructions" below)\r
374\r
375Follow the instructions at https://edk2.tianocore.org/servlets/ProjectSource to\r
376check out the entire EDK II source tree.\r
377\r
378In a command window, change to the top-level directory of the EDK II source.\r
379\r
380To test your tool chain setup and to build the supplied tools, execute:\r
381 c:\MyWork\edk2\> edksetup ForceRebuild\r
382\r
383(The edksetup script is referred to as the setup command throughout the\r
384rest of this document.)\r
385 NOTE: You should run the setup command at the start of every session.\r
386 This configures the environment to include the TianoTools and the\r
387 Java applications and libraries.\r
388\r
389You will need to set the WORKSPACE environment variable, or run the edksetup\r
390script (without any arguments), any time you want to build.\r
391\r
392 Set the WORKSPACE environment variable, e.g.:\r
393\r
394 c:\> set WORKSPACE=C:\MyWork\edk2\r
395\r
396You may need to edit the text files Tools/Conf/target.txt and\r
397Tools/Conf/tools_def.txt (created by edksetup) using your favorite\r
398text editor to ensure that the paths to the tools you want to use\r
399to build EDK II binaries are correct. These files contain the default\r
400paths (as per the default installation of the tools), so a customized\r
401install may require this manual process.\r
402\r
403Once this is completed, you are ready to test the build, by executing:\r
404 c:\MyWork\edk2\> build\r
405\r
406This command builds the active platform specified in text file target.txt. If\r
407the active platform is not specified target.txt, you must execute the build\r
408command from the sub-directory that contains FPD files. For more information\r
409about the active platform policy, see the "EDK II Build and Packaging\r
410Architecture Specification."\r
411\r
412-------------------------------------------------------------------------------\r
413Detailed Starting Instructions\r
414------------------------------\r
415\r
416Follow the instructions at https://edk2.tianocore.org/servlets/ProjectSource to\r
417check out the entire EDK II source tree.\r
418\r
419In a command window, change to the top-level directory of the EDK II source.\r
420\r
421If the active compiler tool chain is GCC, you must set the\r
422environment variable, TOOL_CHAIN to "gcc" before running the\r
423edksetup script. Example: export TOOL_CHAIN=gcc\r
424\r
425To test your tool chain setup and to build the supplied tools, execute:\r
426 c:\MyWork\edk2\> edksetup ForceRebuild\r
427\r
428On Linux systems, you must source the edksetup.sh file to load the correct\r
429settings into your shell.\r
430\r
431 . edksetup.sh # Note the dot.\r
432\r
433If you have recently updated your code from subversion, the tools will need to\r
434be rebuilt if there were any code changes made to them. You can request that\r
435the tools get rebuilt by typing:\r
436\r
437 . edksetup.sh Rebuild # Unix-like systems\r
438 edksetup.bat Rebuild # Windows\r
439\r
440The edksetup script is referred to as the setup command throughout the\r
441rest of this document.\r
442 NOTE: You should run the setup command (edksetup)at the start of every\r
443 session. This configures the environment to include the\r
444 TianoTools and the Java applications and libraries.\r
445\r
446Any changes to the tool source code or XML Schema documents require that\r
447you execute the following:\r
448 c:\MyWork\edk2\> edksetup ForceRebuild\r
449\r
450You must set the WORKSPACE environment variable, or run the edksetup\r
451script (without any arguments), any time you want to build.\r
452\r
453 Set the WORKSPACE environment variable, e.g.:\r
454\r
455 c:\> set WORKSPACE=C:\MyWork\edk2\r
456\r
457You may need to edit the text files Tools/Conf/target.txt and\r
458Tools/Conf/tools_def.txt (created by edksetup) using your favorite\r
459text editor to ensure that the paths to the tools you want to use\r
460to build EDK II binaries are correct. These files contain the default\r
461paths (as per the default installation of the tools), so a customized\r
462tool installation may require this manual process.\r
463\r
464Once this is completed, you are ready to test the build, by executing:\r
465 c:\MyWork\edk2\> build\r
466\r
467This command builds the active platform specified in text file target.txt. If\r
468the active platform is not specified, go to the sub-directory that contains FPD\r
469files and execute the build command. For more information about the active\r
470platform policy, see the "EDK II Build and Packaging Architecture\r
471Specification."\r
472\r
473--------------------------\r
474Individual Platform Builds\r
475--------------------------\r
476After running the setup command, you can build individual platforms.\r
477In the command window:\r
478 Set the active platform in target.txt, and execute this command:\r
479 c:\<directory>\> build\r
480or\r
481 cd to the platform (FPD file) that you want to build and execute this command:\r
482 c:\MyWork\edk2\EdkNt32Pkg\> build\r
483\r
484 Note that the active platform specified in target.txt overrides the platform\r
485 specified by any FPD file in the current directory. For more information\r
486 about active platform policy, see the "EDK II Build and Packaging Architecture\r
487 Specification."\r
488\r
489To run the Nt32 emulation platform under Microsoft Windows, go to\r
490<full build path>\DEBUG\MSFT\IA32 and execute SecMain.exe\r
491\r
492To exit the Nt32 emulation platform, type "reset" at the EFI Shell>\r
493command prompt. Alternatively, from the graphical interface, select the Boot\r
494Maintenance Manager's "Reset System" command.\r
495\r
496 NOTE: When creating a new platform, the Platform Name is restricted\r
497 to a single word containing alphanumeric characters, underscore, dash,\r
498 and period. The space character and other special characters are\r
499 not allowed.\r
500\r
501-----------------------\r
502Notes on Symbolic Debug\r
503-----------------------\r
504To enable EFI Symbolic Debugging, make sure the target output is set to DEBUG\r
505in the text file Tools/Conf/target.txt and then modify the FPD <BuildOptions>\r
506<Options><Option BuildTargets="DEBUG" ToolCode="CC"> and append the following\r
507compiler options to the string:\r
508"/D EFI_GENERATE_SYM_FILE", "/D EFI_SYMBOLIC_DEBUG"\r
509\r
510(If the Option line does not contain "/D EFI_DEBUG", you must add that\r
511option as well.)\r
512\r
513------------------------\r
514Individual Module Builds\r
515------------------------\r
516After running the setup command, you can build individual modules.\r
517 In the command window, cd to the module that you want to build, and\r
518 execute the build command:\r
519 c:\MyWork\edk2\OldMdePkg\Library\BaseLib\> build\r
520\r
521 You must set the active platform in target.txt for individual module builds.\r
522\r
523-------------------------------------------------------------------------------\r
524\r
525General Information:\r
526===============================================================\r
527Mechanisms\r
528----------\r
529A brief overview:\r
530\r
531A) The Surface Area Package Description (SPD) file contains information about\r
532the modules that the package contains, including the location of all MSA files,\r
533and public library names and headers that might be provided by a module in the\r
534package. Packages are defined by SPD files. (Found in the root of the Package\r
535subdirectory (i.e. EdkNt32Pkg).) The SPD file is further explained in "EDK II\r
536Build and Packaging Architecture Specification."\r
537\r
538B) Module Surface Area Definition (MSA) files. A description of a module's\r
539surface area, with all module specific default flags and features specified.\r
540For additional details, see the "EDK II Module Surface Area Specification" and\r
541the "EDK II Build and Packaging Architecture Specification."\r
542\r
543C) Framework Platform Description (FPD) files. A description of a platform's\r
544surface are, including a list of modules that are needed by the platform. To\r
545support individual module builds, developers are not required to provide\r
546information about specific flash devices, nor flash device layout.\r
547Specific sections in the FPD file control aspects of the build, such\r
548as the Supported Architectures and Build Targets, as well as the tool flags\r
549that are used to create the binary files. A valid platform file can specify\r
550zero or more modules, so individual modules can be compiled within the context\r
551of a platform (FPD) definition.\r
552\r
553D) Platform Configuration Database (PCD). A platform database that contains a\r
554variety of current platform settings or directives that can be accessed by a\r
555driver or application. The PCD is defined by the PCD_Protocol (This is\r
556further explained in the "EDK II Platform Configuration Database Infrastructure\r
557Description."\r
558\r
559E) Library Class. A library class is a logical grouping of similar functions.\r
560When developing components, the module surface area declares the class of\r
561libraries that can be used by the component. The MSA and SPD files can specify\r
562a recommended instance of the library that a platform integrator (PI) may\r
563select, however this is only a recommendation. The PI may choose to select a\r
564different library instance to be used during compilation and linking. All\r
565library type modules must include header files in their distribution package,\r
566as well as their MSA files. Components, on the other hand, need provide only an\r
567MSA file and either source or binary files when distributing packages. The\r
568Library Classes are further explained in the "EDK II Build and Packaging\r
569Architecture Specification."\r
570\r
571=========================================================================\r
572The common operations by developers of new modules are:\r
573-----------------------------------------------\r
5741) Manually creating a new module in a package:\r
575 - The module source code must first be created in an appropriate directory\r
576 (under the package the module is to be a part of.)\r
577 - An MSA file must be created, spelling out all aspects of the module.\r
578 - The MSA must be added to the SPD for the package to include the module.\r
579\r
580-----------------------------------------------------\r
5812) Adding and Removing modules to and from a package:\r
582\r
583 - Set up environment as Build\r
584 - Adding a module to a package:\r
585 - Generate the MSA file\r
586 - Add a new <Filename> element under <MsaFiles> into\r
587 <PackageDir>\<PackageName>.spd, using arelative path to the package\r
588 - Add a new <ModuleSA> entry under each <FrameworkModules> into the\r
589 <PackageDir>\<PackageName>.fpd file if necessary.\r
590\r
591 - Removing a module from a package:\r
592 - Comment out or remove the corresponding <Filename> element under\r
593 <MsaFiles> from <PackageDir>\<PackageName>.spd\r
594 - Comment out or remove the corresponding <ModuleSA> entry under each\r
595 <FrameworkModules> from <PackageDir>\<PackageName>.fpd if necessary.\r
596\r
597-------------------------------\r
5983) Manually creating a package:\r
599 - Identify the modules that are to be members of the project.\r
600 - Identify the Variables and Guids required in and of the Package (including\r
601 consumption and production information).\r
602 - Create an SPD file defining these modules and calling out their MSA files.\r
603 - Add a new <Filename> element under <PackageList> into\r
604 Tools\Conf\FrameworkDatabase.db, using the relative path to the workspace.\r
605\r
606-----------------------------------------\r
6074) Declaring a new Protocol in a package:\r
608 - This release requires manual editing of the SPD file, adding the protocol\r
609 to the ProtocolDeclarations section of the file.\r
610 - Add the Protocol .h file to the Include\Protocol directory.\r
611 - Add an <Entry> to the <ProtocolDeclarations> element in the\r
612 <PackageName>.spd file\r
613 - Each line contains Protocol base name, followed by the global variable\r
614 name, and the hex value of the Protocol GUID.\r
615\r
616Example Protocol Entries (NOTE: The Guid entry is a single line in the SPD\r
617file):\r
618<ProtocolDeclarations>\r
619 <Entry Name="Bds">\r
620 <C_Name>gEfiBdsArchProtocolGuid</C_Name>\r
621 <GuidValue>665E3FF6-46CC-11D4-9A38-0090273FC14D</GuidValue>\r
622 <HelpText/>\r
623 </Entry>\r
624 <Entry Name="Cpu">\r
625 <C_Name>gEfiCpuArchProtocolGuid</C_Name>\r
626 <GuidValue>26BACCB1-6F42-11D4-BCE7-0080C73C8881</GuidValue>\r
627 <HelpText/>\r
628 </Entry>\r
629</ProtocolDeclarations>\r
630\r
631------------------------------------\r
6325) Declaring a new PPI in a package:\r
633 - This release requires manual editing of the SPD file\r
634 - Add the PPI .h file to the Include\Ppi directory.\r
635 - Add an <Entry> to the package <PpiDeclarations> element in the\r
636 <PackageName>.spd file\r
637 - Each line contains the PPI base name, followed by the global variable\r
638 name and the hex value of the PPI GUID.\r
639\r
640Example Ppi Entries (NOTE: The Guid entry is a single line in the SPD file):\r
641<PpiDeclarations>\r
642 <Entry Name="BootInRecoveryMode">\r
643 <C_Name>gEfiPeiBootInRecoveryModePpiGuid</C_Name>\r
644 <GuidValue>17EE496A-D8E4-4B9A-94D1-CE8272300850</GuidValue>\r
645 <HelpText/>\r
646 </Entry>\r
647 <Entry Name="CpuIo">\r
648 <C_Name>gEfiPeiCpuIoPpiInServiceTableGuid</C_Name>\r
649 <GuidValue>E6AF1F7B-FC3F-46DA-A828-A3B457A44282</GuidValue>\r
650 <HelpText/>\r
651 </Entry>\r
652</PpiDeclarations>\r
653\r
654-------------------------------------\r
6556) Declaring a new GUID in a package:\r
656 - This release requires manual editing of the SPD file to include the new\r
657 Guid. This is identical to adding a ProtocolDeclaration or PpiDeclaration\r
658 element, as described above.\r
659\r
660------------------------------------------\r
6617) Declaring a new PCD entry in a package:\r
662 - This release requires manual editing of the SPD file to include the new\r
663 PCD. New Pcd entries are added to the PcdDefinitions section of the\r
664 <PackageName>.spd file using the following example for the format\r
665 (NOTE: The hex <Token> value must be unique):\r
666\r
667<PcdDeclarations>\r
668 <PcdEntry ItemType="FIXED_AT_BUILD">\r
669 <C_Name>PcdMaximumUnicodeStringLength</C_Name>\r
670 <Token>0x00000001</Token>\r
671 <TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
672 <DatumType>UINT32</DatumType>\r
673 <ValidUsage>FIXED_AT_BUILD</ValidUsage>\r
674 <DefaultValue>1000000</DefaultValue>\r
675 <HelpText>The maximum lengh for unicode string.</HelpText>\r
676 </PcdEntry>\r
677</PcdDeclarations>\r
678\r
679------------------------------\r
6808) Declaring a new Library Class:\r
681 - This release requires manual editing of the SPD file to include the new\r
682 Library Class. New Library Class entries are added to the\r
683 LibraryClassDeclarations section of the <PackageName>.spd file using\r
684 the following example for the format:\r
685\r
686<LibraryClassDeclarations>\r
687 <LibraryClass Name="BaseLib">\r
688 <IncludeHeader>Include/Library/BaseLib.h</IncludeHeader>\r
689 <HelpText/>\r
690 </LibraryClass>\r
691 <LibraryClass Name="BaseMemoryLib">\r
692 <IncludeHeader>Include/Library/BaseMemoryLib.h</IncludeHeader>\r
693 <HelpText/>\r
694 </LibraryClass>\r
695</LibraryClassDeclarations>\r
696\r
697=======================================================\r
698EDK II Changes Relative to the original EDK:\r
699--------------------------------------------\r
700The EDK II represents significant changes in the structure of the EDK.\r
701Therefore, it is very difficult to isolate all of the changes of this version of\r
702the EDK with the original EDK.\r
703\r
704Of particular note:\r
705\r
7061) EDK II contains new hardware feature support for the ICH SMBUS Libraries.\r
707 These libraries are provided to make Memory Reference Code (MRC) development\r
708 easier.\r
7092) The MDE libraries represent significant changes in source\r
710 (with only limited changes in functionality.) These new libraries conform\r
711 to the "EDK II Module Development Environment Library Specification.?\r
7123) The Fat Binary and the EDK Shell Binary Packages are functionally identical\r
713 to the original EDK.\r
7144) The EDK tools directory has been expanded to include more tools and more\r
715 tool functionality.\r
7165) The EDK NT32 section has been ported to the new build process, but\r
717 functionally remains the same as the original EDK.\r
7186) The Application "HelloWorld" has been ported to EDK II as well.\r
719\r
720=======================================================\r
721Virus scanned by McAfee VirusScan Enterprise 8.0.0, Virus Definitions 4890, no\r
722virus detected.\r
723\r
724vim:tw=78:ts=2:com=fb\:- :ai\r