2007-06-25 13:16:31 +02:00
|
|
|
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:
|
|
|
|
|
2007-07-02 08:10:56 +02:00
|
|
|
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 - Tiano/Framework Includes and Libraries
|
|
|
|
MdeModulePkg - UEFI 2.1/PI 1.0 compliant modules
|
|
|
|
IntelFrameworkModulePKg - Tiano/Framework Includes and Libraries
|
|
|
|
Nt32Pkg - UEFI 2.1/PI 1.0 emulation environment for Windows
|
|
|
|
FatBinPkg - Binaries built from the FatPkg
|
|
|
|
EdkShellBinPkg - Binaries of full shell, minimum shell and commonds(to be added)
|
|
|
|
|
|
|
|
Note:
|
|
|
|
EdkShellBinPkg is supported to support both EDK II build and EDKII Prime build by having several module description files.
|
2007-06-25 13:16:31 +02:00
|
|
|
|
|
|
|
-------------------------------------------------------------------------------
|
|
|
|
Quick Start
|
|
|
|
-----------
|
|
|
|
|
|
|
|
In a command window, change to the top-level directory of the EDK II source.
|
|
|
|
|
2007-06-27 04:16:16 +02:00
|
|
|
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
|
2008-02-22 17:31:23 +01:00
|
|
|
*.txt files in WORKSPACE\Conf in advance. For the reference build of the Nt32
|
|
|
|
Platform emulation environment, use the --nt32 option for edksetup. Building
|
|
|
|
other platforms or modules do not require this option, as Visual Studio standard
|
|
|
|
includes, libraries and/or dlls are not required for normal development.
|
|
|
|
|
|
|
|
c:\MyWork\edk2\> edksetup --nt32
|
2007-06-25 13:16:31 +02:00
|
|
|
|
|
|
|
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
|
2007-07-19 03:43:29 +02:00
|
|
|
(For example, MdePkg\Library\BaseLib\BaseLib.inf), please edit open the <WORKSPACE>\Conf\Target.txt first,
|
2007-06-25 13:16:31 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2007-06-29 04:54:29 +02:00
|
|
|
If you want build a platform, ACTIVE_PLATFORM must be set to your desired platform dsc file,
|
2007-06-27 04:16:16 +02:00
|
|
|
go to directory which must be not a module's directory, and run "build" command.
|
|
|
|
|
2007-07-19 03:43:29 +02:00
|
|
|
Instead of changing Target.txt, you can specify platform, module and/or architecture on command line.
|
|
|
|
For example, if you want to build NT32 platform, you can just type
|
|
|
|
|
|
|
|
c:\MyWork\edk2\> build -p Nt32Pkg\Nt32Pkg.dsc -a IA32
|
|
|
|
|
|
|
|
and if you want to build HelloWorld module, you can just type
|
|
|
|
|
|
|
|
c:\MyWork\edk2\> build -p Nt32Pkg\Nt32Pkg.dsc -a IA32 -m MdeModulePkg\Application\HelloWorld\HelloWorld.inf
|
|
|
|
|
|
|
|
Other helpful command line options of build tool include "-v" and "-d". "-v" option is used to turn on
|
|
|
|
the verbose build, which provide more information during the build. "-d <debug level 0-9>" option is used to
|
|
|
|
turn on the debug information which is helpful debugging build tools.
|
|
|
|
|
|
|
|
For more information on build options, please try "build -h" on command line. Note that "/?" is not working.
|
|
|
|
|
|
|
|
|
|
|
|
-------------------------------------------------------------------------------
|
|
|
|
Supported build targets
|
|
|
|
-----------------------
|
|
|
|
|
2007-09-03 08:11:35 +02:00
|
|
|
all - Build whole platform or module. It can be ignored.
|
|
|
|
genc - Generate AutoGen.c, AutoGen.h and <ModuleName>.depex files only.
|
|
|
|
genmake - Generate makefiles in addition to files generated by "genc" target.
|
2007-07-19 03:43:29 +02:00
|
|
|
clean - Clean intermediate files
|
|
|
|
cleanall - Clean all generated files and directories during build, except Makefile
|
|
|
|
cleanlib - Clean all generated files and directories during library build
|
2007-09-03 08:11:35 +02:00
|
|
|
run - Launch NT32 shell (only valid for NT32 platform)
|
2007-07-19 03:43:29 +02:00
|
|
|
|
2007-06-27 04:16:16 +02:00
|
|
|
-------------------------------------------------------------------------------
|
|
|
|
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:
|
|
|
|
|
2007-09-03 08:11:35 +02:00
|
|
|
build/build.py - The entry tool of build tools
|
|
|
|
AutoGen/AutoGen.py - Generate AutoGen.c/.h and makefile only
|
2007-06-27 04:16:16 +02:00
|
|
|
|
2007-09-03 08:11:35 +02:00
|
|
|
"build.py" steps:
|
2008-02-22 17:31:23 +01:00
|
|
|
1. Run "edksetup.bat"
|
2007-09-03 08:11:35 +02:00
|
|
|
2. set PYTHONPATH to the local directory of above source (BaseTools/Source/Python)
|
|
|
|
3. Set ACTIVE_PLATFORM in WORKSPACE\Conf
|
|
|
|
4. Go to platform or module directory
|
|
|
|
5. Run "<python_interpreter.exe> <python_source_dir>/build/build.py" or "<python_source_dir>/build/build.py"
|
2007-06-27 04:16:16 +02:00
|
|
|
directly.
|
|
|
|
|
|
|
|
"AutoGen.py" steps:
|
2008-02-22 17:31:23 +01:00
|
|
|
1. Run "edksetup.bat"
|
2007-09-03 08:11:35 +02:00
|
|
|
2. set PYTHONPATH to the local directory of above source (BaseTools/Source/Python)
|
|
|
|
3. Set ACTIVE_PLATFORM in WORKSPACE\Conf
|
|
|
|
4. Run "<python_interpreter.exe> <python_source_dir>/AutoGen/AutoGen.py" or "<python_source_dir>/AutoGen/AutoGen.py"
|
2007-06-27 04:16:16 +02:00
|
|
|
|
|
|
|
* 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
|
|
|
|
|
2007-09-03 08:11:35 +02:00
|
|
|
set PYTHONPATH=<buildtools>\BaseTools\Source\Python
|
2007-06-29 04:54:29 +02:00
|
|
|
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
|
2007-06-27 04:16:16 +02:00
|
|
|
|
|
|
|
The generated .exe files are put in "mybuild" subdirectory.
|
2007-06-25 13:16:31 +02:00
|
|
|
|