The Mer Wiki now uses your Mer user account and password (create account on https://bugs.merproject.org/)


Sailfish/ButterflyTouch

From Mer Wiki
< Sailfish
Revision as of 15:46, 4 August 2013 by Zeta (Talk | contribs)

Jump to: navigation, search

Work in progress. This is mostly inspired from the ExoPC tutorial, with adaptation for this hardware.

Contents

Install Sailfish SDK Emulator on ButterflyTouch

This page has instructions on how to install Sailfish SDK emulator on your Packard Bell Butterfly Touch.

It is a x86 (Intel SU4100 dual core x86_64) based laptop/tablet PC. It has a 11.6" resistive touch screen (1366x768). It uses a Intel GM45 Express Chipset.

Install Steps

USB key setup

  • Extract root filesystem from emulator virtualbox image
VBoxManage internalcommands converttoraw ~/SailfishOS/emulator/sailfishos.vdi sailfish.raw
  • Copy to flash key
sudo dd if=sailfish.raw of=/dev/sd* bs=4M
sync
  • Mount flash key
  • Edit /boot/extlinux/extlinux.conf to boot from sdb1 and add rootwait

Running on the ButterflyTouch

  • The following has been done with Ethernet cable plugged. Wifi activation could be added later on.
  • Place the USB key in ButteflyTouch
  • Boot, press F12 button to access boot device selection menu and select USB
  • Ctrl/Alt F2 - Login root/(no password)
  • sshd is already launched by default, but the root account needs a password to allow to connect to it [Edit : as user nemo is in the sudoers, it may not be needed, as nemo can do all this].
  • launch command "passwd", and set the password to nemo.

From now on, you can connect remotely to do the following (it allows copy/pasting the command from a browser and not typing by hand).

  • Edit /usr/lib/qt5/qml/Sailfish/Silica/ApplicationWindow.qml
//width: _transpose ? screen.height : screen.width
//height: _transpose ? screen.width : screen.height
width: 1366
height: 768
  • Put the display in portrait mode.

The original command don't work anymore, so edit the file manually :

vim /etc/gconf/gconf.xml.mandatory/desktop/jolla/components/%gconf.xml

and replace the angle "0" by "90".

The original command was:

su nemo # to switch to nemo user
gconftool-2 --set /desktop/jolla/components/screen_rotation_angle --type int 90
  • reboot the system, press F12 to select boot from USB, and then it should boot to sailfish, with the graphical interface showing.

Working parts

  • Touchscreen
  • General sailfish interface
  • The silica component demo

Known issues

  • If screen shut down (after a few seconds on the home screen), the only way to light it again is to type a key (shows command line), then touch the screen (show the graphical interface).


Interface with QtCreator

QtCreator can be used to compile and send the program to a remote device, not only the emulator.

Change some rights on the device

As the process to deploy the file is not exactly the same than with the emulator, some rights have to be changed, so that the sftp commands don't fail.

sudo chmod og+w /usr/bin/
sudo chmod og+w /usr/share
sudo chmod og+w /usr/share/applications/

The first is where the binary will be put, the second where a directory will be created to contains the app data, and the last is where the icon shortcut will be placed.

Create a new Device

In QtCreator menu "Options/Devices":

  • "Add"
  • "Generic Linux Device"
  • Connection data page:
    • Name : "Butterfly"
    • IP : "192.168.1.xxx"
    • User name : "nemo"
    • Authentication type : "Password"
    • User password : "nemo"


Create a new Kit

In QtCreator menu "Options/Build & Run", in tab "Kits":

  • Select "MerSDK-sailfishOS-i486-x86"
  • "Clone"
  • select "Clone of MerSDK-sailfishOS-i486-x86" and change :
    • Name : "Butterfly"
    • Device type : "Generic Linux Device"
    • Device : "Butterfly"

Add the kit to the project

If the project is opened, click on the "Projects" icon on the left tab (CTRL+4 shortcut). Click "Add Kit", and select "Butterfly"

Compile/Run

Run the project as usual. Take care the kit "Buttefly" is selected

Known issues

  • icon is not shown : replace in the "Other files/HelloWorld.desktop" file the "Icon=" by one icon that exist, for example "icon-launcher-default" (default icon-launcher-gallery don't exist in the emulator)
  • program crash when run from the icon : replace in the "Other files/HelloWorld.desktop" file the "Exec=" line by : "invoker --type=j -s /usr/bin/HelloWorld"
  • cannot deploy as RPM, only by copying binaries (due to having selected a ""Generic Linux Device", and not a Mer Emulator)
Personal tools