]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - BuildNotes2.txt
Reviewed the description in the FatBinPkg .dec file.
[mirror_edk2.git] / BuildNotes2.txt
... / ...
CommitLineData
1Intel(R) Platform Innovation Framework for EFI\r
2EFI Development Kit II (EDK II)\r
3Root Package 1.00\r
42008-05-22\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) 2007 - 2008, Intel Corporation All rights reserved.\r
10\r
11EDK II packages are in the development phase. They consist of:\r
12\r
13 BuildNotes2.txt - The build notes for this package\r
14 BaseTools - Build -specific tools that are designed to help the\r
15 developer create and modify drivers and libraries\r
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
19 IntelFrameworkPkg - Tiano/Framework Includes and Libraries\r
20 IntelFrameworkModulePKg - Tiano/Framework Includes and Libraries\r
21 MdeModulePkg - UEFI 2.1/PI 1.0 compliant modules\r
22 MdePkg - Industry-standard headers and libraries\r
23 Nt32Pkg - UEFI 2.1/PI 1.0 emulation environment for Windows\r
24 OptionRomPkg - UEFI 2.1 peripheral drivers\r
25 UnixPkg - UEFI 2.1/PI 1.0 emulation environment for Unix\r
26\r
27\r
28-------------------------------------------------------------------------------\r
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
36-----------\r
37\r
38In a command prompt window, change to the top-level directory of the EDK II \r
39source.\r
40\r
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
56\r
57 c:\MyWork\edk2\> edksetup --nt32\r
58\r
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
73 c:\MyWork\edk2\> cd MdeModulePkg\Application\HelloWorld\r
74 c:\MyWork\edk2\> build\r
75\r
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
79\r
80Change the following line\r
81 ACTIVE_PLATFORM = MdeModulePkg/MdeModulePkg.dsc\r
82to\r
83 ACTIVE_PLATFORM = MdePkg/MdePkg.dsc\r
84\r
85Then go to MdePkg\Library\BaseLib directory and type build:\r
86 c:\MyWork\edk2\> cd MdePkg\Library\BaseLib\r
87 c:\MyWork\edk2\> build\r
88\r
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
92\r
93Instead of changing Target.txt, you can specify platform, module and/or\r
94architecture on command line.\r
95For example, if you want to build NT32 platform, you can just type \r
96\r
97 c:\MyWork\edk2\> build -p Nt32Pkg\Nt32Pkg.dsc -a IA32\r
98\r
99and if you want to build HelloWorld module, you can just type\r
100\r
101 c:\MyWork\edk2\> build -p Nt32Pkg\Nt32Pkg.dsc -a IA32 -m MdeModulePkg\Application\HelloWorld\HelloWorld.inf\r
102\r
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
106turn on the debug information which is helpful debugging build tools.\r
107\r
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
113\r
114\r
115-------------------------------------------------------------------------------\r
116Supported build targets\r
117-----------------------\r
118\r
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
122clean - Clean intermediate files\r
123cleanall - Clean all generated files and directories during build, except the\r
124 generated Makefile files (top level and module makefiles)\r
125cleanlib - Clean all generated files and directories during library build\r
126run - Launch NT32 shell (only valid for NT32 platform)\r
127\r
128-------------------------------------------------------------------------------\r
129Tools in Python\r
130---------------\r
131\r
132* Run buld tool written in Python from source\r
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
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
152* Convert Python source to exe file\r
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
156\r
157 http://sourceforge.net/projects/cx-freeze/\r
158\r
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
161\r
162 set PYTHONPATH=<buildtools>\BaseTools\Source\Python\r
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
164\r
165 The generated .exe files are put in "mybuild" subdirectory.\r
166\r