-
Notifications
You must be signed in to change notification settings - Fork 1
UDK2018 How to Build
How to Build UDK2018
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.12.01 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
- Download the pre-compiled Openssl binary from https://wiki.openssl.org/index.php/Binaries. Search for a Windows binary in the list of "Third Party OpenSSL Related Binary Distributions" table that will be Windows binary. Go to the third party site to download the latest version of Windows x64 86 or Win32 binary. Download and extract to C:\Openssl. Make sure C:\Openssl is added to system environment variable 'PATH'.
-
Create the full Source Code directory for the UDK2018 release
- Create a working space directory in the build machine, for example, C:\MyWorkspace
- Download the official UDK2018 release .zip file from the UDK2018 Release Page
- Download - UDK2018 edk-vUDK2018 Workspace Source code (zip file)
- Extract files in [edk2-vUDK2018] to the working space directory C:\MyWorkspace.
-
OR Checkout the vUDK2018 Tag from GitHub with the following "git" command
- run
git clone https://github.com/tianocore/edk2.git vUDK2018
- Go to the vUDK2018 directory, and from there run:
git checkout tags/vUDK2018 -b vUDK2018
- Move all files and folders under "vUDK2018" to "C:\MyWorkspace"
- run
-
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.0g. Download it from https://github.com/openssl/openssl/archive/OpenSSL_1_1_0g.zip Extract it to C:\MyWorkspace\CryptoPkg\Library\OpensslLib, and rename its directory name to openssl
-
Compile the BaseTools 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 edksetup.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\NT32IA32\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 is installed well. a) Some operations need switch to user "root" to execute. b) At Ubuntu, you can type
"sudo apt-get install git"
under terminal "Cnt-Alt-T" to install git.
-
-
Install NASM 2.12.01 or later. At Ubuntu, you can type "sudo apt-get install nasm" under terminal 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 to install it. You can also download the source package from https://acpica.org/downloads and install it following the instruction on the website.
-
-
Create the full Source Code directory for the UDK2018 release
- Create a working space directory in the build machine, for example, ~/src/MyWorkspace
- Download the official UDK2018 release .tar file from the UDK2018 Release Page
- Download - UDK2018 edk-vUDK2018 Workspace Source code (tar.gz file)
- Extract files in [edk2-vUDK2018] to the working space directory ~/src/MyWorkspace.
-
OR Checkout the vUDK2018 tag from GitHub with the following "git" command
- Run
"git clone https://github.com/tianocore/edk2.git vUDK2018"
- Go to the vUDK2018 directory, and from there run:
git checkout tags/vUDK2018 -b vUDK2018
- Move all files and folders under "vUDK2018" 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.0g. Download it from https://github.com/openssl/openssl/archive/OpenSSL_1_1_0g.zip Extract it to ~/src/MyWorkspace/CryptoPkg/Library/OpensslLib, and rename its directory name to openssl
-
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