A simple UEFI application helps launch PowerMonkey and start custom system boot image (e.g. Windows) automatically.
This work could not have been created without the help of VisualUEFI project and PowerMonkey project.
- Clone the VisualUEFI project repository and follow its instructions to build the prerequisites.
- Clone the PowerMonkey project repository and store its root directory directly in the root of the VisualUEFI repository, follow its instructions to build PowerMonkey, then put it in the EFI partition.
- Clone this repository and store its root directory directly in the root of the VisualUEFI repository. After you finished these steps, the repository should looks like this:
VisualUEFI ├── debugger/ ├── EDK-II/ ├── edk2/ ├── openssl/ ├── PowerMonkey/ <--- PowerMonkey Workspace ├── PowerMonkeyLoader/ <--- This repository │ ├── PowerMonkeyLoader/ <--- Source Code │ │ ├── Config.c <--- Settings │ │ ├── PMLoader.c <--- Main Program │ │ └── ... │ ├── PowerMonkeyLoader.default.props │ ├── PowerMonkeyLoader.props │ ├── PowerMonkeyLoader.sln <--- Visual Studio Solution File │ └── README.MD ├── Samples/ └── ...
- Open
PowerMonkeyLoader.sln
and edit device paths inConfig.c
. To get the device paths of EFI images, you can go to the EFI Shell and typemap
, then find the device path of EFI parititon usefsX:
(X is the path shown in themap
command) andls
command. Typical device paths of images looks like these:PciRoot(0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)/NVMe(0x1,11-20-00-00-00-00-00-00)/HD(1,GPT,ABCDEFGH-1234-5678-ABCD-ABCDEFGHIJK,0x800,0x32000)/EFI/PowerMonkey/PowerMonkey.efi PciRoot(0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)/NVMe(0x1,11-20-00-00-00-00-00-00)/HD(1,GPT,ABCDEFGH-1234-5678-ABCD-ABCDEFGHIJK,0x800,0x32000)/EFI/Microsoft/Boot/bootmgfw.efi
- Build the project directly in Visual Studio. This process shall generate no warnings or errors. The result should be an EFI executable
/PowerMonkeyLoader/x64/Release/PowerMonkeyLoader.efi
Copy the EFI executable to the EFI partition and add the boot entry just like any other EFI images.