搜尋此網誌

2017年12月18日 星期一

UDK2017 How to Build

From: https://github.com/tianocore/tianocore.github.io/wiki/UDK2017-How-to-Build

HOW TO BUILD (WINDOWS SYSTEM)
The steps below are verified on Microsoft Windows 10 Enterprise*:

1. Setup Build Environment
  • Install Microsoft Visual Studio 2015* in the build machine and make sure that AMD64 complier was selected when installing.
  • Download NASM 2.0.7 or later from http://www.nasm.us/ and install it to C:\Nasm. Make sure C:\Nasm is added to system environment variable 'PATH'
  • Set up for using GitHub for Windows. See: https://github.com/tianocore/tianocore.github.io/wiki/Getting-Started-with-EDK-II#github-help
  • Download and install Python2.7.x https://www.python.org/ for building the BaseTools Default install directory is: C:/Python27
2. Create the full Source Code directory for the UDK2017 release
(1). Create a working space directory in the build machine, for example, C:\MyWorkspace
(2). Download the official UDK2017 release .zip file from the UDK2017 Release Page
a. Download - UDK2017 edk-vUDK2017 Workspace Source code (zip file)
b. Extract files in [edk2-vUDK2017] to the working space directory C:\MyWorkspace.
(3). OR Checkout the vUDK2017 Tag from GitHub with the following "git" command run git clone https://github.com/tianocore/edk2.git vUDK2017 Move all files and folders under "vUDK2017" to "C:\MyWorkspace" Optional (See Compile the BaseTools below) Checkout BaseTools binaries and copy them to BaseTools binary folder. Warning the Windows* Binary tools are only valid for the tip of the https://github.com/tianocore/edk2 repository.
a. Cd C:\MyWorkspace
b. Run git clone https://github.com/tianocore/edk2-BaseTools-win32.git
c. Enter folder edk2-BaseTools-win32
d. Run the command git checkout 0e088c19ab31fccd1d2f55d9e4fe0314b57c0097
e. Cd C:\MyWorkSpace
f. Rename this folder from edk2-BaseTools-win32 to win32, then copy the win32 directory into the BaseTools/Bin directory under the workspace. (e.g. "C:\MyWorkspace\BaseTools\Bin")
3. Generate OpenSSL* Crypto Library
(1). Open file "C:\MyWorkspace\CryptoPkg\Library\OpensslLib\OpenSSL-HOWTO.txt" and follow the instruction to install OpenSSL* for UEFI building. For this release, please use OpenSSL-1.1.0e.
4. Compile the BaseTools (Skip if Optional Step 2.iv was done above) See: https://github.com/tianocore/tianocore.github.io/wiki/Windows-systems#compile-tools
(1). Open a Microsoft Visual Studio* command prompt, type cd C:\MyWorkspace to enter the workspace directory
(2). Compile the BaseTools C source tools
set PYTHON_HOME=C:\Python27
        set EDK_TOOLS_PATH=%CD%\BaseTools
        BaseTools\toolssetup.bat Rebuild
5. Build Steps *** NT32 ***
(1). Open a Microsoft Visual Studio* command prompt, type cd C:\MyWorkspace to enter the workspace directory
(2). Use edksetup.bat command to initialize the working environment. edksetup --nt32
(3). Type following command to build Nt32 platform build -t VS2015x86
(4). Upon the build completing successfully there should be the UEFI Application "HelloWorld.efi" in the C:\MyWorkspace\Build\MdeModule\DEBUG_VS2015x86\IA32 directory