]> git.proxmox.com Git - mirror_edk2.git/blame - BaseTools/BuildNotes.txt
BaseTools: create and use a standard shared variable for '*'
[mirror_edk2.git] / BaseTools / BuildNotes.txt
CommitLineData
30fdf114
LG
1Intel(R) Platform Innovation Framework for EFI\r
2BuildTools Project, BaseTools Sub-Project\r
3Root Package 1.00\r
42007-08-31\r
5\r
6Intel is a trademark or registered trademark of Intel Corporation or its\r
7subsidiaries in the United States and other countries.\r
8* Other names and brands may be claimed as the property of others.\r
f7496d71 9Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.\r
30fdf114
LG
10\r
11-------------------------------------------------------------------------------\r
12Quick Start\r
13-----------\r
14\r
15Windows:\r
7b500c60 16 a) Go to the <buildtools_project>/BaseTools and run "toolsetup" script\r
30fdf114
LG
17\r
18Unix-like:\r
19 a) make -C <buildtools_project>/BaseTools\r
44804146 20 b) Look over https://github.com/tianocore/tianocore.github.io/wiki/Getting%20Started%20with%20EDK%20II\r
30fdf114
LG
21 for a helpful step-by-step guide for building 'Hello World' on\r
22 various operating systems with edk2.\r
23\r
24Supported build targets (toolsetup)\r
25-----------------------------------\r
26\r
27build(or none) - Incremental Build of all C based tools. This is the default target\r
28rebuild - Clean all generated files and directories during build, and rebuild all tools\r
29\r
30-------------------------------------------------------------------------------\r
31Tools in Python\r
32---------------\r
33* Convert Python source to exe file\r
34\r
f7496d71 35 The tools written in Python can be converted into executable program which can\r
44804146 36 be executed without installing a Python interpreter. (Generally it is easier\r
30fdf114
LG
37 to run the scripts from their source on operating systems other than Windows.)\r
38\r
39 For Windows and Linux, the conversion tool package is called cx_Freeze, its\r
40 home page is:\r
41\r
f7496d71 42 http://sourceforge.net/projects/cx-freeze/\r
30fdf114 43\r
f7496d71 44 If you have installed cx_Freeze at c:\cx_Freeze-3.0.3. Use following command\r
30fdf114
LG
45 lines to convert MyBuild.py to MyBuild.exe (note this is an example, there is\r
46 no MyBuild Python project in the BaseTools\Python tree.\r
47\r
48 set PYTHONPATH=<BaseToolsDirPath>\Source\Python\r
f7496d71 49 c:\cx_Freeze-3.0.3\FreezePython.exe --include-modules=encodings.cp437,encodings.gbk,encodings.utf_16,encodings.utf_16_le,encodings.utf_8 --install-dir=.\mybuild MyBuild.py\r
30fdf114 50\r
f7496d71 51 The generated .exe (and .dll) files are put in "mybuild" subdirectory.\r
30fdf114 52\r
f7496d71 53 The following is a real example with the BuildTools/trunk/BaseTools project\r
30fdf114
LG
54 installed in: C:\Work\BaseTools\r
55\r
f7496d71 56\r
30fdf114
LG
57 C:\Work\BaseTools\Source\Python> set PYTHONPATH=C:\Work\BaseTools\Source\Python\r
58 C:\Work\BaseTools\Source\Python> c:\cx_Freeze-3.0.3\FreezePython.exe --include-modules=encodings.cp437,encodings.gbk,encodings.utf_16,encodings.utf_16_le,encodings.utf_8 --install-dir=C:\Work\BaseTools\Bin\Win32 build\build.py\r
59\r
60---------------\r
61* Execute tools written in Python without conversion\r
62\r
63Unix-like systems:\r
64\r
65The edk2/edksetup.sh script will setup everything which is needed to\r
66run the scripts from their source.\r
67\r
68Windows:\r
69\r
70 The tools written in Python can be executed directly from its source directory\r
71as long as the Python interpreter (Python 2.5) has been installed. Before the execution,\r
f7496d71 72please make sure the environment variable PYTHONPATH is set to\r
30fdf114
LG
73\r
74 <buildtools_project>/BaseTools/Source/Python\r
75\r
4234283c 76 There're five tools written in Python. The entrance file of each tool is listed\r
30fdf114
LG
77below.\r
78\r
79 build <buildtools_project>/BaseTools/Source/Python/build/build.py\r
80 GenFds <buildtools_project>/BaseTools/Source/Python/GenFds/GenFds.py\r
81 Trim <buildtools_project>/BaseTools/Source/Python/Trim/Trim.py\r
82 MigrationMsa2Inf <buildtools_project>/BaseTools/Source/Python/MigrationMsa2Inf/MigrationMsa2Inf.py\r
4234283c 83 UPT <buildtools_project>/BaseTools/Source/Python/UPT/UPT.py\r