blob: 78bbf5f0f0d5b2605387263a5a413d103c0f1dcf [file] [log] [blame]
vanjeffe4d8dbc2007-06-25 11:16:31 +00001Intel(R) Platform Innovation Framework for EFI
2EFI Development Kit II Prime (EDK II Prime)
3Root Package 1.00
lhauch1f4c44a2008-05-15 16:14:56 +000042008-05-15
vanjeffe4d8dbc2007-06-25 11:16:31 +00005
6Intel is a trademark or registered trademark of Intel Corporation or its
7subsidiaries in the United States and other countries.
8* Other names and brands may be claimed as the property of others.
lhauch1f4c44a2008-05-15 16:14:56 +00009Copyright (c) 2007 - 2008, Intel Corporation All rights reserved.
vanjeffe4d8dbc2007-06-25 11:16:31 +000010
11EDK II Prime packages are in the development phase. They consist of:
12
qhuang8f91b9b32007-07-02 06:10:56 +000013 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
lhauch1f4c44a2008-05-15 16:14:56 +000022 EdkShellBinPkg - Binaries of full shell, minimum shell and commands
vanjeffe4d8dbc2007-06-25 11:16:31 +000023
qhuang8f91b9b32007-07-02 06:10:56 +000024Note:
lhauch1f4c44a2008-05-15 16:14:56 +000025 EdkShellBinPkg is supported to support both EDK II build and EDKII Prime
26 build by having several module description files.
27
vanjeffe4d8dbc2007-06-25 11:16:31 +000028
29-------------------------------------------------------------------------------
lhauch1f4c44a2008-05-15 16:14:56 +000030The most recent version of the setup instructions is available on the EDK II
31web-site:
32 https://edk2.tianocore.org/installation.html
33
34
35-------------------------------------------------------------------------------
36Quick Start (Windows Development Platform)
vanjeffe4d8dbc2007-06-25 11:16:31 +000037-----------
38
lhauch1f4c44a2008-05-15 16:14:56 +000039In a command prompt window, change to the top-level directory of the EDK II
40source.
vanjeffe4d8dbc2007-06-25 11:16:31 +000041
lhauch1f4c44a2008-05-15 16:14:56 +000042Note:
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
48First, set up your project workspace. If you have previously initialized this
49WORKSPACE, and a newer version of the *.template files in
50WORKSPACE\BaseTools\Conf exists, remove the *.txt files in the WORKSPACE\Conf
51directory prior to running the edksetup script.
52
53For the reference build of the Nt32 Platform emulation environment, use the
54edksetup.bat option: --nt32. For building other platforms or modules, this
55option is not required, as Visual Studio standard includes, libraries and/or
56dlls are not required for normal development.
lhauch8014e7c2008-02-22 16:31:23 +000057
58 c:\MyWork\edk2\> edksetup --nt32
vanjeffe4d8dbc2007-06-25 11:16:31 +000059
lhauch1f4c44a2008-05-15 16:14:56 +000060The default tool chain (named MYTOOLS) is pre-configured to use VS2005 for IA32
61and X64 target architectures and the DDK for IPF target architectures. To use a
62different tool chain, either modify the tools_def.txt file's MYTOOLS entries,
63or modify the %WORKSPACE%\Conf\target.txt file's TOOL_CHAIN_TAG. The pre-defined
64tags are listed near the top of the %WORKSPACE%\Conf\tools_def.txt file, below
65the Supported Tool Chains comment.
66Alternatively, you may use the build command's -t option to specify a different
67tool chain tag name: build -t VS2003 ... , for example. Using this method will
68require that you always use the build command's -t option.
69
70
71Next, go to the module directory and begin to build. This example is for the
72HelloWorld application.
73
vanjeffe4d8dbc2007-06-25 11:16:31 +000074 c:\MyWork\edk2\> cd MdeModulePkg\Application\HelloWorld
75 c:\MyWork\edk2\> build
76
lhauch1f4c44a2008-05-15 16:14:56 +000077If you want to build the a module in another package (for example,
78MdePkg\Library\BaseLib\BaseLib.inf), please edit the file,
79%WORKSPACE%\Conf\Target.txt, first.
vanjeffe4d8dbc2007-06-25 11:16:31 +000080
lhauch1f4c44a2008-05-15 16:14:56 +000081Change the following line
vanjeffe4d8dbc2007-06-25 11:16:31 +000082 ACTIVE_PLATFORM = MdeModulePkg/MdeModulePkg.dsc
83to
84 ACTIVE_PLATFORM = MdePkg/MdePkg.dsc
85
lhauch1f4c44a2008-05-15 16:14:56 +000086Then go to MdePkg\Library\BaseLib directory and type build:
vanjeffe4d8dbc2007-06-25 11:16:31 +000087 c:\MyWork\edk2\> cd MdePkg\Library\BaseLib
88 c:\MyWork\edk2\> build
89
lhauch1f4c44a2008-05-15 16:14:56 +000090If you want build a platform, ACTIVE_PLATFORM must be set to your desired
91platform dsc file, go to directory which must be not a module's directory, and
92run "build" command.
jwang3611dd6c32007-06-27 02:16:16 +000093
lhauch1f4c44a2008-05-15 16:14:56 +000094Instead of changing Target.txt, you can specify platform, module and/or
95architecture on command line.
jwang36183bc302007-07-19 01:43:29 +000096For example, if you want to build NT32 platform, you can just type
97
lhauch1f4c44a2008-05-15 16:14:56 +000098 c:\MyWork\edk2\> build -p Nt32Pkg\Nt32Pkg.dsc -a IA32
jwang36183bc302007-07-19 01:43:29 +000099
100and if you want to build HelloWorld module, you can just type
101
lhauch1f4c44a2008-05-15 16:14:56 +0000102 c:\MyWork\edk2\> build -p Nt32Pkg\Nt32Pkg.dsc -a IA32 -m MdeModulePkg\Application\HelloWorld\HelloWorld.inf
jwang36183bc302007-07-19 01:43:29 +0000103
lhauch1f4c44a2008-05-15 16:14:56 +0000104Other helpful command line options of build tool include "-v" and "-d".
105The "-v" option is used to turn on the verbose build, which provide more
106information during the build. "-d <debug level 0-9>" option is used to
jwang36183bc302007-07-19 01:43:29 +0000107turn on the debug information which is helpful debugging build tools.
108
lhauch1f4c44a2008-05-15 16:14:56 +0000109For more information on build options, please try "build -h" on command line.
110
111Note:
112 The Windows style help option "/?" is not a valid option for the build
113 command.
jwang36183bc302007-07-19 01:43:29 +0000114
115
116-------------------------------------------------------------------------------
117Supported build targets
118-----------------------
119
jwang360c71bc32007-09-03 06:11:35 +0000120all - Build whole platform or module. It can be ignored.
121genc - Generate AutoGen.c, AutoGen.h and <ModuleName>.depex files only.
122genmake - Generate makefiles in addition to files generated by "genc" target.
jwang36183bc302007-07-19 01:43:29 +0000123clean - Clean intermediate files
lhauch1f4c44a2008-05-15 16:14:56 +0000124cleanall - Clean all generated files and directories during build, except the
125 generated Makefile files (top level and module makefiles)
jwang36183bc302007-07-19 01:43:29 +0000126cleanlib - Clean all generated files and directories during library build
jwang360c71bc32007-09-03 06:11:35 +0000127run - Launch NT32 shell (only valid for NT32 platform)
jwang36183bc302007-07-19 01:43:29 +0000128
jwang3611dd6c32007-06-27 02:16:16 +0000129-------------------------------------------------------------------------------
130Tools in Python
131---------------
132
133* Run buld tool written in Python from source
lhauch1f4c44a2008-05-15 16:14:56 +0000134 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:
jwang3611dd6c32007-06-27 02:16:16 +0000137
lhauch1f4c44a2008-05-15 16:14:56 +0000138 https://buildtools.tianocore.org/svn/buildtools/trunk/BaseTools/Source/Python
jwang3611dd6c32007-06-27 02:16:16 +0000139
lhauch1f4c44a2008-05-15 16:14:56 +0000140 where:
jwang3611dd6c32007-06-27 02:16:16 +0000141
lhauch1f4c44a2008-05-15 16:14:56 +0000142 build/build.py - The entry tool of build tools
143 AutoGen/AutoGen.py - Generate AutoGen.c/.h and makefile only
jwang3611dd6c32007-06-27 02:16:16 +0000144
lhauch1f4c44a2008-05-15 16:14:56 +0000145 "build.py" steps:
146 1. Run "edksetup.bat"
147 2. set PYTHONPATH to the local directory of above source
148 (BaseTools/Source/Python)
149 3. Set ACTIVE_PLATFORM in WORKSPACE\Conf
150 4. Go to platform or module directory
151 5. Run "<python_interpreter.exe> <python_source_dir>/build/build.py" or
152 "<python_source_dir>/build/build.py" directly.
jwang3611dd6c32007-06-27 02:16:16 +0000153
lhauch1f4c44a2008-05-15 16:14:56 +0000154 "AutoGen.py" steps:
155 1. Run "edksetup.bat"
156 2. set PYTHONPATH to the local directory of above source
157 (BaseTools/Source/Python)
158 3. Set ACTIVE_PLATFORM in WORKSPACE\Conf
159 4. Run "<python_interpreter.exe> <python_source_dir>/AutoGen/AutoGen.py" or
160 "<python_source_dir>/AutoGen/AutoGen.py"
jwang3611dd6c32007-06-27 02:16:16 +0000161
162* Convert Python source to exe file
lhauch1f4c44a2008-05-15 16:14:56 +0000163 The tools written in Python can be coverted into executable program which can
164 be executed without Python interpreter. One of the conversion tools is called
165 cx_Freeze, available at:
jwang3611dd6c32007-06-27 02:16:16 +0000166
lhauch1f4c44a2008-05-15 16:14:56 +0000167 http://sourceforge.net/projects/cx-freeze/
jwang3611dd6c32007-06-27 02:16:16 +0000168
lhauch1f4c44a2008-05-15 16:14:56 +0000169 If you have installed cx_Freeze at c:\cx_Freeze-3.0.3. Use the following
170 command lines to convert MyBuild.py to a Windows executable.
jwang3611dd6c32007-06-27 02:16:16 +0000171
jwang360c71bc32007-09-03 06:11:35 +0000172 set PYTHONPATH=<buildtools>\BaseTools\Source\Python
lhauch1f4c44a2008-05-15 16:14:56 +0000173 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
jwang3611dd6c32007-06-27 02:16:16 +0000174
lhauch1f4c44a2008-05-15 16:14:56 +0000175 The generated .exe files are put in "mybuild" subdirectory.
vanjeffe4d8dbc2007-06-25 11:16:31 +0000176