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