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