<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://maemo.octonezd.me/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=86.202.50.113</id>
	<title>Maemo Wiki Mirror - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://maemo.octonezd.me/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=86.202.50.113"/>
	<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php/Special:Contributions/86.202.50.113"/>
	<updated>2026-04-22T01:44:25Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Packaging&amp;diff=31405</id>
		<title>Packaging</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Packaging&amp;diff=31405"/>
		<updated>2010-10-13T18:37:43Z</updated>

		<summary type="html">&lt;p&gt;86.202.50.113: /* Testing your package */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Creating Packages for Maemo ==&lt;br /&gt;
&lt;br /&gt;
Since Maemo is based on the Debian operating system, creating packages for Maemo borrows a lot of tools and techniques from Debian.&lt;br /&gt;
&lt;br /&gt;
=== Further reading ===&lt;br /&gt;
&lt;br /&gt;
The following list of resources gives in-depth information on packaging in Debian and Maemo. These links largely discuss packaging Python apps but can be used for any programming language. &lt;br /&gt;
&lt;br /&gt;
*  [http://www.openismus.com/documents/linux/automake/automake Using automake and autoconf with C++]: A great beginner&#039;s tutorial on using autotools to create an easily packagable application &lt;br /&gt;
*  [http://www.debian.org/doc/maint-guide/ Debian New Maintainers Guide]: The best place for information if you have never built a .deb before&lt;br /&gt;
*  [http://wiki.debian.org/Teams/PythonModulesTeam Debian&#039;s Python Modules Team]: definitive documentation for packaging Python modules for Debian&lt;br /&gt;
*  [http://python-modules.alioth.debian.org/python-modules-policy.htm Python Modules Policy]: Reference document.&lt;br /&gt;
* [http://showmedo.com/videos/video?name=linuxJensMakingDeb Creating debs on Ubuntu]: A great screencast and tutorial showing how to package a simple python application as a deb on Ubuntu!&lt;br /&gt;
* [https://wiki.ubuntu.com/PackagingGuide Ubuntu Packaging Guide]&lt;br /&gt;
* [[Documentation/Maemo 5 Developer Guide/Packaging, Deploying and Distributing | Deploying and distributing software on Maemo 5]]: Detailed documentation on packaging for Maemo, including how to ship your software afterwards&lt;br /&gt;
* [http://www.forum.nokia.com/Tools_Docs_and_Code/Documentation/Maemo.xhtml Forum Nokia developer documentation]: General developer documentation reference&lt;br /&gt;
* [[Port an existing Debian package]]&lt;br /&gt;
* [[Packaging a Qt application]] and how it differs from the packaging described here&lt;br /&gt;
* [[User:Jebba]] has created a [[User:Jebba/Package Building HOWTO | package building howto]] with details on every step&lt;br /&gt;
&lt;br /&gt;
==== Checking Maemo Packages ====&lt;br /&gt;
&lt;br /&gt;
Lintian dissects Debian packages and reports bugs and policy violations. &lt;br /&gt;
It contains automated checks for many aspects of Debian policy as well as some checks for common errors. Unfortunately it does not check conformance to the additional Maemo policy.&lt;br /&gt;
&lt;br /&gt;
Currently Maemo is creating [[Maemian]] to check its policy.&lt;br /&gt;
&lt;br /&gt;
== A concrete example - hello ==&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&lt;br /&gt;
For the purposes of our article, we will be packaging a simple [[Hildon]] hello-world application. This will be a standard source tarball using [[Documentation/Maemo 5 Developer Guide/GNU Build System#GNU Autotools|autotools]]. For further information, you can follow [http://www.openismus.com/documents/linux/automake/automake this detailed tutorial] on using Autotools for C++ projects.&lt;br /&gt;
&lt;br /&gt;
You will need a working [[Documentation/Maemo 5 Final SDK Installation|Maemo 5 SDK]] and the &amp;lt;code&amp;gt;libhildon1-dev&amp;lt;/code&amp;gt; package, version 2.2 or greater, which can be installed in Scratchbox with the command:&lt;br /&gt;
&lt;br /&gt;
 fakeroot apt-get install libhildon1-dev&lt;br /&gt;
&lt;br /&gt;
==== hello.c ====&lt;br /&gt;
&lt;br /&gt;
The only C file in our project is &amp;lt;code&amp;gt;hello.c&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;hildon/hildon.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char *argv[])&lt;br /&gt;
{&lt;br /&gt;
  GtkWidget *window;&lt;br /&gt;
  GtkWidget *label;&lt;br /&gt;
&lt;br /&gt;
  hildon_gtk_init(&amp;amp;argc, &amp;amp;argv);&lt;br /&gt;
&lt;br /&gt;
  window = hildon_window_new();&lt;br /&gt;
  label = gtk_label_new(&amp;quot;Hello world!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  g_signal_connect(G_OBJECT (window), &amp;quot;destroy&amp;quot;, G_CALLBACK (gtk_widget_destroy), NULL);&lt;br /&gt;
  gtk_container_add(GTK_CONTAINER(window), label);&lt;br /&gt;
  gtk_widget_show_all(window);&lt;br /&gt;
&lt;br /&gt;
  gtk_main();&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Autotools ====&lt;br /&gt;
&lt;br /&gt;
{{main|Documentation/Maemo 5 Developer Guide/GNU Build System}}&lt;br /&gt;
&lt;br /&gt;
The rest of the project is a small number of files to allow us to make a standard &amp;quot;&amp;lt;code&amp;gt;./configure &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&amp;lt;/code&amp;gt;&amp;quot; project with automake, aclocal and autoconf.&lt;br /&gt;
&lt;br /&gt;
Using the autotools for packaging is quite simple for small projects. You need two files to define the structure of your project, &amp;lt;code&amp;gt;Makefile.am&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;configure.ac&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;configure.ac&amp;lt;/code&amp;gt; is a file used by automake and autoconf to generate the configure script, define the version of the resulting .tar.gz and include the tests which we need to ensure the presence of the appropriate versions of dependencies. Since &amp;lt;code&amp;gt;hello.c&amp;lt;/code&amp;gt; is so simple, we only need to check for the standard C library and a C compiler, and for the Hildon library. The Hildon library check is done by &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt;, which makes it easy to check the library version, and get the right compiler and linker flags. The only output file generated by the configure script will be &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt;, from the input file &amp;lt;code&amp;gt;Makefile.in&amp;lt;/code&amp;gt;, which is in turn generated from &amp;lt;code&amp;gt;Makefile.am&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;autoconf&amp;quot;&amp;gt;&lt;br /&gt;
AC_INIT([hello], [0.1])&lt;br /&gt;
AM_INIT_AUTOMAKE([foreign])&lt;br /&gt;
AC_PROG_CC&lt;br /&gt;
PKG_CHECK_MODULES([HILDON], [hildon-1 &amp;gt;= 2.2])&lt;br /&gt;
AC_CONFIG_FILES([Makefile])&lt;br /&gt;
AC_OUTPUT&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Makefile.am&amp;lt;/code&amp;gt; defines the source structure of your project, listing the files to be installed, the binaries and object files to be generated, and the relationship between the binaries and source files.&lt;br /&gt;
&lt;br /&gt;
You can see that our &amp;lt;code&amp;gt;Makefile.am&amp;lt;/code&amp;gt; is very simple, defining one source file, and one binary file. The &amp;quot;_SOURCES&amp;quot; line must start with a binary name from &amp;quot;bin_PROGRAMS&amp;quot; to make the link between the source file and the executable. The &amp;quot;_CPPFLAGS&amp;quot; and &amp;quot;_LDADD&amp;quot; lines take the Hildon preprocessor and library flags that are provided by &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;configure.ac&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 bin_PROGRAMS = hello&lt;br /&gt;
 hello_SOURCES = hello.c&lt;br /&gt;
 hello_CPPFLAGS = $(HILDON_CFLAGS)&lt;br /&gt;
 hello_LDADD = $(HILDON_LIBS)&lt;br /&gt;
&lt;br /&gt;
Once we have these files, we simply need to initialise our project, defining its license, and generating all of the required files for automake to do its thing. We do this by running:&lt;br /&gt;
&lt;br /&gt;
 autoreconf --force --install&lt;br /&gt;
&lt;br /&gt;
The arguments to autoreconf copy required files to the project (including generic install instructions and a license).&lt;br /&gt;
&lt;br /&gt;
Pay attention during the execution of autoreconf, the execution should be entirely silent if it runs correctly. If there are messages, read them and do what is required to address the issues.&lt;br /&gt;
&lt;br /&gt;
Now to build your software, you have a standard configure script and can simply run&lt;br /&gt;
&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
and to build a distribution file, you have&lt;br /&gt;
&lt;br /&gt;
 make dist&lt;br /&gt;
&lt;br /&gt;
which will create a file &#039;&#039;&amp;lt;code&amp;gt;hello-0.1.tar.gz&amp;lt;/code&amp;gt;&#039;&#039;, which you can use for the rest of this packaging tutorial.&lt;br /&gt;
&lt;br /&gt;
=== Packaging a .deb ===&lt;br /&gt;
&lt;br /&gt;
The easiest way to package a .deb file is to use Debian&#039;s build helpers.&lt;br /&gt;
&lt;br /&gt;
Package your application as you would distribute it in a .tar.gz (when using autotools, this is done with &amp;quot;&amp;lt;code&amp;gt;make distcheck&amp;lt;/code&amp;gt;&amp;quot;). In our example, we uncompress &amp;lt;code&amp;gt;hello-0.1.tar.gz&amp;lt;/code&amp;gt;, and change the current directory to &amp;lt;code&amp;gt;hello-0.1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 $ tar xfz hello-0.1.tar.gz&lt;br /&gt;
 $ cd hello-0.1&lt;br /&gt;
&lt;br /&gt;
Then we run &amp;lt;code&amp;gt;dh_make&amp;lt;/code&amp;gt;, which initialises the Debian package management file structure (among other things):&lt;br /&gt;
 $ dh_make -e &amp;lt;my email address&amp;gt; -f ../hello-0.1.tar.gz -c GPL&lt;br /&gt;
&lt;br /&gt;
You can of course choose a different licence for your package.&lt;br /&gt;
&lt;br /&gt;
Answer the resulting questions - in this case, we are packaging a single binary.&lt;br /&gt;
&lt;br /&gt;
We can now edit the files in the &amp;lt;code&amp;gt;debian/&amp;lt;/code&amp;gt; directory which has been created to their desired values, before packaging the software. In fact, we can delete many of these files. All of the files ending in “.ex” or “.EX” are example files, intended to help you package different types of software.&lt;br /&gt;
&lt;br /&gt;
If you use a standard configure script, you do not need to modify any files except &amp;lt;code&amp;gt;debian/control&amp;lt;/code&amp;gt;, where the Hildon build-time dependency should be added. Change the &amp;lt;code&amp;gt;Build-Depends&amp;lt;/code&amp;gt; line to read (by adding &amp;quot;&amp;lt;code&amp;gt;libhildon1&amp;lt;/code&amp;gt;&amp;quot; at the end):&lt;br /&gt;
&lt;br /&gt;
 Build-Depends: debhelper (&amp;gt;= 5), autotools-dev, libhildon1 (&amp;gt;= 2.2)&lt;br /&gt;
&lt;br /&gt;
Before creating a .deb, you should set a changelog entry. .deb changelogs follow a special format, so rather than editing the files by hand, use the dch helper application. This will allow you to add what new features went into this application, give credit, and so on. It is an especially important file because it sets the version and revision of the source and binary packages. On saving, a syntax check is performed which ensures that the resulting file is OK. The file format is completely documented in the [http://www.debian.org/doc/maint-guide/ Debian packaging guide].&lt;br /&gt;
&lt;br /&gt;
Finally, we generate a .deb from the source code using the command:&lt;br /&gt;
 dpkg-buildpackage -sa -rfakeroot -k&amp;lt;my email address&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should now have several files created in the parent directory to where you unpacked the source code. I have;&lt;br /&gt;
&lt;br /&gt;
 hello_0.1.orig.tar.gz&lt;br /&gt;
 hello_0.1-1_i386.deb&lt;br /&gt;
 hello_0.1-1.diff.gz&lt;br /&gt;
 hello_0.1-1.dsc&lt;br /&gt;
 hello_0.1-1_i386.changes&lt;br /&gt;
&lt;br /&gt;
Now change the target architecture to &amp;lt;code&amp;gt;ARMEL&amp;lt;/code&amp;gt; and rebuild it, to generate &amp;lt;code&amp;gt;hello_0.1-1_arm.deb&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 sb-conf se FREMANTLE_ARMEL&lt;br /&gt;
 dpkg-buildpackage -sa -rfakeroot -k&amp;lt;my email address&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Additional information ====&lt;br /&gt;
&lt;br /&gt;
===== Ignoring git metadata =====&lt;br /&gt;
&lt;br /&gt;
If you use git then you may not want to include the entire git repo in your source bundle. With dpkg-source version 1.13.25 the -i option is not git-aware so you can do:&lt;br /&gt;
&lt;br /&gt;
  dpkg-buildpackage -rfakeroot -sa  -i -I.git&lt;br /&gt;
&lt;br /&gt;
===== Adding build-time dependencies =====&lt;br /&gt;
&lt;br /&gt;
If your program uses another library, such as Hildon in the above example, then both the Debian package and the configure script must depend on the library. &lt;br /&gt;
Otherwise, since the autobuilder only installs packages explicitly required to build your package, the build will fail.&lt;br /&gt;
&lt;br /&gt;
Often, the Debian package has a different name to the pkg-config file, just like in the Hildon example. One way to check which package owns a pkg-config file is to use &amp;lt;code&amp;gt;dpkg-query&amp;lt;/code&amp;gt; on the pkg-config file, for example the &amp;lt;code&amp;gt;mafw&amp;lt;/code&amp;gt; pkg-config file (notice the extra &amp;lt;code&amp;gt;.pc&amp;lt;/code&amp;gt; file extension):&lt;br /&gt;
 dpkg-query --search mafw.pc&lt;br /&gt;
which looks through the installed packages and finds:&lt;br /&gt;
 libmafw0-dev: /usr/lib/pkgconfig/mafw.pc&lt;br /&gt;
Then you know that you must add &amp;lt;code&amp;gt;libmafw0-dev&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;Build-Depends&amp;lt;/code&amp;gt; line in &amp;lt;code&amp;gt;debian/control&amp;lt;/code&amp;gt; if you use the &amp;lt;code&amp;gt;mafw&amp;lt;/code&amp;gt; pkg-config file in &amp;lt;code&amp;gt;configure.ac&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===== Checking build-time dependencies =====&lt;br /&gt;
&lt;br /&gt;
You may verify that your &amp;lt;code&amp;gt;Build-Depends&amp;lt;/code&amp;gt; field in debian/control is complete by running:&lt;br /&gt;
&lt;br /&gt;
 dpkg-depcheck -m dpkg-buildpackage -rfakeroot -b&lt;br /&gt;
&lt;br /&gt;
in the source tree. (You will need to &amp;lt;code&amp;gt;fakeroot apt-get install devscripts&amp;lt;/code&amp;gt; for this to work).&lt;br /&gt;
&lt;br /&gt;
=== Testing your package ===&lt;br /&gt;
&lt;br /&gt;
The first place you can test your app is in Scratchbox. Start Xephyr and the Maemo GUI as described in [[Documentation/Maemo 5 Final SDK Installation | the Maemo 5 SDK instructions]], then run your application by hand from within Scratchbox.&lt;br /&gt;
&lt;br /&gt;
Once you have created a .deb armel package of your application, you can also test it on your N900. Copy the .deb file to the device, and install it by selecting it in the file manager. You will need to ensure that the OS version on your device is compatible with the development environment in your Scratchbox.&lt;br /&gt;
&lt;br /&gt;
To make the package installable using Hildon Application Manager (which will get launched when you select the package), you should follow the [[#Maemo-specific packaging information]] below. In particular, you must set the &amp;quot;Section&amp;quot; to one of the valid sections below in the &amp;quot;debian/control&amp;quot; file.&lt;br /&gt;
&lt;br /&gt;
Once the package is installed, you will be able to launch it directly from the command line in the Xterminal application. To get the application to appear in the application list, you will need to include an icon and desktop file in the package as described in [[/Guidelines | the packaging policy]].&lt;br /&gt;
&lt;br /&gt;
=== Uploading to extras-devel ===&lt;br /&gt;
&lt;br /&gt;
{{main|Uploading to Extras-devel}}&lt;br /&gt;
&lt;br /&gt;
== Maemo-specific packaging information ==&lt;br /&gt;
&lt;br /&gt;
=== Packaging policy ===&lt;br /&gt;
&lt;br /&gt;
{{main|Packaging/Guidelines}}&lt;br /&gt;
&lt;br /&gt;
Maemo packages follow the Debian Policy, but there are some items where Maemo:&lt;br /&gt;
* Is more strict (it is an embedded distribution)&lt;br /&gt;
* Is more relaxed:&lt;br /&gt;
** A single target device (per release)&lt;br /&gt;
** A single specified UI (Hildon)&lt;br /&gt;
** A single user&lt;br /&gt;
* Differs from Debian because Maemo has different:&lt;br /&gt;
** Objectives&lt;br /&gt;
** Maintainers&lt;br /&gt;
** Infrastructure&lt;br /&gt;
&lt;br /&gt;
Most of the specifics for Maemo packaging are outlined in the [[/Guidelines|Maemo packaging guidelines]].&lt;br /&gt;
&lt;br /&gt;
=== Sections ===&lt;br /&gt;
&lt;br /&gt;
This is the list used in Fremantle/Maemo5 and is the same as the [http://lists.maemo.org/pipermail//maemo-developers/2008-October/035437.html final] list for Diablo as [[Task:Package_categories|discussed in the task]] and [[Packaging/Guidelines#Sections|outlined in the packaging guidelines]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key&lt;br /&gt;
! Example English i18n&lt;br /&gt;
! Example apps&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;user/desktop&amp;lt;/code&amp;gt;&lt;br /&gt;
| Desktop&lt;br /&gt;
| Home, statusbar and taskbar applets&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;user/development&amp;lt;/code&amp;gt;&lt;br /&gt;
| Programming&lt;br /&gt;
| py2deb&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;user/education&amp;lt;/code&amp;gt;&lt;br /&gt;
| Education&lt;br /&gt;
| Flashcard apps&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;user/games&amp;lt;/code&amp;gt;&lt;br /&gt;
| Games&lt;br /&gt;
| Doom, Duke Nukem 3D&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;user/graphics&amp;lt;/code&amp;gt;&lt;br /&gt;
| Graphics&lt;br /&gt;
| Photo apps, GIMP, Inkscape, fonts&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;user/multimedia&amp;lt;/code&amp;gt;&lt;br /&gt;
| Multimedia &#039;&#039;or&#039;&#039; Sound &amp;amp; Video&lt;br /&gt;
| Canola, mplayer, Kagu, UKMP, MediaBox&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;user/navigation&amp;lt;/code&amp;gt;&lt;br /&gt;
| (Location &amp;amp;) Navigation&lt;br /&gt;
| maemo-mapper, Navit&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;user/network&amp;lt;/code&amp;gt;&lt;br /&gt;
| Internet &amp;amp; Networking&lt;br /&gt;
| Web browsers, Samba clients, OpenAFS, Transmission&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;user/office&amp;lt;/code&amp;gt;&lt;br /&gt;
| Office&lt;br /&gt;
| GPE, Claws, AbiWord&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;user/science&amp;lt;/code&amp;gt;&lt;br /&gt;
| Science&lt;br /&gt;
| gnuplot, Octave&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;user/system&amp;lt;/code&amp;gt;&lt;br /&gt;
| System&lt;br /&gt;
| rotation-support, enhanced kernels, themes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;user/utilities&amp;lt;/code&amp;gt;&lt;br /&gt;
| Utilities &#039;&#039;or&#039;&#039; Accessories&lt;br /&gt;
| Calculators, terminals, text editors&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If the package&#039;s section starts &amp;quot;user/&amp;quot;, but is not any of the above, the &#039;&#039;Application Manager&#039;&#039; forces them into an &amp;quot;Other&amp;quot; section.&lt;br /&gt;
&lt;br /&gt;
=== Desktop files ===&lt;br /&gt;
&lt;br /&gt;
{{main|Desktop file format}}&lt;br /&gt;
&lt;br /&gt;
Desktop files are used for application icons in menus on the Linux desktop. The Maemo application menu uses the same desktop files, but installs them to a slightly different location; &amp;lt;code&amp;gt;/usr/share/applications/hildon&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;/usr/share/applications&amp;lt;/code&amp;gt;. You can add the desktop file to the &amp;lt;code&amp;gt;.install&amp;lt;/code&amp;gt; file for your application so that it is installed to the correct place, for example, if you have &amp;lt;code&amp;gt;debian/application.install&amp;lt;/code&amp;gt;, adding the line:&lt;br /&gt;
&lt;br /&gt;
 application.desktop usr/share/applications/hildon&lt;br /&gt;
&lt;br /&gt;
would install &amp;lt;code&amp;gt;application.desktop&amp;lt;/code&amp;gt; to the correct location. The location is also available with &amp;lt;code&amp;gt;pkg-config&amp;lt;/code&amp;gt;, for example:&lt;br /&gt;
&lt;br /&gt;
 pkg-config --variable=desktopentrydir osso-af-settings&lt;br /&gt;
&lt;br /&gt;
which can be used in a Makefile to install the desktop file to the correct location.&lt;br /&gt;
&lt;br /&gt;
There is some official documentation on [[Documentation/Maemo_5_Developer_Guide/Application_Development/Writing_a_new_maemo_application#Adding_application_to_menu|desktop files for Maemo applications]].&lt;br /&gt;
&lt;br /&gt;
=== Maemo-specific fields ===&lt;br /&gt;
&lt;br /&gt;
There are a number of Maemo-specific package fields that are handled by Application manager. The Application manager documentation [http://hildon-app-mgr.garage.maemo.org/packaging-stable.html outlines] them.&lt;br /&gt;
&lt;br /&gt;
==== Displaying an icon in the Application Manager next to your package ====&lt;br /&gt;
&lt;br /&gt;
Displaying an icon in the Application Manager next to your package makes it look pretty and makes your package stand out, and it is not that hard to do.&lt;br /&gt;
&lt;br /&gt;
# Make an image that is &#039;&#039;&#039;48x48&#039;&#039;&#039; pixels. The image can be saved in any format that is supported by GdkPixbufLoader on Maemo, but PNG is commonly used.&lt;br /&gt;
# base64 encode the image. This can be done in many ways, depending on the platform, but assuming you are in scratchbox:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install sharutils&lt;br /&gt;
uuencode -m &amp;lt;name of 48x48 image&amp;gt; &amp;lt;name of 48x48 image&amp;gt; &amp;gt; &amp;lt;name of 48x48 image&amp;gt;.base64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Add the field &#039;&#039;XB-Maemo-Icon-26&#039;&#039; to your &amp;lt;code&amp;gt;debian/control&amp;lt;/code&amp;gt; (in Maemo4 the size of the icons was 26x26, hence the name of the field, &#039;&#039;&#039;which has not changed&#039;&#039;&#039;)&lt;br /&gt;
# Open the base64 version of your image and copy from the line under &#039;&#039;begin-base64 644 &amp;lt;name of 48x48 image&amp;gt;&#039;&#039; to the line above the &#039;&#039;===&#039;&#039;&lt;br /&gt;
# Add this to the &#039;&#039;XB-Maemo-Icon-26&#039;&#039; field&lt;br /&gt;
# Add a space in front of every line of the encoded icon. You can do that automatically using sed when you base64 encode the image:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
uuencode -m &amp;lt;name of 48x48 image&amp;gt; &amp;lt;name of 48x48 image&amp;gt; | sed -e s,^,\ ,  &amp;gt; &amp;lt;name of 48x48 image&amp;gt;.base64&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Here is an example of a properly formatted Maemo-Icon-26: (of wrong image size)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Description: Chess...&lt;br /&gt;
XB-Maemo-Icon-26: &lt;br /&gt;
 iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAABGdBTUEAAK/INwWK6QAAABl0&lt;br /&gt;
 RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAALxSURBVHja3FZNTBNREP669J/S&lt;br /&gt;
 XYxtKRWl1JOSFBIPhkitCQeNiaKBmzdj9Ggk0ZOBxHDWixcTjV6MF+WiIB40YEyMBMGYEqQK&lt;br /&gt;
 tLS2lG7pdre0pF3WtxslgJRuD2J0kpfdTN7O976Z782sRpIk7IZR2C2TGW1cv8xaY5WuXLy8&lt;br /&gt;
 iW5XV5fk8/kkr9e7ya/T6SSNRiOViikvbbmDDD590SusZBGYDiDwJbDud7vdvYIgIJfLYXV1&lt;br /&gt;
 tSwhrQrSfRX6/26N/j+gkjW6ce06HE4HGEctGuj9oEwUzFYz5ubmEA6HQVEUisUi8vn8b4rd&lt;br /&gt;
 zjRbNxCZrr+3t7XTzjrnvMfdxMi7xj6OIRaPIbWcQjabVdRWKBTkrX4SZ2SjvCtKXf+tkxxD&lt;br /&gt;
 M5MetwfHj/lwwueHy+WCVqvdehdHKq7R6JvbpfNMAGiGhs1mg9ls3sS+4hodbDqCwef9mA9P&lt;br /&gt;
 7vhhVVWV3BGUOomiaCSufEWMxNwimlweMFYbpoMfyp70J6t8xanLZgWs8Ak07N0Hau0P3qOs&lt;br /&gt;
 wIHnl5FJx2E1WlUFuXrzIS713KusRplMCoLAgl2O4N34ODQ4VRaot6cbUzMRNNQ/w/uJWXWM&lt;br /&gt;
 eH5JARkYHsLQMIe1NZEpB7Sn1uKFhkL3maO4cL5NHVAo+hkPnrzEq2HqQIf/3ICzvr7FXmeH&lt;br /&gt;
 3qBXlslkgtFoVBS3YfbcKRRFfJpagE6vUwd0//FbjI7mkcvnGoNfg51ORx3sNju+hWYxMxsk&lt;br /&gt;
 jHlF2jJgdXU1DAaDrDx/kQAVRREJlldXo8kJoPlQ8wHSevosFgs5MmE5H0IingDP8eAzPAQC&lt;br /&gt;
 tkJakDz05Hsks+poPzwg6+Luo9chVb2O3Hilv7V6W5nO02cVX3wxjsj3CMKRBUSjUcQWY0iy&lt;br /&gt;
 SQVoi6XJaiQxubKpI02yj2xk6BoaBr0BqXRKCZpYSiCZlIXCguM4pWtvY0ypyUtt87PSIj/t&lt;br /&gt;
 pJ/JICzLKiBLySTYVArpdFrp3DuMhRZVqfvnJ+wPAQYA1hdr5EDqltYAAAAASUVORK5CYII=&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please note that if you are packaging a command-line only program that can be executed by the user, you should use the [[User:Tanner#CLI_icon|CLI icon]] only.&lt;br /&gt;
&lt;br /&gt;
==== Bugtracker location ====&lt;br /&gt;
&lt;br /&gt;
As a requirement for your package being promoted from [[Extras-testing]] to [[Extras]], your &amp;lt;code&amp;gt;debian/control&amp;lt;/code&amp;gt; file must have a link to a bugtracker, which is visible in the [http://maemo.org/packages/ maemo.org packages interface]. It is possible to [[Bugs:Adding Extra products|request a component at bugs.maemo.org]] or use a [[Getting_started_with_Maemo_Garage#Trackers_and_tasks|Garage project bugtracker]], or even an email address.&lt;br /&gt;
&lt;br /&gt;
Add the field ‘XSBC-Bugtracker’ to your &amp;lt;code&amp;gt;debian/control&amp;lt;/code&amp;gt;, for example:&lt;br /&gt;
 XSBC-Bugtracker: https://bugs.maemo.org/enter_bug.cgi?product=mypackage&lt;br /&gt;
&lt;br /&gt;
Alternatively for e-mail addresses, you can use the following format:&lt;br /&gt;
 XSBC-Bugtracker: mailto:yourname@example.com&lt;br /&gt;
&lt;br /&gt;
==== Pretty names ====&lt;br /&gt;
&lt;br /&gt;
A package can specify a pretty name for itself. This name is displayed in the Application manager UI instead of the real package name.&lt;br /&gt;
&lt;br /&gt;
The pretty name is specified with the &#039;&amp;lt;code&amp;gt;XSBC-Maemo-Display-Name&amp;lt;/code&amp;gt;&#039; field in your &amp;lt;code&amp;gt;debian/control&amp;lt;/code&amp;gt; file, for example:&lt;br /&gt;
 XSBC-Maemo-Display-Name: My package name&lt;br /&gt;
&lt;br /&gt;
==== Maemo revision string ====&lt;br /&gt;
&lt;br /&gt;
If an upstream package is re-packaged or modified for Maemo, the Maemo revision string should be appended to the upstream revision, in the &amp;lt;code&amp;gt;debian/changelog&amp;lt;/code&amp;gt; file. So if in Debian the package name was something like &amp;quot;Myapp-0.4-2&amp;quot; in maemo this package will be called &amp;quot;Myapp-0.4-2maemo0&amp;quot;. The number after the &amp;quot;maemo&amp;quot; string is a progressive number.&lt;br /&gt;
&lt;br /&gt;
==== Maemo upgrade description ====&lt;br /&gt;
&lt;br /&gt;
Tell users what changed in the update:&lt;br /&gt;
 XB-Maemo-Upgrade-Description: Formatted like &amp;quot;Description&amp;quot;. &lt;br /&gt;
  Will be displayed if user upgrades to new version and clicks&lt;br /&gt;
  on &amp;quot;Details&amp;quot;.&lt;br /&gt;
  .&lt;br /&gt;
  Human-readable and translatable.&lt;br /&gt;
As with all Maemo-specific fields, the &amp;quot;XB-&amp;quot; prefix is needed so the field will remain in the binary package.&lt;br /&gt;
&lt;br /&gt;
==== Translations of text fields ====&lt;br /&gt;
&lt;br /&gt;
The following fields can be translated to the end user&#039;s local language: Maemo-Display-Name, Description and Maemo-Upgrade-Description. It is strongly recommended to make use of this possibility so that end users understand what the application does for them while browsing through the Application Manager.&lt;br /&gt;
&lt;br /&gt;
The translation is done by adding a suffix like &amp;quot;-de_DE&amp;quot; to the respective field name, where &amp;quot;de_DE&amp;quot; is the locale the translated text is for. For example, if LC_MESSAGES equals de_DE, the Application Manager first tries &amp;quot;Description-de_DE&amp;quot; to find the description of a package and then falls back to &amp;quot;Description&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example:&lt;br /&gt;
 Description: Chess...&lt;br /&gt;
 XB-Maemo-Display-Name: My package name&lt;br /&gt;
 XB-Maemo-Upgrade-Description: Formatted like &amp;quot;Description&amp;quot;. &lt;br /&gt;
 XB-Description-de_DE: Schach...&lt;br /&gt;
 XB-Maemo-Display-Name-de_DE: Mein Packetname&lt;br /&gt;
 XB-Maemo-Upgrade-Description-de_DE: Formatiert wie &amp;quot;Description&amp;quot;. &lt;br /&gt;
Note how &amp;quot;Description&amp;quot; becomes &amp;quot;XB-Description-xx_YY&amp;quot; when a locale suffix is added. This is because it&#039;s not a standard Debian field any longer.&lt;br /&gt;
&lt;br /&gt;
=== Debhelper 7 ===&lt;br /&gt;
&lt;br /&gt;
Since the Autobuilder&#039;s [http://www.gossamer-threads.com/lists/maemo/developers/60704 use] of the Squeeze devkit, debhelper 7 is supported natively by it.&lt;br /&gt;
&lt;br /&gt;
Follow the steps on that link to also make your FREMANTLE_* target use the Squeeze devkit.&lt;br /&gt;
&lt;br /&gt;
Note: dh_make doesn&#039;t seem to be provided by the Squeeze devkit, so you&#039;ll have to run it outside of Scratchbox to get a debian/ folder based on debhelper 7.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
A backport of Debhelper 7 for Fremantle is available in extras-devel. &lt;br /&gt;
&lt;br /&gt;
 $ fakeroot apt-get install debhelper7 &lt;br /&gt;
&lt;br /&gt;
It works transparently and can coexist with debhelper 5 in the SDK. It even works on the autobuilder, if the package specifies the correct build-dependency of &amp;lt;code&amp;gt;debhelper7&amp;lt;/code&amp;gt;. The following lines in &amp;lt;code&amp;gt;debian/rules&amp;lt;/code&amp;gt; are necessary to use the new debhelper:&lt;br /&gt;
&lt;br /&gt;
 PATH:=/usr/bin/dh7:/usr/bin:$(PATH)&lt;br /&gt;
 export PATH&lt;br /&gt;
 SBOX_REDIRECT_IGNORE=/usr/bin/perl&lt;br /&gt;
 export SBOX_REDIRECT_IGNORE&lt;br /&gt;
&lt;br /&gt;
In debian/control change:&lt;br /&gt;
&lt;br /&gt;
 Build-Depends: debhelper (&amp;gt;= 7) [...]&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
 Build-Depends: debhelper&#039;&#039;&#039;7&#039;&#039;&#039; (&amp;gt;= 7) [...]&lt;br /&gt;
&lt;br /&gt;
Further information about the updated debhelper is available at [[User:Tanner#debhelper7]].&lt;br /&gt;
&lt;br /&gt;
If you also need a more recent [http://build-common.alioth.debian.org/ CDBS], then use the package [http://maemo.org/packages/view/cdbs-dh7/ cdbs-dh7], which conflicts with the standard CDBS and does not work on autobuilder yet.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can try to use debhelper 5. Debian packages that require level 7 need some changes, for example:&lt;br /&gt;
* debian/compat: 7 -&amp;gt; 5&lt;br /&gt;
* debian/control: Build-Depends: debhelper (&amp;gt;= 7) -&amp;gt; debhelper (&amp;gt;= 5)&lt;br /&gt;
* Possibly, comment out a few dh_* calls from debian/rules, which might not exist on level 5&lt;br /&gt;
&lt;br /&gt;
Things might get complex if the packaging already uses some new features of level 7, like CDBS-style helper rules. In such cases, looking at versions of packages written prior to the compatibility level upgrade might help doing the downgrade (and most Debian packages are kept in public SCMs like svn.debian.org).&lt;br /&gt;
&lt;br /&gt;
=== Ovi Store publishing ===&lt;br /&gt;
&lt;br /&gt;
{{main|Ovi Store publishing}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Packaging]]&lt;/div&gt;</summary>
		<author><name>86.202.50.113</name></author>
	</entry>
	<entry>
		<id>https://maemo.octonezd.me/index.php?title=Documentation/Maemo_5_Final_SDK_Installation&amp;diff=7868</id>
		<title>Documentation/Maemo 5 Final SDK Installation</title>
		<link rel="alternate" type="text/html" href="https://maemo.octonezd.me/index.php?title=Documentation/Maemo_5_Final_SDK_Installation&amp;diff=7868"/>
		<updated>2010-10-12T11:09:30Z</updated>

		<summary type="html">&lt;p&gt;86.202.50.113: /* Starting/Shutting down the SDK UI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
The following document describes the installation of the Maemo 5 Final SDK. Maemo SDK uses Scratchbox as the cross compilation environment into which Maemo specific development files are installed.&lt;br /&gt;
&lt;br /&gt;
Before we begin with the installation, have a look at the minimum system requirements. We officially support x86-32 Debian based distributions, mainly Debian and Ubuntu though it is possible to install the SDK on other flavours of Linux too.&lt;br /&gt;
&lt;br /&gt;
Once you are sure that your development machine fulfils these requirements, you can proceed with the following guidelines:&lt;br /&gt;
&lt;br /&gt;
Maemo 5 SDK comes with two command-line installation scripts and GUI installer (beta) to ease the SDK installation.&lt;br /&gt;
* Scratchbox installer script which downloads and installs the required version of Scratchbox onto your host machine.&lt;br /&gt;
* Maemo SDK installer which sets up two targets (armel and x86) inside Scratchbox, downloads the minimal rootstraps for both targets, and installs the open source development files based on the user selection during the installation process.&lt;br /&gt;
* GUI installer which combines both Scratchbox and SDK installation.&lt;br /&gt;
&lt;br /&gt;
Maemo 5 SDK also provides the essential Nokia proprietary binary packages needed for Maemo development and additional Nokia applications in an authenticated repository. In order to have access to this repository, you will need to accept the End User License Agreement (EULA).    For the complete functionality and usability of the Maemo SDK, it is required to install Nokia proprietary binary packages in addition to the open source packages.&lt;br /&gt;
&lt;br /&gt;
===What is not included in the Maemo SDK?===&lt;br /&gt;
&lt;br /&gt;
Xephyr X11 server software is needed on your host machine before you can run any applications in the Maemo SDK. It is an X11 server that provides a device screen for the developer so that you can see all the Maemo application windows and visuals on your host machine. This software is not included in the SDK mainly because it is available on most linux distributions. &lt;br /&gt;
&lt;br /&gt;
If you choose to install Maemo SDK using the GUI installer on Debian based systems, it will provide an option to install Xephyr for you. &lt;br /&gt;
&lt;br /&gt;
If not, you can manually install Xephyr as follows:&lt;br /&gt;
&lt;br /&gt;
On Debian based linux systems, Xephyr can be installed outside Scratchbox environment using apt with root permission:&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get install xserver-xephyr&lt;br /&gt;
&lt;br /&gt;
On a Gentoo system you need to install xorg-server with the kdrive useflag. This builds the Xephyr binary.&lt;br /&gt;
&lt;br /&gt;
==Installing Maemo 5 SDK using GUI Installer==&lt;br /&gt;
&lt;br /&gt;
Maemo 5 SDK installation is now made easy with GUI installer. This&lt;br /&gt;
installer will install Scratchbox and Maemo 5 SDK on Debian based&lt;br /&gt;
systems. This installer will allow installation of nokia closed packages and&lt;br /&gt;
applications provided that EULA at [http://tablets-dev.nokia.com/eula/index.php this webpage] is accepted. &lt;br /&gt;
&lt;br /&gt;
===Features of the GUI installer===&lt;br /&gt;
&lt;br /&gt;
* Install/Upgrade Scratchbox&lt;br /&gt;
* Installation of Maemo 5 SDK&lt;br /&gt;
* Installation of nokia-binaries&lt;br /&gt;
* Installation of nokia-apps&lt;br /&gt;
* Installation of Xephyr, if missing&lt;br /&gt;
* Can create a launcher for Xephyr on Desktop&lt;br /&gt;
* Can create a shortcut to Scratchbox home folder on Desktop&lt;br /&gt;
* Can create Maemo 5 info page on Desktop that contains useful links for developers &lt;br /&gt;
* Uninstallation of Scratchbox and targets (Debian-based distros only)&lt;br /&gt;
&lt;br /&gt;
GUI installer offers standard and custom installation modes in a wizard. Standard installation will use default settings, while custom offers more choices. Please note that standard mode will overwrite any of the standard targets (&amp;lt;code&amp;gt;FREMANTLE_X86&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FREMANTLE_ARMEL&amp;lt;/code&amp;gt;) if present, but contents of Scratchbox home will be preserved. Please use the custom mode if you don&#039;t want to overwrite your targets.&lt;br /&gt;
&lt;br /&gt;
The GUI installer Qt application requires Python bindings for Qt. GUI installer can install the required packages if not already installed.&lt;br /&gt;
&lt;br /&gt;
The installer will use the &amp;lt;code&amp;gt;http_proxy&amp;lt;/code&amp;gt; environment variable if available. If your connection does not seem to work, you will be asked to manually enter proxy settings.&lt;br /&gt;
&lt;br /&gt;
GUI installer has been tested on Ubuntu Karmic and Debian Lenny, both 32bit and 64bit versions. The GUI installer needs to download Maemo SDK so it requires a working Internet connection. On 64bit kernel, you need to disable VDSO for 32bit applications manually.&lt;br /&gt;
&lt;br /&gt;
===Starting installation with GUI installer===&lt;br /&gt;
&lt;br /&gt;
There is some missing options in this Python script if you run from non-Debian Linux systems you got errors, because it will not automatically define the installation path of Scratchbox, to correct this errors you must patch this script.&lt;br /&gt;
&lt;br /&gt;
Also you must uncheck the Xephyr checkbox and install it manually.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;diff&amp;quot;&amp;gt;&lt;br /&gt;
  129c129&lt;br /&gt;
  &amp;lt; SB_PATH = &amp;quot;/scratchbox&amp;quot;&lt;br /&gt;
  ---&lt;br /&gt;
  &amp;gt; SB_PATH = &amp;quot;/opt/scratchbox&amp;quot;&lt;br /&gt;
  2297a2298&lt;br /&gt;
  &amp;gt;       opt = opt + &amp;quot;-s /opt/scratchbox&amp;quot;&lt;br /&gt;
  2351a2353&lt;br /&gt;
  &amp;gt;       cmd = cmd +&amp;quot; -s /opt/scratchbox&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 wget http://repository.maemo.org/stable/5.0/maemo-sdk-install-wizard_5.0.py&lt;br /&gt;
 chmod a+x maemo-sdk-install-wizard_5.0.py&lt;br /&gt;
&lt;br /&gt;
 $ Installer requires root privileges&lt;br /&gt;
   Ubuntu&lt;br /&gt;
    sudo ./maemo-sdk-install-wizard_5.0.py&lt;br /&gt;
   Debian&lt;br /&gt;
    su -c ./maemo-sdk-install-wizard_5.0.py&lt;br /&gt;
&lt;br /&gt;
===Limitations of the GUI installer===&lt;br /&gt;
&lt;br /&gt;
* As the installer will do package installation, you should quit all package managers before running it.&lt;br /&gt;
* Please note that detecting Scratchbox is not perfect and it will detect only if it is installed in the &amp;lt;code&amp;gt;/scratchbox&amp;lt;/code&amp;gt; path.&lt;br /&gt;
* Please note that python-qt features used in this installer might not be available in older Ubuntu and Debian distros.&lt;br /&gt;
* Due to differences in versions of Python Qt bindings, certain parts of installation can work differently on different systems.&lt;br /&gt;
* Installer only shows required settings on 64-bit machines but does not add them automatically.&lt;br /&gt;
* Installer will always use DISPLAY :2, if you want to use a different value, you need to change it manually.&lt;br /&gt;
* GUI installer does not work on SUSE Linux. You can use command line installers instead.&lt;br /&gt;
&lt;br /&gt;
==Installing Maemo 5 SDK on x86-32 Debian based distribution==&lt;br /&gt;
&lt;br /&gt;
1. Download the Scratchbox installer and the Maemo SDK installer scripts. These are the same scripts as are available through Forum Nokia: [http://www.forum.nokia.com/Tools_Docs_and_Code/Tools/Platforms/Maemo/ Maemo SDK at Forum Nokia].&lt;br /&gt;
&lt;br /&gt;
 $ wget http://repository.maemo.org/stable/5.0/maemo-scratchbox-install_5.0.sh http://repository.maemo.org/stable/5.0/maemo-sdk-install_5.0.sh &lt;br /&gt;
&lt;br /&gt;
2. Set the permissions to execute the scripts.&lt;br /&gt;
&lt;br /&gt;
 $ chmod a+x ./maemo-scratchbox-install_5.0.sh  ./maemo-sdk-install_5.0.sh&lt;br /&gt;
&lt;br /&gt;
Users of Ubuntu 10.04 LTS will need to do the following to fix the installation, note that this may reduce system security! [http://talk.maemo.org/showpost.php?p=636394&amp;amp;postcount=8]&lt;br /&gt;
&lt;br /&gt;
 $ sudo su&lt;br /&gt;
 $ echo &amp;quot;vm.mmap_min_addr = 0&amp;quot; &amp;gt;&amp;gt; /etc/sysctl.conf&lt;br /&gt;
 $ sysctl -p&lt;br /&gt;
 $ exit #to go back to user&lt;br /&gt;
&lt;br /&gt;
3. Run the Scratchbox installer with root permission specifying the username to be added to scratchbox users group and sbox group. The username should be an existing user name from the host Linux system. This will download about 420 MB of material from the web, which is not resumeable if interrupted.&lt;br /&gt;
&lt;br /&gt;
 $ sudo ./maemo-scratchbox-install_5.0.sh -u $USER&lt;br /&gt;
&lt;br /&gt;
4. The installation script adds the specified user to ‘sbox’ user group. For the group membership to be effective in the current terminal session, run the following command:&lt;br /&gt;
&lt;br /&gt;
Note: This command will change the existing group ID during the current login session to ‘sbox’. If you do not want this change, just logout and log back in again for the group membership to be effective.&lt;br /&gt;
&lt;br /&gt;
 $ newgrp sbox&lt;br /&gt;
&lt;br /&gt;
At this step, you should have a working Scratchbox environment ready.&lt;br /&gt;
&lt;br /&gt;
5. Proceed further to run the Maemo SDK installer script. This script is run as &#039;user&#039; outside the Scratchbox environment. Set permission for &#039;user&#039; before runing script.&lt;br /&gt;
&lt;br /&gt;
  $ sudo chmod +x ./maemo-sdk-install_5.0.sh  &lt;br /&gt;
  $ ./maemo-sdk-install_5.0.sh&lt;br /&gt;
&lt;br /&gt;
If you have installed Scratchbox in a path alternative to &amp;lt;code&amp;gt;/scratchbox&amp;lt;/code&amp;gt;, you will need to specify the path with ‘-s PATH’ option. More information on available command line options can be found with --help option. Follow the instructions on the go.&lt;br /&gt;
&lt;br /&gt;
6. Once the script has successfully completed its execution, you can login into Scratchbox.&lt;br /&gt;
&lt;br /&gt;
 $ /scratchbox/login&lt;br /&gt;
&lt;br /&gt;
If you are not able to login, take a look at the [[#Limitations of Scratchbox|limitations of Scratchbox]].&lt;br /&gt;
&lt;br /&gt;
7. Proceed further to accept the EULA in order to obtain the Nokia proprietary binary packages. These Nokia binaries are essential for the complete functionality of the Maemo SDK.&lt;br /&gt;
&lt;br /&gt;
7.1. Accept the EULA on [http://tablets-dev.nokia.com/eula/index.php this webpage] &amp;lt;br/&amp;gt;&lt;br /&gt;
7.2. Copy the &amp;lt;code&amp;gt;sources.list&amp;lt;/code&amp;gt; entry given to you after the license acceptance to your Scratchbox x86 and armel target’s &amp;lt;code&amp;gt;/etc/apt/sources.list&amp;lt;/code&amp;gt; file. Execute the commands below on the &amp;lt;code&amp;gt;FREMANTLE_ARMEL&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;FREMANTLE_X86&amp;lt;/code&amp;gt; targets.&lt;br /&gt;
&lt;br /&gt;
 [sbox-FREMANTLE_X86: ~] &amp;gt; sb-conf select FREMANTLE_ARMEL&lt;br /&gt;
 [sbox-FREMANTLE_ARMEL: ~] &amp;gt; nano /etc/apt/sources.list  # add deb line &lt;br /&gt;
 [sbox-FREMANTLE_ARMEL: ~] &amp;gt; apt-get update&lt;br /&gt;
 [sbox-FREMANTLE_ARMEL: ~] &amp;gt; fakeroot apt-get install nokia-binaries nokia-apps&lt;br /&gt;
&lt;br /&gt;
 [sbox-FREMANTLE_ARMEL: ~] &amp;gt; sb-conf select FREMANTLE_X86&lt;br /&gt;
 [sbox-FREMANTLE_X86: ~] &amp;gt; nano /etc/apt/sources.list  # add deb line &lt;br /&gt;
 [sbox-FREMANTLE_X86: ~] &amp;gt; apt-get update&lt;br /&gt;
 [sbox-FREMANTLE_X86: ~] &amp;gt; fakeroot apt-get install nokia-binaries nokia-apps&lt;br /&gt;
&lt;br /&gt;
The above step installs all needed Nokia proprietary binary packages along with the open source binaries that have dependencies to Nokia proprietary binary packages. With this, your Maemo 5 SDK environment is set up completely and ready for development. If you got any DNS errors with &amp;lt;code&amp;gt;apt-get install&amp;lt;/code&amp;gt; resolving &#039;repository.maemo.org&#039;, you have to copy your host /etc/resolv.conf to Scratchbox:&lt;br /&gt;
&lt;br /&gt;
 $ sudo cp /etc/resolv.conf /scratchbox/etc/resolv.conf&lt;br /&gt;
&lt;br /&gt;
==Installing Maemo 5 SDK on openSUSE==&lt;br /&gt;
&lt;br /&gt;
There are instructions at [http://en.opensuse.org/Maemo5 opensuse.org].&lt;br /&gt;
&lt;br /&gt;
==Installing Maemo 5 SDK on non-Linux operating systems==&lt;br /&gt;
&lt;br /&gt;
If you do not have a Linux environment (Windows or Mac OS X), you can install a [[Documentation/Maemo_5_Developer_Guide/Development_Environment/Maemo_SDK_Virtual_Images|Maemo SDK virtual machine image]]&lt;br /&gt;
from [http://tablets-dev.nokia.com/maemo-dev-env-downloads.php tablets-dev.nokia.com]. [http://www.vmware.com/products/player/ VMPlayer is required].&lt;br /&gt;
&lt;br /&gt;
==Starting/Shutting down the SDK UI==&lt;br /&gt;
&lt;br /&gt;
Before starting the UI framework, ensure that you have installed the following:&lt;br /&gt;
*Xephyr X11 server on the host machine outside the Scratchbox environment&lt;br /&gt;
*The SDK as described above&lt;br /&gt;
*The Nokia proprietary binary packages&lt;br /&gt;
&lt;br /&gt;
1. Now, run Xephyr outside the scratchbox environment:&lt;br /&gt;
&lt;br /&gt;
 $ Xephyr :2 -host-cursor -screen 800x480x16 -dpi 96 -ac -kb &amp;amp;&lt;br /&gt;
&lt;br /&gt;
Ubuntu 10.04 users using the package in the repositories will have to run the same command without the &amp;lt;code&amp;gt;-host-cursor&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-kb&amp;lt;/code&amp;gt;, however the terminal window will have to stay open.&lt;br /&gt;
For recent Ubuntu releases the recommended Xephyr command line (using Finnish keyboard layout) is:&lt;br /&gt;
&lt;br /&gt;
 $ Xephyr :2 -host-cursor -screen 800x480x16 -dpi 96 -ac -keybd ephyr,,,xkbmodel=evdev,xkblayout=fi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Login to Scratchbox X86 target&lt;br /&gt;
&lt;br /&gt;
 $ /scratchbox/login&lt;br /&gt;
 &lt;br /&gt;
 Welcome to Scratchbox, the cross-compilation toolkit!&lt;br /&gt;
 &lt;br /&gt;
 Use &#039;sb-menu&#039; to change your compilation target.&lt;br /&gt;
 &lt;br /&gt;
 See /scratchbox/doc/ for documentation.&lt;br /&gt;
 &lt;br /&gt;
 [sbox-FREMANTLE_X86: ~]&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. Set the DISPLAY variable to match the display setting given for the Xephyr server.&lt;br /&gt;
&lt;br /&gt;
 [sbox-FREMANTLE_X86: ~] &amp;gt;export DISPLAY=:2&lt;br /&gt;
&lt;br /&gt;
4. Start the UI framework .&lt;br /&gt;
&lt;br /&gt;
 [sbox-FREMANTLE_X86: ~] &amp;gt;af-sb-init.sh start&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. You will now see the UI framework up and running on the Xephyr window.&lt;br /&gt;
&lt;br /&gt;
6. You can shut down the UI framework as follows:&lt;br /&gt;
&lt;br /&gt;
  [sbox-FREMANTLE_X86: ~] &amp;gt;af-sb-init.sh stop&lt;br /&gt;
&lt;br /&gt;
==Installation of x86-64 Debian based distributions==&lt;br /&gt;
&lt;br /&gt;
Since Scratchbox only supports x86-32 bit Linux host systems, we need to force the installation of x86-32 Scratchbox packages on the x86-64 bit machines. Using the -F option with the Scratchbox installation script can do this.&lt;br /&gt;
&lt;br /&gt;
===Installation procedure===&lt;br /&gt;
&lt;br /&gt;
* Download the Scratchbox installer and the Maemo SDK installer scripts.&lt;br /&gt;
&lt;br /&gt;
 $ wget -c http://repository.maemo.org/stable/5.0/maemo-scratchbox-install_5.0.sh http://repository.maemo.org/stable/5.0/maemo-sdk-install_5.0.sh &lt;br /&gt;
&lt;br /&gt;
* Set permissions to execute the scripts.&lt;br /&gt;
&lt;br /&gt;
 $ chmod a+x ./maemo-scratchbox-install_5.0.sh  ./maemo-sdk-install_5.0.sh&lt;br /&gt;
&lt;br /&gt;
Users of Ubuntu 10.04 LTS will need to do the following to fix the installation, note that this may reduce system security! [http://talk.maemo.org/showpost.php?p=636394&amp;amp;postcount=8]&lt;br /&gt;
&lt;br /&gt;
 $ sudo su&lt;br /&gt;
 $ echo &amp;quot;vm.mmap_min_addr = 0&amp;quot; &amp;gt;&amp;gt; /etc/sysctl.conf&lt;br /&gt;
 $ sysctl -p&lt;br /&gt;
 $ exit #to go back to user&lt;br /&gt;
&lt;br /&gt;
* Run the Scratchbox installer script as &#039;root user&#039; with -F option, specifying the username to be added to Scratchbox users group sbox group as follows:&lt;br /&gt;
&lt;br /&gt;
 $ sudo ./maemo-scratchbox-install_5.0.sh -F -u $USER&lt;br /&gt;
&lt;br /&gt;
* If you are running squeeze or intrepid or later, read [[#Limitations_of_Scratchbox]] before continuing.&lt;br /&gt;
&lt;br /&gt;
Upon successful installation of Scratchbox, continue to run the Maemo 5 Final SDK Installer as instructed in the [[#Installing_Maemo_5_SDK_on_x86-32_Debian_based_distribution|x86-32 installation]].&lt;br /&gt;
&lt;br /&gt;
==Starting Scratchbox on non-Debian based systems==&lt;br /&gt;
&lt;br /&gt;
If Scratchbox was installed from Debian packages, the &amp;lt;code&amp;gt;/etc/init.d/scratchbox-core&amp;lt;/code&amp;gt; init script is installed and Scratchbox should start automatically when the system is rebooted. However, if you have installed Scratchbox from tarballs, then rebooting your machine will clear away all the mounts and binfmt_misc registrations that Scratchbox requires to work. To get your Scratchbox working again after reboot, you have to run the following command as root:&lt;br /&gt;
&lt;br /&gt;
 $ sudo /scratchbox/sbin/sbox_ctl start&lt;br /&gt;
&lt;br /&gt;
Alternatively you can add &amp;lt;code&amp;gt;sbox_ctl&amp;lt;/code&amp;gt; as an init script to the &amp;lt;code&amp;gt;/etc/init.d&amp;lt;/code&amp;gt; directory and create the appropriate links at your system&#039;s runlevel directories. This procedure works on some systems:&lt;br /&gt;
&lt;br /&gt;
 $ ln -s /scratchbox/sbin/sbox_ctl /etc/init.d/scratchbox-core&lt;br /&gt;
 $ /usr/sbin/update-rc.d scratchbox-core defaults&lt;br /&gt;
&lt;br /&gt;
Refer to your system&#039;s documentation for the correct instructions.&lt;br /&gt;
&lt;br /&gt;
==Upgrading from Maemo 5 Beta2 SDK==&lt;br /&gt;
&lt;br /&gt;
A smooth upgrade from beta2 to Final SDK is unfortunately not possible. Hence it is advised to freshly install the Final SDK. Before you do so, read through the instructions below.&lt;br /&gt;
&lt;br /&gt;
Some of the Nokia applications shipped with the final SDK use a hard coded path for user home directory which presents a problem since the default username on the device differs from the username on the developer’s machine. To make these applications work, it is required to create a home directory that matches the hard coded value.  This needs to be done outside scratchbox using root privileges. The -u  option in the Scratchbox installer has been updated to create the necessary symlinks.  Running the installer with -u option when the Scratchbox has been already installed will just add the user and create symlinks.  Running it for already existing user will check for the symlink and create it if needed.&lt;br /&gt;
&lt;br /&gt;
Run the command below to create the symlink for existing Scratchbox user:&lt;br /&gt;
&lt;br /&gt;
 $ sudo ./maemo-scratchbox-install_5.0.sh -u &amp;lt;EXISTING_USER&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can create the symlinks manually as follows, if Scratchbox is installed in the default location:&lt;br /&gt;
&lt;br /&gt;
 $ sudo ln -s /scratchbox/users/&amp;lt;username&amp;gt;/home/&amp;lt;username&amp;gt; /scratchbox/users/&amp;lt;username&amp;gt;/home/user&lt;br /&gt;
&lt;br /&gt;
The Final SDK installer additionally creates a directory &amp;lt;code&amp;gt;/opt&amp;lt;/code&amp;gt; under &amp;lt;code&amp;gt;/target/&amp;lt;target_name&amp;gt;/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Reason:&#039;&#039;&#039; In order to facilitate installing applications under &amp;lt;code&amp;gt;/opt&amp;lt;/code&amp;gt; on the device, a symlink &amp;lt;code&amp;gt;/opt&amp;lt;/code&amp;gt; has been created pointing to &amp;lt;code&amp;gt;/home/opt&amp;lt;/code&amp;gt;. The SDK inherits this feature. Under Scratchbox, &amp;lt;code&amp;gt;/opt&amp;lt;/code&amp;gt; points to &amp;lt;code&amp;gt;/target/links/opt&amp;lt;/code&amp;gt; which in turn points to &amp;lt;code&amp;gt;/targets/&amp;lt;target_name&amp;gt;/opt&amp;lt;/code&amp;gt;. Installing the rootstraps makes this point to &amp;lt;code&amp;gt;/home/opt&amp;lt;/code&amp;gt;, which is not what we want, since we need &amp;lt;code&amp;gt;/opt&amp;lt;/code&amp;gt; to be target specific.  In order to resolve this situation, we have to manually check whether &amp;lt;code&amp;gt;/targets/&amp;lt;target_name&amp;gt;/opt&amp;lt;/code&amp;gt; is a symlink and if it is, remove it and create a directory with the same name.&lt;br /&gt;
&lt;br /&gt;
==Upgrading from Maemo 4.x/Diablo SDK==&lt;br /&gt;
&lt;br /&gt;
Due to the fact that there are API breaks in Fremantle, we cannot upgrade Diablo SDK to Fremantle. We can however have Fremantle Scratchbox targets co-exist with Diablo targets.&lt;br /&gt;
&lt;br /&gt;
For this, we need to first upgrade the Scratchbox installation on our host machine.&lt;br /&gt;
&lt;br /&gt;
*Download the Maemo5 scratchbox installer.&lt;br /&gt;
&lt;br /&gt;
*Set executable permissions and run it as follows:&lt;br /&gt;
&lt;br /&gt;
 $ chmod a+x ./maemo-scratchbox-install_5.0.sh&lt;br /&gt;
 $ sudo  ./maemo-scratchbox-install_5.0.sh -U -u &amp;lt;EXISTING_USER&amp;gt; -s /scratchbox&lt;br /&gt;
&lt;br /&gt;
Once the Scratchbox installation is done, run the Maemo 5 Final SDK installer.&lt;br /&gt;
&lt;br /&gt;
==Manual Installation==&lt;br /&gt;
&lt;br /&gt;
===On x86 and x86_64 Debian-based systems===&lt;br /&gt;
&lt;br /&gt;
* You can add the following line into your host machine&#039;s &amp;lt;code&amp;gt;/etc/apt/sources.list&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
 deb http://scratchbox.org/debian/ hathor main&lt;br /&gt;
&lt;br /&gt;
* Install the needed Scratchbox packages with root permission&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get update&lt;br /&gt;
 $ sudo apt-get install scratchbox-core scratchbox-libs scratchbox-devkit-qemu scratchbox-devkit-debian scratchbox-devkit-doctools scratchbox-devkit-perl scratchbox-toolchain-host-gcc scratchbox-toolchain-cs2007q3-glibc2.5-arm7 scratchbox-toolchain-cs2007q3-glibc2.5-i486  scratchbox-devkit-svn scratchbox-devkit-git scratchbox-devkit-apt-https&lt;br /&gt;
&lt;br /&gt;
The Scratchbox packages will be unpacked to &amp;lt;code&amp;gt;/scratchbox&amp;lt;/code&amp;gt; directory and the installation procedure will ask you some questions about the group and user accounts. Default group to Scratchbox is &#039;sbox&#039;.&lt;br /&gt;
&lt;br /&gt;
* Users who will be using Scratchbox should be added using the following command with root permission:&lt;br /&gt;
&lt;br /&gt;
 $ sudo /scratchbox/sbin/sbox_adduser USER yes&lt;br /&gt;
&lt;br /&gt;
It will automatically include the user to the Scratchbox group, create user directories under &amp;lt;code&amp;gt;/scratchbox/users&amp;lt;/code&amp;gt; and mount several directories (&amp;lt;code&amp;gt;/dev&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/proc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/tmp&amp;lt;/code&amp;gt;) under the user directory.&lt;br /&gt;
&lt;br /&gt;
* Some of the Nokia applications shipped with the final SDK use a hard coded path for user home directory which presents a problem since the default username on the device differs from the username on the developer’s machine. To make these applications work, it is required to create a home directory that matches the hard coded value. This needs to be done outside scratchbox using root privileges.&lt;br /&gt;
&lt;br /&gt;
 $ sudo ln -s /scratchbox/users/&amp;lt;username&amp;gt;/home/&amp;lt;username&amp;gt; /scratchbox/users/&amp;lt;username&amp;gt;/home/user&lt;br /&gt;
&lt;br /&gt;
* For the group membership to be effective in the current terminal session, run the following command:&lt;br /&gt;
&lt;br /&gt;
 $ newgrp sbox&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; This command will change the existing group ID during the current login session to &#039;sbox&#039;. If you do not want to change, simply logout and log back in for the group membership to be effective.&lt;br /&gt;
&lt;br /&gt;
* Log-in to Scratchbox.&lt;br /&gt;
&lt;br /&gt;
 $ /scratchbox/login&lt;br /&gt;
&lt;br /&gt;
* Configure the scratchbox x86 and armel targets as follows:&lt;br /&gt;
&lt;br /&gt;
 [sbox-&amp;gt;:~]&amp;gt;sb-conf st FREMANTLE_X86 -c cs2007q3-glibc2.5-i486 -d perl:debian-etch:doctools:svn:git -t none&lt;br /&gt;
 [sbox-&amp;gt;:~]&amp;gt;sb-conf st FREMANTLE_ARMEL -c cs2007q3-glibc2.5-arm7 -d qemu:perl:debian-etch:doctools:svn:git -t qemu-arm-sb&lt;br /&gt;
&lt;br /&gt;
* Download the minimal rootstraps.&lt;br /&gt;
&lt;br /&gt;
 [sbox-&amp;gt;:~]&amp;gt; wget http://repository.maemo.org/stable/5.0/armel/maemo-sdk-rootstrap_5.0_armel.tgz http://repository.maemo.org/stable/5.0/i386/maemo-sdk-rootstrap_5.0_i386.tgz&lt;br /&gt;
&lt;br /&gt;
* Switch to x86 target, install the devkits, etc and fakeroot into the target, install the minimal rootstrap and finally the Maemo development files.&lt;br /&gt;
&lt;br /&gt;
 [sbox-&amp;gt;:~]&amp;gt; sb-conf se FREMANTLE_X86&lt;br /&gt;
 [sbox-FREMANTLE_X86: ~] &amp;gt; sb-conf rs maemo-sdk-rootstrap_5.0_i386.tgz&lt;br /&gt;
&lt;br /&gt;
* Some users seem to have problems downloading all files with apt http pipelining enabled. If you want to make sure or you get download errors like &amp;quot;104 connection reset by peer&amp;quot; at the fakeroot steps below, then disable http pipelining with the next command:&lt;br /&gt;
 [sbox-FREMANTLE_X86: ~] &amp;gt; echo &#039;Acquire::http::Pipeline-Depth &amp;quot;0&amp;quot;;&#039; &amp;gt;&amp;gt; /etc/apt/apt.conf.d/00maemo&lt;br /&gt;
&lt;br /&gt;
* either way, continue here:&lt;br /&gt;
 [sbox-FREMANTLE_X86: ~] &amp;gt; sb-conf in -edFL&lt;br /&gt;
 [sbox-FREMANTLE_X86: ~] &amp;gt; apt-get update&lt;br /&gt;
 [sbox-FREMANTLE_X86: ~] &amp;gt; fakeroot apt-get install maemo-sdk-debug&lt;br /&gt;
&lt;br /&gt;
The meta-package &amp;lt;code&amp;gt;maemo-sdk-debug&amp;lt;/code&amp;gt; installs all needed open source runtime, development and debug pakcages into the target. Use &amp;lt;code&amp;gt;maemo-sdk-runtime&amp;lt;/code&amp;gt; if you want only runtime packages to be installed or use &amp;lt;code&amp;gt;maemo-sdk-dev&amp;lt;/code&amp;gt; if you want only the runtime and development packages to be installed.&lt;br /&gt;
&lt;br /&gt;
* Accept the EULA from [http://tablets-dev.nokia.com/eula/index.php here]  to obtain the URL to access the Nokia binaries repository.&lt;br /&gt;
&lt;br /&gt;
* Add the URL thus obtained to the Scratchbox target&#039;s &amp;lt;code&amp;gt;/etc/apt/sources.list&amp;lt;/code&amp;gt; and do the following:&lt;br /&gt;
&lt;br /&gt;
 [sbox-FREMANTLE_X86: ~] &amp;gt;apt-get update&lt;br /&gt;
 [sbox-FREMANTLE_X86: ~] &amp;gt;fakeroot apt-get install nokia-binaries nokia-apps&lt;br /&gt;
&lt;br /&gt;
* In order to facilitate installing applications under &amp;lt;code&amp;gt;/opt on the device, a symlink &amp;lt;code&amp;gt;/opt&amp;lt;/code&amp;gt; has been created pointing to &amp;lt;code&amp;gt;/home/opt&amp;lt;/code&amp;gt;. The SDK inherits this feature. Under Scratchbox, &amp;lt;code&amp;gt;/opt&amp;lt;/code&amp;gt; points to &amp;lt;code&amp;gt;/target/links/opt&amp;lt;/code&amp;gt; which in turn points to &amp;lt;code&amp;gt;/targets/&amp;lt;target_name&amp;gt;/opt&amp;lt;/code&amp;gt;. Installing the rootstraps makes this point to &amp;lt;code&amp;gt;/home/opt&amp;lt;/code&amp;gt;, which is not what we want, since we need &amp;lt;code&amp;gt;/opt,/code&amp;gt; to be target specific. In order to resolve this situation,&lt;br /&gt;
&lt;br /&gt;
 [sbox-FREMANTLE_X86: ~] &amp;gt;rm -rf /targets/FREMANTLE_X86/opt&lt;br /&gt;
 [sbox-FREMANTLE_X86: ~] &amp;gt;mkdir /targets/FREMANTLE_X86/opt&lt;br /&gt;
&lt;br /&gt;
* Execute similar steps on the armel target too to set it up:&lt;br /&gt;
&lt;br /&gt;
 [sbox-FREMANTLE_X86: ~]&amp;gt; sb-conf se FREMANTLE_ARMEL&lt;br /&gt;
 [sbox-FREMANTLE_ARMEL: ~] &amp;gt; sb-conf rs maemo-sdk-rootstrap_5.0_armel.tgz&lt;br /&gt;
&lt;br /&gt;
* again,the next command disables http pipelining, if you like:&lt;br /&gt;
 [sbox-FREMANTLE_X86: ~] &amp;gt; echo &#039;Acquire::http::Pipeline-Depth &amp;quot;0&amp;quot;;&#039; &amp;gt;&amp;gt; /etc/apt/apt.conf.d/00maemo&lt;br /&gt;
&lt;br /&gt;
* pipelining disabled or not, here we go again...&lt;br /&gt;
 [sbox-FREMANTLE_ARMEL: ~] &amp;gt; sb-conf in -edFL&lt;br /&gt;
 [sbox-FREMANTLE_ARMEL: ~] &amp;gt; apt-get update&lt;br /&gt;
 [sbox-FREMANTLE_ARMEL: ~] &amp;gt; fakeroot apt-get install maemo-sdk-debug&lt;br /&gt;
&lt;br /&gt;
* Add the same URL obtained above to access the Nokia binaries repository under &amp;lt;code&amp;gt;/etc/apt/sources.list&amp;lt;/code&amp;gt; file of the Scratchbox armel target.&lt;br /&gt;
&lt;br /&gt;
 [sbox-FREMANTLE_ARMEL: ~] &amp;gt;apt-get update&lt;br /&gt;
 [sbox-FREMANTLE_ARMEL: ~] &amp;gt;fakeroot apt-get install nokia-binaries nokia-apps&lt;br /&gt;
&lt;br /&gt;
* Create the &amp;lt;code&amp;gt;/opt&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
 [sbox-FREMANTLE_ARMEL: ~] &amp;gt;rm -rf /targets/FREMANTLE_ARMEL/opt&lt;br /&gt;
 [sbox-FREMANTLE_ARMEL: ~] &amp;gt;mkdir /targets/FREMANTLE_ARMEL/opt&lt;br /&gt;
&lt;br /&gt;
With this, you must now have both the targets setup and ready to use.&lt;br /&gt;
&lt;br /&gt;
[[#Starting/Shutting down the SDK UI|Start the UI framework]].&lt;br /&gt;
&lt;br /&gt;
==Un-installation==&lt;br /&gt;
&lt;br /&gt;
Make sure that you have no process running inside Scratchbox. Uninstalling Scratchbox will remove everything that is installed and saved inside Scratchbox. Please take a backup of your files from Scratchbox user home directory if needed.&lt;br /&gt;
&lt;br /&gt;
On Debian based systems, do the following with root permissions:&lt;br /&gt;
&lt;br /&gt;
 $ sudo apt-get remove scratchbox-* --purge&lt;br /&gt;
 $ sudo rm -rf /scratchbox&lt;br /&gt;
&lt;br /&gt;
On non-Debian based systems, you need to stop scratchbox as follows before removing it.&lt;br /&gt;
&lt;br /&gt;
 $ sudo /scratchbox/sbin/sbox_ctl stop&lt;br /&gt;
 $ sudo rm -rf /scratchbox&lt;br /&gt;
&lt;br /&gt;
==Limitations of Scratchbox==&lt;br /&gt;
&lt;br /&gt;
The following limitations have been noted in the usage of Scratchbox:&lt;br /&gt;
&lt;br /&gt;
===VDSO support===&lt;br /&gt;
&lt;br /&gt;
Scratchbox versions [http://lists.scratchbox.org/pipermail/scratchbox-users/2010-June/001618.html prior to 1.0.18 (Hathor)] do not work when VDSO32 support is enabled in the host&#039;s kernel, although there are some workarounds for older versions, which are presented here.&lt;br /&gt;
&lt;br /&gt;
If your host has VDSO32 turned on you will get an error like this when trying to login to Scratchbox.&lt;br /&gt;
&lt;br /&gt;
 No directory, logging in with HOME=/&lt;br /&gt;
 Inconsistency detected by ld.so: rtld.c: 1192: dl_main: Assertion `(void *) &lt;br /&gt;
 ph-&amp;gt;p_vaddr == _rtld_local._dl_sysinfo_dso&#039; failed!&lt;br /&gt;
&lt;br /&gt;
===x86-64 kernel===&lt;br /&gt;
&lt;br /&gt;
x86-64 Linux kernels starting from version 2.6.25 enable VDSO32 by default. To temporarily disable VDSO32 execute &lt;br /&gt;
&lt;br /&gt;
 sysctl abi.vsyscall32=0&lt;br /&gt;
&lt;br /&gt;
On Linux kernel 2.6.24 &amp;lt;= you can disable VDSO32 by executing&lt;br /&gt;
&lt;br /&gt;
 sysctl vm.vdso_enabled=0&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 sysctl kernel.vdso=0&lt;br /&gt;
&lt;br /&gt;
The current setting of VDSO32 can be verified by using sysctl. Only values 0 and 2 are compatible with Scratchbox. In our examples we use 0 (disable). 2 enables compat mode.&lt;br /&gt;
&lt;br /&gt;
You can set all of these permanently by adding the following lines to &amp;lt;code&amp;gt;/etc/sysctl.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 vm.vdso_enabled = 0&lt;br /&gt;
 abi.vsyscall32 = 0&lt;br /&gt;
 kernel.vdso = 0&lt;br /&gt;
&lt;br /&gt;
Save the file and run the command:&lt;br /&gt;
&lt;br /&gt;
 $ sudo sysctl -p&lt;br /&gt;
&lt;br /&gt;
Please note the correct line depends on your Linux kernel version. When you execute sysctl -p you may get a warning about unknown keys. You can safely ignore those warnings as long as one of the 3 settings works.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WARNING :&#039;&#039;&#039; You should try setting these values by echoing them to the given locations before adding them to &amp;lt;code&amp;gt;sysctl.conf&amp;lt;/code&amp;gt; to see if they cause any problems. For example, in some Ubuntu Gutsy installations, it has been observed that changing the VDSO settings will hang the system and thus making permanent changes in &amp;lt;code&amp;gt;sysctl.conf&amp;lt;/code&amp;gt; may, in these cases, make your system unbootable.&lt;br /&gt;
&lt;br /&gt;
==Known Issues in the SDK==&lt;br /&gt;
&lt;br /&gt;
* A list of issues and their solutions can be found in the [[Developer_FAQ#Maemo_SDK_and_Scratchbox|Developer FAQ]] article&lt;br /&gt;
* Unnecessary warnings and debugging messages are printed out when the hildon application framework is started.&lt;br /&gt;
* Armel target does not bring up the UI framework&lt;br /&gt;
* It has been noted that Xephyr dies with the application framework at times. The crash in question might even be Xephyr related since the application framework behaves differently with different versions/builds of Xephyr. The case seems to be worst on Xephyr that comes with Ubuntu Jaunty, there Xephyr will die when running any application that contains an input field and clicking on that field with a mouse to invoke the input method. On Fedora Core 10 the Xephyr does not mind the mouse clicks but dies when shutting down the application framework. On the other hand Xephyr on Ubuntu Intrepid or even the Intrepid version recompiled for Jaunty does not experience crashing in these situations.&amp;lt;br/&amp;gt;A patch is already available for the Xephyr on Ubuntu Jaunty and can be found at http://bugs.freedesktop.org/show_bug.cgi?id=21591. Binaries packages for [http://launchpadlibrarian.net/30330126/xserver-xephyr_1.6.3-1ubuntu2_i386.deb xserver-xephyr] package and its dependencies ([http://launchpadlibrarian.net/27533744/libgpg-error0_1.6-1ubuntu1_i386.deb libgpg-error0] and [http://launchpadlibrarian.net/28623981/libgcrypt11_1.4.4-2ubuntu2_i386.deb libcrypt11]) can be download from Ubuntu Jaunty repositories.&lt;br /&gt;
* The performance of clutter can be improved by enabling hardware acceleration if not enabled already. In some cases, it would require installing restricted/proprietary drivers (Eg: on host machines with ATI or NVidia graphics card). Refer to [[Maemo 5 Clutter performance]] for more details.&lt;br /&gt;
* Running Xephyr with &amp;lt;code&amp;gt;-kb&amp;lt;/code&amp;gt; option disables entry of “@” symbol. However, removing &amp;lt;code&amp;gt;-kb&amp;lt;/code&amp;gt; option disables cursor keys.&lt;br /&gt;
* Running Xephyr with &amp;lt;code&amp;gt;-host-cursor&amp;lt;/code&amp;gt; is causing Xephyr to crash in Ubuntu Lucid and Debian Squeeze when the Hildon Application Framework is closed.&lt;br /&gt;
* Xephyr in Ubuntu Lucid does not support the &amp;lt;code&amp;gt;-kb&amp;lt;/code&amp;gt; option anymore. https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/531872&lt;br /&gt;
* In order to run ARMEL binaries in scratchbox the &amp;lt;code&amp;gt;mmap_min_address&amp;lt;/code&amp;gt; needs to be set to 4096 or lower. Normally the SDK installer warns about that, but in Ubuntu Lucid the /proc entry is visible only to root, so the SDK installer can not see it. https://bugs.launchpad.net/ubuntu/+source/linux/+bug/568844 This also [http://lists.scratchbox.org/pipermail/scratchbox-users/2010-June/001624.html prevents qemu from checking the value], in which case it is assumed to be 0. Because of this, until the bug is fixed (kernel 2.6.34 is unaffected, and at least that version will be in Maverick), the value should be set to 0 on Lucid.&lt;br /&gt;
** [http://talk.maemo.org/showpost.php?p=636394&amp;amp;postcount=8 To install on Ubuntu 10.04] (restart installation afterwards):&lt;br /&gt;
 $ sudo su&lt;br /&gt;
 $ echo &amp;quot;vm.mmap_min_addr = 0&amp;quot; &amp;gt;&amp;gt; /etc/sysctl.conf&lt;br /&gt;
 $ sysctl -p&lt;br /&gt;
 $ exit #to go back to user&lt;br /&gt;
&lt;br /&gt;
[[Category:Scratchbox]]&lt;/div&gt;</summary>
		<author><name>86.202.50.113</name></author>
	</entry>
</feed>