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


Sailfish/ButterflyTouch

From Mer Wiki
< Sailfish(Difference between revisions)
Jump to: navigation, search
m
(Working parts)
 
(One intermediate revision by one user not shown)
Line 46: Line 46:
  
 
* reboot the system, press F12 to select boot from USB, and then it should boot to sailfish, with the graphical interface showing.
 
* reboot the system, press F12 to select boot from USB, and then it should boot to sailfish, with the graphical interface showing.
 +
 +
== Install to hard disk with double boot ==
 +
This can be done after trying out the usb key (what I did), or directly without the USB key step (using the raw file of the Virtual machine). The following instruction are written from the usb key.
 +
 +
DISCLAIMER : Take care of what you are doing here, as you can erase a complete partition (maybe more) of your hard drive, or break the bootloader. Save your data first (I know I didn't, but don't do like me ! ;) ) and double check the command you are typing.
 +
 +
In my case, the usb key was /dev/sdb1, and the availlable partition on my hard drive /dev/sda5, change the number to what you have.
 +
 +
Boot the device under your favorite linux distribution (Fedora in my case), and run the command (change sdaX by your partitition number):
 +
sudo dd if=/dev/sdb1 of=/dev/sdaX bs=4M
 +
 +
Then, for update grub2 configuration to add this to the boot menu:
 +
sudo cp /boot/grub2.grub.cfg /boot/grub2.grub.cfg.old # save the old config
 +
sudo grub2-mkconfig -o /boot/grub2.grub.cfg
 +
 +
It should display somewhere in the output:
 +
Found Mer release 0.2011 (Mer) on /dev/sdaX
 +
 +
Reboot, and select the Mer entry in the boot menu.
  
 
== Working parts ==
 
== Working parts ==
Line 51: Line 70:
 
* General sailfish interface
 
* General sailfish interface
 
* The silica component demo
 
* The silica component demo
 +
* HDMI output (I plugged it to a 24" screen and got a mirror of the tablet screen)
 +
* Sound (at least when a pull up menu is triggered)
 +
 +
 +
Video of it running can be seen here : [http://youtu.be/EIkfaxzIKrM "Sailfish OS with Qt5/Wayland running on Packard Bell Butterfly Touch"]
  
 
== Known issues ==
 
== Known issues ==

Latest revision as of 18:44, 4 August 2013

Work in progress. This is mostly inspired from the ExoPC tutorial, with adaptation for this hardware, and has been updated to use the Qt5/Wayland new SDK Alpha.

Contents

[edit] 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.

[edit] Install Steps

[edit] 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

[edit] 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.

[edit] Install to hard disk with double boot

This can be done after trying out the usb key (what I did), or directly without the USB key step (using the raw file of the Virtual machine). The following instruction are written from the usb key.

DISCLAIMER : Take care of what you are doing here, as you can erase a complete partition (maybe more) of your hard drive, or break the bootloader. Save your data first (I know I didn't, but don't do like me ! ;) ) and double check the command you are typing.

In my case, the usb key was /dev/sdb1, and the availlable partition on my hard drive /dev/sda5, change the number to what you have.

Boot the device under your favorite linux distribution (Fedora in my case), and run the command (change sdaX by your partitition number):

sudo dd if=/dev/sdb1 of=/dev/sdaX bs=4M

Then, for update grub2 configuration to add this to the boot menu:

sudo cp /boot/grub2.grub.cfg /boot/grub2.grub.cfg.old # save the old config
sudo grub2-mkconfig -o /boot/grub2.grub.cfg

It should display somewhere in the output:

Found Mer release 0.2011 (Mer) on /dev/sdaX

Reboot, and select the Mer entry in the boot menu.

[edit] Working parts

  • Touchscreen
  • General sailfish interface
  • The silica component demo
  • HDMI output (I plugged it to a 24" screen and got a mirror of the tablet screen)
  • Sound (at least when a pull up menu is triggered)


Video of it running can be seen here : "Sailfish OS with Qt5/Wayland running on Packard Bell Butterfly Touch"

[edit] 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).


[edit] Interface with QtCreator

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

[edit] 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.

[edit] 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"


[edit] 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"

[edit] 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"

[edit] Compile/Run

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

[edit] Debug

Debugging seems to work (I never debugged a QML app yet, so don't know if it is fully functionnal). However, as stated in the SDK known issues (https://sailfishos.org/wiki/SDK_Alpha_Qt5_Known_Issues), to be able to do it, first run this command:

sudo zypper in qt5-qtdeclarative-plugin-qmlinspector

It will install the missing package that is needed.

Then simply press "F5" or click on the debug button in QtCreator to build/deploy/run with debugging support. You can place breakpoints and see QML/js console messages.

[edit] 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