forked from tianocore/edk2
-
Notifications
You must be signed in to change notification settings - Fork 1
UDK2017 How to Build
Laurie Jarlstrom edited this page Jun 28, 2017
·
3 revisions
How to Build UDK2017
Table of Contents
The steps below are verified on Microsoft Windows 10 Enterprise*:
-
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
-
Create the full Source Code directory for the UDK2017 release
- Create a working space directory in the build machine, for example, C:\MyWorkspace
- Download the official UDK2017 release .zip file from the UDK2017 Release Page
- Download - UDK2017 edk-vUDK2017 Workspace Source code (zip file)
- Extract files in [edk2-vUDK2017] to the working space directory C:\MyWorkspace.
-
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"
- run
-
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.
Cd C:\MyWorkspace
- Run
git clone https://github.com/tianocore/edk2-BaseTools-win32.git
- Enter folder edk2-BaseTools-win32
- Run the command
git checkout 0e088c19ab31fccd1d2f55d9e4fe0314b57c0097
Cd C:\MyWorkSpace
- 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")
-
Generate OpenSSL* Crypto Library
- 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.
-
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
- Open a Microsoft Visual Studio* command prompt, type
cd C:\MyWorkspace
to enter the workspace directory - Compile the BaseTools C source tools
- Open a Microsoft Visual Studio* command prompt, type
set PYTHON_HOME=C:\Python27 set EDK_TOOLS_PATH=%CD%\BaseTools BaseTools\toolssetup.bat Rebuild
-
Build Steps *** NT32 ***
- Open a Microsoft Visual Studio* command prompt, type
cd C:\MyWorkspace
to enter the workspace directory - Use edksetup.bat command to initialize the working environment.
edksetup --nt32
- Type following command to build Nt32 platform
build -t VS2015x86
- Upon the build completing successfully there should be the UEFI Application "
HelloWorld.efi
" in the C:\MyWorkspace\Build\MdeModule\DEBUG_VS2015x86\IA32 directory
- Open a Microsoft Visual Studio* command prompt, type
The below steps are verified on Ubuntu 16.04 LTS Desktop*:
-
Setup Build Environment
- Follow instructions for setting up the build environment on tianocore.org. "https://github.com/tianocore/tianocore.github.io/wiki/Using-EDK-II-with-Native-GCC"
- Please notice that here the root is
"~/src/MyWorkspace"
instead of"~/src/edk2"
- Make sure BaseTools is built and required software like iASL compiler
are installed. Some operations need switch to user "root" to execute.
At Ubuntu, you can type
"sudo apt-get install git"
under terminal prompt "Cnt-Alt-T" to install git. - Install NASM 2.0.7 or later.
At Ubuntu, you can type
"sudo apt-get install nasm"
under terminal prompt to install it. You can also download the source package from http://www.nasm.us/ and install it following the instruction on the website. - Install IASL 20150818 or later.
At Ubuntu, you can type
"sudo apt-get install iasl"
under terminal prompt to install it. You can also download the source package from https://acpica.org/downloads and install it following the instruction on the website. - Install the C Compiler- Ubuntu 16.04 LTS you can use GNU C compiler (v5.4.0)
At Ubuntu, you can type
"sudo apt-get install gcc-5"
under terminal prompt to install it.
-
Create the full Source Code directory for the UDK2017 release
- Create a working space directory in the build machine, for example, ~/src/MyWorkspace
- Download the official UDK2017 release .tar file from the UDK2017 Release Page
- Download - UDK2017 edk-vUDK2017 Workspace Source code (tar.gz file)
- Extract files in [edk2-vUDK2017] to the working space directory ~/src/MyWorkspace.
-
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 "~/src/MyWorkspace"
- Run
-
Generate OpenSSL* Crypto Library
- Open file "~/src/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.
-
Build Steps *** MdeModulePkg ***
- Open a terminal and type
"cd ~/src/MyWorkspace"
to enter the workspace directory. - First build the BaseTools by typing
"make -C BaseTools"
- Initialize the build environment by typing
". edksetup.sh"
. - Type following command to build platforms using GCC v5.4.0
"build -p MdeModulePkg/MdeModulePkg.dsc -t GCC5"
- Upon the build completing successfully there should be the UEFI Application "
HelloWorld.efi
" in the ~/src/MyWorkspace/Build/MdeModule/DEBUG_GCC5/IA32 directory
- Open a terminal and type
If you have questions please email the edk2-devel mail list.
See also Getting Started with EDK II