Maemo Linux Mobile Phone platform series analysis: 5 install the maemo SDK

Source: Internet
Author: User

This part of content:
  • Preface
  • What is scratchbox?
  • Scratchbox Composition
  • Prerequisites for Installation
  • Automatic Installation of scratchbox
  • Automatically install the maemo SDK
  PrefaceThis section describes how to install the development environment and its prerequisites. The maemo SDK contains libraries and tools for developing applications. This SDK must be installed in a development environment called scratchbox to be used. First, install scratchbox, and then install the maemo SDK in scratchbox. Install scratchbox and SDK either manually or automatically. manually execute a script written by Nokia to automatically combine the manual installation processes. This method has a high success rate, after all, it has been verified multiple times. This automatic installation method is also used here to ensure that the environment can be used after being set up. What is scratchbox? You may have seen the application running on the Internet tablet before. Maybe you will ask: how to write your own program. If you have used different GNU tools before, you may want to know how these tools and libraries work during development? In scratchbox, there is a very special thing: Sandbox (sandbox), which provides some necessary tools and isolates your development from the real Linux system. Another use of scratchbox is: Cross-compilation. You can compile binary files that can run directly on the target device in scratchbox. Scratchbox is named "Linux from scratch" + "chroot jail" and put into jail (in one box ). This tells us some information: When we work in scratchbox, the program you run runs in an environment that changes the root directory. In Linux, you can change the path that a process can see. Scratchbox uses this to switch its root directory to another directory at startup, instead of pointing to its real root directory. This is also part of the tricks used by isolation technology. For this reason, this new environment is called a sandbox. You can play dangerous things in this isolated box without harming the real environment. The isolation technology also uses another technology: Transfer (by using ld_preload, the shared library specified by ld_preload is better than other shared libraries to load) What are the features of scratchbox?
  • It is a specific implementation package of sandbox. The main purpose of sandbox is to isolate
  • Easy-to-use cross-compilation tools
  • Allows multiple developers to use the same development environment.
  • Support independent configuration for each developer
  • It can run the Target Program originally running on the hardware through a mechanism: sbrsh
  • Can run non-local binary code on the host, by using qemu
In the above main features, the packages used for program development have been installed in the scratchbox environment, and scratchbox also integrates the Debian package management. Therefore, you can release software packages for different targets in scratchbox (similar to Windows. MSI file, of Fedora. RPM file ). By using the standard Debian package management tool, you can directly install some Development Kits you need over the Internet. Internet tablet products also use similar package management, which means that packages compiled using scratchbox can be directly installed on the actual device. Scratchbox component: before installing scratchbox, we first understand some terms used in scratchbox. From now on, we refer scratchbox to sbox for short.
  • Core Package:Core Package, which contains the core tool for sbox implementation
  • Libs package:Library File package, which contains the library files required for running the core package
  • Devkit:The development kit contains all the additional tools required by sbox. We will focus on four devkits.
  • Toolchain:Tool chains, such as compilers and connectors.
  • Target:Target: the tool chain and configuration we are currently using. A target uses a specific tool chain and has a file system. You can have different goals, or even use the same tool chain for these goals. This makes it easy to test different goals. Note: sbox targets cannot be the same as physical devices.
  • Rootmetadata:Rootpattern is the target root file system for basic development. Rootstraps usually requires basic files for specific development goals, but sometimes it only serves as a guide. For maemo, there is also a rootscheme, which we call "maemo SDK ".
Prerequisites for installation: before installation, you can check the installation instructions. Check binfmt, which supports running some commands in sbox. Step 1: Check binfmt. If binfmt is not loaded, manually load root @ test-desktop:/home/workspace # lsmod | grep binfmtroot @ test-desktop: /home/workspace # root @ test-desktop:/home/workspace # modprobe binfmt_miscroot @ test-desktop:/home/workspace # lsmod | grep binfmtbinfmt_misc 12936 0 root @ test-desktop: /home/workspace # Step 2: install an X server. Step 2 is to install an X server. It can be used as an X client to connect to your actual system. This is very necessary, for running your program. X Server currently has three options:
  • Using xephyr, A kdrive based X Server/client that can emulate 16-color depth for its clients even if it's acting as a client to an 24-bit depth real X server. it also implements modern X protocol extensions. this material will only cover xephyr.
  • Using xnest, which is an older version of the subject. Requires your real X server to be at the same depth that it is simulating to its clients.
  • Using xvnc which is an X server that can be connected to using a VNC client. Using xvnc is not covered here, but its use shoshould be very close to using xnest.
Command: root @ test-desktop:/home/workspace # apt-Get install xserver-xephyrreading package lists... donebuilding dependency tree reading state information... doneThe following new packages will be installed: xserver-xephyr0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. need to get 1587kb of archives. after unpacking into KB of additional disk space will be used. get: 1 http://security.ubuntu.co M gutsy-Security/main xserver-xephyr 2:1. 3.0.0.dfsg-12ubuntu8. 3 [1587kb] fetched 1587kb in 56 s (27.9kb/s) Selecting previusly deselected package xserver-xephyr. (Reading database... 88958 files and directories currently installed .) unpacking xserver-xephyr (from... xserver-xephyr_2 % 3a1. 3.0.0.dfsg-12ubuntu8. 3_i386.deb )... setting up xserver-xephyr (2:1. 3.0.0.dfsg-12ubuntu8. 3 )... root @ test-desktop :/ Home/workspace # verify: root @ test-desktop:/home/workspace # dpkg-L | grep xephyrii xserver-xephyr 2:1. 3.0.0.dfsg-12ubuntu8. 3 next generation nested x serverroot @ test-desktop:/home/workspace # Step 3: automatically install scratchbox: a better way to install scratchbox is to use an automatic installation script, first download the script from its website: http://tablets-dev.nokia.com/4.0/maemo-scratchbox-install_4.0.sh root @ test-desktop:/home/workspace/maemo_sdk # Sh. /maemo-scratchbox-install_4.0.sh- The U test-u option specifies to whom scratchbox is installed, and the user name I configured earlier is test. This download takes a long time and waits patiently: it may take several hours! Too long, Step 4: automatically install maemo SDK: Download installation script: http://tablets-dev.nokia.com/4.0/maemo-sdk-install_4.0.sh root @ test-desktop:/home/workspace # Sh maemo-sdk-install_4.0.sh[Select 3rd for installation.] After the installation is complete, there are two targets:
  • Chinook_x86: Suitable for developing software and Testing
  • Chinook_armel: Suitable for compiling arm image files for the target version.

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.