Maemo SDK building (officially reposted)

Source: Internet
Author: User


Installation Guide for http://wiki.maemo.org/Maemo_5_Final_SDK_%E5% AE %89%E8%A3%85%E6%8C%87%E5%8D%97Maemo 5 Final SDK
Contents

[Hide]

  • 1 Introduction

    • 1.1 contents not included in the maemo SDK
  • 2. Install the maemo 5 SDK through the installation program on the GUI
  • 3 install maemo 5 SDK On Debian-based x86-32 Linux distributions
  • 4. Install the maemo 5 SDK on opensuse
  • 5. Start/end the SDK Gui
  • 6 install maemo 5 SDK On Debian-based x86-32 Linux distributions
  • 7. Start scratchbox in a non-Debian system
  • 8 from maemo 5 beta 2 SDK upgrade
  • 9 upgraded from maemo 4.x/ Diablo SDK
  • 10 Manual Installation
  • 11 uninstall
  • 12 scratchbox Problems
    • 12.1 vdso support
    • 12.2 x86-64 Kernel
  • 13 known issues

[Edit] Introduction

This document is a simplified Chinese translation of documentation/maemo 5 Final SDK installation.

The following document describes how to install the maemo 5 Final SDK. The maemo SDK uses scratchbox as the Cross-compiling environment. You also need to install the maemo development file.

Before starting the installation, let's take a look at the minimum system requirements. Official support for Debian-based x86-32 Linux release, mainly Debian and ubuntu. However, you can also install the maemo SDK on other Linux distributions.

When you confirm that your development device meets these requirements, you can follow the instructions below.

The maemo 5 SDK is equipped with two command line installation scripts and an installation program with a graphical interface (still in beta version) to simplify SDK installation.

  • The scratchbox installation script will automatically download and install the specified version of scratchbox on your machine.
  • The maemo SDK installation script sets two compilation targets (Armel and x86) in scratchbox, downloads the most basic development file package rootstraps for the two targets, and installs the user-specified open-source development tool.
  • The graphical interface installer installs scratchbox and maemo SDK at the same time.

The maemo 5 SDK uses an authentication software source to provide the Nokia binary development package required by developers and the accompanying Nokia applications. To obtain these files, you must accept Nokia's End User License Agreement. To obtain the complete features of the maemo SDK, you need Nokia binaries other than these open-source sdks.

 

[Edit] Contents Not included in the maemo SDK

The xephye X11 server is required to run the maemo SDK program on your host. The X11 server provides a window to display the device screen and user interface, allowing developers to view the maemo program window and interface on their hosts. This software is not included in the maemo SDK, because most Linux distributions provide this software.

If you install the maemo SDK through the graphical installation program on the Debian-based Linux release, You will be provided with the option to install xephyr.

If not, you can manually install xephyr in the following ways.

On Debian-based Linux systems, you can use apt-get to install xephyr with root permissions outside the scratchbox environment.

$ sudo apt-get install xserver-xephyr

On the Gentoo system, you need to add the useflag kdrive and compile Xorg-server to obtain xephye.

[Edit] install the maemo 5 SDK through the installation program on the GUI

Now, the maemo 5 SDK has a convenient GUI installation method. This installer can install scratchbox and maemo 5 sdks on the Debian-based release. At the same time, you can also handle the Nokia end user protocol provided on this page, and install the Nokia binary Development Kit and applications.

The GUI installer provides the following functions.

  • Install/upgrade scratchbox
  • Install the maemo 5 SDK
  • Install the Nokia Binary Package
  • Install the Nokia Application
  • Install xephye
  • Create an xephye initiator on the desktop
  • Create a shortcut for the scrachbox home directory on the desktop
  • Create a maemo 5 Information Page useful to developers on the desktop

