TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Resources on how to write a UEFI application from scratch?

2 pointsby Majora320over 7 years ago
I'm interested in building a toy OS, and the modern way of building one seems to be using UEFI. There are a few tutorials for writing a simple UEFI OS, but most of them use either GNU-EFI or EDK2, and I'd like to build one from scratch using only a C compiler, assembler, and linker. I tried getting clang to produce a PE32+ executable (I'm on Linux), but was unsuccessful. Any tutorials or places to find good documentation on this? (wiki.osdev.org has much more about legacy boot than UEFI)

1 comment

tqhover 7 years ago
I wrote this: <a href="https:&#x2F;&#x2F;github.com&#x2F;tqh&#x2F;efi-example" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;tqh&#x2F;efi-example</a> It&#x27;s using the linker script and headers from GNU-EFI. Also check Zircon bootloader <a href="https:&#x2F;&#x2F;github.com&#x2F;fuchsia-mirror&#x2F;zircon&#x2F;tree&#x2F;master&#x2F;bootloader" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;fuchsia-mirror&#x2F;zircon&#x2F;tree&#x2F;master&#x2F;bootloa...</a> It is Googles UEFI loader that works on x86-64 and arm-64. It&#x27;s quite new, and has it&#x27;s own linker script.