pc bios or why smartphones are lame

:: introductory, computers, bios, smart-devices

Today, let me tell you a story about the PC BIOS. Or, why smartphones are lame. I will explain to you why the PC BIOS (and its successor, EFI or UEFI, which I will treat as equivalent for this post) is awesome, and why systems lacking something like a BIOS are lame (generally so-called “smart” devices).

First off, what is the PC BIOS?

The PC BIOS is something most computer users have seen, if not directly interacted with. You know when your computer first starts up and it shows (or did — it is often hidden now) a label not of the operating system (OS) that it will run, but something from the computer or motherboard vendor? That’s a screen given by the BIOS. It usually says something like “Press F2 for options” or “Press F10 for boot menu”. As you can see, it’s the first thing that comes up when a computer boots. It’s been around since the 1970’s. And it’s awesome.

But that just explains where you’ve seen it, not what it is exactly. BIOS stands for Basic Input/Output Stream (and UEFI stands for Unified Extensible Firmware Interface, for the interested). It lives on a chip on the computer’s motherboard. As the first code that is run by the computer at startup, its job is to initialize the various system components, such as the CPU, RAM, storage, and other devices. It then searches for something else to boot into.

Is that it?

So all this thing does is initialize stuff and then pass the buck to an OS or bootloader?? Why am I even dedicating a blog post to this? Why does that matter?

It matters a lot! When it passes execution to the operating system (or a bootloader, which is just another thing that finds another thing to boot, which is also cool for different reasons which I won’t get into here (though not as cool as the bios itself)), it has initialized hardware and provides a standard interface to the operating system. That means that operating systems booting on top of a BIOS don’t need to worry about the specifics of how to initialize components on that specific motherboard, with that specific CPU, etc. This means that any operating system that can use that standard interface can boot on top of all the computers that provide said interface (more or less). Therefore, OS writers can write to one interface, and the results can be used on various completely different motherboards in various completely different configurations. It means that Joe Shmoe Average can get a CD or USB disk with an operating system image, hit F10 (or whatever key it is for a given BIOS), tell his computer to boot into that disk, and WHAMMO! he’s using that operating system and can install it to his hard drive if he wants.

Let’s contrast this to smartphones and other ARM CPU based devices. They have no BIOS or similar thing. So each board, with their vagaries in sundry hardware configurations, must have boot code specific to that board in the operating system! For each of these devices, there must be some magic setup at some non-standard place on some specific storage device for them to be able to launch an operating system, and the user wanting to load a custom operating system has to know all that! It’s complicated stuff. I don’t even know how to set that crap up properly. Contrasted to the fact that I was, without help, able to boot an operating system from a generic disk from the BIOS of a computer as a teenager, this demonstrates a serious issue.

The BIOS is essentially the reason that on desktop and laptop computers it is not hard for even teenagers with no serious computer knowledge or training to boot into (if not necessarily install some of the more complex of) hundreds of operating systems — Windows (not really recommended, but that’s what I first did…), Ubuntu, Arch Linux, FreeBSD, OpenBSD, several other BSD’s, Haiku, FreeDOS, ReactOS, and many many more (including hundreds of different GNU/Linux distributions I haven’t mentioned.

The lack of a BIOS is essentially the reason that on smartphones and tablets you can generally load only the OS image provided by the manufacturer/cell carrier or a handful of closely related modifications of that same OS. This is also why you have to wait for the manufacturer to publish the rare updates to newer versions of the operating system, and why these stop coming after a short time (unless your specific device is veeeery popular).

Without a BIOS to give a standard way for operating systems to load, only an expert can make an OS installer for a certain phone. Without a BIOS, it makes it difficult even for experts to move far from the original to a very different operating system (for instance, the alternative Linux kernel based phone OS called Ubuntu Touch has only been ported with any real success to a few phones, even though both it and Android use the Linux kernel. And you NEVER see, say, a BSD or other kernel on a phone (exception: iphone, but that doesn’t really count, since only Apple has any control over their products)).

Now a BIOS on phones wouldn’t just be helpful to nerds like me who want to run and develop for weird operating systems, but it would also be beneficial to the manufacturers! Currently they have to hire people to tweak each new version of Android that they release to work on all their different phones. Every time they upgrade the OS they have to merge their funky device initialization code into the upstream Linux and Android code to get something working, and it must be a pain! Imagine instead if they could simply maintain — independent of any android or kernel development — a simple BIOS layer on their devices that would present a standardized interface to generic Android builds for the same interface. They would still need to write this initialization code, but it would be in one place, in one component, independent of the other parts of the system that would otherwise require painstaking and careful merging! They could then ship updates whenever they wanted because updates to the kernel or low level Android gunk wouldn’t require fussing with hardware init stuff anymore. They could even just let Google push updates, kind of like how every PC manufacturer just lets Microsoft do its thing with Windows. You don’t have to wait for your laptop manufacturer to give you Windows security updates or a new version of Windows — Microsoft does it whenever the heck they please! Having some sort of BIOS on their devices is a clear path to hardware manufacturers getting out of the OS customizing business, and for consumers to have up-to-date, (more) secure software.

So why don’t phones have this already?

Probably because manufacturers would have to do some minimal collaboration to decide on a standard (though they could just use Coreboot — an open source/free software BIOS/EFI implementation that a few ARM devices actually already use if I’m not mistaken), and most importantly, it would add one more component to phones that would drive the price up a few dollars. So there are reasons why they haven’t… they’re just not very good reasons. Every desktop and laptop computer for decades has had this abstraction layer allowing you to boot any version of any operating system that follows the BIOS protocols. The average phone today is orders of magnitude better and more powerful than any computer from more than a decade ago, yet it lacks a simple functionality that made PCs great. The small price of adding a BIOS chip wouldn’t deter people from buying a phone, especially since the advantages are great! I know people who have bought whole new phones so they could use the latest version of Android. People will be willing to spend a few dollars more to be able to constantly be up to date with their operating systems, and some people (like me) would be willing to pay a lot more for a phone that allows them to easily boot into whatever OS they want, without tons of specialized knowledge and lots of wasted time tinkering with device-specific initialization crap.

So please, hardware manufacturers, start adding a BIOS/EFI to your devices. Please, major mobile OS developers like Google, pressure hardware manufacturers to add a BIOS. It will be so much better for everyone.