Raspberry Pi 2 with Sailfish OS, DIY-smartphone? Part 3

So that marks another milestone on this journey. I have succeeded in making the applications to work, again with the help of Martin Brook, I have managed to fix qtwayland for applications and the EGL fullscreen implementation not to show applications upside down. So all credit to him now :). With working applications, this means that SailPi is quite ready to the first standalone test.

Some bumps since the last article where the issues with the GPIO pin assignment of the PiScreen and the GSM board. It turned out that the GSM board has a reset pin, which is wired to the same pin as PiScreen pin for display backlight. I ended up buying a new screen, from Adafruit. This worked like a charm once the kernel was extracted from the debian package, as Adafruit apparently doesn’t offer a cross-platform firmware repository like Notro does with his/hers fbtft driver. The extraction is simple, issue:

dpkg-deb -x raspberrypi-bootloader_1.20150309-1_armhf.deb .

To a similar package you could download from adafruit repository pool. After doing this, one can copy the needed files in ./boot/ and ./lib to the SailPi installation. I have already done this in this image. The installation instructions can be found from this blog and will be edited accordingly.

First thing you will notice from the new image is that the desktop or rather the homescreen has been changed to default to Glacier homescreen. This is due to the freedom Glacier homescreen gives on applying a special shader to application windows, which is the final fix to the application graphics being rendered either upside down or inside out. I have configured it so that this can be done with a special environment variable.

There are still rendering issues, like the Silica applications being rendered with a top and bottom white stripe and Glacier applications rendered off screen completely. These issues still remain in the latest image. Work to fix this has not yet been started since I don’t yet know where to start.

However, for this latest image, there has been great strides made to fix the issues with stability of the homescreen and the freezing of the homescreen. The latter was made with a simple mcetool command and this configuration now persists for this release.

Finally, the touchscreen now uses tslib, which isn’t available in SailfishOS repositories. This repository has tslib installed and it was made working by issuing this command in the SailPi:

Note that the first command references the primary framebuffer, not the touchscreen display. This is technically because of the implementation of the fbcp program which is used to drive the secondary framebuffer now. The coordinates need to reflect the primary framebuffer, since the secondary output framebuffer is not used to directly render at all. This is a major feature-block as I would have liked the GPU to drive the secondary framebuffer as well, but this is not possible as its wired to the SPI.

Fixes for this would be quite welcome, since using the secondary framebuffer only would complete the circle of this setup being live instead of just expensive copying of the framebuffer to the other one.

There should be a part 4 coming, but not probably in the near future, since the remaining issues are non-trivial without help. But still, stay tuned and thanks for reading!