Android phones for example

  • Skull giver@popplesburger.hilciferous.nl
    link
    fedilink
    arrow-up
    11
    ·
    4 hours ago

    Linux works on desktops because the companies making desktop hardware put somewhere between “some” and “massive” effort into making mainline Linux work. It’s not that difficult for motherboards (most of the work is done for motherboard manufacturers already) but for anything from CPUs to disk drives, manufacturers write Linux code and submit it back upstream. Without companies wanting to make Linux work on PC, it simply wouldn’t. Of course there are plenty of volunteer and hobbyist programmers who also contribute, as well as people paid by the various free software funds, but they generally do smaller stuff rather than complete device support. It also helps that computers have standardised ways of booting and identifying what hardware is present.

    On ARM, companies like Qualcomm take the inverse approach. They take Linux, make some modifications (usually ones that will never be accepted upstream because of code quality or style concerns), build binary drivers for that specific version of Linux, and then hand that entire thing to companies like Google and Samsung. These vendors have no interest in upstreaming code and make a lot of money selling ongoing maintenance for old, customised kernels.

    Booting ARM devices is also a pain. Instead of BIOS/UEFI, every vendor has their own boot method, usually involving a modified version of u-boot that’s customised to do whatever weird shit the vendor needs.

    Even if you get Linux to boot, you’ll probably struggle with basic features like “not burning through the battery in ten minutes” without vendor code or binaries.

    There are projects to bring normal Linux to phones. Ubuntu Touch is actually quite usable, Plasma Mobile works on a few devices, and postmarketOS has a surprising range of working hardware. One big challenge is support for hardware accelerated wifi, and the latter is doing quite well for that.

    Still, despite all the hard work, some stuff like binary drivers just won’t make it into the kernel without major effort for every model of SoC. For Android phones, the custom upstream kernel can form a good basis, but someone needs to go through the code and make it Linux compatible. WiFi and Bluetooth can usually be hacked together but someone needs to do it. Cell modems are even worse, so calling and texting are even less likely to work.

    Basically, there’s no commercial interest, the hardware works very differently, and it’s a lot of work. It can be done if someone is passionate enough about Linux on their device but only for one or a few related models in that case.