UEFI development made easy
Makefile Visual Basic C
Pull request Compare This branch is 54 commits ahead, 1 commit behind utshina:master.
Latest commit a3d029a Nov 22, 2016 @pbatard update gnu-efi to latest

README.md

UEFI:SIMPLE - EFI development made easy

A simple UEFI "Hello World!" style application that can:

  • be compiled on Windows or Linux, using Visual Studio 2015 (including CodeGen2/Clang support), MinGW or gcc.
  • be compiled for x86_32, x86_64, ARM or AARCH64 targets
  • be tested on the fly, through a QEMU+OVMF UEFI virtual machine.

Prerequisites

  • Visual Studio 2015 or gcc/make
  • QEMU v2.7 or later (NB: You can find QEMU Windows binaries here)
  • git
  • wget, unzip, if not using Visual Studio

Sub-Module initialization

For convenience, the project relies on the gnu-efi library, so you need to initialize the git submodule either through git commandline with:

git submodule init
git submodule update

Or, if using a UI client (such as TortoiseGit) by selecting Submodule Update in the context menu.

Compilation and testing

If using Visual Studio, just press F5 to have the application compiled and launched in the QEMU emulator.

If using MinGW or Linux, issue the following from a command prompt:

make

If needed you can also add ARCH=<arch> and CROSS_COMPILE=<tuple>:

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-

where <arch> can be x64, ia32, arm or aa64.

You can also add qemu as your make target to run the application under QEMU, in which case a relevant UEFI firmware (OVMF for x86 or QEMU_EFI for Arm) will be automatically downloaded to run your application against it.

Visual Studio and Arm support

To enable Arm compilation in Visual Studio 2015, you must perform the following:

  • Make sure Visual Studio is fully closed.
  • Navigate to C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\ARM and remove the read-only attribute on Platform.Common.props.
  • With a text editor running with Administrative privileges open:
    C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\ARM\Platform.Common.props.
  • Under the <PropertyGroup> section add the following:
    <WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport>