summaryrefslogtreecommitdiff
path: root/BuildNotes2.txt
blob: c6e49cede83fec0c9770819b35087af5d88cd686 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
Intel(R) Platform Innovation Framework for EFI
EFI Development Kit II Prime (EDK II Prime)
Root Package 1.00
2007-06-25

Intel is a trademark or registered trademark of Intel Corporation or its
subsidiaries in the United States and other countries.
* Other names and brands may be claimed as the property of others.
Copyright (c) 2007, Intel Corporation

EDK II Prime packages are in the development phase. They consist of:

  BuildNotes2.txt    - The build notes for this package
  MdePkg             - Industry-standard headers and libraries
  BaseTools          - Build -specific tools that are designed to help the
                       developer create and modify drivers and libraries
  IntelFrameworkPkg  - Framework headers and libraries
  MdeModulePkg       - Reference drivers


-------------------------------------------------------------------------------
Quick Start
-----------

NOTE: Please confirm you have already installed Python on your machine.

In a command window, change to the top-level directory of the EDK II source.

First, set up your workspace. If you have had a setup, please make sure that
you don't have newer *.template in WORKSPACE\BaseTools\Conf. Otherwise remove
*.txt files in WORKSPACE\Conf in advance.
    c:\MyWork\edk2\> edksetup newbuild

Second, go to the module directory (For example, MdeModulePkg\Application\HelloWorld),
and then begin to build
    c:\MyWork\edk2\> cd MdeModulePkg\Application\HelloWorld
    c:\MyWork\edk2\> build

If you want to build the modules in other packages
(For example, MdePkg\Library\BaseLib\BaseLib.inf), please edit open the BaseTools\Conf\Target.txt firstly,

change the following line
    ACTIVE_PLATFORM       = MdeModulePkg/MdeModulePkg.dsc
to
    ACTIVE_PLATFORM       = MdePkg/MdePkg.dsc

and then go to MdePkg\Library\BaseLib directory and build
    c:\MyWork\edk2\> cd MdePkg\Library\BaseLib
    c:\MyWork\edk2\> build

If you want build a platform, ACTIVE_PLATFORM must be set to your desired platform dsc file,
go to directory which must be not a module's directory, and run "build" command.

-------------------------------------------------------------------------------
Tools in Python
---------------

* Run buld tool written in Python from source
  The build tool written in Python can be executed from its source directly as long as you
have the Python interpreter (version 2.5) installed. The source of Python code is locating at

		https://buildtools.tianocore.org/svn/buildtools/trunk/BaseTools/Source/Python

	where:

		MyBuild.py	- The temporary "build" tool from which the "build.exe" is coming
		AutoGen.py  - Generate AutoGen.c/.h and makefile only

	"MyBuild.py" steps:
		1. Run "edksetup.bat newbuild"
		2. Set ACTIVE_PLATFORM in WORKSPACE\Conf
		3. Go to platform or module directory
		4. Run "<python_interpreter.exe> <python_source_dir>\MyBuild.py" or "<python_source_dir>\MyBuild.py"
		   directly.

	"AutoGen.py" steps:
		1. Run "edksetup.bat newbuild"
		2. Set ACTIVE_PLATFORM in WORKSPACE\Conf
		4. Run "<python_interpreter.exe> <python_source_dir>\AutoGen.py" or "<python_source_dir>\AutoGen.py"

* Convert Python source to exe file
  The tools written in Python can be coverted into executable program which can be executed
without Python interpreter. One of the convertion tools is called cx_Freeze at 

		http://sourceforge.net/projects/cx-freeze/

	Suppose you have installed cx_Freeze at c:\cx_Freeze-3.0.3. Use following command line to convert MyBuild.py

  	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

	The generated .exe files are put in "mybuild" subdirectory.