EfiWrapper is a library which simulate a UEFI firmware implementation. Its first purpose is to run a subset of the Kernelflinger OS loader to run in a non-UEFI environment.
-
libefiwrapper: library that provides a basic implementation of the Boot services and Runtime services. It includes basic EFI variable management (no storage) and serial IO protocol support. It also provides an abstraction for storage class implementation. This library is system independent and MUST be kept that way. -
libefiwrapper_drivers: library including all the protocols specified by theLIBEFIWRAPPER_DRIVERSMakefile variable. Drivers are in the drivers/DRIVER_NAME directories and might rely on external libraries like thelibpayloadfrom the Coreboot project. -
host: produce anefiwrapper_hosthost executable that can run an EFI binary. SeeRun an EFI binary on hostsection. -
efiwrapper: library that provides the
main()entry point which initialize the libefiwrapper library and all the drivers before calling theefi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *table)function.
To build efiwrapper_host, run the following command in your Android
build environment:
$ make efiwrapper_host-<BUILD_VARIANT>Where <BUILD_VARIANT> is either user, userdebug or eng.
$ efiwrapper_host --help
Usage: efiwrapper_host [OPTIONS] <EFI binary> [ARGS]
OPTIONS:
-h,--help Print this help
--list-drivers List available drivers
--disable-drivers=DRV1,DRV2 Disable drivers DRV1 and DRV2The efiwrapper_host has built-in drivers:
$ efiwrapper_host --list-drivers
Drivers list:
- disk: Emulate eMMC storage
- event: Event management for host
- tcp4: TCP/IP protocol
- fileio: File System Protocol support
- gop: Graphics Output Protocol support based on Xlib
- image: PE/COFF imageDrivers can be independently deactivated. For instance, if you want to run Kernelflinger EFI binary witout the Graphic Output Protocol support:
$ efiwrapper_host --disable-drivers=gop kernelflinger.efi -f-
gnu-efi: libefiwrapper and efiwrapper libraries depends on the gnu-efi library for EFI types definitions.
-
drivers/*: most of these drivers depends on the
libpayloadlibrary from the Coreboot project.
EfiWrapper is licensed under the terms of the BSD 2-Clause.