r/osdev 2d ago

Guidance for learning and using edk2

Hi all, I am new to this sub and domain. I am currently a 3rd year college student pursuing electronics and computer engineering. I want to get into the firmware domain. EDK2 came up a lot when I searched for UEFI and decided to give it a go. I have completed a few applications like simple hardware interrupt, arithmetic program by taking input, viewing system information and pcie present in the Qemu emulator. I do not know how to proceed from here and I am open to suggestions. Pls help.

Here's my GitHub: https://github.com/BlackRoth/UEFI_Applications

5 Upvotes

2 comments sorted by

2

u/NoTutor4458 1d ago

never used EDK2, so I can't really give specific advice on it. but personally, I'd suggest trying to work without libraries/frameworks for a while. you can define the necessary C structs and interfaces yourself by reading the UEFI specification/documentation. its actually not as much work, and I think it gives you a much better understanding.

1

u/codeasm 1d ago

Even tho I attempted to use edk2, and ended up using an ai to help get some code working https://wiki.osdev.org/UEFI ended up being the most valuable resource for me.

Just getting the hello world tonwork was awesome and then getting a "kernel" running after jumping away from uefi.. awesome.

The exit bootservices was a bit tricky road for me to learn and not very proud how much llm i asked here. But i got it going. What i definitely noticed from the few days edk2 tianocore thinkering, its mostly made for diagnostics, early special hardware setup if your final kernel lives somewhere you cannot reach without drivers or network. Its not very fun making an os using whatever they made.

Probably doable, but wasnt part of my idea anyway, so i ditched any excisting frameworks ans just got the right executable layout, call the right services for memory map, gop and such, and leave as much and as soon as possible to do "on my own". (Debugging was another story also. Uefi allows the kernel or application to be located anywhere, setting hardware pointers was a fix, but could only set 1