pip install conan
Create profiles for the available compilers.
# GCC is commonly the default compiler on Linux distributions
conan profile new --detect default
# Set properly CC and CXX to point respectively to the C and C++ compilers
CC=clang-5.0 CXX=clang++-5.0 conan profile new --detect clang
CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ conan profile new --detect mingw-w64
See .travis.yml
Once you have configured the profiles, clone the repository.
cd test-uefi
mkdir build-dir && cd build-dir
# Run this script to export the conanfiles
../scripts/conan-bootstrap.bash
# You can list the available profiles you previously configured
conan profile list
# Build the dependencies
conan install --profile=default .. --build=missing
# Run CMake & Make
cmake ..
make
make uefi.img (need root's rights to mount disk on loopback device)
make run-qemu-nographics-tty
cmake -DCMAKE_TOOLCHAIN_FILE="../cmake/toolchains/mingw64.cmake" ..
CC=clang-5.0 CXX=clang++-5.0 cmake ..
Debugging EFI applications has only been tested with GCC on Linux. It doesn't work with MINGW. It wasn't tested with Clang.
Start Qemu with the EFI binary without debug symbols. It will wait for a tcp connection on port 5555 before running OVMF.
make run-qemu-gdbstab
Start socat on port 5555.
make debug-tty
...
Image base: 0x<IMAGE_BASE>
Run gdb and load the image with debug symbols to a relocated address
make gdb
> efidebug -f binary-debug.efi -b 0x<IMAGE_BASE>