Hacker News new | ask | show | jobs
by bogomipz 3152 days ago
>"UEFI is a proprietary and closed-source operating system, with a codebase almost as large as the Linux kernel"

Does anyone know how they were able to compare the size of the codebase given that UEFI is proprietary/closed-source?

4 comments

UEFI is just a spec. Intel did release an open source implementation: http://www.tianocore.org
My understanding is that most of the UEFI implementations out in the wild is based on this one, since the spec is pretty big and definitely not something a random mobo vendor would like to implement.
Most UEFI in the wild is based on Tianocore/EDK-II, which has about 1.5 million SLOC, plus about 400,000 source lines in header files. Some subset of this would actually be running on the device, but this doesn't include the drivers and the very base of the firmware. Let's say maybe two million SLOC is running on a typical UEFI firmware blob.

Linux also lacks the most basic level of the firmware (which is most likely handled Coreboot? I'm not fully clear on what NERF is overall). A much smaller proportion of Linux codebase would be running on a given device, as compared to the EDK-II, though. Who knows. /kernel and /arch/x86 together make about 440k SLOC.

Funnily enough, this is actually the second time a "Linux BIOS" has been tried. The first time was called LinuxBIOS (later renamed to Coreboot), and the idea was quite literally to put a kernel on ROM and have as little firmware as possible to get to a booted system.

Non disclosure agreement? Or just asked the UEFI vendor(s)?
Compare the size of the binary, perhaps?
While that would also be a somewhat useful measure in this context, there's very little correlation between the size of the codebase and the size of the binary.

Programming languages and styles can vary in verbosity a lot. For example, if UEFI is written in some form of assembler code, then you quickly get a lot of lines of code while the binary doesn't grow particularly. On the other hand, high-level programming languages like Java, or even moreso functional and logic programming languages like Haskell and Prolog respectively, can generate huge binaries out of even just a few lines of code.