The GUI installer provides two options: Standard installation and custom installation. Standard installation uses the default settings, while custom installation provides more options. Note that if there are compilation targets of fremantle_x86 and fremantle_armel, standard installation will overwrite these two targets, but the home directory of scratchbox will be retained. If you do not want to overwrite these two compilation targets, use custom installation.

The installer is a python QT program that requires pyqt support. If your system does not install these packages, the installer can install them.

If necessary, the installer can use the HTTP proxy. If your network connection does not work properly, the installer will request you to manually set the proxy.

The installer has been tested on Ubuntu karmic and Debian Lenny. Both the 32-bit and 64-bit versions can be used normally. The installation program needs to download the maemo SDK, so you need an available Internet connection.

Start Installation

If you want to execute the installation script on a non-Debian system, some Python settings may be missing, so you cannot automatically locate the installation path of scratchbox. To solve this problem, you need to patch the script.

The following are the patch files.

129c129< SB_PATH = "/scratchbox"---> SB_PATH = "/opt/scratchbox"2297a2298> opt = opt + "-s /opt/scratchbox"2351a2353> cmd = cmd +" -s /opt/scratchbox"

In addition, you should also remove the xephyr Installation option and install it manually.

Use wget to download the installer.

$ wget http://repository.maemo.org/stable/5.0/maemo-sdk-install-wizard_5.0.py

Add executable permissions for the installer

$ chmod a+x maemo-sdk-install-wizard_5.0.py

Root permission is required for installation.

Ubuntu$ sudo ./maemo-sdk-install-wizard_5.0.py
Debian$ su -c ./maemo-sdk-install-wizard_5.0.py

Note::

  • Because the installation program requires installation of software packages, you should first exit other package management programs before installation.
  • Note that the scratchbox path detection is not perfect. You must install it in the/scratchbox directory.
  • In addition, the installation program requires pyqt support. Earlier versions of Ubuntu and Debian may not provide pyqt.
  • On a 64-bit system, the installer displays the settings that need to be configured, but does not automatically configure them. You need to manually configure them.
  • The installer sets the display environment variable to ": 2". If you want to use other values, change them manually.

[Edit] installing maemo 5 SDK On Debian-based X86-32 Linux distributions

