Application Developer - Mamona SDK
Abstract
This tutorial shows one way to setup a development environment. The Application developer is that one who wants to develop and test new applications to run at Mamona distributions. At the end you will be able to develop for Mamona and to create your own Mamona image to run at your device.
Mamona Installer
Mamona installer is a set of scripts and configuration files which will help you to install and to configure your environment in order to have everything you need.
In this section we will use only scripts required by SDK.
You have 4 options to install the Mamona Installer:
- Deb package install instructions
- Rpm package install instructions
- Tarball package install instructions
- Using Mamona Gentoo Overlay
- Install instructions using Git repository
NOTE: Read Mamona Installer for further information about how to install it.
CPU Transparency
mamona-cputransp is a start/stop service that enable/disable your mamona-qemu-arm, which is provided by Mamona Installer.
Enable:
$ sudo mamona-cputransp start
Disable:
$ sudo mamona-cputransp stop
NOTE: Read CPU Transparency for further information about how it works.
SDK Installer
Note: At this point you must have your mamona-qemu-arm working properly. Start mamona-cputransp before go on.
To install Mamona SDK just execute mamona-sdk-install as root. It will check your environment and debootstrap Mamona from the repository you want (n770, n800, n810 or omap3430).
$ sudo mamona-sdk-install
It'll ask you the options you want and debootstrap your environment after.
You can also give the options as parameters:
$ mamona-sdk-install -h
Usage: mamona-sdk-install -d -i [-a arch] [-m machine] [-o output_sdk_directory] [-r repository address]
Mamona SDK Install.
Options:
-a ARCH Set architecture for debootstrap. (Supported: arm)
-d Use defaults when variables are not explictly required.
Defaults:
SDK Output Directory = /usr/local/mamona-root
Mamona Repository = http://dev.openbossa.org/mamona/0.2
Machine = nokia810
Arch = arm
-h This help.
-m MACHINE What Machine do you want to use? (Supported: nokia770 nokia800 nokia810 omap3430sdp). Useless when using -r
-o DIR Mamona SDK Output directory.
-r REPODIR Mamona Repository address
Note: root permission required
Report bugs to <mamona-devel@garage.maemo.org>
Mamona-chroot
Note: At this point you must have your mamona-qemu-arm working properly. Start mamona-cputransp before go on.
Now on you can develop using the Mamona environment that you have just installed.
To access it you can just give chroot and optionally mounting proc and dev inside your chroot environment. But you don't need to worry about this, there is the mamona-chroot script that will do it for you.
Now you just need to run mamona-chroot to access your chroot environment:
$ sudo mamona-chroot /usr/local/mamona-root
Notes:
- Command syntax : sudo mamona-chroot <path to mamona-root directory>
- There is -d option that mounts /dev into chroot, if you need it (recommended)
And that's it, now you are inside the SDK. To install other packages you just need to give apt-get update and apt-get install <package>, our mirror is already configured at your sources.list.
Known issues
- Rebuilding a package from source ("apt-get build-dep" and dpkg-buildpackage) doesn't work at the moment (see ticket #134).
Noemu - Making your compilation faster
Sometimes the complete emulated compilation is up to 23 times slower.
It is possible to make it faster using some special i386 packages inside your ARM chroot environment avoiding the QEMU emulation.
To set it up, follow the noemu 0.2 Repository instructions.
Xephyr - Developing graphical applications
Optionally you can start up the Enlightenment Window Manager in your pc following the steps below.
- Host (your PC) - You should start the Xephyr X server.
Xephyr :2 -host-cursor -screen 800x480x16 -dpi 96 -ac -extension Composite
- Mamona chroot environment - Install and start up Enlightenment Window Manager.
$ apt-get update $ apt-get install task-mamona-wm $ export DISPLAY=:2 $ /etc/X11/Xsession.d/90xXWindowManager
- If you want to use the virtual keyboard, start the daemon
$ /etc/X11/Xsession.d/80matchboxkeyboard
The result will be similar to the screenshot below:
Notes:
- If you get error get_pty: not enough ptys then you should execute an additional steps on host side: sudo mount -t devpts none /usr/local/mamona-root/dev/pts
- To open the terminal (Aterm) you need to access the chroot with /dev mounted with your system's /dev. Just use sudo mamona-chroot -d /usr/local/mamona-root.
"Flashable" Image (jffs2)
At some point you will want (need?) to test it in a real device. To do it you have 2 ways:
Flashing rootfs.jffs2
To get your chroot ready to flash into a device you can use mamona-gen-utils script to create your jffs2 file system image:
$ mamona-gen-utils image -r /usr/local/mamona-root -i /tmp/rootfs.jffs2
Turn off your device and connect it through usb.
Run OxFFFF or flasher to flash the rootfs to your device:
$ sudo 0xFFFF -R -p rootfs.jffs2 $ sudo flasher -r rootfs.jffs2 -f # Nokia flasher (optionally) - proprietary
Turn on your device. After finished just remove usb cable to boot it.
Flashing FIASCO Image
If you are planning to flash the entire device (including kernel, initfs, etc) you should skip the "Flashing rootfs.jffs2" section and go directly to the Generating Mamona FIASCO image section.
Success
Congratulations. Now you are ready to use Mamona SDK to develop your applications.
Read Running Mamona to know more about how to use and generate a complete FIASCO image to flash into your device. You can also read Platform Developer to know how to hack the platform itself, meaning flexibility once you can easily change any of Mamona components.
Attachments
-
xephyr.png
(153.8 KB) - added by rsalveti
18 months ago.
mamona with xephyr
-
mamona-sdk.png
(30.0 KB) - added by vivijim
18 months ago.
-
mamona-sdk.svg
(46.4 KB) - added by vivijim
18 months ago.


