
Resources on how to write a UEFI application from scratch? - Majora320
I&#x27;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&#x27;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&#x27;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)
======
tqh
I wrote this: [https://github.com/tqh/efi-example](https://github.com/tqh/efi-
example) It's using the linker script and headers from GNU-EFI. Also check
Zircon bootloader [https://github.com/fuchsia-
mirror/zircon/tree/master/bootloa...](https://github.com/fuchsia-
mirror/zircon/tree/master/bootloader) It is Googles UEFI loader that works on
x86-64 and arm-64. It's quite new, and has it's own linker script.

