Porting Sailfish OS

@adampigg

Wait.....Sailwhat??

Sailfish OS is

  • A mobile OS combining
    • linux kernel
    • Mer middleware
    • proprietary gui by Jolla
  • Developed by
    • Jolla
    • Sailfish and Mer communities
    • Members of the Sailfish alliance

Ok, but....Mer? Jolla?

Mer

Mer is an open, mobile-optimised, core distribution aimed at device manufacturers; powered by Qt/QML and HTML5 - openly developed, inclusive, and meritocratically governed.

 

By geeks for geeks

 

merproject.org

Jolla

A startup company born out of the ashes of the #elopalypse, made up of ex Nokia employees involved with the maemo (N900) and meego (N9) platforms.

 

jolla.com

Porting

  • The process of building the software to run on a hardware platform not originally intended for

  • Typically, porters use a device with existing good support from Cyanogenmod, the community built distribution of Android

  • Sailfish is built on top of a modified version of android, utilising the kernel and some low level services

Libhybris

Hybris is a compatibilty layer between glibc based systems (regular linux) and bionic based systems (android)

It provides the glue between the Sailfish display system and android graphics drivers

It also provides glue between some android services such as the sensor framework

Hybris is also used by Cannonical in Ubuntu Touch

 

But why? there are already two perfectly good platforms!

Why Not!

  • You might want a device that respects freedom and privacy
  • You might want something open-source and hacker friendly
  • Its a cheap way (in cost, not time!) to build a developer device for testing against
  • To be involved in a great community
  • Because you can
  • You might get awesome free stuff (i have got awesome free stuff! ;)

Ok, i'm convinced, how do I get started?

Your first port

  • Read read read the HADK
  • Also read the developer FAQ
  • Probably read up on compiling cyanogenmod
  • It helps to know a bit about the android build system
  • Join the other porters in #sailfishos-porters on freenode
  • Be prepared for failure and frustration
  • Knowing a bit of C/C++/Java is probably an advantage but not essential, dont let that put you off

The rocky road ahead

What to expect

  • Just being able to telnet into your device is a major accomplishment!
  • If you can get graphics on screen then your port is a success!
  • HADK-FAQ covers all the common problems,
    • reboots
    • graphics
    • mobile network
    • camera
  • Remember, there are plenty of people willing to help a porter

Uncommon Problems

  • If you decide to port an older device, you may hit more problems than usual, eg
    • Graphics driver problems
    • Android RIL being too old, android has changed the modem protocol several times, currently V11, V6 was a major change.  You may find yourself decoding messages from the modem!

The end result

Port 1 -HTC ACE

  • Working
    • Graphics
    • Sound
    • Wifi
    • Mobile Network (sorta)
  • Not Working
    • Bluetooth
    • Camera
    • Tethering

 

Port 2 -Samsung N7000

  • Working
    • Graphics
    • Sound
    • Wifi
  • Not Working
    • Mobile Network (modem crashes!)
    • Bluetooth
    • Camera

 

More Info

  • http://www.sailfishos.org
  • http://www.jolla.com
  • https://sailfishos.org/develop/hadk/
  • http://piratepad.net/hadk-faq
  • https://wiki.merproject.org/wiki/Adaptations/libhybris

Porting Sailfish OS

By Adam Pigg

Porting Sailfish OS

  • 4,096