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
(HOW-TO: Build a package locally)
(Build and Setup SB2 target)
 
Line 40: Line 40:
  
 
ONCE YOU HAVE DONE THAT ( ^^^^^ ) STEP, do (inside the SDK):
 
ONCE YOU HAVE DONE THAT ( ^^^^^ ) STEP, do (inside the SDK):
  sb2 -t <TARGET_NAME> -R ssu re -r latest
+
  sb2 -t <SB2_TARGET_NAME> -R ssu re -r latest
  sb2 -t <TARGET_NAME> -R ssu fl devel
+
  sb2 -t <SB2_TARGET_NAME> -R ssu fl devel
  sb2 -t <TARGET_NAME> -R ssu ar http://repo.merproject.org/obs/mer:/qt:/devel/latest_armv7hl/ mer-qt
+
  sb2 -t <SB2_TARGET_NAME> -R ssu ar http://repo.merproject.org/obs/mer:/qt:/devel/latest_armv7hl/ mer-qt
  sb2 -t <TARGET_NAME> -R ssu ur
+
  sb2 -t <SB2_TARGET_NAME> -R ssu ur
  sb2 -t <TARGET_NAME> -R zypper ref
+
  sb2 -t <SB2_TARGET_NAME> -R zypper ref
  sb2 -t <TARGET_NAME> -R zypper dup
+
  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"
 
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"

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