1. Download the installation script of scratchbox and maemo SDK. You can also download the same script from the Nokia Development Forum (maemo SDK at Forum Nokia.

$ 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

2. Add executable permissions to the script.

$ chmod a+x ./maemo-scratchbox-install_5.0.sh ./maemo-sdk-install_5.0.sh

3. Run the scratchbox installation script with the root permission and specify the user to be added to the scratchbox user group. This user must be valid in the host Linux system. This will download about MB of content and does not support resumable data transfer.

$ sudo ./maemo-scratchbox-install_5.0.sh -u USER

4. The installation script adds the specified user to the sbox user group. To make the modification settings take effect in the current terminal process, you need to execute the following command.

  • Note: If you have logged on to the scratchbox environment, this command changes the current user group ID. If you do not want to change, you only need to log out from the scratchbox environment and then log on again.
$ newgrp sbox

5. Now you have an available scratchbox environment.

6. Continue to install the maemo SDK. This script must run with the user permission specified during installation outside the scratchbox environment. First, add executable permissions to the script user.

$ sudo chmod +x ./maemo-sdk-install_5.0.sh

Then run.

$ ./maemo-sdk-install_5.0.sh

If you install scratchbox to a directory other than/scratchbox, you need to use the "-s path" option to specify your scratchbox directory. You can use the "-- Help" option to obtain more information about command line options.

7. After the script is successfully executed, you can log on to the scratchbox environment.

$ /scratchbox/login

If you cannot log on, check the scratchbox issue.

8. You need to accept Nokia's End User License Agreement to obtain the Binary Package provided by Nokia. After installing these software packages, you will obtain the complete features of the maemo SDK.

8.1. Accept the End User License Agreement through this page.

8.2. Add the software source addresses obtained after accepting the End User License Agreement to the/etc/APT/source. list files of the x86 and Armel compiling target environments respectively. Run the following commands in two target environments.

 

Sbox-FREMANTLE_X86: ~ > Sb-conf select fremantle_armel [sbox-FREMANTLE_ARMEL: ~] > Nano/etc/APT/sources. List # Add software source address [sbox-FREMANTLE_ARMEL: ~] > Apt-Get update [sbox-FREMANTLE_ARMEL: ~] > Fakeroot apt-Get install Nokia-binaries Nokia-apps [sbox-FREMANTLE_ARMEL: ~] > Sb-conf select fremantle_x86 [sbox-FREMANTLE_X86: ~] > Nano/etc/APT/sources. List # Add software source address [sbox-FREMANTLE_X86: ~] > Apt-Get update [sbox-FREMANTLE_X86: ~] > Fakeroot apt-Get install Nokia-binaries Nokia-apps

The Nokia binary package will be installed in the above steps, and some open source toolkit will depend on them. In this way, you have completed the configuration of the maemo 5 SDK development environment and can start development.

[Edit] install maemo 5 SDK on opensuse

This is the installation guide from opensuse.org.

[Edit] graphic user interface for SDK startup/termination

Before starting the user interface, make sure that you have correctly installed the following content:

  • Xephyr X11 server on the host system outside the scratchbox Environment
  • SDK mentioned earlier
  • Nokia binary Toolkit

1. First, start xephyr outside the scratchbox environment:

Xephyr :2 -host-cursor -screen 800x480x16 -dpi 96 -ac -kb &

2. log on to scratchbox's X86 compiling target environment

$ /scratchbox/loginWelcome to Scratchbox, the cross-compilation toolkit!Use 'sb-menu' to change your compilation target.See /scratchbox/doc/ for documentation.[sbox-FREMANTLE_X86: ~]>

3. Set the display environment variable to make it consistent with the xephyr setting.

[sbox-FREMANTLE_X86: ~] >export DISPLAY=:2

4. Start the user interface.

[sbox-FREMANTLE_X86: ~] >af-sb-init.sh start

5. The graphic interface will appear in the xephyr window.

6. You can use the following command to terminate the user interface:

[sbox-FREMANTLE_X86: ~] >af-sb-init.sh stop

[Edit] installing maemo 5 SDK On Debian-based X86-32 Linux distributions

Since scratchbox only supports the Linux host system of the x86-32 architecture, in the x86-64 system, we need to force the installation of the scratchbox package of the x86-32. When executing the scratchbox installation script, add the "-F" option.

Installation Process

  • Download the installation script of scratchbox and maemo 5 SDK.
$ 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
  • Add executable permissions to scripts
$ chmod a+x ./maemo-scratchbox-install_5.0.sh ./maemo-sdk-install_5.0.sh
  • Run the scratchbox installation script with the root permission, add the "-F" option, and specify the user to be added to the scratchbox user group. This user must be valid in the host Linux system.
$ sudo ./maemo-scratchbox-install_5.0.sh -F -u $USER

After scratchbox is successfully installed, continue installing the maemo 5 Final SDK with reference to the installation guide for the x86-32 system.

[Edit] Start scratchbox in a non-Debian system

If scratchbox is installed through the Deb package of Debian, the start script of scratchbox/etc/init. d/scratchbox-core will be correctly installed, and scratchbox will be automatically started when the system is restarted.

If you have installed scratchbox through tarbils, the mounting configuration and binfmt_misc required by scratchbox will be cleared after the system is restarted.

To enable scratchbox to continue working after restart, run the following command with root permission:

$ sudo /scratchbox/sbin/sbox_ctl start

You can also use sbox_ctl as a system script, add it to the/etc/init. d directory, and create a link in the corresponding running level directory. In most systems, the method is as follows:

$ ln -s /scratchbox/sbin/sbox_ctl /etc/init.d/scratchbox-core$ /usr/sbin/update-rc.d scratchbox-core defaults

Please refer to your system documentation for more information.

[Edit] upgrade from maemo 5 beta 2 SDK

Unfortunately, it is impossible to smoothly upgrade from Beta 2 to final SDK. Therefore, we recommend that you reinstall final SDK. Before you proceed, take a look at the following guidelines.

Some Nokia applications that come with the final SDK use a fixed path to specify the user's home directory. To make these programs work properly, you need to create a directory with the same path as the one specified by Nokia.

This operation must be performed with the root permission outside the scratchbox environment.

The "-U" option of the scratchbox installation script updates the environment and creates necessary links.

Run the following command to create necessary links for existing scratchbox users.

$ sudo ./maemo-scratchbox-install_5.0.sh -u <EXISTING_USER> 

You can also manually create links. If scratchbox is installed in the default path, run the following command:

$ sudo ln -s /scratchbox/users/<username>/home/<username> /scratchbox/users/<username>/home/user

The final SDK installation script also adds the/OPT directory under the/target/<target_name>/directory.

To facilitate application installation in the/OPT path, some Linux systems will create a link pointing to/home/OPT as the/OPT directory. The SDK also inherits this feature.

In the scratchbox environment, the/OPT directory path is/target/<target_name>/OPT.

After installing the basic system package rootstraps, all/target/<target_name>/OPT in the compiling target environment will be directed to/home/OPT. /OPT should be specified for each compilation target environment.

To solve this problem, we need to manually check whether/target/<target_name>/OPT is linked. If yes, delete the link and recreate the corresponding directory.

[Edit] upgrade from maemo 4.x/ Diablo SDK

In fact, due to API changes, we cannot upgrade from Diablo to Fremantle. However, we can use the scratchbox environment of Diablo to help configure the scratchbox environment of Fremantle.

Therefore, we can upgrade scratchbox.

  • Download the scratchbox installation script for maemo 5
$ chmod a+x ./maemo-scratchbox-install_5.0.sh
  • Add the executable permission for the script and execute it as follows:
$ sudo ./maemo-scratchbox-install_5.0.sh -U -u <EXISTING_USER> -s /scratchbox

After the script is successfully executed, install the maemo 5 Final SDK.

[Edit] manual Installation
  • On Debian-based x86-32 systems:

    • You can add the following content to the/etc/APT/sources. list file of your host:
deb http://scratchbox.org/debian/ maemo5-sdk main
  • Then, install the scratchbox package with the root permission.
$ sudo apt-get update$ 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
  • On Debian-based x86-64 systems:

    • Download the scratchbox package from here.
  • Force these x86-32 packages to be installed with root privileges.
$ sudo dpkg -i --force-architecture 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
  • The scratchbox package will be unwrapped and installed in the/scratchbox directory. During the installation process, you will be asked to answer questions about user groups and users. The default scratchbox user group is "sbox ".
  • The user who uses scratchbox needs to be added to the scratchbox user group and run the following command as root to add the user:
$ sudo /scratchbox/sbin/sbox_adduser USER yes
  • This will add a user to the scratchbox user group, create the user directory/scratchbox/<user_name>, and mount the system directory (/dev,/proc,/tmp) under the user directory ).

 

  • Some Nokia applications that come with the final SDK use a fixed path to specify the user's home directory. To make these programs work properly, you need to create a directory with the same path as the one specified by Nokia. This operation must be performed with the root permission outside the scratchbox environment.
