Mainline Linux kernel for the Jolla C2

Since I got my Jolla C2, I’ve been trying to get a (close-to-)mainline Linux kernel running on it. Now that at least some things are working, I’ve decided to create this thread to report the mainlining progress.

The following things are working right now:

  • Display
  • Touchscreen
  • GPU
  • USB in peripheral mode (no host mode yet)
  • Battery charging and fuel gauge
  • Power off (but no reboot for some reason)

The changes are available at Files · ums9230 · linux-mainlining / Linux · GitLab.

To boot this kernel, use this U-Boot fork as a secondary bootloader. The installation process is described here.

42 Likes

Uh, nice! Please continue your work! It always bothers me to use decades old kernels on embedded devices.

2 Likes

Even though i dislike the C2 i have to give MAJOR props for your work. :slightly_smiling_face:

1 Like

Sailfish OS community port for the Jolla C2

A Sailfish OS community port is now available for the Jolla C2 based on the experimental close-to-mainline kernel. The currently recommended way to boot it is from an SD card, which allows you to keep your existing Sailfish OS data. However, this port is provided without any warranty, so data loss is still possible. Install at your own risk!

A prebuilt image for the Sailfish OS part is available here. Kernel building and SD card partitioning still need to be done manually.

Updated kernel build instructions are here: linux-mainlining / Sailfish OS porting / Jolla C2 kernel building · GitLab

I’ve also started writing a WiFi driver, which is still in an early stage but should already be enough to connect to the internet.

Supported features

  • WiFi, tested with a WPA2 network. Internet connectivity works.
  • Bluetooth
  • Display, Touchscreen, GPU
  • Battery charging and fuel gauge
  • USB, USB power delivery protocol (disabled in Jolla’s downstream kernel) and WIP host mode support
  • Initial code for modem bringup

Features that are not working yet

  • Standby mode (lipstick is not even blanking the display properly)
  • Audio, but Bluetooth audio works
  • Mobile data
  • WiFi AP mode (tethering)
  • GPS
  • Sensors
  • Camera
  • Video acceleration (but videos play anyway)
  • AppSupport (because this is a community port, but also because the version offered with Sailfish OS does not support mainline kernels)

Known issues

  • Bluetooth crashes when trying to use a headset in handsfree mode (if possible at all), but A2DP should work
  • WiFi and Bluetooth sometimes do not work. This happens when the wireless connectivity processor is booted before the GNSS processor, which is currently broken and causes a connectivity crash. This does not happen on every boot, so reboot if you experience this problem
  • USB host mode only works with simple devices like mouse and keyboard, USB storage is broken
  • Jolla store offers AppSupport installation because this is a C2, but it does not work and is not officially supported
  • Data role switching with USB PD might still be broken
17 Likes

Mobile data is now implemented in the close-to-mainline kernel port! SMS also seems to work, but this may depend on the provider since there is no VoLTE support yet. Only the first SIM slot works, but this will be fixed later.

For those who are interested, here are the changes I had to make to oFono: Comparing sailfishos:master...affenull2345:unisoc · sailfishos/ofono · GitHub

To avoid having to keep old images on my server, there will only be a single link to the latest image from now on: https://storage.abscue.de/private/zImage/Sailfish_OS-s19mps-latest.zip

The installation process was simplified so that the image can now be downloaded and installed directly on the Jolla C2. The kernel no longer needs to be built separately. After downloading the image, just run the following commands on the phone (make sure an SD card is inserted and there is no important data on it):

unzip SailfishOS-5.0.0.62-s19mps-0.0.1.202503152044.zip
cd SailfishOS-5.0.0.62-s19mps-0.0.1.202503152044/
./install-on-device.sh

See the localbuild repository linked in the previous post for more information about booting back to the original Sailfish OS.

7 Likes