Hacker News new | past | comments | ask | show | jobs | submit login

Paraphrase the question in the reverse and you get your answer: What makes this possible on Windows desktops?

Stable binary driver ABI. Hardware monoculture. Expensive driver certification program. Letting hardware vendors release binary drivers without releasing the corresponding sources. An opt-out automatic update mechanism.

(Disclaimer: I work at Google, but not on the Android team.)

Hardware monoculture? Surely you must be joking. There are only a few to several dozen current Android phone models being sold at a given time. There are thousands upon thousands of PC models being sold among major manufacturers. This doesnt even begin to account for home builds or customizations. There is a very slim chamce that anyone has the exact same hardware config as my PC, yet Windows still has to work on it. Sure, vast majority of Windows is x86/x64, but that doesn't mean it is a hardware monoculture.

If you break those PC models open what's really different? The hardware interfaces of PC has almost always been stable since the age of IBM PC clones. It might not be a monoculture in terms of all the RGB lightings you can put on your machine, but you definitely don't need to worry about different protocols. All the while Android phones can have the weirdest SoC's on the planet in them.

I admittedly have zero experience with configuring HW with ARM.

However, to say that HW interfaces on the PC have been stable since the age of IBM PC clones is a joke. In the DOS days, users manually had to manually set IO memory addresses and IRQ levels. Early Windows sat on top of DOS, so still had to do it there. Plug'n'Play didn't show up until Windows 95, and even then it was hit and miss. Some devices worked, others required manual configuration. RTM Win95 didn't support USB, either. That took the equivalent of a service pack (although, IIRC, they went by a different name back then. I want to say OSR1 added USB 1.1 support). Windows drivers didn't really get friendlier until the push to the NT kernel & it's HAL. Win2k had limited, but good support. WinXP got better. Vista was a step backwards. Win7, 8 and 10 have incrementally improved on Vista. Even on Windows 10, though, I have updates that "forget" a subset of my USB controllers. Windows doesn't know about drivers for my HOTAS. Most recent windows updates cause it to forget about my secondary monitor. Half the time after an update, my USB keyboard doesn't work (I have to login on my desktop using an on-screen keyboard to correct settings). I'm probably one of the only (or a small handful) of people that have a Geforce 690 & 1080 in the same system. Sure, PC might be better in that most peripherals go over USB. But, not all USB devices work with a generic driver, and Windows often doesn't include non-generic drivers for all but the most popular devices.

Let's ignore the historical legacy non-PNP ISA config nightmare, because they do not bring anything of value in this discussion.

The core system of PC is highly compatible with OSes in pretty much all directions. (Well now even if I don't ignore the non-PNP ISA configurations stuffs, it does not really change the situation: those were not for core system stuffs)

Then you have drivers for various bus controllers and peripheral, some of which are crucial for using your PC in practice, but as soon as the necessary driver exists, loaded by the kernel way after the core boot, and highly abstracted on all modern OSes (it only access the HW through functions abstracted by the OS)

For non-ancient PC, you even have with ACPI some abstracted functions, provided by the HW, and used at the runtime by the OS. It's to be considered as part of the core plateform, as if it was a pure HW interface, given what we are discussing about. The NT HAL, btw, is a vestigial of early NT years, and is of zero interest for the purpose of PC compatibility today (there is only one HAL that is in use on modern PCs, and IIRC switching the HAL was not even enough when multiple were in use IIRC, other MS binaries still needed to be recompiled -- so the NT HAL is merely an internal detail that bring no consequence in backward or fw compat as far as decoupling of binaries and their update of a partial subset in a system is concerned)

Now the situation for ARM SoC for Android is NOT the same. You just don't boot a generic ARM Linux kernel to driver your random ARM SoC of your random phone. Because even what could constitute an equivalent core system as what exists for PC, follows no standard.

You still need all of these things. An x64 Intel Processor manufactured in 2017 still boots into real mode at startup exactly like the original did 30 years ago. Complete with segmented mode without memory protection, multitasking, or code privilege levels, just as AT/AT compatible as the day it was born.

Thanks for reminding me of Plug'N'Pray. Some stuff worked but a lot didn't, likely the cheap rubbish hardware I bought with lame drivers. And trying to load a mouse driver for DOS and play a game that needed himem. Or trying the set the right IRQ to get the DOS game to believe you had an Adlib or SB16 compatible card....

The kids today don't know how easy things are with unified drivers for audio on Mac OS etc. I mean, even USB coming out was amazing instead of serial devices and guessing the COM port? Which LPT1?? And dial up etc etc so easy now.

My understanding is the interface between hardware and kernel is more vendor-specific on ARM than it is on the PC. So the PC has lots of hardware diversity but the way you talk to a given device is already somewhat abstracted from the perspective of the kernel.

A major thing you have on PCs that you do not have on ARM is bus query.

With PCI and later the OS can ask each device on the bus to ID itself and thus figure out if it is a known device type or not (and if not, ask the admin to install drivers).

On ARM You have things sitting off various buses that expect the kernel to know what they are and how to talk to them from the word go.

It has gotten better as now there exist something known as a device tree that can be read by the kernel at boot. But not every SoC provide support.

Intel started work on Moblin back in the day because Microsoft balked at bringing Windows to a x86 platform without PCI device enumeration.

Heck, if you crack open the ARM based Windows RT tablets you will find quite the odd duck of an ARM SoC inside. One more reminiscent of a x86 PC than what you find in your average Android device.

I think you're overstating the value of most of those things, because it's also possible on Linux desktops too. You can take a typical off-the-shelf x86 laptop, pop a disk in, and install Linux on it.

IMO the key point out of the things you mentioned is the hardware monoculture, because that definitely does help people get Linux running (and keep it running) on new hardware. I'm skeptical about most of the others.

Your example actually helps prove the point: the fact that Linux can use some of these advantages but not others lines up pretty neatly with the fact that it's generally harder to get Linux running on a given system than it is Windows. I say this as someone whose used Linux and thinks that practically everyone could benefit from giving Linux a try as their primary personal computer (with the always-major caveat that you have to be careful about hardware purchases and/or have someone knowledgeable set it up).

Windows runs on many CPU architectures. Android phones are packed with binary blobs.

Windows is one giant binary blob. Also, Android runs on many CPU architectures as well.

So it's Linux fault and Fuchsia is the solution, right? :)

What is this "fuck sea" you're talking about and how do I sail in it?

It's Google's best shot so far at provoking "Android is dead" rumours: http://www.androidpolice.com/2017/02/15/speculation-around-g...

But the reason I brought it up is that Fuchsia OS will have a stable driver ABI.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact