"drivers often come in the form of binary blobs"

This is a quote from the Fairphone web site:

drivers often come in the form of binary blobs

What does this mean?

Does this mean, that Linux is the only operating system one can run on the Fairphone?

The background for my question is: I am searching for a hardware, which can be used to write an operating system from scratch similar to this tutorial. Would this be possible on the Fairphone hardware? Or are there parts of the hardware, which are not documented well enough to write a driver from scratch?

I’m not a developer, but from what I learned here on the Forum, it’s close to impossible to write your own drivers for all the integrated hardware of the phone, i.e. the processor, camera, speakers, microfones, all the sensors, the usb interface, wifi…
As a matter of fact, since qualcomm probably won’t supply any new drivers for the FP2 hardware, there might not be any updates further than android 6, because noone but the vendor of the chipset can sensibly devleop the proper drivers.
it would be an entirely different story, if the drivers were open source and one could tinker with the code. this is not the case however and the drivers are closed and are being supplied to fairphone as binaries, i.e. compiled form, that can not be turned back into sourcecode and can not be modified anymore. There are some efforts to provide alternative operating systems for the FP2 and you can read on it here in the Forums, but developing yout own OS would certainly be a very big effort…

And all alternative operating systems also depend on these closed drivers/firmware.

It is pretty much impossible to write such drivers/firmware on your own. If you want a phone very close to real open hardware, you would need to get a Neo900 (if this ever gets ready), and even their hardware is not entirely open. Some introduction here:

If we are talking Kernel: Yes, no other kernel makes any sense right now. Windows has the NT Kernel → closed source. macOS has the XNU kernel → closed source. Linux → open source.

Basically the only drivers which are available for ARM SOCs run on Linux and are mostly compiled specifically for Android (which is why something like libhybris is needed for “alternative operating systems”).

1 Like

libhybris is for libc, which is user-mode. What has this to do with kernel-mode?

Is just the firmware, which has to be loaded as a blob into a device, closed source. Or is it the driver for the OS? The first would make it possible to write a kernel from scratch. But the later will prevent writing a kernel from scratch.

I dont care about firmware. I just care about drivers. This is a difference.

Drivers for “peripherals” like camera, display, bluetooth, etc are blobs and run a layer on top of the kernel. This is called Android HAL (Hardware Abstraction Layer).

I think writing drivers from scratch is nearly impossible. I’m not a systems developer, but the people at Mozilla with B2G/FxOS, the people at Canonical with Ubuntu Touch, the people at KDE with Plasma Mobile and the people at Jolla with Sailfish OS, all of them, use the device kernel sources and provide slightly different methods to reuse the blobs:

  • FxOS is built over a stripped down Android which, well, “boots to Gecko”, which runs Gaia then
  • Ubuntu Touch boots to the Ubuntu rootfs and uses libhybris over a LXC Android container (a kind of chroot?), included as a separate image
  • Sailfish OS boots to a GNU rootfs and uses libhybris too
  • Pasma Mobile uses libhybris too, I don’t know the internals yet

It may be that these OSes were thought for the global scope, not for a particular device. Libhybris seems to be the only option available for the task. Note that Android blobs are not compiled with GNU C (glibc), but with Bionic, the C library modified by Google for Android (I’m not so technical here because I don’t clearly understand the differences, honestly)

If you want, I can search for some kind of paper I found somewhere in the Internet about Ubuntu Touch architecture in deep.

1 Like

Plasma Mobile runs in an LXC container on top of Android (AOSP/LineageOS) and also uses libhybris.

About glibc vs bionic: They are many different C library (libc) implementations, the most popular one used in most (GNU/)Linux systems is glibc. Basically libhybris is for running binaries/shared objects compiled for/with bionic in a glibc environment (think like Wine for running win32 applications on Linux). If the different vendors would provide their drivers also in a compiled form with glibc, then libhybris wouldn’t be needed but as they (eg Qualcomm) aren’t interested in providing these, libhybris is needed.

I hope this is at least a bit understandable and somewhat correct :slight_smile:

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.