$ sudo ln -s /scratchbox/users/<username>/home/<username> /scratchbox/users/<username>/home/user
  • To make the user group settings take effect in the current terminal environment, run the following command:

    • Note: If you have logged on to the scratchbox environment, this command changes the current user group ID. If you do not want to change, you only need to log out from the scratchbox environment and then log on again.
$ newgrp sbox
  • Log on to the scratchbox environment.
$ /scratchbox/login
  • Configure x86 and Armel compilation targets:
[sbox->:~]>sb-conf st FREMANTLE_X86 -c cs2007q3-glibc2.5-i486 -d perl:debian-etch:doctools:svn:git -t none[sbox->:~]>sb-conf st FREMANTLE_ARMEL -c cs2007q3-glibc2.5-arm7 -d qemu:perl:debian-etch:doctools:svn:git -t qemu-arm-sb
  • Download the basic system package rootstraps.
[sbox->:~]> 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
  • Switch to the x86 target environment, unlock the x86 rootstraps, install devkits, fakeroot, and other tools to the target environment.
[sbox->:~]> sb-conf se FREMANTLE_X86[sbox-FREMANTLE_X86: ~] > sb-conf rs maemo-sdk-rootstrap_5.0_i386.tgz
  • If apt's apt HTTP pipeline is configured to be enabled, some users may encounter problems when downloading files using apt. You can use the following command to disable this setting:
