Changes the boot screen image on a UEFI computer.
This is a remake of Ben Wang's windows_custom_loader.efi
, the source code of which is long lost. Several incompatiblities with non-Apple UEFI implementations are addressed, and you can now replace the logo without recompiling the whole program.
- UEFI firmware (some old EFI firmwares might be supported as well)
Run BGRTInjector.efi
either manually or automatically before your OS loads. You need to disable Secure Boot or sign it on your own, obviously.
Put a release build of BGRTInjector.efi
(driver mode) into ESP:\EFI\refind\drivers_x64
and reboot.
Put a release build of BGRTInjector.efi
(Windows loader mode) into your ESP volume and set it as the default loader. This can be achieved by putting it to ESP:\EFI\boot\bootx64.efi
. (Firmware on some devices will load Windows first which is a violation of the UEFI standard. You might need to manually register a UEFI boot entry on these systems.)
To customize the image, put a 24-bit BMP image named boot_image.bmp
into the root directory of your ESP volume (where BGRTInjector.efi
lives).
Convert a 24-bit BMP image to C-style array initializer, replace default_boot_image.bmp.inc
and compile. To do the convertion you can use bin2array:
python3 bin2array.py -O default_boot_image.bmp.inc your_image.bmp
Flags:
_DEBUG
: debug output and more pauses to see the log on the screenLOAD_WINDOWS
: Windows loader mode. It will automatically search forEFI\Microsoft\Boot\bootmgfw.efi
and start it after BGRT table has been injected
Requirements:
- Visual Studio 2017 or higher
- C++ desktop development tools
- MSVC C++ build tools (for architectures you need)
- MSVC C++ Spectre-mitigated libs (for architectures you need)
- QEMU
Open BGRTInjector.sln
in Visual Studio and click Build Solution.