Want to run Linux on a mobile SoC?
Well good luck with that, because you probably can’t, due to the dominance of Android.
There just isn’t a market for X11 drivers, let alone Wayland drivers, so most manufacturers won’t even think about delivering SoCs which supports them.
- Use Android. Obey your new masters. This is what most people do, if they even consider leaving “Apple world” in the first place.
- Use AOSP (Android Open Source Project) on stock hardware, like a Nexus device. Except that AOSP is getting progressively crippled and abandoned, because Google’s real operating system base is actually Google Play Services. Google really don’t have your best interests in mind with Android. See Google’s iron grip on Android: Controlling open source by any means necessary.
- CyanogenMod. Getting better. You’ve got yourself a usable OS, which some people actually prefer to commercial Android distributions. But you’re still in much the same place.
- Use Replicant, which is built from CyanogenMed, but with every single bit of proprietary stuff removed. Better yet from a “freedom” perspective, but you are now really cutting off your own nose in regards to the hardware you can use. Replicant only works on chronically old devices. And it still doesn’t solve all the privacy/security issues.
- Opt out of Android entirely, and go for the only true mobile Linux which exists, Tizen, which is actually running on X11. You can even buy real devices with it installed like the Samsung Z3. But Tizen has its own problems, the most acute of which, for potential end-users, is the complete dearth of available software, combined with no ability to run Android applications as a stop-gap, which makes the platform practically unusable, IMHO. Even Samsung struggle to get SoCs which support X11/Wayland. And Tizen 3.0, along with its open governance, has still not arrived on commercial devices.
- None of the above? There must be a better way? Well ….
The primary incompatibility between Android (which uses the Linux kernel) and existing Linux distros is the C runtime. For the Android user-land, Google chose to build bionic (primarily to avoid GPL licensing), rendering Android applications binary-incompatible with Linux, even if they are running on the same hardware. Linux userland applications typical use the GNU C Library (glibc).
This was the problem-space facing Carsten Munk in 2012, so he tried something crazy, and it worked. He built a compatibility layer for glibc sitting on top of bionic which allows both Android and Linux user-lands to co-exist on top of an Android kernel.
He later extended that model to GPU drivers, so you can run Wayland on top of Android drivers, which is a very neat trick.
Hybris is the “secret sauce” which lets Sailfish OS, Ubuntu Phone, Plasma Mobile and AsteroidOS work on the mobile/wearable hardware which we actually have to work with right now. You can read more about it on Wikipedia and check out the code on Github.
Hybris is the reason why the following fantastic devices coming to Mobile World Congress this year are possible:
This magic opens up the possibility of Linux user-land in a world of Android-dominance.
We can all hope-and-dream of a future of open hardware and 100% open source drivers and bootloaders for them. In the meantime, Hybris lets those of us who cannot affect that situation continue to build freedom-respecting software in the real world.
Forever obsessing about things which are not under your control is not the path to happiness. Let’s work on the pieces where we can make a difference today.
UPDATE: Also check out the Open Devices project from Sony which is working on a mainline Linux kernel for xperia devices.