[sbox-FREMANTLE_X86: ~] > echo 'Acquire::http::Pipeline-Depth "0";' >> /etc/apt/apt.conf.d/00maemo
  • Continue installation:
[sbox-FREMANTLE_X86: ~] > sb-conf in -edFL[sbox-FREMANTLE_X86: ~] > apt-get update[sbox-FREMANTLE_X86: ~] > fakeroot apt-get install maemo-sdk-debug
  • The virtual package "maemo-SDK-Debug" will install all required open source runtime libraries, development files and debugging files for the target environment. If you only need to run the library, you can install the "maemo-SDK-RunTime" package. If you only need to run the library and Development files, you should install the "maemo-SDK-dev" package.
  • Accept Nokia's End User License Agreement through this page.
  • Add the software source address obtained after the license agreement is accepted to the/etc/APT/source. list file in the target environment. Then run the following command.
[sbox-FREMANTLE_X86: ~] >apt-get update[sbox-FREMANTLE_X86: ~] >fakeroot apt-get install nokia-binaries nokia-apps

 

  • To facilitate application installation in the/OPT path, some Linux systems will create a link pointing to/home/OPT as the/OPT directory. The SDK also inherits this feature.
  • In the scratchbox environment, the/OPT directory path is/target/<target_name>/OPT. After installing the basic system package rootstraps, all/target/<target_name>/OPT in the compiling target environment will be directed to/home/OPT. /OPT should be specified for each compilation target environment.
  • To solve this problem, we need to manually check whether/target/<target_name>/OPT is linked. If yes, delete the link and recreate the corresponding directory.
[sbox-FREMANTLE_X86: ~] >rm /targets/FREMANTLE_X86/opt[sbox-FREMANTLE_X86: ~] >mkdir /targets/FREMANTLE_X86/opt
  • Perform similar operations in the target Armel environment:
[sbox-FREMANTLE_X86: ~]> sb-conf se FREMANTLE_ARMEL[sbox-FREMANTLE_ARMEL: ~] > sb-conf rs maemo-sdk-rootstrap_5.0_armel.tgz
  • If you need to disable apt HTTP pipelining, run the following command:
[sbox-FREMANTLE_X86: ~] > echo 'Acquire::http::Pipeline-Depth "0";' >> /etc/apt/apt.conf.d/00maemo
  • Continue ......
[sbox-FREMANTLE_ARMEL: ~] > sb-conf in -edFL[sbox-FREMANTLE_ARMEL: ~] > apt-get update[sbox-FREMANTLE_ARMEL: ~] > fakeroot apt-get install maemo-sdk-debug
  • Add the same Nokia software source address to the/etc/APT/source. list file in the target environment. Then run the following command.
[sbox-FREMANTLE_ARMEL: ~] >apt-get update[sbox-FREMANTLE_ARMEL: ~] >fakeroot apt-get install nokia-binaries nokia-apps
  • Create the/OPT directory.
