Maemo Development Environment

3,174 views
3,109 views

Published on

maemo development environment

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,174
On SlideShare
0
From Embeds
0
Number of Embeds
37
Actions
Shares
0
Downloads
434
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Maemo Development Environment

  1. 1. Development Environment Juha Tukkinen / November 2007
  2. 2. Content <ul><li>development environment overview </li></ul><ul><li>how to install </li></ul><ul><li>tools </li></ul><ul><li>supported runtimes </li></ul><ul><li>software porting examples </li></ul>
  3. 3. Development environment overview <ul><li>The problem: Open source projects use GNU configure build system </li></ul><ul><ul><li>a developer creates GNU M4 macros </li></ul></ul><ul><ul><li>configure script gets generated by GNU Automake and GNU Autoconf </li></ul></ul><ul><ul><li>… which produce Makefile s and a config.h </li></ul></ul>
  4. 4. Development environment overview <ul><li>So what’s wrong with this? </li></ul><ul><ul><li>configure assumes that the target environment will be the same as the compilation host environment </li></ul></ul><ul><ul><li>compilation natively on an Internet Tablet is not… optimal </li></ul></ul>
  5. 5. Development environment overview <ul><li>A solution: Scratchbox </li></ul><ul><ul><li>a cross-compilation environment </li></ul></ul><ul><ul><li>a sandbox put together by wrappers, black magic and symbolic links </li></ul></ul><ul><ul><li>makes use of QEMU as a machine emulator (not as a virtualizer) </li></ul></ul>
  6. 6. Scratchbox
  7. 7. Scratchbox and maemo SDK <ul><li>Scratchbox provides a sandboxed cross-compilation development environment ( chroot on steroids) </li></ul><ul><li>maemo SDK is installed inside Scratchbox </li></ul><ul><li>maemo SDK provides two targets for Scratchbox: </li></ul><ul><ul><li>X86 used for active development </li></ul></ul><ul><ul><li>ARMEL for cross-compilation, QEMU also provides CPU transparency </li></ul></ul><ul><li>maemo SDK also provides closed Nokia binaries separately </li></ul>
  8. 8. Scratchbox under the hood <ul><ul><li>target : has a root file system, uses a toolchain </li></ul></ul><ul><ul><li>devkit : tools native to host </li></ul></ul><ul><ul><li>toolchain : compiler, linker, binutils… </li></ul></ul><ul><ul><li>rootstrap : root file system for the target device </li></ul></ul><ul><ul><li>CPU transparency (cputransp devkit) </li></ul></ul><ul><ul><li>maemo SDK provides two preconfigured targets: SDK_X86 and SDK_ARMEL </li></ul></ul>
  9. 9. Tools inside Scratchbox (to list some) <ul><li>GNU toolchain for ARM processors </li></ul><ul><li>debugger: gdb </li></ul><ul><li>tracing tools: strace, ltrace </li></ul><ul><li>valgrind: suite of tools for debugging and profiling </li></ul><ul><ul><li>memcheck – memory management detector </li></ul></ul><ul><ul><li>cachegrind – cache profiler </li></ul></ul><ul><ul><li>callgrind – extra information of call graphs to the above </li></ul></ul><ul><ul><li>massif – heap profiler </li></ul></ul><ul><ul><li>helgrind – thread debugger </li></ul></ul>
  10. 10. How to install maemo SDK <ul><li>SDK depends on Scratchbox that is only available for Linux </li></ul><ul><li>installer script installs both Scratchbox and SDK </li></ul><ul><li>alternative solution: VMWare image </li></ul><ul><ul><li>can be used also in Windows </li></ul></ul><ul><ul><li>Ubuntu Linux Desktop with maemo SDK installed </li></ul></ul><ul><ul><li>do not get confused: you run a virtualized Linux PC inside a Windows operating system and inside the virtualized Linux you run Scratchbox </li></ul></ul>
  11. 11. Supported runtimes <ul><li>official supported language is C </li></ul><ul><li>Python </li></ul><ul><li>C++ </li></ul><ul><li>C# through Mono </li></ul><ul><li>Java </li></ul><ul><li>Ruby </li></ul><ul><li>… </li></ul><ul><li>ITOS has Gecko 1.9 and Flash 9: “Web 2.0” runtime </li></ul>
  12. 12. Hacking session – see README.TXT <ul><li>Install VMware player </li></ul><ul><li>Unzip Ubuntu-maemo-sdk.zip </li></ul><ul><li>Start the virtual Ubuntu Gutsy Desktop </li></ul><ul><li>Start Xephyr (the spring icon in the top toolbar) </li></ul><ul><li>Start a Terminal </li></ul><ul><li>Start Scratchbox by typing scratchbox </li></ul><ul><li>Start the application framework: af-sb-init.sh start </li></ul>Change targets (SDK_X86 and SDK_ARMEL) with sb-menu /scratchbox/users/maemo/home/maemo (outside) /home/maemo (inside Scratchbox)
  13. 13. Hacking session – things to try <ul><li>install “xterm” and “ssh server” on the N800 </li></ul><ul><ul><li>http://maemo.org/download </li></ul></ul><ul><li>Compile maemo-examples in SDK_X86 </li></ul><ul><ul><li>make </li></ul></ul><ul><li>Run some maemo-examples in SDK_X86 </li></ul><ul><ul><li>run-standalone.sh ./example </li></ul></ul><ul><li>Compile maemo-examples in SDK_ARMEL </li></ul><ul><li>Run some examples in SDK_ARMEL </li></ul><ul><li>Copy binaries to N800 and run them there </li></ul><ul><li>Examine and try out examples, dosbox and frodo </li></ul><ul><li>Try out the python environment </li></ul><ul><ul><li>python2.5 </li></ul></ul>
  14. 14. Thank you!

×