vanjeff | e4d8dbc | 2007-06-25 11:16:31 +0000 | [diff] [blame] | 1 | Intel(R) Platform Innovation Framework for EFI
|
| 2 | EFI Development Kit II Prime (EDK II Prime)
|
| 3 | Root Package 1.00
|
| 4 | 2007-06-25
|
| 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, Intel Corporation
|
| 10 |
|
| 11 | EDK II Prime packages are in the development phase. They consist of:
|
| 12 |
|
qhuang8 | f91b9b3 | 2007-07-02 06:10:56 +0000 | [diff] [blame] | 13 | BuildNotes2.txt - The build notes for this package
|
| 14 | MdePkg - Industry-standard headers and libraries
|
| 15 | BaseTools - Build -specific tools that are designed to help the
|
| 16 | developer create and modify drivers and libraries
|
| 17 | IntelFrameworkPkg - Tiano/Framework Includes and Libraries
|
| 18 | MdeModulePkg - UEFI 2.1/PI 1.0 compliant modules
|
| 19 | IntelFrameworkModulePKg - Tiano/Framework Includes and Libraries
|
| 20 | Nt32Pkg - UEFI 2.1/PI 1.0 emulation environment for Windows
|
| 21 | FatBinPkg - Binaries built from the FatPkg
|
| 22 | EdkShellBinPkg - Binaries of full shell, minimum shell and commonds(to be added)
|
vanjeff | e4d8dbc | 2007-06-25 11:16:31 +0000 | [diff] [blame] | 23 |
|
qhuang8 | f91b9b3 | 2007-07-02 06:10:56 +0000 | [diff] [blame] | 24 | Note:
|
| 25 | EdkShellBinPkg is supported to support both EDK II build and EDKII Prime build by having several module description files.
|
vanjeff | e4d8dbc | 2007-06-25 11:16:31 +0000 | [diff] [blame] | 26 |
|
| 27 | -------------------------------------------------------------------------------
|
| 28 | Quick Start
|
| 29 | -----------
|
| 30 |
|
vanjeff | e4d8dbc | 2007-06-25 11:16:31 +0000 | [diff] [blame] | 31 | In a command window, change to the top-level directory of the EDK II source.
|
| 32 |
|
jwang36 | 11dd6c3 | 2007-06-27 02:16:16 +0000 | [diff] [blame] | 33 | First, set up your workspace. If you have had a setup, please make sure that
|
| 34 | you don't have newer *.template in WORKSPACE\BaseTools\Conf. Otherwise remove
|
| 35 | *.txt files in WORKSPACE\Conf in advance.
|
vanjeff | e4d8dbc | 2007-06-25 11:16:31 +0000 | [diff] [blame] | 36 | c:\MyWork\edk2\> edksetup newbuild
|
| 37 |
|
| 38 | Second, go to the module directory (For example, MdeModulePkg\Application\HelloWorld),
|
| 39 | and then begin to build
|
| 40 | c:\MyWork\edk2\> cd MdeModulePkg\Application\HelloWorld
|
| 41 | c:\MyWork\edk2\> build
|
| 42 |
|
| 43 | If you want to build the modules in other packages
|
jwang36 | 183bc30 | 2007-07-19 01:43:29 +0000 | [diff] [blame] | 44 | (For example, MdePkg\Library\BaseLib\BaseLib.inf), please edit open the <WORKSPACE>\Conf\Target.txt first,
|
vanjeff | e4d8dbc | 2007-06-25 11:16:31 +0000 | [diff] [blame] | 45 |
|
| 46 | change the following line
|
| 47 | ACTIVE_PLATFORM = MdeModulePkg/MdeModulePkg.dsc
|
| 48 | to
|
| 49 | ACTIVE_PLATFORM = MdePkg/MdePkg.dsc
|
| 50 |
|
| 51 | and then go to MdePkg\Library\BaseLib directory and build
|
| 52 | c:\MyWork\edk2\> cd MdePkg\Library\BaseLib
|
| 53 | c:\MyWork\edk2\> build
|
| 54 |
|
jwang36 | d57e875 | 2007-06-29 02:54:29 +0000 | [diff] [blame] | 55 | If you want build a platform, ACTIVE_PLATFORM must be set to your desired platform dsc file,
|
jwang36 | 11dd6c3 | 2007-06-27 02:16:16 +0000 | [diff] [blame] | 56 | go to directory which must be not a module's directory, and run "build" command.
|
| 57 |
|
jwang36 | 183bc30 | 2007-07-19 01:43:29 +0000 | [diff] [blame] | 58 | Instead of changing Target.txt, you can specify platform, module and/or architecture on command line.
|
| 59 | For example, if you want to build NT32 platform, you can just type
|
| 60 |
|
| 61 | c:\MyWork\edk2\> build -p Nt32Pkg\Nt32Pkg.dsc -a IA32
|
| 62 |
|
| 63 | and if you want to build HelloWorld module, you can just type
|
| 64 |
|
| 65 | c:\MyWork\edk2\> build -p Nt32Pkg\Nt32Pkg.dsc -a IA32 -m MdeModulePkg\Application\HelloWorld\HelloWorld.inf
|
| 66 |
|
| 67 | Other helpful command line options of build tool include "-v" and "-d". "-v" option is used to turn on
|
| 68 | the verbose build, which provide more information during the build. "-d <debug level 0-9>" option is used to
|
| 69 | turn on the debug information which is helpful debugging build tools.
|
| 70 |
|
| 71 | For more information on build options, please try "build -h" on command line. Note that "/?" is not working.
|
| 72 |
|
| 73 |
|
| 74 | -------------------------------------------------------------------------------
|
| 75 | Supported build targets
|
| 76 | -----------------------
|
| 77 |
|
jwang36 | 0c71bc3 | 2007-09-03 06:11:35 +0000 | [diff] [blame^] | 78 | all - Build whole platform or module. It can be ignored.
|
| 79 | genc - Generate AutoGen.c, AutoGen.h and <ModuleName>.depex files only.
|
| 80 | genmake - Generate makefiles in addition to files generated by "genc" target.
|
jwang36 | 183bc30 | 2007-07-19 01:43:29 +0000 | [diff] [blame] | 81 | clean - Clean intermediate files
|
| 82 | cleanall - Clean all generated files and directories during build, except Makefile
|
| 83 | cleanlib - Clean all generated files and directories during library build
|
jwang36 | 0c71bc3 | 2007-09-03 06:11:35 +0000 | [diff] [blame^] | 84 | run - Launch NT32 shell (only valid for NT32 platform)
|
jwang36 | 183bc30 | 2007-07-19 01:43:29 +0000 | [diff] [blame] | 85 |
|
jwang36 | 11dd6c3 | 2007-06-27 02:16:16 +0000 | [diff] [blame] | 86 | -------------------------------------------------------------------------------
|
| 87 | Tools in Python
|
| 88 | ---------------
|
| 89 |
|
| 90 | * Run buld tool written in Python from source
|
| 91 | The build tool written in Python can be executed from its source directly as long as you
|
| 92 | have the Python interpreter (version 2.5) installed. The source of Python code is locating at
|
| 93 |
|
| 94 | https://buildtools.tianocore.org/svn/buildtools/trunk/BaseTools/Source/Python
|
| 95 |
|
| 96 | where:
|
| 97 |
|
jwang36 | 0c71bc3 | 2007-09-03 06:11:35 +0000 | [diff] [blame^] | 98 | build/build.py - The entry tool of build tools
|
| 99 | AutoGen/AutoGen.py - Generate AutoGen.c/.h and makefile only
|
jwang36 | 11dd6c3 | 2007-06-27 02:16:16 +0000 | [diff] [blame] | 100 |
|
jwang36 | 0c71bc3 | 2007-09-03 06:11:35 +0000 | [diff] [blame^] | 101 | "build.py" steps:
|
jwang36 | 11dd6c3 | 2007-06-27 02:16:16 +0000 | [diff] [blame] | 102 | 1. Run "edksetup.bat newbuild"
|
jwang36 | 0c71bc3 | 2007-09-03 06:11:35 +0000 | [diff] [blame^] | 103 | 2. set PYTHONPATH to the local directory of above source (BaseTools/Source/Python)
|
| 104 | 3. Set ACTIVE_PLATFORM in WORKSPACE\Conf
|
| 105 | 4. Go to platform or module directory
|
| 106 | 5. Run "<python_interpreter.exe> <python_source_dir>/build/build.py" or "<python_source_dir>/build/build.py"
|
jwang36 | 11dd6c3 | 2007-06-27 02:16:16 +0000 | [diff] [blame] | 107 | directly.
|
| 108 |
|
| 109 | "AutoGen.py" steps:
|
| 110 | 1. Run "edksetup.bat newbuild"
|
jwang36 | 0c71bc3 | 2007-09-03 06:11:35 +0000 | [diff] [blame^] | 111 | 2. set PYTHONPATH to the local directory of above source (BaseTools/Source/Python)
|
| 112 | 3. Set ACTIVE_PLATFORM in WORKSPACE\Conf
|
| 113 | 4. Run "<python_interpreter.exe> <python_source_dir>/AutoGen/AutoGen.py" or "<python_source_dir>/AutoGen/AutoGen.py"
|
jwang36 | 11dd6c3 | 2007-06-27 02:16:16 +0000 | [diff] [blame] | 114 |
|
| 115 | * Convert Python source to exe file
|
| 116 | The tools written in Python can be coverted into executable program which can be executed
|
| 117 | without Python interpreter. One of the convertion tools is called cx_Freeze at
|
| 118 |
|
| 119 | http://sourceforge.net/projects/cx-freeze/
|
| 120 |
|
| 121 | Suppose you have installed cx_Freeze at c:\cx_Freeze-3.0.3. Use following command line to convert MyBuild.py
|
| 122 |
|
jwang36 | 0c71bc3 | 2007-09-03 06:11:35 +0000 | [diff] [blame^] | 123 | set PYTHONPATH=<buildtools>\BaseTools\Source\Python
|
jwang36 | d57e875 | 2007-06-29 02:54:29 +0000 | [diff] [blame] | 124 | 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
|
jwang36 | 11dd6c3 | 2007-06-27 02:16:16 +0000 | [diff] [blame] | 125 |
|
| 126 | The generated .exe files are put in "mybuild" subdirectory.
|
vanjeff | e4d8dbc | 2007-06-25 11:16:31 +0000 | [diff] [blame] | 127 |
|