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