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