edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/EdkIIGlueBase.h:
[edk2.git] / BuildNotes2.txt
blob78bbf5f0f0d5b2605387263a5a413d103c0f1dcf
1 Intel(R) Platform Innovation Framework for EFI\r
2 EFI Development Kit II Prime (EDK II Prime)\r
3 Root Package 1.00\r
4 2008-05-15\r
5 \r
6 Intel is a trademark or registered trademark of Intel Corporation or its\r
7 subsidiaries in the United States and other countries.\r
8 * Other names and brands may be claimed as the property of others.\r
9 Copyright (c) 2007 - 2008, Intel Corporation  All rights reserved.\r
11 EDK II Prime packages are in the development phase. They consist of:\r
13   BuildNotes2.txt         - The build notes for this package\r
14   MdePkg                  - Industry-standard headers and libraries\r
15   BaseTools               - Build -specific tools that are designed to help the\r
16                             developer create and modify drivers and libraries\r
17   IntelFrameworkPkg       - Tiano/Framework Includes and Libraries\r
18   MdeModulePkg            - UEFI 2.1/PI 1.0 compliant modules\r
19   IntelFrameworkModulePKg - Tiano/Framework Includes and Libraries\r
20   Nt32Pkg                 - UEFI 2.1/PI 1.0 emulation environment for Windows\r
21   FatBinPkg               - Binaries built from the FatPkg \r
22   EdkShellBinPkg          - Binaries of full shell, minimum shell and commands\r
24 Note:\r
25   EdkShellBinPkg is supported to support both EDK II build and EDKII Prime\r
26   build by having several module description files.\r
29 -------------------------------------------------------------------------------\r
30 The most recent version of the setup instructions is available on the EDK II\r
31 web-site:\r
32   https://edk2.tianocore.org/installation.html\r
35 -------------------------------------------------------------------------------\r
36 Quick Start (Windows Development Platform)\r
37 -----------\r
39 In a command prompt window, change to the top-level directory of the EDK II \r
40 source.\r
42 Note:\r
43   The first time the edksetup script is executed, it creates three files in the\r
44   %WORKSPACE%\Conf directory. The files: tools_def.txt, target.txt and\r
45   build_rule.txt, are only created if they do not exist, if they exist, they\r
46   are not touched.\r
48 First, set up your project workspace. If you have previously initialized this\r
49 WORKSPACE, and a newer version of the *.template files in\r
50 WORKSPACE\BaseTools\Conf exists, remove the *.txt files in the WORKSPACE\Conf\r
51 directory prior to running the edksetup script.\r
53 For the reference build of the Nt32 Platform emulation environment, use the \r
54 edksetup.bat option: --nt32. For building other platforms or modules, this\r
55 option is not required, as Visual Studio standard includes, libraries and/or\r
56 dlls are not required for normal development.\r
58     c:\MyWork\edk2\> edksetup --nt32\r
60 The default tool chain (named MYTOOLS) is pre-configured to use VS2005 for IA32\r
61 and X64 target architectures and the DDK for IPF target architectures. To use a\r
62 different tool chain, either modify the tools_def.txt file's MYTOOLS entries,\r
63 or modify the %WORKSPACE%\Conf\target.txt file's TOOL_CHAIN_TAG. The pre-defined\r
64 tags are listed near the top of the %WORKSPACE%\Conf\tools_def.txt file, below\r
65 the Supported Tool Chains comment.\r
66 Alternatively, you may use the build command's -t option to specify a different\r
67 tool chain tag name: build -t VS2003 ... , for example.  Using this method will\r
68 require that you always use the build command's -t option.\r
71 Next, go to the module directory and begin to build.  This example is for the\r
72 HelloWorld application.\r
74     c:\MyWork\edk2\> cd MdeModulePkg\Application\HelloWorld\r
75     c:\MyWork\edk2\> build\r
77 If you want to build the a module in another package (for example, \r
78 MdePkg\Library\BaseLib\BaseLib.inf), please edit the file,\r
79 %WORKSPACE%\Conf\Target.txt, first.\r
81 Change the following line\r
82     ACTIVE_PLATFORM       = MdeModulePkg/MdeModulePkg.dsc\r
83 to\r
84     ACTIVE_PLATFORM       = MdePkg/MdePkg.dsc\r
86 Then go to MdePkg\Library\BaseLib directory and type build:\r
87     c:\MyWork\edk2\> cd MdePkg\Library\BaseLib\r
88     c:\MyWork\edk2\> build\r
90 If you want build a platform, ACTIVE_PLATFORM must be set to your desired\r
91 platform dsc file, go to directory which must be not a module's directory, and\r
92 run "build" command.\r
94 Instead of changing Target.txt, you can specify platform, module and/or\r
95 architecture on command line.\r
96 For example, if you want to build NT32 platform, you can just type \r
98     c:\MyWork\edk2\> build -p Nt32Pkg\Nt32Pkg.dsc -a IA32\r
100 and if you want to build HelloWorld module, you can just type\r
102     c:\MyWork\edk2\> build -p Nt32Pkg\Nt32Pkg.dsc -a IA32 -m MdeModulePkg\Application\HelloWorld\HelloWorld.inf\r
104 Other helpful command line options of build tool include "-v" and "-d".\r
105 The "-v" option is used to turn on the verbose build, which provide more\r
106 information during the build. "-d <debug level 0-9>" option is used to\r
107 turn on the debug information which is helpful debugging build tools.\r
109 For more information on build options, please try "build -h" on command line.\r
111 Note:\r
112   The Windows style help option "/?" is not a valid option for the build\r
113   command.\r
116 -------------------------------------------------------------------------------\r
117 Supported build targets\r
118 -----------------------\r
120 all       - Build whole platform or module. It can be ignored.\r
121 genc      - Generate AutoGen.c, AutoGen.h and <ModuleName>.depex files only.\r
122 genmake   - Generate makefiles in addition to files generated by "genc" target.\r
123 clean     - Clean intermediate files\r
124 cleanall  - Clean all generated files and directories during build, except the\r
125             generated Makefile files (top level and module makefiles)\r
126 cleanlib  - Clean all generated files and directories during library build\r
127 run       - Launch NT32 shell (only valid for NT32 platform)\r
129 -------------------------------------------------------------------------------\r
130 Tools in Python\r
131 ---------------\r
133 * Run buld tool written in Python from source\r
134   The build tool written in Python can be executed from its source directly as\r
135   long as you have the Python interpreter (version 2.5) installed. The source\r
136   of Python code is locating at:\r
138     https://buildtools.tianocore.org/svn/buildtools/trunk/BaseTools/Source/Python\r
140   where:\r
142     build/build.py      - The entry tool of build tools\r
143     AutoGen/AutoGen.py  - Generate AutoGen.c/.h and makefile only\r
145   "build.py" steps:\r
146     1. Run "edksetup.bat"\r
147     2. set PYTHONPATH to the local directory of above source\r
148        (BaseTools/Source/Python)\r
149     3. Set ACTIVE_PLATFORM in WORKSPACE\Conf\r
150     4. Go to platform or module directory\r
151     5. Run "<python_interpreter.exe> <python_source_dir>/build/build.py" or\r
152        "<python_source_dir>/build/build.py" directly.\r
154   "AutoGen.py" steps:\r
155     1. Run "edksetup.bat"\r
156     2. set PYTHONPATH to the local directory of above source\r
157        (BaseTools/Source/Python)\r
158     3. Set ACTIVE_PLATFORM in WORKSPACE\Conf\r
159     4. Run "<python_interpreter.exe> <python_source_dir>/AutoGen/AutoGen.py" or\r
160        "<python_source_dir>/AutoGen/AutoGen.py"\r
162 * Convert Python source to exe file\r
163   The tools written in Python can be coverted into executable program which can\r
164   be executed without Python interpreter. One of the conversion tools is called\r
165   cx_Freeze, available at: \r
167     http://sourceforge.net/projects/cx-freeze/\r
169   If you have installed cx_Freeze at c:\cx_Freeze-3.0.3. Use the following\r
170   command lines to convert MyBuild.py to a Windows executable.\r
172     set PYTHONPATH=<buildtools>\BaseTools\Source\Python\r
173     c:\cx_Freeze-3.0.3\FreezePython.exe --include-modules=encodings.cp437,encodings.gbk,encodings.utf_16,encodings.utf_8 --install-dir=.\mybuild MyBuild.py\r
175   The generated .exe files are put in "mybuild" subdirectory.\r