Fri 16 September 2022

GNOME OS & Atomic Upgrades on the PinePhone

GNOME OS is a testing-only operating system built as part of GNOME's CI/CD pipeline, developed by the GNOME community.

A small team of Codethink interns aspired to port GNOME OS to mobile platforms. The team had two primary goals:

  • Demonstrating GNOME OS on a mobile device
  • Showing Atomic Upgrades working in a Linux phone OS

Atomic Upgrades is a term used to describe a method for upgrading an operating system. Atomic Upgrades enable rollback, a feature that ensures systems cannot be left in a broken or intermediate state if an error occurs during the upgrade. The interns demonstrated Atomic Upgrades with GNOME OS on a mobile device and virtual machine images using official and locally hosted GNOME OS images. The team designed the upgrades to be performed using the GNOME Software application and directly from the command line interface. An extensive wiki section on Atomic Upgrades was designed to support other developers looking to explore mobile Linux-based operating systems.

The intern team were able to boot GNOME OS on the PinePhone and PinePhone Pro, including options for both the internal storage and SD card. During this period, the team gained significant experience in several technologies over two months, including BuildStream, Freedesktop SDK, QEMU, and OSTree.

Running GNOME OS on mobile

The initial step was to select the hardware to target. The team decided to go for the PinePhone because hardware availability and maturity of the software ecosystem for that phone. Generating images for the PinePhone Pro was set as a stretch goal.

Software wise the initial work was to create build instructions to be able to create images for the PinePhone. For that, the team created a fork of the upstream GNOME OS integration repository and added corresponding changes. This also had the benefit of being able to test the changes in a CI/CD pipeline. After the initial image was created, the initial booting of GNOME OS proved to be relatively painless; understandably, some of the hardware was not working: the camera, cellular/modem, Wi-Fi, GPS, speakers, and microphones were non-functional.

The interns tweaked kernel configurations and worked to upgrade the the 5.17 branch of the megous kernel to correct the WiFi and modem problems. Combined this with an updated ModemManager they were able to solve the calling and GPS issues.

PinePhone running GNOME OS PinePhone running GNOME OS

PinePhone running GNOME OS with a working modem PinePhone running GNOME OS and evidencing modem

PinePhone running GNOME OS and making calls PinePhone running GNOME OS and making calls

Furthermore, the interns figured that the system behaviour, applications, and user interface were not resembling a mobile-like experience. The widgets and applications did not scale correctly on the phone, the keyboard was partially functioning, and the swiping gestures were ineffective. These are known issues and there is indeed plans to make GNOME more mobile friendly by default, but in the meantime the interns experimented with some GNOME Shell Extensions to improve the usability of the UI. You can see those experiments in the initial MR but as said before they were only to experiment, and not to get them merged.

Atomic updates

The interns verified atomic updates worked as expected; after flashing the phone you will automatically get a notification if a new version is available and the system will atomically upgrade to the new version, all thanks to the underlying ostree infrastructure.

This not only has benefits as a user, but as a developer as people will be able to create their own customization and switch atomically to them without reflashing the phone.

Instructions on how to use ostree are documented in the wiki as well

PinePhone running GNOME OS and performing Atomic Upgrades using a local server and hosting a custom image PinePhone running GNOME OS and performing Atomic Upgrades to the local server with custom image

The results

The team has successfully managed to create GNOME OS images for the PinePhone; and make them available through the upstream GNOME CI pipelines.

The booting and flashing processes are documented in the wiki, with options to boot from internal storage or an SD card for the PinePhone. You can find detailed instructions here

The work produced by the interns has been upstreamed to the official GNOME repo; the merge request for master (future GNOME 44) are being reviewed and can be found here:

Future work

Hardware support still needs work: The PinePhone image lacks Bluetooth, functioning speakers, and camera support. Furthermore, the PinePhone Pro has similar issues including the lack of Wi-Fi, calling, and modem.

We hope this project will help to develop and test future GNOME mobile developments, like the work in progress GNOME Shell and Mutter work.

If you discover something new or how to fix the previous issues, we would love to hear how you did it. Let us know through the official GNOME OS matrix channel or comment on the original issue.

The GNOME name and logo are trademarks of the GNOME Foundation

Other Content

Get in touch to find out how Codethink can help you

sales@codethink.co.uk +44 161 660 9930

Contact us