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