Wednesday, January 1, 2014

2013 year of the Sailfish

2013, year of the Sailfish


Just a few highlights on this years hacking.

As the title of the blog says it really was the year of the Sailfish starting in February with the launch of the Sailfish SDK.  This provided a couple of VM's and integration to Qt creator allowing developers a first look at Sailfish API's.   Apps could be developed run and within an emulator.  I played around with this but my skills as a Qt/QML developer were embryonic but I managed to take some existing code and port to Sailfish.  



Sailfish had been demonstrated on the Nokia N950 by Jolla folks and I was keen to run something up on a real device and the SDK release gave me my first opportunity to do this.  By talking the SDK x86 packages along with the device adaptation packages from the ExoPc and O2 Joggler I was able to run up the emulator up on real hardware.  





In April Carsten Munk published http://mer-project.blogspot.co.uk/2013/04/wayland-utilizing-android-gpu-drivers.html which described well the problems of the 'binary blob' in device adaptation and described a way of utilising Android hardware adaptations with a regular libc linux userspace.  Called libhybris this was to be the foundation of the software stack used on the Jolla phone announced in September and which started shipping to customers at the end of November.  His blog post and follow ups go into much of the details behind libhybris, wayland and qt5-wayland compositor.

Having suffered with the 'binary blob' situation on many of my projects over the years I was keen to learn more and Carsten as always keen to help me in this.  His target for initial development was a HP Touchpad (qualcom adreano) and I was able to reproduce his results on cubieboard (mali).    Shown below is a Qt5 demo running on cubieboard.



    
This opened the doors for a move to Qt5 / Wayland for lipstick (the nemomobile compositor) and in July nemomobile started to switch https://lists.sailfishos.org/pipermail/devel/2013-July/000473.html . In August Qt5 version of the Sailfish SDK was released https://lists.sailfishos.org/pipermail/devel/2013-August/000502.html

In October a further SDK update was released https://lists.sailfishos.org/pipermail/devel/2013-October/000845.html which among other things added arm support.  This enabled my to do a similar hack to the Sailfish SDK on ExoPc but this time on the cubieboard.

  

In November the Jolla phone was launched and this again allowed access to the packages required to do a port to N950.  This port uses the nemomobile N950 adaptation packages and runs quite well considering  the age of this target.  I received my real Jolla in December which I'm loving to bits.  See it here with the N950 port.


The final video is the packages from the Jolla running on the cubieboard libhybris adaptation so the future for running sailfish on other Android devices is rosy.


Finally there has been much talk about community and openness but from my standpoint I feel part of the Jolla/nemo/mer community and thank all involved in making those communities special for me.

Happy New Year

vgrade



  
  


Wednesday, December 4, 2013

N950 and Jolla Phone Repo's


I've been hacking around with the Jolla phone repos and the N950 for the last few days and wanted to share the kickstart method which avoids much of the manual zypper/ssu stuff 

References are


Nemomobile N950 Installation Instructions - https://wiki.merproject.org/wiki/Nemo/Installing

Using the platform sdk create a filesystem image 

sudo mic create fs sailfish2-armv7hl-n950.ks -o . --pkgmgr=zypp --arch armv7hl  --pack-to=vgrade-sailfish.tar.bz2


Flash to N950

sudo tar --numeric-owner -xjf vgrade-sailfish.tar.bz2 -C /mnt






Please help as things still need fixing, time is not setting correctly audio not working as it was on the previous hacks etc, but this should allow more controlled development.

A pirate pad is operating at http://piratepad.net/nVuyI2uxrY you are very welcome to contribute

Saturday, October 19, 2013

Device List

atom - joggler, ExoPc, Fonepad

omap - n900, n950, n9, pandaboard, beaglebone, Archos G9, compulab cm-t3730

tegra - 2- advent vega, trimslice - TK1

amlogic - zenithink c71, c72

exynos - galaxy note 1, tizen lunchbox

a10 - pengpod, cubiaboard, melea1000, H6 netbook

