]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - BuildNotes2.txt
SignedCapsulePkg: Replace [Ascii|Unicode]ValueToString
[mirror_edk2.git] / BuildNotes2.txt
... / ...
CommitLineData
1Intel(R) Platform Innovation Framework for EFI\r
2EFI Development Kit II (EDK II)\r
32011-12-14\r
4\r
5Intel is a trademark or registered trademark of Intel Corporation or its\r
6subsidiaries in the United States and other countries.\r
7* Other names and brands may be claimed as the property of others.\r
8Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.\r
9\r
10EDK II packages can be gathered from the following address:\r
11 https://github.com/tianocore/edk2.git\r
12\r
13The detailed introduction of these packages can be found in each package\r
14description file. (The *.dec file under the package directory)\r
15\r
16\r
17-------------------------------------------------------------------------------\r
18The most recent version of the setup instructions is available on the EDK II\r
19web-site:\r
20 https://github.com/tianocore/tianocore.github.io/wiki/Getting%20Started%20with%20EDK%20II\r
21\r
22\r
23-------------------------------------------------------------------------------\r
24Quick Start (Windows Development Platform)\r
25-----------\r
26\r
27In a command prompt window, change to the top-level directory of the EDK II \r
28source.\r
29\r
30Note:\r
31 The first time the edksetup script is executed, it creates three files in the\r
32 %WORKSPACE%\Conf directory. The files: tools_def.txt, target.txt and\r
33 build_rule.txt, are only created if they do not exist, if they exist, they\r
34 are not touched.\r
35\r
36First, set up your project workspace. If you have previously initialized this\r
37WORKSPACE, and a newer version of the *.template files in\r
38WORKSPACE\BaseTools\Conf exists, remove the *.txt files in the WORKSPACE\Conf\r
39directory prior to running the edksetup script.\r
40\r
41For the reference build of the Nt32 Platform emulation environment, use the \r
42edksetup.bat option: --nt32. For building other platforms or modules, this\r
43option is not required, as Visual Studio standard includes, libraries and/or\r
44dlls are not required for normal development.\r
45\r
46 c:\MyWork\edk2\> edksetup --nt32\r
47\r
48The default tool chain (named MYTOOLS) is pre-configured to use VS2008 for IA32\r
49and X64 target architectures and DDK3790 for IPF target architectures. To use a\r
50different tool chain, either modify the tools_def.txt file's MYTOOLS entries,\r
51or modify the %WORKSPACE%\Conf\target.txt file's TOOL_CHAIN_TAG. The pre-defined\r
52tags are listed near the top of the %WORKSPACE%\Conf\tools_def.txt file, below\r
53the Supported Tool Chains comment.\r
54Alternatively, you may use the build command's -t option to specify a different\r
55tool chain tag name: build -t VS2008 ... , for example. Using this method will\r
56require that you always use the build command's -t option. If you use 64-bit \r
57Windows OS, you should use tool chain tag name with x86, such as VS2008x86.\r
58\r
59\r
60Next, go to the module directory and begin to build. This example is for the\r
61HelloWorld application.\r
62\r
63 c:\MyWork\edk2\> cd MdeModulePkg\Application\HelloWorld\r
64 c:\MyWork\edk2\> build\r
65\r
66If you want to build the a module in another package (for example, \r
67MdePkg\Library\BaseLib\BaseLib.inf), please edit the file\r
68%WORKSPACE%\Conf\Target.txt first.\r
69\r
70Change the following line\r
71 ACTIVE_PLATFORM = MdeModulePkg/MdeModulePkg.dsc\r
72to\r
73 ACTIVE_PLATFORM = MdePkg/MdePkg.dsc\r
74\r
75Then go to MdePkg\Library\BaseLib directory and type build:\r
76 c:\MyWork\edk2\> cd MdePkg\Library\BaseLib\r
77 c:\MyWork\edk2\> build\r
78\r
79If you want build a platform, ACTIVE_PLATFORM must be set to your desired\r
80platform dsc file, go to directory which must be not a module's directory, and\r
81run "build" command.\r
82\r
83Instead of changing Target.txt, you can specify platform, module and/or\r
84architecture on command line.\r
85For example, if you want to build NT32 platform, you can just type \r
86\r
87 c:\MyWork\edk2\> build -p Nt32Pkg\Nt32Pkg.dsc -a IA32\r
88\r
89and if you want to build HelloWorld module, you can just type\r
90\r
91 c:\MyWork\edk2\> build -p Nt32Pkg\Nt32Pkg.dsc -a IA32 -m MdeModulePkg\Application\HelloWorld\HelloWorld.inf\r
92\r
93Other helpful command line options of build tool include "-v" and "-d".\r
94The "-v" option is used to turn on the verbose build, which provide more\r
95information during the build. "-d <debug level 0-9>" option is used to\r
96turn on the debug information which is helpful debugging build tools.\r
97\r
98For more information on build options, please try "build -h" on command line.\r
99\r
100Note:\r
101 The Windows style help option "/?" is not a valid option for the build\r
102 command.\r
103\r
104\r
105-------------------------------------------------------------------------------\r
106Supported build targets\r
107-----------------------\r
108\r
109all - Build whole platform or module. It can be ignored.\r
110genc - Generate AutoGen.c, AutoGen.h and <ModuleName>.depex files only.\r
111genmake - Generate makefiles in addition to files generated by "genc" target.\r
112clean - Clean intermediate files\r
113cleanall - Clean all generated files and directories during build, except the\r
114 generated Makefile files (top level and module makefiles)\r
115cleanlib - Clean all generated files and directories during library build\r
116run - Launch NT32 shell (only valid for NT32 platform)\r
117\r
118-------------------------------------------------------------------------------\r
119Tools in Python\r
120---------------\r
121\r
122* Run build tool written in Python from source\r
123 It can be executed from its source directly as long as you have the Python\r
124 interpreter (version 2.5.4) installed. The source code is located at\r
125 WORKSPACE/BaseTools.\r
126\r
127 where:\r
128\r
129 build/build.py - The entry tool of build tools\r
130\r
131 "build.py" steps:\r
132 1. Run "edksetup.bat"\r
133 2. set PYTHONPATH to the local directory of above source\r
134 (BaseTools/Source/Python)\r
135 3. Set ACTIVE_PLATFORM in WORKSPACE\Conf\r
136 4. Go to platform or module directory\r
137 5. Run "<python_interpreter.exe> <python_source_dir>/build/build.py" or\r
138 "<python_source_dir>/build/build.py" directly.\r
139\r
140* Convert Python source to exe file\r
141 The tools written in Python can be coverted into executable program which can\r
142 be executed without Python interpreter. One of the conversion tools is called\r
143 cx_Freeze, available at: \r
144\r
145 http://sourceforge.net/projects/cx-freeze/\r
146\r
147 If you have installed cx_Freeze at c:\cx_Freeze-3.0.3. Use the following\r
148 command lines to convert MyBuild.py to a Windows executable.\r
149\r
150 set PYTHONPATH=<buildtools>\BaseTools\Source\Python\r
151 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
152\r
153 The generated .exe files are put in "mybuild" subdirectory.\r
154\r