What does HackerNews think of edk2?

EDK II

Language: C

#13 in C
#38 in Python
UEFI is not a big bloat of closed source. UEFI is a spec that defines a newer, more feature-rich and easily-extensible way to boot than legacy BIOS. There is a common core, used by just about every single UEFI-based firmware out there, that is completely open source available here https://github.com/tianocore/edk2 and it's completely possible to ship a fully open UEFI system.

It happens to be the case that most organizations using UEFI-based firmware don't, and they keep everything beyond that core closed-source. This is not the fault of UEFI - those companies were closed source beforehand, and that trend continued. UEFI neither caused nor enabled them to be that way.

Now you may not want any of the things UEFI brings to the table, like GPT and booting to partitions larger than 2.2TB, or filepath based booting rather than sector based booting (or sector-booting into a boot manager and file booting from there). That's fine, but there's a difference between "X provides Y which I don't need" and "X causes Z which is bad" - UEFI causes almost none of the things people blame it for.

If you must blame UEFI for one thing, you can blame it for Secure Boot, as that wasn't (easily) possible with legacy BIOS. But neither is it mandated what keys it does or doesn't include, or even that it be implemented/enabled! UEFI has nothing to do with whether you should use Secure Boot - only that you can. The blame lies mostly with Microsoft for pushing so hard on vendors to ship with it enabled/locked/whatever.

Heh. Embedded Development Kit II (EDK2) is a "modern, feature-rich, cross-platform firmware development environment for the UEFI and PI specifications". https://github.com/tianocore/edk2
> Please can you post the link to the github repo? I'm can't seem to find it.

https://github.com/tianocore/edk2

Although https://www.tianocore.org/ is probably a better link to get started.

> Also, which license is it published under?

BSD + a patent grant, https://github.com/tianocore/edk2/blob/master/License.txt

> How are people allowed to publish a fork without publishing the code?

That's a feature of BSD style licenses. Copyleft-style licenses such as GPL avoid this problem.

Almost certainly the code doing the GPT partition table recovery here is stock edk2 + a bunch of proprietary drivers to initialize clocks on the motherboard. The edk2 code is open source under a BSD-ish license, although I take your point that the full blob running on the ASRock motherboard doesn't come with compilable source so it's not much help. https://github.com/tianocore/edk2
UEFI is open source to some extent. There is an Intel project [1] that every company's UEFI is based upon. Even having fully open source BIOS is not enough by itself. The binary that is on your system can be anything. You can somewhat trust it if you can verify it, only if the project would use reproducible builds. But the hardware can still lie to you. What I also have in mind is the trusting trust issues [2].

[1] https://github.com/tianocore/edk2

[2] http://wiki.c2.com/?TheKenThompsonHack

https://github.com/tianocore/tianocore.github.io/wiki/Gettin...

Also, see the "Resources" section of this: https://github.com/tianocore/edk2

Every computer coming out these days should be on EDKII based UEFI Firmware

> Is there any guide to all this? Any standardization?

UEFI is standardized. The reference implementation of UEFI called EDK II is even open source. [0]

However original device manufacturers (ODMs) are lazy, and independent BIOS vendors (IBVs) have moved in to offer ODMs customization (e.g. the fancy configuration GUI) based on EDK II but which aren't open source and are sprinkled with their proprietary magic. Think AMI, Phoenix, etc. the same people who were making BIOSes.

The specific Intel features like TXT, Boot Guard, AMT, etc are not to my knowledge open specifications, so if you wanted more information, you'd probably need to sign a very long NDA with Intel. Clearly there is information available, since the IBVs integrate this functionality into their product.

In summary:

- UEFI is an open standard with an open source reference implementation [0]

- TPM is an open standard. [1]

- Intel specific features are, to my knowledge, proprietary

- IBV products (AMI, Phoenix) are proprietary

[0] https://github.com/tianocore/edk2

[1] https://en.wikipedia.org/wiki/Trusted_Platform_Module

> And the fact that black-box UEFI is built in

UEFI isn't any more black-box than BIOS in general. Sure, I'd rather run entirely FOSS firmware, but in the absence of that, UEFI doesn't make things any worse. If anything, it allows quite a bit more introspection and extensibility. And its core is FOSS (https://github.com/tianocore/edk2), just not the versions shipped by board/system vendors.

(U)EFI is essentially a little OS that eventually loads the OS that runs the software you care about. Intel sponsors most of the core OS code (mirrored) at: https://github.com/tianocore/edk2

A Bios vendor takes that code, drops in a bunch of hardware init code from Intel (or AMD), adds thier own user interface, "csm16" old-school BIOS implementation, and value-adds like debugging and automation for factory test and provisioning.

In order to comprehend anything in the codebase, the first step is probably to get acquainted with the local vernacular. https://github.com/tianocore/tianocore.github.io/wiki/Acrony...