a20 - cubieboard2, eoma68 (kde tablet)

broadcom - Raspberry Pi, Alpha , model B

rk3188 - hudl, qc802. radxa

qualcom - nexus 1, nexus 5, one+, jolla


Thursday, April 18, 2013

Adventures with Libhybris and Andriod





As promised in my tweet at the weekend I'm going to give some more details on the steps required to get Mer based gfxs apps running on top of Android graphics drivers on the Allwinner A10 based cubieboard.  This work was inspired by this blog which sets out the dilemma we face when trying to port regular GNU Linux to fantastic mobile devices.

So, what do you need, well specifically a cubieboard but any Andriod device running a recent version which allows you to boot your own kernel is a potential target for Mer and Libhybris.  On the software side you need an Android development environment, access to the andriod source repo for your device, patch for bionic (android's version of libc) and the libhybris library.  The reason we need all this android stuff is so that we can rebuild the android bionic library with a couple of tweaks which will allow bionic and libc libraries coexist in our final build.

So first follow these instructions to setup your Android build environment, I welcome any questions on this blog post except this section, please beware this is the most frustrating things  I've done in ages and would not like to re-live it.  There are plenty of sources of help on the web, if you're lucky the stars will align and you will have no problems.

http://source.android.com/source/initializing.html and the installing repo section from http://source.android.com/source/downloading.html

Now you need access to the Andriod source repo for your device, I will be giving cubieboard specific instructions from now but all Andriod devices have a similar repo structure.  There are a couple of pages with Andriod for cubieboard but this is the one I used, https://github.com/cubieboard/manifests.  It does give some instructions on setting up a dev environment which I've not tried but you may be more successful than my attempts.

So following that page


$mkdir openbox && cd openbox
$repo init --no-repo-verify -u git://github.com/cubieboard/manifests -b cb -m jb.xml  
$repo sync

gets the android code and binary blobs for the cubieboard.  Now build with 


$source build/envsetup.sh
$lunch 4 (note: select cubieboard option)
$make -j4

You will have time for more than lunch!

So the build should complete with some messages about creating a system.img file.  Congratulations you've just built your first Android ROM.

Next we need to patch the bionic library so descend into the bionic directory and apply this patch and rebuild

$make -j4

Now we have to tar up the android system directory so we can install it on the device.  This will have the patched bionic library plus all the andriod libs (EGL, GLESv2, RIL etc) which we will now be able via libhybris to access from regular glibc apps.  This will be at out/target/product/cubieboard/system.

Ok so next step is to get a minimal Mer image for your device, this is another blog post in itself so I've created a basic image here.  Download this and write to an sdcard and boot in the cubieboard.  It should boot to xterm on hdmi.

Ok, so we don't want X to start anymore so from VT2 login root/mer and remove uxlaunch before rebooting.

$zypper -e uxlaunch

On next boot X will not start so login again from VT2.

Now we can install libhybris.


$zypper ar http://repo.merproject.org/obs/home:/sage:/libhybris/latest_armv7hl/home:sage:libhybris.repo
$zypper in libhybris
$zypper in libhybris-tests




Next copy the android system dir we made a copy of earlier to /system

Now we can test libhybris is installed correctly



$test_egl

This should give some messages but if all is well it should not crash and print 'stop'



$test_glesv2


This should show a white diamond shape filled with an animated Catherine wheel.  Congrats you are now running an EGL/GLES glibc application linking to the Android EGL/GLES bionic drivers.

Next we can now run a couple of more interesting demos


$zypper in qt5-plugin-imageformat-jpeg
$zypper in qt5-plugin-platform-eglfs
$zypper in qt5-qtdeclarative-qmlscene
$zypper in qt5-qtdeclarative-import-qtquick2plugin
$zypper in qt5-qtdeclarative-import-window2
$zypper in qt5-plugin-generic-evdev
$curl -O http://qtl.me/minimer3.tar.gz
$zypper in tar
$tar -xf minimer3.tar.gz
$QT_QPA_EGLFS_DEPTH=24 qmlscene -platform eglfs mail.qml


This should give you a rotating and scaling mer logo, now lets install the Qt Cinematic Experience app which I showed in the youtube video. 



$curl -O http://quitcoding.com/download/Qt5_CinematicExperience_rpi_1.0.tgz
$tar -xf Qt5_CinematicExperience_rpi_1.0.tgz
$cd Qt5_CinematicExperience_rpi_1.0
$zypper in vim
$zypper in qt5-qtdeclarative-import-particles2
$zypper in qt5-qtquick*
$vim content/Mainview.qml - and comment out the PathAnimation part with //
$QT_QPA_EGLFS_DEPTH=24 qmlscene -platform eglfs Qt5_CinematicExperience.qml



So if you've reached this far thanks for reading and if you have used a different Android device please let us know on #mer or #libhybris.

As usual in the open source world we are always building "on the shoulders of giants" so a few thanks to the giants.

Stskeeps for his awsome contributions not just with libhybris but all things Mer and also his patience with me.  Thanks to the wider Mer and libhybris teams.

On the cubieboard front thanks to the linux-sunxi team for their work on the bootloader and kernel and to mdfe for his excellent Mer adaptation packaging and awesome Jenkins buld system.

TTFN

vgrade - catch me in #mer on freenode IRC










Tuesday, March 5, 2013

Ahoy SailfishOS on Exopc



Ahoy 


I've been hacking on the Jolla Sailfish SDK which was launched recently to get it running outside of its virtual box environment.

After installation you will find in the Sailfish SDK a sub-directory which contains the emulator virtualbox image (.vdi) which is used by the SDK to allow deployment of apps from QtCreator for testing.  I used this as a basis for creating an image I can boot on the Exopc (and probably other Intel based tablets and netbooks).

To convert the emulator vdi image I used vboxmanage tools to convert to a raw format which could be written to a usb key for booting in the Exo.

Since the emulator was built for running in virtualbox with no hardware acceleration the image includes a version of mesa which is built to use llvmpipe software rendering.  As we are running on Exo we have access to hardware acceleration so I  built the latest versions of mesa and the xorg-intel-drv against mercore https://build.merproject.org/project/monitor?project=home%3Avgrade%3Abranches%3Anemo%3Adevel%3Ahw%3Ax86-common.

After a few tweaks to remove configuration related to the virtual box environment (xorg.conf, /usr/lib/egl/, /var/lib/environment) I was booting sailfish os, see video for results.

Plan is to integrate with the SDK to allow app deployment to the Exo and in time to extend this to ARM devices once Sailfish components become available for that platform.

More details can be found at https://wiki.merproject.org/wiki/Sailfish/Exopc where contributions are welcome.

Fair winds!





Sunday, September 23, 2012

Tizen IVI Preview on ExoPc


There is a new Tizen IVI snapshot available so I thought I'd run it up on the ExoPC.

Needs a bit of tweaking to get the wlan up so you can update from the ivi base but otherwise runs up ok.

For details about this update seehttps://wiki.tizen.org/wiki/IVI/IVI_Sept_18,_2012_preview_update

vgrade

Sunday, March 4, 2012

Raspberry Pi Mer Hardware Adaptation

I've made some packages for the RaspberryPi to adapt the board to Mer.

Using the information released by the foundation at https://github.com/raspberrypi I've built 3 packages which consist of a kernel package, bootloader and mkimage tool to convert the kernel into a format readable by the bootloader. Packages can be found at http://repo.pub.meego.com/home:/vgrade:/raspPi/Mer_Core_armv6l/armv6l/

I've also created a Mer kickstart file which creates an image which can be easily written to sdcard and boots to X+qmlviewer within 20 seconds of powerup.  The kickstart and image can be found at http://bug10738.openaos.org/images/raspberry-pi/

An ideal base for very low cost Qt/QML based products.  eg, Interactive bus stop, travel information display, store customer service etc


Check back for more details of how you can use the Mer PDK, http://wiki.merproject.org/wiki/Platform_SDK for development.










Thursday, February 9, 2012

Spark Development

I've been working on the Spark project (http://aseigo.blogspot.com/2012/01/reveal.html) since before Christmas focussing on the device adaptation for the Zenithink C71 hardware.


Here is a video of progress so far.






Thanks go aseigo, atp_uestc, mdfe_ and the Mer and Plasma Active project teams.


Linked here http://aseigo.blogspot.com/2012/02/network.html





Wednesday, November 23, 2011

Waiting for Tizen

Its been 4 years since my last phone upgrade (a Nokia N95) from O2 having purchased a Nexus One direct from Google in 2010.  My eye was caught by the Samsung Note so I ordered and received it today.  Half phone, half tablet, my son Matt has christened it the 'phablet'. See it pictured below next to the Nokia N950.



Spec wise we have Samsung Exynos chipset with a 1.4GHz dual-core cpu, Mali-400 GPU and 1GB RAM.  5.3" HD Super AMOLED screen and also boasts a stylus , sorry S-Pen which is great for quick note taking. Full spec at 


Kernel source is available now at 


Here's hoping we can get the required driver support from the Tizen project (as Samsung are partners in that project with Intel) to make this the next developer handset to follow on from the N900/N950/N9.

vgrade

24.11.11





 

Wednesday, November 16, 2011

Qt Creator on Raspberry Pi

Its been a week or so since I did anything with the Raspberry Pi but I received my stickers today which encouraged me to get the device out and hack together something.

One of the target markets for the device is in education so I thought that a small distribution built on Mer with QtCreator installed would provide an excellent introduction to Qt and QML programming.

As you can see from the video you get a basic desktop environment with xterm, qt-demos and qt-creator installed.  




UPDATE:


Image and installation instructions can be found at http://images.formeego.org/raspberry-pi/

vgrade



   

Monday, November 14, 2011

Mer


Since the demise of MeeGo a group of people have been involved with taking the best elements of that project along with a dose of new ideas to create the Mer Project.  This project is aimed not at end users but at people, and companies who are or want to produce products.  Mer provides a core set of fully maintained packages which can be used to build products in the mobile and embedded markets providing Qt/HTML5/JS API's.  Because the core is maintained by the Mer project resources are not required by each manufacturer so has obvious cost savings. Mer is just the core and needs two elements to be added to make a full software stack for a product.  A device adaptation is required to sit below the Mer core and provides a well defined interface to it.  The adaptation is made up of a Linux kernel, graphics and network drivers, sound and device configurations, things which will be different for each product.  The other element required is a user interface or user experience (UX) layer and this is where device manufacturers can provide differentiation for their product, the look and feel.  Mer core will provide a rich set of API's to build the UX layer with modern API's such as Qt/QML and HTML5 ensuring the best possible experience for the end user.


The Mer core set of packages is around 300 and these are stored in git repositories and a change mechanism has been implemented using a set of opensource tools which allow for both human and automatic review processes, each change is sent to a build system to ensure changes don't break the whole build.  Plans are in place to offer automatic testing of all changes to the core after code review and build test. These processes are in large part automatic and provide the level of tracking an OEM will need especially in the area of license management and compliance.


The project is open source and has a draft governance document based on the Yocto project and is in review at the moment. You can read it here and comment to the mailing list.


The project has a growing wiki page and this is also where you can find details of the projects surrounding Mer the community workspace, where you can find details of the progress of the device adaptations and user experiences already built on Mer Core.  You will see from that page that there are a number of devices running a diverse set of user experiences and this is just after a few weeks since the project launch.


As an example I've been involved in device adaptations to the Advent Vega Tablet and compulab Trimslice, both nVidia Tegra devices and also in integration of the Plasma Active UX on those devices and to the Nokia N950.












If you want to know more about Mer and the community projects surrounding drop into #Mer on freenode IRC.




vgrade  15.11.11