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


Nemo/Armv7hl Development Guide

From Mer Wiki
< Nemo(Difference between revisions)
Jump to: navigation, search
(Flash Nemo Wayland image)
(Build and Setup SB2 target)
 
(13 intermediate revisions by 3 users not shown)
Line 13: Line 13:
  
 
== Flash Nemo Wayland image ==
 
== Flash Nemo Wayland image ==
We don't have an official images URL like we did for Nemo X11...
+
Grab images from here: [[Nemo/Installing#Wayland.2FQt5|Nemo/Installing#Images]]
Nemo Wayland images are currently hosted by contributors.
+
Link to latest image: [https://www.dropbox.com/s/kr8sre1ob2cglps/n950-270820131123.tar.bz2 here](thanks locusf)
+
  
If you want to build
 
 
Once you have the .tar.bz2 image file, head to [[Nemo/Installing]] to discover how to install Nemo on your device
 
Once you have the .tar.bz2 image file, head to [[Nemo/Installing]] to discover how to install Nemo on your device
  
Line 25: Line 22:
  
 
Once you have a working Mer SDK setup:
 
Once you have a working Mer SDK setup:
* Start the SDK, and run (inside the SDK):
+
* Start the SDK, and run (inside the SDK)
 +
echo 5.9.68.173 repo.pub.meego.com | sudo tee -a /etc/hosts
 +
to workaround the recent shutdown of MeeGo repositories, and
 
  sudo zypper in -t pattern Mer-SB2-armv7hl
 
  sudo zypper in -t pattern Mer-SB2-armv7hl
 +
to install needed tools to crosscompile for armv7hl arch.
  
 
Now we have to build the SB2 target image:
 
Now we have to build the SB2 target image:
* Download the [https://github.com/faenil/NemoWaylandKickstart/blob/master/nemo-armv7hl-rnd_sb2target.ks kickstart file], which is what you will pass as parameter in the next command in <KS_FILENAME>
+
* Download the [https://raw.github.com/faenil/NemoWaylandKickstart/master/nemo-armv7hl-rnd_sb2target.ks kickstart file], which is what you will pass as parameter in the next command in <KS_FILENAME>
 
* Now build the image with
 
* Now build the image with
 
  sudo mic create fs --record-pkgs=name -o /parentroot/srv/mer/targets/ --pkgmgr=zypp --arch=armv7hl <KS_FILENAME> --tokenmap=MER_RELEASE:latest,NEMO_RELEASE:latest,SSU_RELEASE_TYPE:rnd,FLAVOUR:devel
 
  sudo mic create fs --record-pkgs=name -o /parentroot/srv/mer/targets/ --pkgmgr=zypp --arch=armv7hl <KS_FILENAME> --tokenmap=MER_RELEASE:latest,NEMO_RELEASE:latest,SSU_RELEASE_TYPE:rnd,FLAVOUR:devel
  
 
When the process is finished:
 
When the process is finished:
  cd /srv/mer/targets/<PATH_OF_BUILT_IMAGE>
+
  cd /parentroot/srv/mer/targets/<PATH_OF_BUILT_IMAGE>
 
  sudo chown -R $USER .
 
  sudo chown -R $USER .
  
* '''Now complete the setup of the SB2 target''' by following the guide available [https://wiki.merproject.org/wiki/Platform_SDK_and_SB2#Initialize_scratchbox2 here]
+
* '''Now complete the setup of the SB2 target by following the guide available [https://wiki.merproject.org/wiki/Platform_SDK_and_SB2#Initialize_scratchbox2 here]''' ('''NOTE''': you can skip the "zypper dup" command as you'll have to do it again in the next step)
 +
 
 +
ONCE YOU HAVE DONE THAT ( ^^^^^ ) STEP, do (inside the SDK):
 +
sb2 -t <SB2_TARGET_NAME> -R ssu re -r latest
 +
sb2 -t <SB2_TARGET_NAME> -R ssu fl devel
 +
sb2 -t <SB2_TARGET_NAME> -R ssu ar http://repo.merproject.org/obs/mer:/qt:/devel/latest_armv7hl/ mer-qt
 +
sb2 -t <SB2_TARGET_NAME> -R ssu ur
 +
sb2 -t <SB2_TARGET_NAME> -R zypper ref
 +
sb2 -t <SB2_TARGET_NAME> -R zypper dup
 +
 
 +
if, while zypper dup'ing you get some "cpio: rename failed - Invalid cross-device link" error, feel free to ignore it by press "i" and "enter"
  
 
== HOW-TO: Build a package locally ==  
 
== HOW-TO: Build a package locally ==  
Line 51: Line 61:
 
Once you have the .spec file, run Mer SDK, and use this command to build the .rpm package :) As simple as that!  
 
Once you have the .spec file, run Mer SDK, and use this command to build the .rpm package :) As simple as that!  
 
  cd /path/of/your/app
 
  cd /path/of/your/app
  mb build -t <sb2 target name here> path/to/spec/file
+
  mb2 -t SB2_TARGET_NAME build path/to/spec/file
  
 
Now you have the .rpm package of your app!
 
Now you have the .rpm package of your app!

Latest revision as of 11:46, 23 May 2014

NOTE: This guide uses N9/N950 as an example of target device, but it should be easy enough to adapt it to other armv7hl devices! The SB2 target image, for example, is for a generic armv7hl device.

So, you want to help developing Nemo or want to develop your app and test it on Nemo, using N950 or N9 devices? Great! This guide is for you.

Here's how it works:

  • Flash the Nemo wayland image to your N9/N950
  • Setup a SB2 target to build package for your N9/N950
  • Build rpm packages locally for the SB2 target and test them on your device!
  • Let us know about your app on #nemomobile IRC channel!

Contents

[edit] Flash Nemo Wayland image

Grab images from here: Nemo/Installing#Images

Once you have the .tar.bz2 image file, head to Nemo/Installing to discover how to install Nemo on your device

[edit] Build and Setup SB2 target

Prerequisites:

  • A working Mer SDK setup is required. If you have not installed Mer SDK yet, read [1] until the "Basic Tasks" section (excluded).

Once you have a working Mer SDK setup:

  • Start the SDK, and run (inside the SDK)
echo 5.9.68.173 repo.pub.meego.com | sudo tee -a /etc/hosts

to workaround the recent shutdown of MeeGo repositories, and

sudo zypper in -t pattern Mer-SB2-armv7hl

to install needed tools to crosscompile for armv7hl arch.

Now we have to build the SB2 target image:

  • Download the kickstart file, which is what you will pass as parameter in the next command in <KS_FILENAME>
  • Now build the image with
sudo mic create fs --record-pkgs=name -o /parentroot/srv/mer/targets/ --pkgmgr=zypp --arch=armv7hl <KS_FILENAME> --tokenmap=MER_RELEASE:latest,NEMO_RELEASE:latest,SSU_RELEASE_TYPE:rnd,FLAVOUR:devel

When the process is finished:

cd /parentroot/srv/mer/targets/<PATH_OF_BUILT_IMAGE>
sudo chown -R $USER .
  • Now complete the setup of the SB2 target by following the guide available here (NOTE: you can skip the "zypper dup" command as you'll have to do it again in the next step)

ONCE YOU HAVE DONE THAT ( ^^^^^ ) STEP, do (inside the SDK):

sb2 -t <SB2_TARGET_NAME> -R ssu re -r latest
sb2 -t <SB2_TARGET_NAME> -R ssu fl devel
sb2 -t <SB2_TARGET_NAME> -R ssu ar http://repo.merproject.org/obs/mer:/qt:/devel/latest_armv7hl/ mer-qt
sb2 -t <SB2_TARGET_NAME> -R ssu ur
sb2 -t <SB2_TARGET_NAME> -R zypper ref
sb2 -t <SB2_TARGET_NAME> -R zypper dup

if, while zypper dup'ing you get some "cpio: rename failed - Invalid cross-device link" error, feel free to ignore it by press "i" and "enter"

[edit] HOW-TO: Build a package locally

  • Create a .spec file

To be able to build a package locally you need a .spec file which is used to package your app. If your app doesn't have a .spec file yet, you have to write one :D There are lots of tutorials, this is an example Creating the Spec File - RPM.org

Or you can see how we did in Nemomobile QML apps, you can find sources here Nemomobile's GitHub repo (e.g. QmlCalc .spec file)

  • Build the package

Once you have the .spec file, run Mer SDK, and use this command to build the .rpm package :) As simple as that!

cd /path/of/your/app
mb2 -t SB2_TARGET_NAME build path/to/spec/file

Now you have the .rpm package of your app!

[edit] HOW-TO: Deploy and install

  • Once you have an .rpm package, plug your device to USB and use
scp /path/to/file.rpm nemo@192.168.2.15:

to copy it to /home/nemo directory on your device

  • To install the .rpm package, just run (on device as root)
zypper install /home/nemo/myApp.rpm
Personal tools