In this article, I will show you how to compile EDK II DUET (BIOS GPT Bootable)
First, we need a Operating System, so I choose Ubuntu 16.04 LTS as TianoCore recommended, during testing, it works like a charm.
Using other version of Linux distro might works, TianoCore EDK II using very old GCC version, 4.9 to be precise, GCC 5 supported. Other version might throw an error, compiling bios will mark warning as error, so I suggest use Ubuntu 16.04 LTS
Get Ubuntu 16.04 installed, either real PC or VM, and follow this command to get started:
Development
Get common apt-get in order to compile EDK II
sudo apt-get install build-essential git uuid-dev iasl nasm
Make src
folder at home
folder
mkdir ~/src
cd ~/src
Clone TianoCore EDK 2 (UDK2018)
git clone --single-branch --branch UDK2010.SR1 https://github.com/tianocore/edk2
Build BaseTools
cd edk2
make -C BaseTools
. edksetup.sh
Configure compile target
Before run build
command edit target file first nano Conf/target.txt
Find ACTIVE_PLATFORM
Replace Nt32Pkg/Nt32Pkg.dsc
with DuetPkg/DuetPkgX64.dsc
Find TARGET_ARCH
Replace IA32
with X64
Find TOOL_CHAIN_TAG
Replace MYTOOLS
withGCC47
Build EDK II
After done configuring, now you can start typing build
to compile
DUET UEFI
Now we going to make BIOS PC capable to boot an UEFI Operating System and able to use Large 2TB disk
. edksetup.sh BaseTools
build -p DuetPkg/DuetPkgX64.dsc -a X64 -t GCC47
Make sure Efildr
file must less than 470k, you can remove unnecessary drivers at DuetPkg /DuetPkg.fdf
by adding #
at beginning of line