X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=BuildNotes2.txt;h=ffec64462ddc4f35e9ae33197dc38871ca19a040;hp=c6e49cede83fec0c9770819b35087af5d88cd686;hb=cfe9de52447337bd470bd831080f5671ed979fe6;hpb=d57e875ca3aac3249751b18db03921b6f0cff5fe diff --git a/BuildNotes2.txt b/BuildNotes2.txt index c6e49cede8..ffec64462d 100644 --- a/BuildNotes2.txt +++ b/BuildNotes2.txt @@ -10,20 +10,24 @@ 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 - + 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. ------------------------------------------------------------------------------- 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 @@ -37,7 +41,7 @@ and then begin to build 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, +(For example, MdePkg\Library\BaseLib\BaseLib.inf), please edit open the \Conf\Target.txt first, change the following line ACTIVE_PLATFORM = MdeModulePkg/MdeModulePkg.dsc @@ -51,6 +55,34 @@ and then go to MdePkg\Library\BaseLib directory and 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. +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 " 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 +----------------------- + +all - Build whole platform or module. It can be ignored. +genc - Generate AutoGen.c, AutoGen.h and .depex files only. +genmake - Generate makefiles in addition to files generated by "genc" target. +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 +run - Launch NT32 shell (only valid for NT32 platform) + ------------------------------------------------------------------------------- Tools in Python --------------- @@ -63,20 +95,22 @@ have the Python interpreter (version 2.5) installed. The source of Python code i where: - MyBuild.py - The temporary "build" tool from which the "build.exe" is coming - AutoGen.py - Generate AutoGen.c/.h and makefile only + build/build.py - The entry tool of build tools + AutoGen/AutoGen.py - Generate AutoGen.c/.h and makefile only - "MyBuild.py" steps: + "build.py" steps: 1. Run "edksetup.bat newbuild" - 2. Set ACTIVE_PLATFORM in WORKSPACE\Conf - 3. Go to platform or module directory - 4. Run " \MyBuild.py" or "\MyBuild.py" + 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 " /build/build.py" or "/build/build.py" directly. "AutoGen.py" steps: 1. Run "edksetup.bat newbuild" - 2. Set ACTIVE_PLATFORM in WORKSPACE\Conf - 4. Run " \AutoGen.py" or "\AutoGen.py" + 2. set PYTHONPATH to the local directory of above source (BaseTools/Source/Python) + 3. Set ACTIVE_PLATFORM in WORKSPACE\Conf + 4. Run " /AutoGen/AutoGen.py" or "/AutoGen/AutoGen.py" * Convert Python source to exe file The tools written in Python can be coverted into executable program which can be executed @@ -86,6 +120,7 @@ without Python interpreter. One of the convertion tools is called cx_Freeze at Suppose you have installed cx_Freeze at c:\cx_Freeze-3.0.3. Use following command line to convert MyBuild.py + set PYTHONPATH=\BaseTools\Source\Python 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.