Git Product home page Git Product logo

uefi-examples's Introduction

UEFI examples in Zig

This repo contains examples about how to use Zig to build UEFI apps.

Recommended reading order:

  1. hello
  2. protocols
  3. events
  4. memory
  5. exit_boot_services
  6. efivars
  7. hii (TODO)

How to build and run.

Run zig build in any of the subdirectories to build. Then you can copy the output file to a FAT32 formatted device to efi/boot/bootx64.efi. Alternatively you can use QEMU with qemu-system-x86_64 -bios /usr/share/edk2-ovmf/OVMF_CODE.fd -hdd fat:rw:. -serial stdio.

FAQ

How much stack space do I get?

At least 128 KiB before calling exitBootServices(). After calling exitBootServices() you have to provide at least 4 KiB.

Why does my computer reboot after 5 minutes?

By default, your firmware's watchdog reboots your system after 5 minutes if your application does not call exitBootServices(). You can disable the watchdog timer using boot_services.setWatchdogTimer(0, 0, 0, null).

Where do I get more information?

Read the spec. It's really well written.

Further reading

uefi-examples's People

Contributors

nrdmn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

uefi-examples's Issues

Build fails on Linux Zig 0.12.0

error: root struct of file 'std' has no member named 'build'
const Builder = @import("std").build.Builder;
                ~~~~~~~~~~~~~~^~~~~~

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.