[sbox-FREMANTLE_ARMEL: ~] >rm /targets/FREMANTLE_ARMEL/opt[sbox-FREMANTLE_ARMEL: ~] >mkdir /targets/FREMANTLE_ARMEL/opt

Now you have an available maemo 5 development environment.

The user interface can be started below

[Edit] uninstall

First, check that no process is running in the scratchbox environment. Back up the files and directories you need first. Uninstalling scratchbox will delete all the items in the scratchbox environment.

In a Debian-based system, run the following command as root:

$ sudo apt-get remove scratchbox-* --purge$ sudo rm -rf /scratchbox

In a non-Debian system, you need to manually stop the scratchbox process and delete it:

$ sudo /scratchbox/sbin/sbox_ctl stop$ sudo rm -rf /scratchbox

[Edit] scratchbox Problems

Pay attention to the following scratchbox problems:

[Edit] vdso support

When vdso is enabled on the host machine kernel, scratchbox cannot work normally. We are trying to solve this problem.

If vdso32 is enabled on your host, the following error occurs when you log on to scratchbox:

No directory, logging in with HOME=/Inconsistency detected by ld.so: rtld.c: 1192: dl_main: Assertion `(void *)

Ph-> p_vaddr = _ rtld_local. _ dl_sysinfo_dso 'failed!

 

[Edit] x86-64 Kernel

Vdso32 is enabled by default in x86-64 kernels later than 2.6.25. Run the following command to temporarily disable this feature:

sysctl abi.vsyscall32=0

If your kernel version is earlier than 2.6.24, run the following command:

sysctl vm.vdso_enabled=0

Or

sysctl kernel.vdso=0

Sysctl can be configured with vdso32. Only values 0 or 2 are compatible with scratchbox. In our example, use 0 (disabled ). 2. The compat mode is enabled.

You can also add the following content to the/etc/sysctl. conf file.

vm.vdso_enabled = 0abi.vsyscall32 = 0kernel.vdso = 0

Save and execute:

$ sudo sysctl -p

Note that the correct line of the three lines depends on your Linux kernel version. When you execute "sysctl-P", the warning "unknown keys" may appear. You can ignore these warnings. Only the correct one in the Three-line configuration will be enabled.

Warning: Before adding the content to sysctl. conf, you should try to configure them with ECHO to see if it will cause some special problems. For example, in Ubuntu gutsy, A vdso error may damage the system and cause the system to fail.

Warning: You shocould try setting these values by echoing them to the given locations before adding them to sysctl. conf 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 sysctl. conf may, in these cases, make your system unbootable.

(Translator: I am not sure of the correct translation, so I will keep the original article.)

[Edit] known issues
  • Here you can find a list of known Problems and Solutions
  • When the user interface is started, unnecessary warnings and debugging information will be displayed on the terminal.
  • The Armel target environment does not have a graphical user interface.
  • When the user interface is running, xephye may be frozen. This may be caused by the behavior differences between different versions of xephyr. The worst case is in xephyr that comes with Ubuntu jaunty. When the user interface runs a program with an input area and you click to switch the input method, xephyr will be frozen. In Fedora Core 10, xephyr ignores mouse clicks, but freezes when the user interface program exits. There is no conflict in other xephyr, such as xephyr in Ubuntu intrepid or the intrepid version xephyr that is re-compiled for jaunty.

    • Now, you have a patch for xephyr of ubuntu jaunty. You can find it here. You can also find the compiled Binary Package and its dependent package (libgpg-error0 and libcrypt11) from the launchpad source of ubuntu jaunty ).
  • Clutter performance can be improved through hardware acceleration. Sometimes, this means you need to install some limited drivers (such as the ATI and NVIDIA Graphics Accelerator cards on the host ). See maemo5 clutter performance for more details.
  • Starting xephyr with the "-kb" option will disable the keyboard from entering the "@" flag. However, if "-kb" is removed, the direction keys are disabled.
  • In some programs (such as browsers and photos), colors are sometimes reversed.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.