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