Thursday 20 June 2013

Connecting to the Harmattan QEMU: Learning from Sailfish!

A few days ago I wanted to compare some differences in behavior between the Sailfish Emulator, and the old Harmattan Equivalent QEMU.

These are two very different beasts, with the QEMU being so slow and unresponsive as to be just barely usable, while the Sailfish Emulator is a much snappier affair. But that is not the point of this post.

On starting up on the QEMU I realized that I had not installed my AbstractUI library on QEMU, and even more surprisingly that I had never connected to the thing via SSH for a peak inside.

A quick google found this link:

http://harmattan-dev.nokia.com/docs/library/html/guide/html/Developer_Library_Alternative_development_environments_Platform_SDK_user_guide_Using_QEMU_in_Scratchbox.html

 

So we can connect like this:

 

ssh -p6666 root@localhost

 

no password required!



Installing AbstractUI with an Rsync Script

After a bit of poking around, I decide that AbstractUI should be installed in: 

/usr/lib/qt4/imports

 

But can I use rsync (and a script like I made for the Sailfish Emulator)?

A quick test of rsync on QEMU proves disappointing: rsync is not installed, and apt-get install rsync finds nothing.

So after some more googling, I came across this:

http://www.who.is.free.fr/wiki/doku.php?id=harmattan

 

Unfortunately the link to the .deb package did not work: This would have been my preferred option.

But the second option worked: Adding a repository to apt, and then doing apt-get instal rsync again.

Please bear in mind that you do this at your own risk, and only try this if you have some idea of what your are doing. If you goldfish has kittens, your mother-in-law gets the hiccups (or the other way around) as a result of this, don't come running to me!

RX71-47-2_QEMU_MR0:~# killall  pkgmgrd && killall pkgmgrd

killall: pkgmgrd: no process killed

 

RX71-47-2_QEMU_MR0:~# distro="harmattan"

RX71-47-2_QEMU_MR0:~# target="MeeGo_1.2_Harmattan_Maemo.org_MeeGo_1.2_Harmattan_standard"

RX71-47-2_QEMU_MR0:~# repo="home-rzr-${distro}-${target}"

RX71-47-2_QEMU_MR0:~# baseurl="http://rzr.online.fr/r/"

RX71-47-2_QEMU_MR0:~# url="http://repo.pub.meego.com/home:/rzr:/${distro}/${target}/"

RX71-47-2_QEMU_MR0:~# url="${baseurl}${url}"

RX71-47-2_QEMU_MR0:~# echo "deb ${url} ./" |  tee "/etc/apt/sources.list.d/${repo}.list"

 

RX71-47-2_QEMU_MR0:~# apt-get install rsync

 

Note that in the original instructions in the link above the author installed further bits and bobs. I chose not to do this - at -least until I work out what these are. For the moment I am only interested in getting rsync.

Having run the above, another test rsync gives much more positive results.

Without further ado, we can then modify our sync script for QEMU:

# This script syncs abstractui files from the localhost to the QEMU Harmattan Emulator
# and then sets owners and rights
# Note: It syncs the entire org directory structure.
# Make this script executable with chmod 755 syncAUI2QEMU.sh
# call it with ./syncAUI2QEMU.sh
rsync -avz -e "ssh -p 6666" org root@localhost:/usr/lib/qt4/imports/ --exclude .DS_Store \
&& \
ssh -p 6666 root@localhost "cd /usr/lib/qt4/imports/ && \chown -R root:root org && \
cd org/flyingsheep/abstractui && \
chmod 755 *.so && \
chmod 644 *.qml && \
chmod 644 qmldir && \
ls -ahl && \
exit \
; bash"

 

 

 

 

No comments:

Post a Comment