Giter Site home page Giter Site logo

efiwrapper's Introduction

EfiWrapper

Overview

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.

Basic architecture

  • 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 the LIBEFIWRAPPER_DRIVERS Makefile variable. Drivers are in the drivers/DRIVER_NAME directories and might rely on external libraries like the libpayload from the Coreboot project.

  • host: produce an efiwrapper_host host executable that can run an EFI binary. See Run an EFI binary on host section.

  • efiwrapper: library that provides the main() entry point which initialize the libefiwrapper library and all the drivers before calling the efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *table) function.

Run an EFI binary on host

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 DRV2

The 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 image

Drivers 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

Dependencies

  • gnu-efi: libefiwrapper and efiwrapper libraries depends on the gnu-efi library for EFI types definitions.

  • drivers/*: most of these drivers depends on the libpayload library from the Coreboot project.

Copyright and Licence

EfiWrapper is licensed under the terms of the BSD 2-Clause.

efiwrapper's People

Contributors

beckwen avatar bhe4 avatar graspempty avatar haoyu-tang avatar jeremy-compostella avatar jwu55 avatar phireg avatar qichen5x avatar qshi5 avatar rdower avatar steven-lgs avatar txu4 avatar ustcxd avatar xihua-chen avatar xinanlux avatar xshahbazintel avatar yang-kaix avatar yayongdx avatar zhimincx avatar zhouji3x avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.