<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated on Wed, 25 Nov 2009 15:53:54 -0800 -->
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <atom:link href="http://software.intel.com/en-us/articles/mobility/type/technical-article/feed/" rel="self" type="application/rss+xml" />
    <title>Intel Software Network articles feed</title>
    <link>http://software.intel.com/en-us/articles/mobility/technical-article/</link>
    <description></description>
    <language>en-us</language>
    <item>
      <title>Building the Moblin Media Player with the Intel Compiler</title>
      <description><![CDATA[ <meta content="en-gb" />
<meta content="text/html; charset=windows-1252" />
<h3><span style="font-size: x-small;"><span style="font-family: Arial"><strong>Building the Moblin Media Player Gui with the Intel Compiler</strong></span></span></h3>
<h3><span style="font-size: x-small; font-family: Arial;"><strong class="sectionHeadingText">Introduction</strong></span></h3>
<p class="sectionBody">The media player project is know as Hornsey and depends on clutter, clutter-gst, bickley, nbtk, bognor-regis, libunique, libstartup-notification and gtk+-2.0.</p>
<p><span class="sectionBody">For the build enironment I am using the Moblin2 development image installed on a dualcore laptop.  </span></p>
<p><span style="font-size: x-small;"><span class="sectionBody">In this paper, I am only building the top level of the player, and not the underlying library dependencies.</span></span></p>
<h3><span style="font-size:10.0pt;font-family:Arial"><strong class="sectionHeadingText">Setting up the build environment </strong></span></h3>
<p class="MsoNormal">Download and install the moblin dev image from here</p>
<p class="MsoNormal"><span style="font-size: x-small; font-family: Arial;"><a href="http://moblin.org/documentation/moblin-sdk/download-development-images" style="color: blue; text-decoration: underline; text-underline: single">http://moblin.org/documentation/moblin-sdk/download-development-images</a>6</span></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Create a USB or CD and install. Instructions here:</p>
<p class="MsoNormal"><span style="font-size: x-small; font-family: Arial;"><a href="http://moblin.org/documentation/test-drive-moblin/using-moblin-live-image" style="color: blue; text-decoration: underline; text-underline: single">http://moblin.org/documentation/test-drive-moblin/using-moblin-live-image</a></span></p>
<p class="MsoNormal"> </p>
<h3><span style="font-size: x-small;"><span style="font-family: Arial"><strong class="sectionHeadingText">Building the media player gui</strong></span></span></h3>
<h3><span style="font-size: x-small;"><span style="font-family: Arial"><strong class="sectionHeadingText">Downloading the sources</strong></span></span></h3>
<p class="MsoNormal"><span class="sectionBody">Boot up Mobln2<br /><br />In directory of your choice get the Hornsey code</span></p>
<p class="MsoNormal"><span class="sectionBody">    git clone git://git.moblin.org/hornsey</span></p>
<p class="sectionBody"> </p>
<p class="MsoNormal"><span style="font-size: x-small;"><span class="sectionBody">Directory structure should look similar to this:</span></span></p>
<p class="MsoNormal"><span style="font-size: x-small;"><span class="sectionBody">    &lt;dev dir&gt;/hornsey</span></span></p>
<p class="MsoNormal"><span class="sectionBody">Go into the hornsey directory and change the branch to match  the moblin dev image<br />e.g.  </span></p>
<p class="MsoNormal"><span style="font-size: x-small;"><span class="sectionBody">        </span></span><span style="font-family: Courier New;"><span class="sectionBody"> cd hornsey<br />         git checkout –b origin/moblin-2.0<br /></span></span><span style="font-size:10.0pt;font-family:Arial"><br /></span><span style="font-style: normal; font-variant: normal; font-weight: normal; font-family: Arial"><span class="sectionBody"> </span></span><span class="sectionBody">FYI you can get a list of branches by doing<br />       </span><span style="font-size: x-small;"><span style="font-family: Arial"><br /><span class="sectionBody">    </span></span><span class="sectionBody">    </span></span><span class="sectionBody">git  branch –a <br /> </span></p>
<h3><span style="font-size:10.0pt;font-family:Arial"><strong class="sectionHeadingText">Building the sources</strong></span></h3>
<p><span style="font-size: x-small; font-family: Arial;"><b class="sectionHeadingText">Choosing which compiler </b></span></p>
<p><span style="font-size: x-small; font-family: Arial;"><b class="sectionHeadingText">Building with GCC</b></span></p>
<p><span class="sectionBody">For our installation, we'll use the environment variable  $PREFIX custom directory so as not to override any existing installation</span></p>
<p><span class="sectionBody">     export PREFIX=~/dv/hornsey/gcc<br />    ./autogen.sh --prefix=$PREFIX</span></p>
<p><span style="font-size: x-small; font-family: Arial;"><b>Building with ICC</b></span></p>
<p><span class="sectionBody">To build the library with the Intel compiler use the following commands</span></p>
<p><span class="sectionBody">    export CC=icc<br />    export CXX=icc<br />    export CFLAGS="-02 -g"<br /> </span></p>
<p><span class="sectionBody">   export PREFIX=~/dv/hornsey/icc<br />  ./autogen.sh --prefix=$PREFIX</span></p>
<p><span style="font-size: x-small; font-family: Arial;"><b class="sectionHeadingText">Continuing the build</b></span></p>
<p><span class="sectionBody">When autogen has completed you should get a message similar to the display below </span></p>
<p class="MsoNormal"><span class="sectionBody"> </span></p>
<p class="MsoNormal"><span class="sectionBody">      config.status: config.h is unchanged<br />      config.status: executing depfiles commands<br />      config.status: executing default-1 commands<br />      config.status: executing po/stamp-it commands<br />      Now type `make' to compile hornsey</span></p>
<p class="MsoNormal"><span class="sectionBody"> </span></p>
<p><span class="sectionBody">Now build the source by calling make <br /></span></p>
<p><span class="sectionBody">        <br />        make clean<br /><br />        make<br /><br />The progress of the make will be reported, the last few lines looking similar to this:</span></p>
<p><span class="sectionBody">          CC    hrn-controls.o<br />          CC    nbtk-im-label.o<br />          CC    hornsey<br />        Making all in data<br />        Making all in po<b> </b></span></p>
<p class="sectionHeadingText"><b>Installing the </b><b>media player</b></p>
<p>To install the new new media player call:</p>
<p>      make install</p>
<p><span style="font-size: x-small; font-family: Arial;">Checking the contents of the install dir :
<p class="MsoNormal">ls -R  $PREFIX</p>
<p class="MsoNormal">    /home/sblairch/dv/hornsey/gcc:<br />                bin  share</p>
<p class="MsoNormal">    /home/sblairch/dv/hornsey/gcc/bin:<br />                hornsey</p>
<p>    /home/sblairch/dv/hornsey/gcc/share:<br />                applications  dbus-1  hornsey  icons  locale</p>
<h3><span style="font-size: x-small;"><span class="sectionHeadingText">Running the Media Player</span></span></h3>
<p><span style="font-family: Arial;">The media player can be invoked by simple calling the executable  &lt;install dir&gt;/bin/hornsey</span></p>
</span></p> ]]></description>
      <link>http://software.intel.com/en-us/articles/building-the-moblin-media-player-with-the-intel-compiler</link>
      <pubDate>Tue, 17 Nov 2009 00:33:48 -0800</pubDate>
      <comments>http://software.intel.com/en-us/articles/building-the-moblin-media-player-with-the-intel-compiler#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/building-the-moblin-media-player-with-the-intel-compiler</guid>
      <category>Mobility</category>
      <category>Tools</category>
      <category>Intel® Atom™ Software Developer Community</category>
      <category>MID</category>
    </item>
    <item>
      <title>Overview - Intel(R) Software Development Tool Suites for Intel(R) Atom(TM) processor</title>
      <description><![CDATA[ <strong>Improved performance on Intel(R) Atom(TM) processor through Intel’s software development tools<br /></strong><br />
<p><br /><strong>Introduction<br /></strong><span class="sectionBodyText">Intel offers a wide range of software development tools designed for enabling the software developer to get great performance and end-user experience out of their application. At the same time it ensures with its wide range of development tools that performance bottlenecks can be identified quickly and coding errors and runtime issues can be pinpointed and fixed quickly. The purpose is to enable on-time delivery of mature and fast applications that showcase the user-friendliness, performance and feature richness of your applications.<br />Specifically for development projects targeting Moblin compliant applications and devices taking advantage of the Intel(R) Atom(TM) processor a set of software development tool suites is being offered. It bundles key development components addressing all phases of development from design, testing, bug fix cycle to performance tuning. <br />The following paragraphs will provide an insight into the Intel(R) Application Software Development Tool Suite for Intel(R) Atom(TM) processor and the Intel(R) Embedded Software Development Tool Suite for Intel(R) Atom(TM) processor. They will highlight the tools components included and their effective use. <br /></span><br /><strong>Tools Overview<br /></strong>The Intel(R) Atom(TM) processor is specifically targeted at low-power IA-32 based designs for a wide range of small form factor devices. These include netbooks, settop boxes, consumer electronics, in-vehicle infotainment and other designs focusing on internet content consumption, telephony and mobile location based services. The one thing most of these designs have in common is that their form factor makes it inconvenient to develop software natively on these platforms. The Intel(R) Software Development Tool Suites for Intel(R) Atom(TM) processor take this into account and offer solutions that address cross development requirements for designs running Moblin compliant Linux* OS and other Linux* based operating systems.<br />The Intel(R) Application Software Development Tool Suite consists of 4 development tools components.<br /><br /><strong>Intel(R) C++ Compiler<br /></strong>The Intel(R) C++ Compiler for Linux* has been optimized to harness key properties or the Intel(R) Atom(TM) processors architecture and get optimal performance out of it. The option switch –xSSE3_ATOM will cause the Intel(R) C++ Compiler to model the instruction pipeline of this in-order processor feeding instructions to it in an order that minimizes dependency stalls and resource stalls. Additionally it takes advantage of a complex set of heuristics to decide which type of assembly instructions to generate to speed up memory access, improve branch prediction and take account of the Intel(R) Atom(TM) processor’s floating point properties. Finally it also aggressively takes advantage of the SSE3 instruction set for vectorization and sped-up execution of thus parallelized loops. <br /><br /><strong>Intel(R) Integrated Performance Primitives <br /></strong>The Intel(R) IPP offer a rich set of library functions and codecs to be used to speed up development of highly optimized routines for the handling of multimedia formats and data of any kind. They have been low-level hand optimized to provide their known performance strength and ease of use for Intel(R) Atom(TM) processor based platforms. <br /><br /><strong>Intel(R) VTune(TM) Performance Analyzer<br /></strong>Finding the bottlenecks in your application, identifying where most time is spent during application and using event-based sampling to find hardware resource constraints that limit the performance potential of your application. This is the domain of the Intel(R) VTune(TM) Performance Analyzer. A VTune(TM) Performance Analyzer Sampling Collector (SEP) is included that allows for low overhead command line based performance data collection on the Intel(R) Atom(TM) processor based target device without any instrumentation of the code base to be analyzed. <br /><br /><strong>Intel(R) Application Debugger<br /></strong>A rich and user friendly Eclipse* RCP based graphical user interface combined with OS signal awareness and thread awareness enable the developer to use this TCP/IP cross-debug solution to more easily find coding issues that affect application runtime behavior and correct them.<strong> <br /><br />Intel(R) JTAG Debugger<br /></strong>In addition to these components the Intel(R) Embedded Software Development Tool Suite for Intel(R) Atom(TM) processor provides a JTAG debug solution that utilizing the same Eclipse* RCP based graphical user interface to give you access to the descriptor tables, page tables and all chipset registers with the detail that only it’s bitfield editor can provide. This debugger allows for high level language source level debugger of bootcode, OS kernel and device drivers.<br /><br /><strong>Benefits for your development projects<br /></strong>The benefits of using these comprehensive tool suites are many and impact every phase of the software development process. <br /><br />Improved performance in your critical applications and codecs due to the use of the Intel(R) C++ Compiler’s optimizations for the Intel(R) Atom(TM) processor or the Intel(R) IPP. <br /><br />Performance tuning and avoidance of inefficient code in your application with the help of the Intel(R) VTune(TM) Performancer Analyzer, leading to a smoother and more responsive end-user experience<br /><br />Faster coding issue detection and correction and thus improved maturity as well as faster time-to-market, faster development cycles for your project. <br /><br /><strong>How to start with application development for Moblin on Intel® Atom™ processor<br /></strong>The Intel(R) Application Software Development Tool Suite supports a wide variety of Intel(R) Atom(TM) processor based devices. This means that there is not one single use case or usage model that will fit the needs of every developer. Development for Intel(R) Atom(TM) processor based devices tends to have one aspect in common however. In most cases you will want to take advantage of the performance and the high screen resolution of your regular development environment and deploy your build to the real hardware for validation and analysis only. In short, most commonly the usage model will be one of cross development.<br />The Intel(R) Application Software Development Tool Suite for Intel(R) Atom(TM) processor addresses this in multiple ways.<br /><br />The Intel(R) C++ Compiler and the Intel(R) Integrated Performance Primitives will by default be installed on the development host system. To provide a protected build environment without host system library pollution it is however also supported to install these components into the Moblin* Image Creator 2 jailroot system or to install them into a Moblin* 2 developer image running inside a KVM* virtual machine or even on a real target. For the installation into Moblin* Image Creator 2 or into a KVM* image it is recommended to do this following the yum rpm repository based installation process outlined in the Moblin* Integration Guide Moblin_Integration.htm. <br /><br />Moblin* Image Creator 2 kickstart scripts can be found at <br /><a href="http://software.intel.com/en-us/articles/moblin-integration-software-development-tool-suite-atom/ ">http://software.intel.com/en-us/articles/moblin-integration-software-development-tool-suite-atom/ <br /></a>A template rpm repository definition file for the direct KVM* image installation of compiler and Intel(R) IPP can be found at <a href="http://software.intel.com/en-us/articles/installing-compiler-into-kvm-atom/">http://software.intel.com/en-us/articles/installing-compiler-into-kvm-atom/</a>. <br /><br />The Intel(R) Application Debugger will with the standard installation package be installed on your development host. Via TCP/IP you can connect to and debug a process either running on actual Intel(R) Atom(TM) processor based target hardware or a KVM* virtual machine or some other virtualization method that assures you that the application to be debugged runs in a software environment identical to the later application deployment. Please also have a look at the Getting Started Guide Getting_Started.html that is part of the tool suite distribution for further details on the Intel(R) Application Debugger usage.<br /><br />The Intel(R) VTune(TM) Performance Analyzer analyzes event based and time based sampling data on the development host. The data has been gathered on an Intel(R) Atom(TM) processor based target platform with low overhead giving you accurate sampling data. The analysis can be done within the standard KDE* or Gnome* based standard Linux* GUI you are used to for your development efforts.<br /><br /><strong>How to develop, and optimize applications for Windows* running on Intel® Atom™ processors</strong><br />When developing for a Microsoft Windows* XP or Windows* 7 based netbook whose platform is based on the Intel® Atom™ processor, the software development methodology is basically identical to what you are familiar with for writing an application that targets regular notebook PCs.<br /><br />The whole range of Intel’s software development products are at your disposal. <br />o <strong>Intel® Parallel Studio</strong> <br />A plug-in into Microsoft* Visual Studio* to analyze, and develop multithreaded applications for netbooks, and other Windows/Intel Atom processor based systems<br />o <strong>Intel® C++ Compiler for Windows* <br /></strong>A build solutionto generate highly optimized application code<br />o <strong>Intel® Integrated Performance Primitives Library for Windows*</strong> <br />A highly optimized multimedia library – already including multi-threading / autoscaling<br />o <strong>Intel® Threading Building Blocks <br /></strong>A template library to implement multithreading through C++ templates<br /><br />For more information on these tools please check on our website for more details on download, evaluation, usage and purchase: <a href="http://www.intel.com/software/products">http://www.intel.com/software/products</a>.<br /><br />Additional details on Intel® Atom™ specific development under Windows can be found at<br /><br />o Developing for Intel® Atom™ Processor running Linux* and Microsoft Windows* XP<br /><a href="http://software.intel.com/en-us/articles/development-atom-linux-and-windows/">http://software.intel.com/en-us/articles/development-atom-linux-and-windows/</a><br />o Optimized for the Intel® Atom™ Processor with Intel's Compiler<br /><a href="http://software.intel.com/en-us/articles/atom-optimized-compiler">http://software.intel.com/en-us/articles/atom-optimized-compiler<br /></a>o Using VTune™ Peformance Analyzer for Intel® Atom™ Processor on Windows* XP<br /><a href="http://software.intel.com/en-us/articles/using-vtune-atom-windows">http://software.intel.com/en-us/articles/using-vtune-atom-windows</a><br /><br /><strong>Usage Details &amp; Examples<br /></strong>The Intel Software network offers a wide range of further reading and whitepapers detailing the different use cases for the Intel(R) Software Development Tool Suites for Intel(R) Atom(TM) processor and it’s components. <br /><br />Application Debugging in Cross-Debug Environment<br /><a href="http://software.intel.com/en-us/articles/cross-application-debugging/">http://software.intel.com/en-us/articles/cross-application-debugging/</a> <br />Using the VTune(TM) Performance Analyzer Sampling Collector for Mobile Internet Devices<br /><a href="http://software.intel.com/en-us/articles/sampling-collector-mid/ ">http://software.intel.com/en-us/articles/sampling-collector-mid/ <br /></a>Optimized for the Intel(R) Atom(TM) Processor with Intel's Compiler<br /><a href="http://software.intel.com/en-us/articles/atom-optimized-compiler/">http://software.intel.com/en-us/articles/atom-optimized-compiler/</a> <br />Integrating Intel(R) Software Development Tool Suite Components with Moblin* Image Creator<br /><a href="http://software.intel.com/en-us/articles/moblin-integration-software-development-tool-suite-atom/">http://software.intel.com/en-us/articles/moblin-integration-software-development-tool-suite-atom/</a> <br />Installing the Intel(R) C++ Compiler and Intel(R) Integrated Performance Primitives into KVM* for Intel(R) Atom(TM) Processor targeted development<br /><a href="http://software.intel.com/en-us/articles/installing-compiler-into-kvm-atom/ ">http://software.intel.com/en-us/articles/installing-compiler-into-kvm-atom/ <br /></a>Compile moblin2 kernel sources with Intel Compiler <br /><a href="http://software.intel.com/en-us/articles/compiler-moblin2-kernel-sources-with-intel-compiler/ ">http://software.intel.com/en-us/articles/compiler-moblin2-kernel-sources-with-intel-compiler/ <br /></a>Device Driver Debugging on Intel(R) Atom(TM) processor based devices <a href="http://software.intel.com/sites/products/documentation/hpc/atom/application/device_driver_debugging.pdf">http://software.intel.com/sites/products/documentation/hpc/atom/application/device_driver_debugging.pdf<br /></a>Building Clutter* GUI libraries using the Intel(R) C++ Compiler<br /><a href="http://software.intel.com/en-us/articles/building-the-moblin-clutter-library-with-the-intel-compiler/">http://software.intel.com/en-us/articles/building-the-moblin-clutter-library-with-the-intel-compiler/</a><br />Building FFMEG using the Intel(R) C++ Compiler<br /><a href="http://software.intel.com/en-us/articles/how-to-build-ffmpeg-to-run-under-moblin-2/">http://software.intel.com/en-us/articles/how-to-build-ffmpeg-to-run-under-moblin-2/</a></p>
<p><br /><strong>References<br /></strong>Product Page: <a href="http://www.intel.com/software/products/atomtools">http://www.intel.com/software/products/atomtools</a><br />Documentation: <a href="http://software.intel.com/en-us/articles/intel-embedded-tool-suite-documentation/">http://software.intel.com/en-us/articles/intel-application-tool-suite-documentation/<br />http://software.intel.com/en-us/articles/intel-embedded-tool-suite-documentation/<br /></a>Knowledge Base: <a href="http://software.intel.com/en-us/articles/software-development-toolsuite-atom-kb/all/1/">http://software.intel.com/en-us/articles/software-development-toolsuite-atom-kb/all/1/<br /></a>Forum: <a href="http://software.intel.com/en-us/forums/software-development-toolsuite-atom/">http://software.intel.com/en-us/forums/software-development-toolsuite-atom/<br /></a><br /><strong>Conclusions<br /></strong>The Intel(R) Software Development Tool Suites for Intel(R) Atom(TM) processor provide a comprehensive development tools solution for Moblin compliant and Intel(R) Atom(TM) processor based platforms that is versatile and highly configurable in its usage model, tightly integrates with the Moblin SDK and brings the power of Intel’s software development tools solutions to the new class of devices and applications targeted by the Intel(R) Atom(TM) processor.</p> ]]></description>
      <link>http://software.intel.com/en-us/articles/overview-software-development-tool-suites-atom</link>
      <pubDate>Tue, 13 Oct 2009 11:49:15 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/overview-software-development-tool-suites-atom#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/overview-software-development-tool-suites-atom</guid>
      <category>Mobility</category>
      <category>Tools</category>
      <category>Intel® Atom™ Software Developer Community</category>
      <category>MID</category>
      <category>Intel® Software Development Tool Suites for Intel® Atom™ Processor Knowledge Base</category>
    </item>
    <item>
      <title>How to build ffmpeg to run under Moblin 2</title>
      <description><![CDATA[ <div class="Section1">
<p class="MsoNormal"><span class="sectionBodyText"><br />The application ‘ffmpeg’ consist of three executables and 5 libraries. All the sources can be downloaded using the following svn command:</span></p>
<p class="MsoNormal"><span class="sectionBodyText"></span></p>
<p class="MsoNormal"><span class="sectionBodyText"></span></p>
<p style="text-indent: -0.25in; margin-left: 0.5in" class="MsoNormal"><span style="font-size: 11pt; font-family: Wingdings">Ø<span style="FONT: 7pt 'Times New Roman'">      </span></span><span class="sectionBodyText">svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg </span></p>
<p class="MsoNormal"><span style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana"> </span><strong class="sectionHeading">Required patch</strong></p>
<p class="MsoNormal"><span class="sectionBodyText">One version which I tried ( download: svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg –r 17944)</span></p>
<p class="sectionBodyText">has a known problem with the sources. If you try to build the code, then you will get a compile time error:</p>
<p class="MsoNormal"><span class="sectionBodyText"> </span><span class="sectionBodyText">libswscale/swscale.c:488: error: ‘PIX_FMT_YUV420PLE’ undeclared</span></p>
<p class="MsoNormal"><span class="sectionBodyText"></span></p>
<p class="MsoNormal"><span class="sectionBodyText">The solution is solved by copying the contents of the libswscale directory from .</span><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><span class="sectionBodyText">  </span> <a href="http://www.ffmpeg.org/releases/ffmpeg-0.5.tar.bz2" style="color: blue; text-decoration: underline; text-underline: single" title="http://www.ffmpeg.org/releases/ffmpeg-0.5.tar.bz2">http://www.ffmpeg.org/releases/ffmpeg-0.5.tar.bz2</a>    (see </span><span style="font-size: 8.5pt; font-family: Verdana" lang="EN"><a href="http://www.ffmpeg.org/download.html" style="color: blue; text-decoration: underline; text-underline: single">http://www.ffmpeg.org/download.html</a>)</span></p>
<p class="MsoNormal"><span class="sectionBodyText"></span></p>
<p class="MsoNormal"><span class="sectionBodyText">Please Note, <b><i>only</i></b> the libswscale directory should be copied <b><i>over the top</i></b> of the existing files.</span></p>
<h3> </h3>
<h3><span lang="FR" class="sectionHeading">Build Instructions</span></h3>
<p class="MsoNormal"><span class="sectionBodyText"></span></p>
<p class="MsoNormal"><span class="sectionBodyText">Following instructions will help you build ffmpeg under a Linux system assuming that the tar ball from the download is copied to &lt;install_directory&gt;:<br /></span><br /> Ø      cd  &lt;install_directory&gt;<br /><br /> Ø      cd tar xvfz  ffmpeg.tar.gz   #Extract the tar ball to your local directory. You will find a directory tree under the name ffmpeg installed. All the required sources are installed within this tree provided that you are not enabling any additional third party libraries.<br /><br /> Ø      cd ffmpeg</p>
<p class="sectionBodyText"> Ø      ./configure –help &lt;cr&gt; # to show all the options available to rebuild ffmpeg. For a reference build with <b>gcc</b> there is no need to provide any parameters to configure. However if you would like to enable any third party libraries like ‘libfaad’, ‘libx264’ etc. then you need to add --enable-libfaad --enable-libx264 etc. as parameters to configure. If this is required make sure that you have these sources available on your development environment and that the third party libraries are rebuilt with the selected compiler / compiler options.</p>
<p class="sectionBodyText"> Ø      ./configure &lt;parameters as below&gt;</p>
<p class="MsoNormal"><span class="sectionBodyText"> </span>Ø      make &lt;cr&gt; #recommended sequence is ‘make clean’ followed by ‘make’. The rebuild will take several minutes (depending on your development environment). Two versions of each executable are produced: ex. ‘ffmpeg’ and ‘ffmpeg_g’. The ‘*_g’ contains the executable with debug information while the ‘*’ is the stripped version. In addition ‘ffplay, ffplay_g, ffserver and ffserver_g’ are produced as executables and libavutil, libavcodec, libavformat, libavdevice and libswscale are rebuilt.</p>
<p class="sectionHeadingText"> <b><span style="text-decoration: underline;">Icc build</span></b>:</p>
<p class="MsoNormal"><span class="sectionBodyText">Depending on what version of icc you are using different configure parameters may be necessary.</span></p>
<p class="MsoNormal"><span class="sectionBodyText"> </span><span class="sectionBodyText">Using icc v10.1.xxx:</span></p>
<p class="MsoNormal"><span class="sectionBodyText"> </span>Ø      ./configure cc=icc --extra-cflags=”-xL –O3” --extra-libs=-lsvml &lt;cr&gt; # Without linking in the extra library (libsvml.so) you get several references unresolved.</p>
<p class="MsoNormal"><span class="sectionBodyText"> </span><span class="sectionBodyText">Using icc v11.0.xxx:</span></p>
<p class="MsoNormal"><span class="sectionBodyText"> </span>Ø      ./configure cc=icc –extra-cflags=”-xSSE3_ATOM –O3” –extra-libs=-lsvml &lt;cr&gt; #  The option –xSSE3_ATOM do require that you run the code on a processor which does support the ‘movbe’ instruction. If you would like to test the code on a processor not supporting the ‘movbe’ instruction you can add the option ‘-minstruction=nomovbe’ in the extra-cflag part of the command line above.<br />Ø      Make sure that the LD (linker) options do not contain ‘–march=generic’ in the config.mak file. This option causes an error from the compiler.<br /><span class="sectionBodyText"><br />Using icc v11.1.xxx:<br /></span><br />Ø      To avoid a run time erratum following source change is needed:   Open file ./libavcodec/x86/dsputil_mmx.c and on line #2944 insert // before || __ICC &gt; 1100. The line is highlighted below.</p>
<p style="MARGIN-LEFT: 0.25in" class="MsoNormal"><span style="FONT-SIZE: 11pt; FONT-FAMILY: Verdana"><v:shapetype coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f" id="_x0000_t75"><v:stroke joinstyle="miter"></v:stroke><v:formulas><v:f eqn="if lineDrawn pixelLineWidth 0"></v:f><v:f eqn="sum @0 1 0"></v:f><v:f eqn="sum 0 0 @1"></v:f><v:f eqn="prod @2 1 2"></v:f><v:f eqn="prod @3 21600 pixelWidth"></v:f><v:f eqn="prod @3 21600 pixelHeight"></v:f><v:f eqn="sum @0 0 1"></v:f><v:f eqn="prod @6 1 2"></v:f><v:f eqn="prod @7 21600 pixelWidth"></v:f><v:f eqn="sum @8 21600 0"></v:f><v:f eqn="prod @7 21600 pixelHeight"></v:f><v:f eqn="sum @10 21600 0"></v:f></v:formulas><v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"></v:path><o:lock v:ext="edit" aspectratio="t"></o:lock></v:shapetype><v:shape type="#_x0000_t75" style="width: 6in; height: 113.25pt;" id="_x0000_s1025"><v:imagedata src="new_page_21_files/image001.png"><img width="576" src="http://software.intel.com/file/22666" height="151" /></v:imagedata></v:shape></span><br /><br />Ø      After the change it will look like: #if ARCH_X86_64 || ! ( __ICC) // || __ICC &gt; 1100</p>
<p style="MARGIN-LEFT: 0.25in" class="MsoNormal"><span class="sectionBodyText"></span></p>
<p style="text-indent: -0.25in; margin-left: 0.5in" class="sectionBodyText">Ø      ./configure cc=icc –extra-cflags=”-xSSE3_ATOM –O3” &lt;cr&gt; # This simple configure does work but you get better performance if you also add the ‘--extra-lib=-lsvml’. Additional compiler switches can be used to improve the performance – for example ‘-no-prec-div’, ‘-vec-‘. As the no-prec-div has an effect on the fp calculations please refer to the compiler documentation before it is used. In addition the ‘-xSSE3_ATOM’ switch are no longer requiring a processor with ‘movbe’ support.</p>
<p class="sectionHeadingText"> Cross compilation.</p>
<p class="MsoNormal"><span class="sectionBodyText">It is standard practice to build the library and executables on a development machine and then copy the resultant files to the MOBLIN target.  You can use the option --enable–cross-compile in this case.</span></p>
<p class="MsoNormal"><span class="sectionBodyText"></span></p>
<p style="MARGIN-LEFT: 0.25in" class="MsoNormal"><span class="sectionBodyText"></span></p>
<p class="MsoNormal"><span class="sectionBodyText">Once you have completed the configure stage you can just run the ‘make clean’ followed by ‘make’. You could expect additional warnings produced.</span></p>
<p class="MsoNormal"><span class="sectionHeading"></span></p>
<p class="MsoNormal"><b><span style="text-decoration: underline;"><span class="sectionHeading">Building ffmpeg with third party libraries:</span></span></b></p>
<p class="MsoNormal"><b><span style="text-decoration: underline;"><span class="sectionHeading"></span></span></b></p>
<p class="MsoNormal"><span class="sectionBodyText">The application can support 21 different external 3<sup>rd</sup> party libraries. Each of those are selected in the configure process by adding the option ‘--enable-&lt;library-name&gt;’. </span></p>
<p class="MsoNormal"><span class="sectionBodyText">Below is an example of using some of the different external libraries available:</span></p>
<p class="MsoNormal"><span class="sectionBodyText"> </span>Ø      ./configure &lt;other options as above&gt; --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid<span class="sectionBodyText"> </span></p>
<p class="MsoNormal"><span class="sectionBodyText">The invocation above assumes that you will be using 6 external 3<sup>rd</sup> party libraries:</span></p>
<p class="MsoNormal"><span class="sectionBodyText"> </span><span class="sectionBodyText">- libfaac       # for example you can download ‘faac-1.28.tar.gz’ or later version from the web.</span></p>
<p class="MsoNormal"><span class="sectionBodyText"> </span><span class="sectionBodyText">- libfaad       # for example you can download ‘faad2-2.7.tar.gz’ or later version from the web.</span></p>
<p class="MsoNormal"><span class="sectionBodyText"> </span><span class="sectionBodyText">- libmp3lame # for example you can download ‘lame-398-2.tar.gz’ or later version from the web.</span></p>
<p class="MsoNormal"><span class="sectionBodyText"> </span><span class="sectionBodyText">- libtheora    # for example you can download ‘libtheora-1.0.tar.tar’ or later version from the web. Please note that you can not use ICC v 10.1 to rebuild this library due to a compiler issue. This has been fixed with 11.1 version of the compiler.</span></p>
<p class="MsoNormal"><span class="sectionBodyText"> </span><span class="sectionBodyText">- libx264      # for example you can download ‘x264-snapshot-20090117-2245.tar.bz2’ or later version from the web.</span></p>
<p class="MsoNormal"><span class="sectionBodyText"> </span><span class="sectionBodyText">- libxvid      # for example you can download ‘xvidcore-1.2.1.tar.gz’ or later version from the web.</span></p>
<p class="MsoNormal"><span class="sectionBodyText"> </span></p>
</div> ]]></description>
      <link>http://software.intel.com/en-us/articles/how-to-build-ffmpeg-to-run-under-moblin-2</link>
      <pubDate>Thu, 01 Oct 2009 02:39:07 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/how-to-build-ffmpeg-to-run-under-moblin-2#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/how-to-build-ffmpeg-to-run-under-moblin-2</guid>
      <category>Mobility</category>
      <category>Open Source</category>
      <category>Tools</category>
      <category>Intel® Atom™ Software Developer Community</category>
      <category>MID</category>
      <category>Intel® Software Development Tool Suites for Intel® Atom™ Processor Knowledge Base</category>
    </item>
    <item>
      <title>Building the Moblin Clutter Library with the Intel Compiler</title>
      <description><![CDATA[ <p><b>Building the Moblin Clutter Library with the Intel Compiler</b></p>
<p><b>Introduction</b></p>
<p><b>Build environment</b></p>
<p>The build instructions below are based on the assumption that the build environment is a Fedora10 installation. </p>
<p>A copy of the installation disks can be found here. <a href="http://fedoraproject.org/get-fedora">http://fedoraproject.org/get-fedora</a></p>
<p>It is important that the GCC tools are installed when the Fedora installation is installed.</p>
<p><b>Cross-development</b></p>
<p>The clutter libraries  and test environment  are first built on a Fedora installation, and then the resultant executables and libraries can then be copied over to a MOBLIN2 platform.</p>
<p><b>Virtualisation</b></p>
<p>The steps below can be undertaken on a virtual machine, the only restriction being that not all virtual machines support video acceleration  </p>
<p><b>The tests</b></p>
<p>There are a number of tests that can be used to benchmark the clutter library. The benchmark performance is measured by how many Frames Per Second (FPS) are achieved.<b><br clear="all" /></b></p>
<p><b>Building the Clutter Libraries</b></p>
<p><b>Downloading the sources</b></p>
<p>The sources for the clutter library can be obtained by using the following command.</p>
<p>In a development directory of your choosing download the sources</p>
<p>   git clone git://git.clutter-project.org/clutter</p>
<p>   git clone git://git.clutter-project.org/clutter-box2d</p>
<p>Progress for each download should be reported similar the following:</p>
<p> </p>
<p>$ git clone git://git.clutter-project.org/clutter<br /><br />Initialized empty Git repository in /home/intel/dv/clutter/clutter/.git/<br />remote: Counting objects: 25225, done.<br />remote: Compressing objects: 100% (10261/10261), done.<br />remote: Total 25225 (delta 20575), reused 18319 (delta 14944)<br />Receiving objects: 100% (25225/25225), 6.99 MiB | 104 KiB/s, done.<br />Resolving deltas: 100% (20575/20575), done.</p>
<p><b>Building the Sources</b></p>
<p>Directory structure should look similar to this:</p>
<p>             &lt;dev-dir&gt;/clutter/<br />            &lt;dev-dir&gt;/clutter-box2d</p>
<p> </p>
<p>In each of these sub directories build the libraries as follows:</p>
<p><b>Choosing which compiler </b></p>
<p><b>Building with GCC</b></p>
<p>For our installation, we'll use the environment variable  $PREFIX custom directory so as not to override any existing installation</p>
<p>     export PREFIX=/opt/custom/gcc<br />    ./autogen.sh --prefix=$PREFIX</p>
<p><b>Building with ICC</b></p>
<p>To build the library with the Intel compiler use the following commands</p>
<p>    export CC=icc<br />    export CXX=icc</p>
<p>   export PREFIX=/opt/custom/icc<br />  ./autogen.sh --prefix=$PREFIX</p>
<p><b>Continuing the build</b></p>
<p>When autogen has completed you should get a message similar to the display below </p>
<p>  <br />                                  Clutter    0.9.7<br />                         ====================<br />                                  prefix:   /opt/custom/gcc<br />                                Flavour:   glx/gl<br />                                 XInput:   no<br />                          GL headers:   GL/gl.h<br />                    Image backend:   gdk-pixbuf<br />                       Target library:   libclutter-glx-0.9.la<br />               Clutter debug level:   yes<br />                 COGL debug level:   minimum<br />                      Compiler flags:   -Wall -Wshadow -Wcast-align -Wno-uninitialized -Wno-strict-aliasing -Wempty-body -Wformat-security -Winit-self<br />        Build API documentation:   no<br />  Build manual documentation:   no<br />         Build introspection data:   auto</p>
<p>  </p>
<p>Now build the source by calling make</p>
<p>The progress of the make will be reported, the last few lines looking similar to this:</p>
<p>   Making all in tools<br />     CC    disable-npots.o<br />     LINK  libdisable-npots-static.la<br />     LINK  libdisable-npots.la <br />   Making all in po</p>
<p><b>Installing the new library</b></p>
<p>To install the new library call:</p>
<p>make install</p>
<p>Note, depending on the permissions of the installation directory (set with the $PREFIX variable in the previous steps) you may need to do this as root.</p>
<p> </p>
<p><b>Building the tests</b></p>
<p>The test directory has a number of tests. The README describes the tests as follows </p>
<p><i>"The conform/ tests should be non-interactive unit-tests that verify a single feature is behaving as documented. See conform/ADDING_NEW_TESTS for more details.</i></p>
<p><i> </i><i>The micro-bench/ tests should be focused performance test, ideally testing a single metric. Please never forget that these tests are synthetic and if you are using them then you understand what metric is being tested. They probably don't reflect any real world application loads and the intention is that you use these tests once you have already determined the crux of your problem and need focused feedback that your changes are indeed improving matters. There is no exit status requirements for these tests, but they should give clear feedback as to their performance. If the frame rate is the feedback metric, then the test should forcibly enable FPS debugging.</i></p>
<p><i> </i><i>The interactive/ tests are any tests who's  status can not be determined without a user looking at some visual output, or providing some manual input etc. This covers most of the original Clutter tests. Ideally some of these tests will be migrated into the conformance/ directory so they can be used in automated nightly tests."</i></p>
<p>To build the tests, from the top level of the test directory do: </p>
<p>    make</p>
<p>The build will report:</p>
<p>    Making all in data <br />    Making all in conform<br />    Making all in interactive<br />    Making all in micro-bench<br />    Making all in tools</p>
<p><b>Running the tests</b></p>
<p>Having built the tests, each test can be run from the command line.</p>
<p><b>Automatic running of  tests.</b></p>
<p>Many of the tests do not run to completion, but keep running,  The script in the appendix below gives an example of how the tests can be automatically called and killed after a predefined time.</p>
<b><br clear="all" /></b>
<p><b>Appendix 1 -  Script to drive test cases</b></p>
<p>#!/usr/bin/perl<br /># list of tests <b>TODO: EDIT THESE TO YOUR REQUIREMENTS<br /></b>@Tests=("test-actors", "test-behave", "test-clip","test-cogl-offscreen","test-cogl-primitives","test-cogl-tex-convert","test-cogl-tex-foreign","test-cogl-tex-getset","test-cogl-tex-polygontest","test-cogl-tex-tile","test-depth","test-layout","test-multistage","test-pixmap","test-project","test-random-text","test-rotate","test-scale","test-script","test-sharder","test-text","test-texture-quality","test-textures","test-threads","test-unproject","test-viewport");<br /><br />#@Tests=("test-actors", "test-behave");<br />@Results=();<br /><br /># for each test run it for 10 seconds<br />my $Timeout = 10;<br />## chdir interactive;<br />my $bStarted = 0;<br /><br />foreach my $Test (@Tests)<br />{<br />    # print "executing $Test\n ";<br />    eval {<br />        local $SIG{ALRM} = sub { die "alarm\n" }; # NB: \n required<br />        alarm $Timeout;<br />        # system("./$Test --clutter-show-fps &gt; res.$Test.txt");<br /><br />        # mark end of prev test<br />        push @Results, "END" if $bStarted;<br />        push @Results, "TEST:$Test\n-----------------------\n";<br />        $bStarted = 1;<br />        open (RUN,"./$Test --clutter-show-fps &amp;|");<br />        while(&lt;RUN&gt;)<br />        {<br />            push @Results, $_;<br />        }<br />        alarm 0;<br />    };<br />    if ($@) <br />    {<br />        die unless $@ eq "alarm\n"; # propagate unexpected errors<br />        # timed out<br />        system("killall -9 lt-test-interactive");<br />     }<br />}<br /># mark the end of the last test<br />push @Results, "END" if $bStarted;<br /><br /># process the results<br />my $NumTests = 0;<br />my $Total = 0;<br />my $Max = 0;<br />my $Min = 9999;<br />my $TestName="";<br /><br />print "\nName Min Max NumTests Average\n";<br />foreach my $Line (@Results)<br />{<br />    if($Line=~/^TEST:(.*)/)<br />    {<br />        # print "IN TEST $Line";<br />        $TestName= $1;<br />        chomp $TestName;<br />        $NumTests = 0;<br />        $Total = 0;<br />        $Max = 0;<br />        $Min = 9999;<br />    }<br /><br />    if($Line=~/END/)<br />    {<br />        # print "IN END :$Line";<br />        $Average = 0;<br />        $Average = $Total/$NumTests if $NumTests &gt; 0;<br />        print "$TestName $Min $Max $NumTests $Average\n";<br />    }<br /><br />    if($Line=~/\*\*\* FPS: (.*) \*\*\*/)<br />    {<br />        # print "IN FPS: $Line";<br />        $NumTests++;<br />        $Total = $Total + $1;<br />        $Max = $1 if $1 &gt; $Max;<br />        $Min = $1 if $1 &lt; $Min;<br />    }<br />}<br /><br />print "exiting ..\n";<br /> </p>
<p> </p>
<b><br clear="all" /></b>
<p><b> Appendix 2 - Essential notes on installing Fedora  </b></p>
<p>When installing Fedora you must install the Software Development tools.</p>
<p> </p>
<p> </p> ]]></description>
      <link>http://software.intel.com/en-us/articles/building-the-moblin-clutter-library-with-the-intel-compiler</link>
      <pubDate>Sat, 12 Sep 2009 03:56:58 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/building-the-moblin-clutter-library-with-the-intel-compiler#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/building-the-moblin-clutter-library-with-the-intel-compiler</guid>
      <category>Mobility</category>
      <category>Tools</category>
      <category>MID</category>
      <category>Intel® Compilers</category>
      <category>Intel® Software Development Tool Suites for Intel® Atom™ Processor Knowledge Base</category>
    </item>
    <item>
      <title>Integrating Intel® Software Development Tool Suite Components with Moblin* Image Creator</title>
      <description><![CDATA[ This article describes how to install components of the Intel(R) Software Development Tool Suites for Intel(R) Atom(TM) Processor with the Moblin* Image Creator. <br /><br />This allows to use the Intel(R) C++ Compiler and the Intel(R) Integrated Performance Prmitives inside the Moblin* Image Creator's protected jailroot environment.<br /><br />It also allows to make sure the Moblin* target image created contains the idbserver, the Intel(R) Application Debugger remote debug server, as well as a copy of the Intel(R) VTune(TM) Performance Analzyzer Sampling Collector (SEP) installation for the Intel(R) Atom(TM) Processor.<br /><br />The Intel(R) Software Development Tool Suites 2.0 for Intel(R) Atom(TM) Processor offers two distinct options for tight integration of Intel's development tools with Moblin*'s development and testing environment. You can download an existing Moblin* image from http://www.moblin.org for development and testing on this image and install target specific components of the Intel(R) Application Software Development Tool Suite into it. Alternatively you can also download and install the Moblin Image Creator 2 from http://www.moblin.org and integrate development tool suite components into it's jailroot environment as well as prepare the target image created by Moblin Image Creator to contain the Intel(R) VTune(TM) Performance Analyzer Sampling Collector (SEP) and Intel(R) Application Debugger debug agent (idbserver) for testing and performance tuning. <br /><br />
<p>Whether you intend to do most of your development on a live Moblin* image running inside a KVM* virtual machine ore whether you intend to do your development in a protected jailroot/chroot environment, there are tools components that should be installed on your development host system and should be independent of your Moblin* based Intel(R) Atom(TM) Processor target.</p>
<p>It is recommended to register for the Intel(R) Application Software Development Tool Suite for Intel(R) Atom(TM) Processor or the Intel(R) Embedded Software Development Tool Suite for Intel(R) Atom(TM) Processor at <a href="http://software.intel.com/en-us/intel-compilers/">http://software.intel.com/en-us/intel-compilers/</a> and download it at <a href="https://registrationcenter.intel.com/">https://registrationcenter.intel.com</a>. It is also recommended to install at least the Intel(R) VTune(TM) Performance Analyzer and the Intel(R) Debugger following the steps outlined in the product installation guide Install_All.htm. This will take care of installing the host components to take advantage of the Intel(R) Application Software Development Tool Suite's performance analysis, tuning and debug capabilities.</p>
<p>To install the Intel(R) C++ Compiler and the Intel(R) Integrated Performance Primitives into the Moblin* Image Creator jailroot environment and prepare the Moblin* Image Creator produced target image to also include the Intel(R) Application Debugger debug agent (Idbserver) and the Intel(R) VTune(TM) Analyzer Sampling Collector (SEP) please follow the steps below:</p>
<ol>
<li>Go to <a href="http://www.moblin.org/">http://www.moblin.org</a> and download Moblin* Image Creator 2. Detailed Moblin* Image Creator documentation can be found at <a href="http://moblin.org/documentation/moblin-image-creator-2/using-moblin-image-creator">http://moblin.org/documentation/moblin-image-creator-2/using-moblin-image-creator</a> and the Moblin* Image Creator itself can be downloaded at  <a href="http://git.moblin.org/cgit.cgi/moblin-image-creator-2">http://git.moblin.org/cgit.cgi/moblin-image-creator-2</a> . </li>
<li>Follow the instructions you find at moblin.org for installing the Moblin* Image Creator. </li>
<li>Go to <a href="http://software.intel.com/en-us/articles/moblin-integration-software-development-tool-suite-atom/">http://software.intel.com/en-us/articles/moblin-integration-software-development-tool-suite-atom/</a> and download the two scripts <strong>netbook-core-developer_JAILROOT.ks</strong> and <strong>netbook-core-developer_TARGET.ks</strong> . </li>
<li>To create a KVM* image or a Live-CD of the target Moblin* system, please use netbook-core-developer_TARGET.ks:<br /> 
<blockquote>&gt; moblin-image-creator -c &lt;path_to_ks&gt;/netbook-core-developer_TARGET.ks -f raw --cache=/tmp/mycache</blockquote>
<p>The image created will contain The Intel(R) Application Debugger Idbserver and the Intel(R) VTune(TM) Analyzer Sampling Collector for target system located as a tarball in the /tmp directory. TheParameter '-f raw' of the moblin-image-creator command instructs the Moblin* Image Creator to create an image which can be loaded into a KVM* virtual machine. For more information on Moblin* Image Creator usage please consult moblin.org.</p>
</li>
<li>
<p>To create an image with the Intel(R) C++ Compiler &amp; the Intel(R) Integrated Performanced Primitives that you can then use to do builds in a protected jailroot/chroot environment before creating the target image please use netbook-core-developer_JAILROOT.ks:<br /> 
<blockquote>&gt; moblin-image-creator -c &lt;path_to_ks&gt;/netbook-core-developer_JAILROOT.ks -f loop --cache=/tmp/mycache</blockquote>
</p>
<p>The image will contain the Intel(R) C++ Compiler and the Intel(R) IPP at /opt/intel/Compiler. The command parameter '-f loop' of moblin-image-creator tells it to create a loop image. You can mount this image and then chroot into it for your protected builds using the following commands:<br />  
<blockquote>&gt; mount -o loop moblin-netbook-core-developer_JAIROOT.img /mnt/loop<br /> &gt; chroot /mnt/loop su</blockquote>
</p>
</li>
<li>To additionally install the Intel(R) VTune(TM) Analyzer Sampling Collector (SEP) you would download it directly from <a href="http://downloads.moblinzone.com/development-tool-suite-2/rpm/vtune91_target.tar.gz">http://downloads.moblinzone.com/development-tool-suite-2/rpm/vtune91_target.tar.gz</a> and unpack it and install it in the Moblin* environment. Please be advised that using SEP is only supported on real Intel(R) Atom(TM) Processor based hardware and not on OS images running under KVM*. 
<p> </p>
</li>
</ol>
<p><b>Advanced </b></p>
<p>If you would like to modify the kickstart script templates provided with the Moblin* Image Creator yourself, below is a short outline of the changes we apply to the template scripts provided with the Moblin* Image Creator to enable our integration. The example kickstart scripts for the Moblin* Image Creator can be found in the /usr/share/mic2 after you installed it.</p>
<p>To enable integration of the Intel(R) Software Development Tool Suite you would do the following:</p>
<ol>
<li>add a repository entry for the Intel(R) Software Development Tool Suite  to the header of ks file:   <br />   
<blockquote>&gt; repo --name=intel-tools --baseurl=http://downloads.moblinzone.com/development-tool-suite-2</blockquote>
</li>
<li>add packages which you want to install into Moblin image in %packages section of the ks file.<br />There are 4 groups of Intel packages which you may want to install:<br />
<blockquote>  @Compiler<br />  @IPP<br />  @Application Debugger<br />  @Server agent for Application Debugger</blockquote>
</li>
</ol>
<p>Each of these groups contains a set of rpm files related to the corresponding products.<br />  
<blockquote>@Compiler contains the Intel(R) C++ Compiler for applications runninng on IA-32<br />  @IPP containsthe Intel(R) IPP for Intel(R) Atom(TM) Processor<br />  @Application Debuggers contains the Intel(R) Application Debugger 2.0 for Intel(R) Atom(TM) Processor<br />  @Server agent for Application Debugger conntains the Intel(R) Debugger Remote Server (idbserver) </blockquote>
</p>
<p>     <br />Each group of packages contains the information about its dependencies which will be automatically resolved during the installation.</p>
<p> </p>
<p><strong>Host Install</strong> </p>
<p><br />It is recommended to register for the Intel(R) Application Software Development Tool Suite for Intel(R) Atom(TM) Processor or the Intel(R) Embedded Software Development Tool Suite for Intel(R) Atom(TM) Processor at http://software.intel.com/en-us/intel-compilers/ and download it at https://registrationcenter.intel.com. It is also recommended to install at least the Intel(R) VTune(TM) Performance Analyzer and the Intel(R) Debugger following the steps outlined in the product installation guide Install_All.htm. This will take care of installing the host components to take advantage of the Intel(R) Debugger and Intel(R) VTune(RM) Perfromance Analyzers debuging and performance optimization tuning capabilities.<br /><br />If you wanted to you could however also do the host component install using the kickstart script approach of Moblin Image Creator 2. This is however not the recommended approach.<br />To the any kickstart script of your choice you would add  the '%post --nochroot' section shown below for copying of the Intel(R) VTune(TM) Performance Analyzer and the Application Debugger to the host machine and VTune sampling collector for embedded systems (SEP-embedded) to the target image.<br /><br />
<blockquote><br />%post --nochroot<br /><br /># Copying vtune_for_targets to the target image (set your proxy here if needed)<br />echo "Downloading required additional packages..."<br />export http_proxy=http://proxy.jf.intel.com:911<br />test -s /tmp/vtune91_target.tar.gz || wget http://downloads.moblinzone.com/development-tool-suite-2/rpm/vtune91_target.tar.gz -O /tmp/vtune91_target.tar.gz<br />cp /tmp/vtune91_target.tar.gz $INSTALL_ROOT/tmp/vtune91_target.tar.gz<br /><br /># copying VTune for host to the user's host machine<br />test -d /tmp/intel-tools || mkdir -p /tmp/intel-tools<br />test -s /tmp/intel-tools/l_vt_pu_9.1.021.tar.gz || wget http://downloads.moblinzone.com/development-tool-suite-2/l_vt_pu_9.1.021.tar.gz -O /tmp/intel-tools/l_vt_pu_9.1.021.tar.gz<br /><br /># copying Application Debugger to the user's host machine<br />test -d /tmp/intel-tools/idb || mkdir -p /tmp/intel-tools/idb<br />wget http://downloads.moblinzone.com/development-tool-suite-2/rpm/intel-mid_idb20006-2.0.006-001.i486.rpm -O /tmp/intel-tools/idb/intel-mid_idb20006-2.0.006-001.i486.rpm<br />wget http://downloads.moblinzone.com/development-tool-suite-2/rpm/intel-mid_idb-kernel20006-2.0.006-001.i486.rpm -O /tmp/intel-tools/idb/intel-mid_idb-kernel20006-2.0.006-001.i486.rpm<br />wget http://downloads.moblinzone.com/development-tool-suite-2/rpm/intel-mid_idb-eclipse20006-2.0.006-001.i486.rpm -O /tmp/intel-tools/idb/intel-mid_idb-eclipse20006-2.0.006-001.i486.rpm<br /><br /># Installing App Debugger (if needed, please remove the comments)<br /># TODO: write some lines, so that add installation for non-rpm systems (like Ubuntu 8.10)<br />#echo "Installing an Application Debugger..."<br />#type -P rpm &amp;&gt;/dev/null<br />#if [ $? -eq 0 ]; then<br /># rpm -U --force --nodeps /tmp/intel-tools/idb/intel-mid_idb20006-2.0.006-001.i486.rpm<br /># rpm -U --force --nodeps /tmp/intel-tools/idb/intel-mid_idb-kernel20006-2.0.006-001.i486.rpm<br /># rpm -U --force --nodeps /tmp/intel-tools/idb/intel-mid_idb-eclipse20006-2.0.006-001.i486.rpm<br />#fi<br /><br />%end<br /></blockquote>
<br /><br />Again though - the recommended method to installing the host components of the Intel(R) Software Development Tool Suites for Intel(R) Atom(TM) Processor is to simply download the installation tarball, run the install.sh install script as outlined in Install_All.htm and follow it's instructions.<br /><br />********************************************************************************************************<br />NOTE: In addition to the information above you may find useful mini how-to document of MIC usage:<br />http://moblin.org/documentation/moblin-image-creator-2/using-moblin-image-creator<br />********************************************************************************************************</p> ]]></description>
      <link>http://software.intel.com/en-us/articles/moblin-integration-software-development-tool-suite-atom</link>
      <pubDate>Tue, 21 Jul 2009 15:19:50 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/moblin-integration-software-development-tool-suite-atom#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/moblin-integration-software-development-tool-suite-atom</guid>
      <category>Mobility</category>
      <category>Intel® Atom™ Software Developer Community</category>
      <category>MID</category>
      <category>Intel® Software Development Tool Suites for Intel® Atom™ Processor Knowledge Base</category>
    </item>
    <item>
      <title>Developing for Mobile Internet Devices, Part 2: Designing, Coding and Testing a Twitter* Location-Based Application</title>
      <description><![CDATA[ By Paul Ferrill<br /><br />In<strong> </strong><a href="http://software.intel.com/en-us/articles/developing-for-mobile-internet-devices-part-1-tools-choices-and-development-environment-configuration/"><span style="text-decoration: underline;"><strong>part 1</strong></span></a> of this series, I showed you what it takes to build applications for the Mobile Internet Device (MID) platform. I covered the basic issues of setting up a development workstation, choosing a programming language, and making good choices in terms of external libraries. I also discussed issues like device emulation, the importance of working through a prototype “hello world” application, and common problems to avoid.<br /><br />This installment gets down to the business at hand and walks through the process of designing and coding a working application. I chose a Twitter* application that will report the user’s current location as a way to exercise as many of the MID features as possible. Although it’s a simple application in terms of what it does, it has many of the parts you’d need to build any general-purpose user application.
<p class="sectionHeading"><br />Design Choices</p>
<p>Many of the functional parts of this application are foundational to everyday applications, requiring features such as user authentication, configuration storage and retrieval, network communications, and user interaction. It’s important to modularize the design as much as possible to both break the overall project down into manageable pieces and to make it easier to reuse the code.</p>
<p>The application checks each time it runs to see whether any user credential information has been entered. If not, it presents a typical user name/password login dialog box and stores the information in an encrypted local configuration file. A preferences dialog box makes it possible to change the user name and password after initial setup along with other program options.</p>
<p>For the initial release of this program, I assume that there is an active network connection. This is a bit of a stretch for the Compal JAX10* MID I tested on: It did not have an active 3G radio, so there was no “always-on” Internet connection. I was able to simulate having a consistent connection by using Wi-Fi, instead. Later versions might check for connectivity and, if currently disconnected, queue up the message to send the next time a connection to the Internet is available.</p>
<p>Another design consideration for the mobile form factor is deciding what happens when a button is pressed. With this particular application, there is a consequence for choosing single-key action; every time the user presses one of the action buttons, a message is sent to Twitter. If you assume the user won’t inadvertently press a button or do something like put the device in a back pocket with the application running, it shouldn’t be a problem. Alternatives might include adding a confirmation dialog box to each action (“Really send message?”), adding a button or a timer to lock the screen, or exiting the program by default after the message is sent.</p>
<p class="sectionHeading">Building a UI for the Small Screen</p>
<p>One of nice things about Python* is the abundance of libraries to do just about anything you need to do. The Compal* MID used for this project has a number of useful libraries installed as a part of the base operating system, and I chose to take advantage of them. The GTK+* user interface (UI) library contains a wealth of resources for building everything from a simple dialog box to a complex data-entry form. PyGTK is a wrapper around the GTK+ library and provides access to virtually every routine through standard Python objects.<br />Building a login dialog using PyGTK consists of creating a simple window with individual text boxes for username and password. You can find a good example and explanation of these techniques on the <a href="http://www.pygtk.org/pygtk2tutorial/sec-TextEntries.html">PyGTK tutorial page</a>. In the following code snippet the pass_input.set_visibility(False) line causes the password to be blanked by a dot symbol:</p>
<p> </p>
<pre name="code" class="cpp">def login(self):<br />        dialog = gtk.Dialog('Login', <br />                            self.window,<br />                            flags=gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,<br />                            buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT,<br />                                     gtk.STOCK_OK, gtk.RESPONSE_ACCEPT))<br />        dialog.set_default_response(gtk.RESPONSE_ACCEPT)<br />        <br />        userbox = gtk.HBox(False)<br />        <br />        user_label = gtk.Label('Username:')<br />        userbox.pack_start(user_label)<br />        <br />        user_input = gtk.Entry()<br />        user_input.set_activates_default(True)<br />        userbox.pack_start(user_input)<br />        <br />        dialog.vbox.pack_start(userbox)<br />    <br />        passbox = gtk.HBox(False)<br />        <br />        pass_label = gtk.Label('Password:')<br />        passbox.pack_start(pass_label)<br /><br />        pass_input = gtk.Entry()<br />        pass_input.set_activates_default(True)<br />        pass_input.set_visibility(False)<br />        passbox.pack_start(pass_input)<br />	  dialog.vbox.pack_start(passbox)<br /></pre>
Another chore for the small screen is creating a finger-friendly interface. For this application, that means buttons appropriately sized and spaced so that an adult‘s finger can easily press the button of choice. It is possible to code the button sizes specifically for the Compal screen size and resolution, but a more general approach would be to use the available system information to calculate the appropriate dimensions.
<p> </p>
<p>A second option with GTK+ is to create a table that fills the screen with a matrix of buttons that essentially takes up all the screen real estate. Although doing so might not be as visually appealing, it does accomplish the task of building a finger-friendly interface in which you can easily “click” the right button. It also provides a few more options for adding descriptive text to the button for the Twitter application. In Python, the matrix would look something like this:</p>
<p> </p>
<pre name="code" class="cpp">def create_table(self):<br />        self.table = gtk.Table(3,4,True) # Create a 3 row by 4 column table<br />        button1 = gtk.Button("Button 1") # Create a button named button1<br />        self.table.attach(button1,0,1,0,1) # put button 1 in location 0,1<br />        button2 = gtk.Button("Button 2")<br />        self.table.attach(button2,1,2,0,1)	<br />        button3 = gtk.Button("Button 3")<br />        self.table.attach(button3,1,2,0,1)<br />.<br />.<br />.	<br />        button12 = gtk.Button("Button 12")<br />        self.table.attach(button12,1,2,0,1)<br /></pre>
<p> </p>
<p>The lines with a single period are meant to indicate that the sequence repeats down to the final definition of button12.</p>
<p class="sectionHeading">Coding Practices</p>
<p>Python is a language that allows you to write code by the brute-force method, as in the lines above, or in a more elegant way using concepts like iteration. If you were to define all 12 buttons in a linear fashion, you would need 26 lines of code. Using the Python for construct, you can accomplish the same task in a mere seven lines of code. That equates to less than one-third of the code for this simple example, but the difference would be substantial for a larger table. Here’s the code in a more “Pythonic” way:</p>
<pre name="code" class="cpp">    def create_table(self):<br />        self.table = gtk.Table(3,4,True)<br />        for row in range(3):<br />            for col in range(4):<br />            	name = 'Twitter %i' % (row*4 + col + 1)<br />            	button = gtk.Button(name)<br />            	self.table.attach(button, col, col+1, row, row+1)<br /></pre>
<br />
<p>Keeping your code manageable is important when scripts start to get large. Python functions are a good way to break down your code into small, manageable pieces. It’s also important to point out that everything in Python is an object. You can see this to some extent in the create_table function through the use of the self construct. The function create_table creates a gtk.Table and returns it as an object—hence, the use of self to refer to the object being created. There is an abundance of resources on the Web if you’re not familiar with object-oriented programming concepts.</p>
<p>Taking advantage of all the built-in language features and functions is another way to keep your source code manageable. Python has a module for reading and writing configuration files named ConfigParser. This module provides all the tools you need to save and read program configuration information. It supports different sections and creates a file of name–value pairs within each section. There are even individual methods to retrieve specific types, such as getboolean, getint, and getfloat.</p>
<p>If you can’t find what you need in the Python standard library, chances are that someone else has already written what you need. A quick Google* search typically returns multiple choices for a specific tool. Python-Twitter is a good example of a helper library to accomplish the heavy lifting of sending messages to the Twitter service. It’s hosted on Google Code* and even comes with several sample applications.</p>
<strong>Testing and Debugging</strong>
<p>You can test code on the Compal MID in several ways. File transfer over a USB port is drop-dead simple and works well.  Optionally, you could attach a USB keyboard to the Compal MID and use the VI editor directly on the device for your editing and the Python interpreter for testing. This method works okay for small proof-of-concept efforts but gets out of control for anything but small, simple programs. Another, similar approach is to use Virtual Network Computing* (VNC) to remotely view the screen on the device through your workstation.</p>
<p>Another way is to use the emulator approach.  The Moblin* project has a tool called the Moblin Image Creator* (MIC) for building platform-specific images. With MIC you can also use the Xephyr* emulator tool to launch an independent session for testing purposes. This method has the advantage of a rapid build / test cycle to help work the bugs out of your code in short order.</p>
<p>A final way might be to test the initial version of the software on your Linux* desktop.  The advantage is that you don’t need MIC.  The disadvantages are that you may need additional hardware for your desktop (GPS, for example) and that you can’t test MID specific functionality (such as screen characteristics).</p>
<p class="sectionHeading">Lessons Learned</p>
<p>Don’t get bogged down in the details too early in the process. It’s important to completely flesh out your requirements in the beginning, then make some design decisions based on a clear picture of what you’re trying to accomplish. Get comfortable with your development tools—especially the debugging portion—as you’ll probably use them more than you think.</p>
<p>The easier it is for you to test and debug your code, the quicker you’ll get it running.</p>
<p>Have a convenient way to transfer files to your device that doesn’t require a lot of motion. This could be as simple as keeping an easily accessible USB cable plugged into your workstation. When you get down to squashing bugs, it helps to make the process as smooth and painless as possible, especially if you’re editing all the code on a workstation and have to move it over to the device for testing.</p>
<p class="sectionHeading">Summary</p>
<p>Building a solid application for the MID platform requires the same set of disciplined steps you would use in any software project. Be sure you don’t skip steps like these:</p>
<ul>
<li>Take your time on the design process, and consider alternatives.</li>
<li>Think through the UI design from a user’s perspective before you start coding.</li>
<li>Write your code with testing in mind.</li>
<li>Have a clear set of requirements that you can test.</li>
<li>Use tools such as source code control, and check in your code frequently.</li>
</ul>
<br />
<p class="sectionHeading">About Author</p>
<p>Paul Ferrill has been writing in the computer trade press for more than 20 years. He got his start writing networking reviews for PC Magazine on products like LANtastic and early versions of Novell Netware. Paul holds both BSEE and MSEE degrees and has written software for more computer platforms and architectures than he can remember.</p>
<br /><span class="sectionHeading"><br />Link to Part 1 of this series</span><br /><br /><a href="http://software.intel.com/en-us/articles/developing-for-mobile-internet-devices-part-1-tools-choices-and-development-environment-configuration/"><span style="text-decoration: underline;"><strong>Tools, Choices, and Development Environment Configuration</strong></span></a>.<br /><br /> ]]></description>
      <link>http://software.intel.com/en-us/articles/developing-for-mobile-internet-devices-part-2-designing-coding-and-testing-a-twitter-location-based-application</link>
      <pubDate>Tue, 05 May 2009 11:05:45 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/developing-for-mobile-internet-devices-part-2-designing-coding-and-testing-a-twitter-location-based-application#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/developing-for-mobile-internet-devices-part-2-designing-coding-and-testing-a-twitter-location-based-application</guid>
      <category>Mobility</category>
      <category>Intel® Atom™ Software Developer Community</category>
      <category>MID</category>
    </item>
    <item>
      <title>Developing for Mobile Internet Devices, Part 1: Tools, Choices, and Development Environment Configuration</title>
      <description><![CDATA[ <strong>By Paul Ferrill<br /></strong><br />Developing applications for Mobile Internet Devices (MIDs) requires a new mindset on the part of developers. While it is possible to take an existing application and port it to a MID, it probably will not work well without some tweaking. Building a new application from the ground up to take advantage of MID features opens a world of possibilities.<br /><br />Targeting a specific MID might limit the usefulness of the application. It makes a lot more sense to build in platform awareness for things like display size, network connectivity, Global Positioning System (GPS) availability, and storage. This will take a little extra coding but should make for a much more robust application. It will also make the code work on more platforms.<br /><br />Making the right choices when it comes to programming language, support libraries, and user interface (UI) will determine the overall success of the project. Most open source projects typically start out as a pet project written in someone's favorite language or as an exercise to learn something new. For this article series, I use the Python language and attempt to keep the supporting libraries to a minimum.<br /><br /><span class="sectionHeadingText">Hardware Possibilities</span><br /><br />The current crop of MIDs, based on the Intel® Atom™ processor, provides a combination of CPU power, graphics performance, and memory not previously available in small devices. When you add in GPS, Wi-Fi, and 3G connectivity (on some models), you have the potential for a truly always-connected device capable of delivering precision location information. This combination of hardware functionality opens up a whole new world of possibilities for applications.<br /><br />This series of articles uses the Compal* JAX10 MID as the target platform. It is based on an 800-MHz Intel® Atom™ processor with 512 MB of memory, 4 GB of solid-state disk configured as two 2-GB devices, two built-in cameras on the front and back for video conferencing and taking pictures or video, GPS, Bluetooth* technology, and 802.11b/g Wi-Fi. The model tested did not have 3G wireless installed.<br /><br />Powering up the Compal* JAX10 MID reveals the Midinux* operating system from Red Flag Software. A version of Moblin* specifically for the JAX10 is available from <a href="http://www.moblin.org" target="_blank">Moblin.org</a>. It requires a bit of tweaking to get the touch screen and wireless to work, but it is doable. One other option is Ubuntu* Mobile and Embedded (UME), although it is based on an older version of Ubuntu.<br /><br /><strong>UI Constraints and Choices</strong><br /><br />One of the problems developers inevitably face with small form factor devices is in designing the right UI to be both visually appealing and finger functional. Crafting a small-screen UI is one of the most important things you have to take into consideration when developing for the MID form factor. The Compal JAX10 MID has a display size of 800 × 480, which can chop off the lower portion of some fixed-sized dialog boxes.<br /><br />Choosing a flexible and easy-to-use UI foundation library helps keep your development struggles to a minimum. Which library you select depends a great deal on the type of application you're looking to build. The <a href="http://www.gtk.org/" target="_blank">GTK+* framework </a>comes as a standard part of both Midinux and Moblin, so you won't have to include or require any additional libraries should you choose to go that route. Moblin has also decided to standardize on <a href="http://clutter-project.org/" target="_blank">Clutter*</a> for graphics-intensive applications.<br /><br /><span class="sectionHeading">Development Environment<br /></span><br />Although you could do the development work on either a Windows* or Linux*-based computer, it really makes the most sense to use a Linux system for a number of reasons. The build-test-build cycle goes more quickly when you run on the same operating system. The only exception might be when using a language like Python* that doesn't really require compilation. In addition, Linux target device emulation has the best support from the Linux operating system.<br /><br />Choosing a stable, popular distribution like Ubuntu makes it easier to get the tools you need up and running quickly. It also increases your chances of finding help for problems you might run into, as more often than not, someone else has already found a solution. Ubuntu is also one of the distributions-along with Fedora* 9-directly supported by the Moblin project. We chose Ubuntu 8.10 to use on our development system for this project.<br /><br />Consider using a fairly recent computer with hardware virtualization support as your primary machine. Some of the virtualization software packages require hardware virtualization support to work properly. Others will work without it but obviously run faster if the support is available. You should max out your memory, as well, although a 32-bit machine can't really use more than 3 GB.<br /><br /><strong>Developer Tools</strong><br /><br />Most seasoned developers have a preferred set of tools they feel most comfortable using. For many in the open source world, this toolset equates to Eclipse* and some number of add-ins. Although Eclipse was built on Java* technology and counts Java developers as its largest user base, it does support other languages quite well. Nokia* uses Eclipse as the foundation of its developer tools to deliver a high-end experience complete with emulation and target device deployment for the Nokia* N810 family of devices.<br /><br />Anjuta* is another integrated development environment (IDE) with a substantial following. Anjuta is written in the C language and uses C for its application programming interface (API) and plug-in architecture. It does provide decent support for both C++ and Python, as well. Support for other languages, including C#, is in the works. Of particular interest to UI designers is the integrated Glade* tool, with tight support for editing and creating Glade files.<br /><br />Intel has a number of open source tools available to developers serious about squeezing the most out of their applications. New power-management profiling tools make it possible for developers to determine exactly how much power individual pieces of their code consume. The <a href="http://software.intel.com/en-us/articles/application-energy-toolkit/">Application Energy Toolkit </a>evaluates applications to determine how "power aware" they are. Versions for Windows, Linux, and Mac OS* X version 10.5 Leopard are available. Specifically for mobile developers, the Intel® Mobile Platform Software Development Kit (Intel® Mobile Platform SDK) offers a number of different tools to facilitate building "mobile aware" applications.<br /><br /><strong>Emulation</strong><br /><br />One of the best ways to test your software without actually loading it onto the target device is through emulation. A number of emulation tools work only in the Linux environment. Red Flag* Software uses Xnest* in conjunction with chroot in its SDK for Midinux, which makes it possible to run in virtually the same environment you would be running on the target device. For our purposes, there's a how-to on the Red Flag site for configuring its SDK to work with Xnest.<br /><br />The Moblin project uses a similar approach with its Moblin Image Creator* (MIC) tool. This graphical user interface (GUI) application helps you create a target Moblin image for a specific platform, then test it by using Kernel-based Virtual Machine* (KVM). MIC can also build VMware* VMDK* images for use with VMware's player application, which gives you the option of running completely inside a virtual environment without making any modifications to your host machine.<br /><br /><span class="sectionHeading">Getting Started</span><br /><br />The best place to start with any project is the beginning. Developing a set of requirements that meet your goals helps determine the overall direction of the project. Even if the project is fairly simple, it always helps to write down what your application will do. For this effort, I focus on an application that will take advantage of a number of the MID features, including the GPS and Wi-Fi connectivity.<br /><br />It's a good idea to go through the process of creating the typical "hello world" application after you have your development environment configured to your liking. This might seem like a trivial exercise, but it confirms your ability to build your code then deploy it to your target platform. It might also help you think through how best to automate the process to save time in the future.<br /><br />Be sure to enable Secure Shell (SSH) on the target platform to make it possible to enter commands remotely. For the JAX10 notebook, you must type a command in a terminal window on the device to start the SSH daemon. Launching a terminal window requires you to press the Fn and P keys simultaneously (Function P), which brings up a prompt similar to this:<br /><br />
<blockquote>
<pre>[root@CompalMID~]#

To start the SSH daemon you must type:

[root@CompalMID~]# /etc/init.d/sshd start

You should see:

Starting sshd:  								[OK]
</pre>
</blockquote>
<br />When that's done, you'll be able to use an SSH client tool to connect remotely to the device. You need the IP address to connect: You can find that information with the <span style="font-family: courier new;">IFCONFIG</span> command.<br /><br /><span class="sectionHeading">Avoid Common Problems</span><br /><br />Don't get bogged down in the details too early in the process. Trying to write code to accomplish a task you don't understand well is not a good idea. Reading the documentation and studying example source code for any library or packaged code you choose to use could actually save you time in the long run. Reading through forums or old IRC logs can help answer questions and provide some insight as to how others have approached similar problems in the past.<br /><br />Don't be afraid to build small "proof of concept" applications to figure out how something works-say, how to connect to the GPS or how to properly size a button based on the display dimensions of the device. Look for other code that accomplishes the same thing. Don't be too proud to learn from someone else's work. The Python community has a large body of code to do just about anything you can think of. You can find a wealth of searchable code examples on the <a href="http://code.activestate.com/recipes/langs/python/" target="_blank">ActiveState Python Cookbook</a> site.<br /><br />Do use some type of source control system for tracking revisions and keeping your source code backed up. It's a good idea to either use a hosted service or run the main source code repository on separate machine from your development computer. Then, you'll always have a way to recover should something happen to that machine. Concurrent Versions System* (CVS) has been around forever, while Subversion* (SVN) and Git* are more recent possibilities.<br /><br /><span class="sectionHeading">Summary</span><br /><br />Building software applications for the MID platform requires a new mindset and a good set of tools to do the job right. Keep these things in mind when starting out:<br />
<ul>
<li>Choose a good IDE that you're comfortable with.</li>
<li>Use a popular Linux distribution like Ubuntu for the operating system of your development computer.</li>
<li>Don't skimp on your development hardware, and do get a machine with a recent processor and ample memory.</li>
<li>Use good software development practices, like gathering requirements and using a source code control tool.</li>
</ul>
<span class="sectionHeading">About the Author</span><br /><br />Paul Ferrill has been writing in the computer trade press for more than 20 years. He got his start writing networking reviews for PC Magazine on products like LANtastic and early versions of Novell Netware. Paul holds both BSEE and MSEE degrees and has written software for more computer platforms and architectures than he can remember.<br /><br /><span class="sectionHeading"><br />Link to Part 2 of this series</span><br /><br />Designing Code and Testing (coming soon).<br /><br /> ]]></description>
      <link>http://software.intel.com/en-us/articles/developing-for-mobile-internet-devices-part-1-tools-choices-and-development-environment-configuration</link>
      <pubDate>Tue, 05 May 2009 10:45:26 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/developing-for-mobile-internet-devices-part-1-tools-choices-and-development-environment-configuration#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/developing-for-mobile-internet-devices-part-1-tools-choices-and-development-environment-configuration</guid>
      <category>Mobility</category>
      <category>Intel® Atom™ Software Developer Community</category>
      <category>MID</category>
    </item>
    <item>
      <title>An Edge By Design for MID Applications</title>
      <description><![CDATA[ <em>Design research and design-driven best practices can help your application development get an edge.<br /><br />By Knut Graf.  Knut is a Principal Designer at <a href="http://www.frogdesign.com/" target="_blank">frog design</a>, a global innovation firm. <br /></em><br /><span class="sectionHeading">Abstract<br /></span><br />The Mobile Internet Device (MID) platform has to establish a following of users and a set of high quality applications, which presents a kind of chicken and egg challenge. The lack of a track record to refer to, along with other factors that are common to emerging platforms, makes application development on MIDs challenging. Yet, high-quality applications are critical to the platform's success. Design, as expertise and as a set of practices, can address many of the risk factors that characterize this situation.<br /><br />Design ensures that the product vision is relevant to the user by gathering knowledge about the user and the application's usage environment through informal discovery activities and through formal research. Based on the knowledge gained in this discovery phase, a crisp feature definition lays the groundwork for a great user experience, which is built out through a compelling look and feel. A prototype confirms the product vision amongst team members and guides implementation and testing, thereby reducing the need for lengthy and tedious traditional requirements documentation.<br /><br />The guidance and streamlining that design brings to an application development process allows the core development team members to devote proper amounts of attention to technical challenges and quality, greatly improving the odds that the project will be completed and successful.<br /><br /><span class="sectionHeading">Introduction</span><br /><br />The software industry has established a track record over the last few decades of slowly making its development practices more efficient and effective. Even so, software projects are still burdened with high failure risks. The quality of projects that make it to market is hard to predict. For example, in consumer-facing applications, for every well-rounded product, there is another one full of bugs and quirks. Properly introducing "design" into a software project is one way to increase its odds of success.<br /><br />Many processes and best practices address risk and quality concerns in software projects. In practice however, such practices compete with established habits and the temptation to take shortcuts.<br /><br />Design has a variety of effects. Approached naively, design can raise expectations and then confuse and complicate the actual process, inundating unprepared developers with distractions and implicit requirements. On the other hand, a proper approach to harnessing design for software development can ensure that the end product is both relevant and beautiful. Along the way, the collaborative aspects of design process can align stakeholder's expectations and even save development time by using prototypes to communicate project goals.<br /><br />Design - whether it be "Interaction Design," "User Interface Design," or "Experience Design" - is not retrofitting a screen with pretty graphics. Applying design to an existing project provides limited value. Design in software development is much more valuable when applied as a way to discover, refine, and execute proper success criteria.<br /><br /><span class="sectionHeading">Addressing the MID Form Factor</span><br /><br />The Mobile Internet Device, or MID, is a low-power mobile device with many of the capabilities of a full PC. It employs a small, high-resolution touch screen and a reduced keypad. The MID platform provides unique new usage opportunities and advantages that translate into an exciting new market opportunity. MIDs offers new capabilities in terms of computing power, display quality, touch-input quality, and connectivity, along with a high amount of energy invested in the software tools. <br /><br />The way the platform's promise translates into value to the end user is through the software running on it. Software turns abstract capabilities into user-facing features. Software applications will decide the fate of the platform: Compelling usefulness will give mobile internet devices a place in our everyday lives, bringing success to the platform. Falling short, MIDs will join our Palm* Pilots in the gadgets drawer, awaiting their fate at the next garage sale.<br /><br />The platform's promise does not guarantee success. MIDs faces some specific challenges in terms of application development - challenges that design can help address.<br /><br /><strong>Thinking Small<br /></strong><br />With or without all the power delivered by a MID, the small device form factor limits the gamut of interactions that people will want to engage in. Comparing the same task on a small device and a large device, the small device requires more dexterity and concentration from the user. Simplifying tasks for small devices means challenging the user's habits and expectations.<br /><br /><strong>Lean Teams<br /></strong><br />The limited out-of-the-gate user base constrains the economically sensible investment to be made. Development teams will be lean and schedules will be short, even as the application development community is still familiarizing itself with the MID development environment.<br /><br /><strong>Porting</strong><br /><br />Many projects are ported from existing implementations on other platforms. Considerable updates to such projects are often required to allow them to take full advantage of the specific conditions offered by MIDs.<br /><br /><strong>Device Definition</strong><br /><br />Smart phones, with ever-growing capabilities, and the booming netbook contest the space for the MID platform. Acceptance for MIDs depends on unique value which neither of these other device classes can offer.<br /><br /><span class="sectionHeading">Establishing a Target Design</span><br /><br />In software application development, challenges are not unusual. Any software development project, regardless of the platform, comes with challenges. The way to mitigate the risk associated with these challenges is to decide upon a focused, valuable target, and to stay on this target. <br /><br />At the heart of a software application is the basic idea, "does it do something useful?" For the application to be successful, the answer must be "yes." A software project starts with existing ideas for specific features, or with general goals. These existing goals are formalized, to arrive at an implementable specification. During this process of formalization, the goals are examined, refined and adjusted.<br /><br />The first step towards the feature definition is learning who the end user is, what the end user likes, and what the end user does.<br /><br />A certain amount of general knowledge about users can be derived from the MID platform goals as a whole, as well as from interpreting the usage opportunities offered by target devices appearing on the market. Beyond this common sense approach, design provides a set of tools to get a clear picture of the end user and of the opportunities for application usage afforded to the user.<br /><br /><strong>User Personas</strong><br /><br />A user persona provides a description of an imaginary, but specific person who would use the application. A user persona is meant to be realistic and robust. A user persona describes the habits, preferences and environment of the target character, to provide a framework from which the character would make judgments and decisions. The user persona is a conceptual simulator for the practical value of new features.<br /><br /><strong>Idealized Personas<br /></strong><br />The practical use of an application is not the only question to consider. An application can be an enabler to the user, providing functionality that is socially attractive and desirable, regardless of its usefulness in a traditional sense. <em>Idealized personas</em> provide a handle on defining this type of functionality. Idealized personas are traditionally used in the discipline of marketing, not in the more "down to earth" context of usability. Actual people aspire to the attributes the idealized persona embodies. The idealized persona is more sophisticated then a real person, bound by fewer constraints. Some stereotypes might be used to define this persona. The idealized persona provides a sounding board for empowering, uncommon feature possibilities.<br /><br /><strong>Scenarios</strong><br /><br />A scenario describes a situation, and a sequence of events, in which the device and the software application running on it are used. The scenario is meant to be realistic, to provide a background to judge the value of the planned application and its features. The more detailed the scenario is, the more it can serve as a source and validation point for specific ideas.<br /><br />Other, less standardized forms of documentation can be used as a basis for feature definition. The assumptions and conclusions in any feature documentation can be tested and strengthened by personas and scenarios as verification points.<br /><br />Personas and scenarios are speculative in nature: they are based on assumptions. To add a grounding in realism to these assets, we recommend that design research activities be performed. <br /><br /><strong>Mining Reality for Knowledge: Research</strong><br /><br />Design research mines real life for project-relevant information. Common methods include surveys, user interviews, and contextual inquiry, in which the researcher engages with a user one-on-one to observe activities. Ranging from simple to very involved, the value of the research results grows with the depth of user-engagement. <br /><br />Design research requires preparation time and careful analysis of data. The schedule impact must be weighed against the benefits to the project. Consider that often the benefit is a drastic reduction of risk. <br /><br />For applications that provide narrow specialized feature sets for vertical markets, the value of research is fairly obvious: it provides knowledge of the problem domain to the team. For common applications with mass-market, mainstream functionality, the value proposition is more subtle: while the team is familiar with the domain, the deeper examination can provide insights into key differentiators that escape the naked eye.<br /><br /><strong>Generating the Design<br /></strong><br />Equipped with a picture of a target user, and solid knowledge of the real-world context, designers unearth feature opportunities for the application. Some opportunities will be obvious from looking at a scenario. Interpreting research data and applying abductive reasoning to the problem space knowledge uncovers further opportunities.<br /><br />Designers define features by mapping the opportunities and constraints to an actual software structure. To arrive at valid results, design principles are applied to guide this exercise. In absence of specific native design principles for MID devices, proven design principles from other small platforms can be used.<br /><br />The actual feature definition is expressed as a vision of the resulting program, and this is done in the form of diagrams, wireframes, and visual mock-ups. Abstract features are given a concrete expression. This documentation provides a moment of truth for project stakeholders. It serves as the first concrete shared picture of "the design" and a glance at the project outcome. As the project continues, collaborative discussions will adjust this picture. <br /><br />The design addresses core features first, and then it takes on secondary features such as peripheral details. One after another, parts of the application get addressed, designed, documented, designed and adjusted.<br /><br /><span class="sectionHeading">Design Principles for Mobile Platforms<br /></span><br />For relevance to the MID form factor, Table 1 lists a set of design principles that are relevant and apply to mobile platforms.<br /><br />
<table class="tableformat1" border="0" cellspacing="0" cellpadding="10">
<tbody>
<tr>
<td valign="top">Mobile Platforms Design Principal</td>
<td valign="top">Description</td>
</tr>
<tr>
<td valign="top"><strong>Immediate Results</strong></td>
<td valign="top">Small, mobile devices offer themselves to be used spontaneously, whenever opportunity beckons. Such an opportunity for using the device, especially when occurring in a mobile situation, may not last long, as other things compete for the user's attention. To ensure a successful user experience, the application accessed by the user must waste no time in providing results. The tasks offered by the application must be straightforward, leading to immediate results. Long sessions that require continuous user attention are better suited for a full-size PC.<br /><br />The home screen application of the HP* Mini 1000 MI (Mobile Internet) Edition netbook is an example for focus on immediate results. The HP MI Edition is the Linux* version of this product. Its home screen accumulates recent e-mail, web shortcuts and thumbnails for favorite music and photos. The traditional "launch and dig" sequence to get to content is eliminated. In contrast to this approach, most other netbooks just offer collections of program icons on their home screen.</td>
</tr>
<tr>
<td valign="top"><strong>Adequate Feature Density</strong></td>
<td valign="top">Besides being short, the path to results must also be obvious. Few users will tolerate forced way-finding exercises. Given the constrained screen real-estate, this principle is applied by carefully designing decision trees to present clear decision points, and by limiting the amount of inputs asked of the user. Full-size PC applications have more leeway for less-clear structure. Feature density is an important consideration especially when porting existing full-size applications to a MID.</td>
</tr>
<tr>
<td valign="top"><strong>Adequate Information Density</strong></td>
<td valign="top">While the small, high-resolution screen is a brilliant display, it is still, and foremost, simply small. The number of concurrently displayed content items should be more limited, to avoid intolerably microscopic text and graphics</td>
</tr>
<tr>
<td valign="top"><strong>Flow</strong></td>
<td valign="top">Since not every interaction can be reduced to a few buttons on a few screens, the user will inevitably spend time completing non-trivial tasks. Those tasks may be necessary sequences, such as forms that must be filled, or voluntary sequences, such as meandering through a media library. In either case, the immersion that is achieved by presenting a steady stream of simple choices, creates a level of comfort. The immersion must not be interrupted trivially by modal alerts or dead-end flows. This is a general design principle, but on a small form factor platform, the temptation to present such interruptions is higher then on full-size PC applications, because fewer opportunities are available to communicate secondary information in more subtle ways.</td>
</tr>
<tr>
<td valign="top"><strong>Interruptability</strong></td>
<td valign="top">It is a common full-size PC experience ritual to launch an application, and then to open a document, or to perform some other initiation procedure, before getting to the actual task at hand, and to save and quit the application when done. On a MID device, where application state management is not on the user's mind, and usage session durations are short, this ritual gets in the way. Dealing with any sort of sequential task becomes more feasible, even attractive, once it is possible to effortlessly "Pick up where you left off".</td>
</tr>
<tr>
<td valign="top"><strong>Progressive Disclosure</strong></td>
<td valign="top">Progressive disclosure, the hiding of secondary information on secondary screens, is a well-known, valuable design principle. Applied to a MID, it can be read slightly differently: high density of information, as encountered in an existing PC application, can be preserved, behind lower-density summary screens, when the application is ported to a MID. Such summary screens, presented as the initial entry points of an application, provide the right small-device scale and satisfy many scenarios. More traditional, higher-density screens underneath, can provide unexpected horsepower for full-featured PC functionality. Handled with care, progressive disclosure is a valuable principle for porting existing applications to MIDs.</td>
</tr>
</tbody>
</table>
<br /><strong>Table1: Design Principals for Mobile Platforms</strong><br /><br /><span class="sectionHeading">Look and Feel<br /></span><br />Expressing features as parts of a software application is not a mechanical procedure. It’s a subjective process, in which the designer makes personal decisions. As a result, the application gains a unique personality. This personality is expressed in the “look and feel,” which has a great impact on shaping the user experience. The user experience — literally the string of moments the user lives through while interacting with the product — determines the user's memory and judgment about the device.<br /><br />Look and feel ensures usability through design patterns that string user-facing objects together in ways that make sense. These patterns are reused across the application, providing comfort and predictability.<br /><br />Look and feel is concerned with the details of the experience: the central moments when the user pays detailed attention, and those less important moments that lie in between and help string the important ones together. All these moments benefit from the beauty of well-executed emphasis and guidance, through visual means like composition, contrasts and harmonies on a pixel level.<br /><br />The user’s experience of an application is shaped over time, as the application changes state during use, bringing up one screen after another, or updating the content that is shown on the screen. This temporal aspect of the experience is part of look and feel too. It can be shaped to provide a good flow, actively help the user with tracking the application’s state, through meaningful transitions.<br /><br />Iconic examples of strong, experience-shaping look and feel are the “Fluent” interface of Microsoft* Office 2007, or the category-defining appearance of the Adobe* Lightroom application. Such strong statements can be controversial at first, as they force users to jettison old habits. But they usually establish a following and invite imitations.<br /><br /><strong>Implementation Complexity as a Concern<br /></strong><br />While working on the ‘look and feel’, the designer must be aware of the implementation platform, and its constraints and opportunities as they relate to the user interface. For MIDs, Hildon* is the primary choice platform, and it has some very specific characteristics. It cannot be emphasized enough that the design must be implementable on the given platform, by the developers tasked with the job, in the timeframe available.<br /><br />To avoid surprises, it is essential that the actual development team members who are responsible for the UI execution provide their perspective to the designer during the look and feel work. A professional designer is prepared to listen.<br />With a design team on board, there usually is a temptation to go for a totally custom UI, to maximize usability, beauty, flow, and branding. These are noble intentions, but must be checked against the realities of schedule- and resource constraints. A simpler look and feel that is actually executable might be a better way to go. After all, the measure of success is the real product that makes it to market.<br /><br />To ensure that the project is on track, the design must be truly understood by all stakeholders. A particular asset can communicate the design much better then any combination of diagrams, wireframes and specification documents: the prototype.<br /><br /><span class="sectionHeading">Expressing Living Features: A Prototype</span><br /><br />As the regular implementation preparation proceeds, a design team can provide a valuable contribution typical project constituents can’t — a prototype. A developer, sometimes called a design technologist, puts the prototype together. This prototype shows core moments and aspects of the application. The ideas shown are those of the project team as a whole, as captured from the stakeholders. The design team shapes these ideas, infusing them with a user-facing structure that eventually evolves into a coherent look and feel. The main value of a prototype is its ability to play out concurrent changes from multiple separate angles of the project. Valuable time can be saved this way, and the project team can cover a lot of ground in the process. <br /><br />The prototype is an antidote to analysis paralysis. Application structure, functionality, and look and feel come together as a unit and are refined together. The in-progress result is visible to the entire team, serving as a validation point. The aspect of validation can be taken further, by presenting the prototype to users, who provide both usability feedback and emotional responses, without the need for preparation of additional test assets.<br /><br />The prototype neither has to be perfect nor complete, as long as it provides meaningful insights. Bugs and dead ends are allowed and expected, so the developer can focus on relevant details.<br /><br />As the prototype is built out, it takes on the role of a living specification, replacing much of the traditional specification documentation that otherwise must be written and maintained. Traditional specifications still play a supporting role, filling in detail for areas that the prototype doesn’t cover. The application developers refer directly to the prototype as a reference for the implementation. The QA team can do the same, informing a traditional QA process by referencing the prototype, bringing efficiencies to the testing process.<br /><br /><span class="sectionHeading">To Do This, Do You Need a Designer?<br /></span><br />The answer to the above question is, “it depends.” Do you have enough knowledge of your problem space to perform a well-grounded feature definition? Do you have the time to take care of the details for a good follow-through? Will your stakeholders take care of this for you?<br /><br /><strong>Common Sense…</strong><br /><br />It is evident that not every good piece of software is produced with the involvement of a dedicated designer or design team. Much useful work, in terms of crisp feature definition and high execution quality, can be done by “simply” assuming a design perspective.<br /><br />This reliance on common sense thrives when a self-motivated developer is driving the work and making her own decisions, within a manageable scope of work. But the efficiency of this approach does drop off, experience suggests, as the complexity of the challenge grows and more stakeholders come to the table. This is not at all a matter of malevolence by any stakeholder: all parties do want the best outcome. It is more a matter of entropy: as more perspectives and opinions come into play, more forces are at work. In such a situation, any perspective that is not formally represented will not be heard. Ask yourself: who is representing the end user?<br /><br /><strong>…And Addressing Complexity</strong><br /><br />As project size increases, the complexity of the design-addressable challenges also grows, quickly reaching a point where common sense falls short. Here, the benefits of a professional perspective become obvious. Just as the development team should not be handling accounting on the side, it is not in a position to be handling design. The design team’s role is not meant to weaken other project contributors design ideas. On the contrary, the design team synthesizes everyone’s contributions, amplifying the good ones. This synthesis is essential when many different perspectives need to be heard. On large projects without formal design participation, design will go wrong.<br /><br />Engaging a design team can bring otherwise unattainable results to a software project: a unique execution, with an outstanding look and feel. This can turn out to be the single, critical differentiator in the marketplace. <br /><br /><span class="sectionHeading">Change the Odds</span><br /><br />Full-size desktops and laptops have long given up their position as the only form factors for personal computing. After small form factors had been pioneered by the PDA, the mobile phone matured to provide ad-hoc information access and media consumption. The laptop as sole choice for mobile content creation and productivity has made room for the netbook, its smaller, less powerful sibling. Each of these form factors thrives on useful, attractive software. That’s evident when you consider the variety of software being used on near-identical hardware. <br /><br />The MID form factor is in a position to be the next step in this march of personal computing to ubiquity. New form factors start as an underdog. To fuel their possible success, great applications first have to be created, under developmental conditions that are more challenging than those on established platforms. As the software industry comes to terms with the platform, design can make a contribution to the quality of individual software experience offerings, which is what counts most at the current moment in the lifecycle of the platform.<br /><br /><span class="sectionHeading">About the Author</span><br /><br />Knut Graf is a Principal Designer at <a href="http://www.frogdesign.com/" target="_blank">frog design</a>, a global innovation firm. Frog Design* works with the world’s leading companies, helping them create and bring to market meaningful products, services, and experiences. Knut joined frog in 1997 and has since served as Developer, as Content Architect and as Senior Design Analyst before assuming the role of Principal Designer. Knut has worked with clients such as SAP*, Microsoft*, and HP*. His recent work includes contributing to the well-received HP Mini 1000 MI edition user interface as a design lead on the project.<br /><br />Knut's work focuses on software user interfaces, from idea development to implementation. He guides software designs through the time- and resource constraints that real-world software projects bring, ensuring that the user experience of the end product is of the highest quality possible.<br /><br />In his work, Knut brings a programmer’s view of software development to a German design education background, to create innovative solutions that empower both the end user and the development team that has to meet shipping deadlines. In Knut’s opinion, design work must be judged by the quality of the end product. It is the actual result that matters, not the unrealized potential. ]]></description>
      <link>http://software.intel.com/en-us/articles/an-edge-by-design-for-mid-applications</link>
      <pubDate>Thu, 30 Apr 2009 17:16:02 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/an-edge-by-design-for-mid-applications#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/an-edge-by-design-for-mid-applications</guid>
      <category>Mobility</category>
      <category>Intel® Atom™ Software Developer Community</category>
      <category>MID</category>
    </item>
    <item>
      <title>Power Efficiency – Analysis and SW Development Recommendations for Intel® Atom™ based MID platforms 2</title>
      <description><![CDATA[ This is part 2 of an article - You can <a href="http://software.intel.com/en-us/articles/power-efficiency-analysis-and-sw-development-recommendations-for-intel-atom-based-mid-platforms/">read part 1 here</a>.<br /><br />Explore power characteristics of the Intel® Atom™ platform geared for the MID (Mobile Internet Device) category of devices. Providing recommendations for SW developers on how to best optimize applications for power efficiency for this new line of Intel processors/platforms. Some topics also apply to Intel® Atom™ processor based NetBooks.<br /><br />
<p class="sectionHeading">Workloads</p>
The following MID workload categories were analyzed:<br /> 
<ul>
<li>Idle behaviour in typical system idle states</li>
<li>Video playback using Moblin Media Player &amp; Helix framework</li>
<li>Multi-threaded Video decode, audio transcode and Flash workloads used for HT impact analysis</li>
<li>Browsing using Moblin Browser</li>
</ul>
<br />All workload measurements are performed in steady state unless otherwise noted. Linux* kernel version 2.6.22 was used.<br /><br /><strong>5.1. Idle modes</strong><br />Power data was captured for different processor configurations (modified via BIOS):   
<ul>
<li>HT on/off</li>
<li>C6 on/off</li>
</ul>
The following idle modes were analyzed:<br /> 
<ul>
<li>Home Screen - HTML </li>
<li>Home Screen - HTML - Screen off</li>
<li>Home Screen - Clutter (OpenGL)</li>
<li>Home Screen - Flash (UI created in Flash, embedded in HTML)</li>
<li>XTerm</li>
<li>Moblin Browser with default home page loaded</li>
</ul>
Note: As the Flash Home Screen feature was broken, no Flash application icons were visible just a Flash shell. This was considered an acceptable approximation. After launch, a regular terminal shell was invoked (ctrl-alt-F1), the "on-demand" governor activated and measurements were made.<br /><br />Observe that this is by no means an exhaustive list. Additional measurements are needed to provide a more complete overview of possible application/launcher user interfaces.<br /><br /><em>Note: As the Flash Home Screen feature was broken, no Flash application icons were visible just a Flash shell. This was considered an acceptable approximation. After launch, a regular terminal shell was invoked (ctrl-alt-F1), the "on-demand" governor activated and measurements were made.<br /><br />Observe that this is by no means an exhaustive list. Additional measurements are needed to provide a more complete overview of possible application/launcher user interfaces.</em><br /><br /><strong>5.1.1. Processor sleep state behaviour</strong><br /><br />The following NetDAQ data was captured with HT turned on. C6 or C4 (C6 off) was configured as the lowest possible processor sleep state.<br /><br />Below data was captured for when in idle on HTML Home Screen.<br /><br /> 
<table class="tableformat1" border="0" cellspacing="0" cellpadding="5">
<tbody>
<tr>
<td>C-State Configuration</td>
<td>Average CPU Idle Power</td>
</tr>
<tr>
<td>C6 off</td>
<td>~160mW</td>
</tr>
<tr>
<td>C6 on</td>
<td>~80mW</td>
</tr>
</tbody>
</table>
<br />Note the ~80mW difference in average power for C6 on vs. off. It is clear that the C6 state has an important positive impact on average power when processor is experiencing low load or is mostly in idle. In essence the new C6 deep sleep state significantly reduces average Intel Atom™ processor power in idle.<br /><br />Refer to chapter 6: "Appendix A" for details on Intel Atom™ sleep states and their characteristics.<br /><br /><strong>5.1.2. Processor &amp; Chipset power usage in Idle modes</strong><br /><br />The following NetDAQ data was captured with C6 and HT turned on. Idle power behaviour for the different Home Screens (application launchers) was compared to the Browser and Xterm in idle.<br /><br />The Home Screens tested represent various UI technologies used for displaying application icons and launching applications. The UI technologies tested was HTML, OpenGL (Clutter) and Flash<sup>1</sup>.<br /><br /><img src="http://software.intel.com/file/15735" alt="" /><br /><br />The above graph illustrates the normalized power behaviour for the 6 targeted idle workloads.<br /><br />Contrary to what might be expected the Clutter home screen (OpenGL) does not lead to increased chipset average idle power. The HTML and OpenGL UI home screen solutions used are quite power friendly.<br /><br />Automatically turning the screen off after an interval of no user input lowers chipset average power significantly (~13.5% below HTML idle). More importantly, powering off the screen also saves LCD power.<br /><br />Moblin browser in idle mode on the default home page consumes a slightly higher average power for processor/chipset (~3.5 % above HTML idle). Observe that the default page did not have any advanced content such as Flash* or Ajax*, etc.<br /><br />When idle on Flash home screen a completely different pattern is revealed. Due to the high number of interrupts, 250 wakeups/s (captured by PowerTOP, see below), the benefit of C6 sleep state is not fully utilized (even though the processor sometimes moves into C6). This is apparent from the much higher average power usage for processor and chipset (33% above HTML idle). <br /><br />An alternative view of the power behaviour is available from the data captured by PowerTOP. Wakeup/s and deeper C state residency is captured in the graphs below.<br /><br /><img src="http://software.intel.com/file/15736" alt="" /><br /><br />From the above data it is easy to see the impact of a high number of wakeup/s on processor deep sleep state residency. For instance, the Flash home screen wakes up the processor ~250 times/s resulting in ~60% of the time spent in C4-C6, while the HTML home screen wakes up the processor 35 times/s resulting in ~98% of the time spent in C4-C6 resulting in significant power improvements.<br /><br />Recent measurement using latest versions of Flash 9 and 10 reveals an improved Flash wakeup pattern resulting in improved power characteristics. Still, even during playback of the simplest Flash content with a frame rate of 1 fps, the wakeups per second in idle does not move below ~100 wakeups/s.<br /><br />For all workloads, the processor spent &gt; 95% in the lowest frequency mode (LFM, 800MHz) execution state (P-state). <br /><br /><strong>5.2. Video playback</strong><br /><br />Power measurements were captured while Moblin Media player (utilizing the Helix framework) played back video of the following formats:<br /><br /> 
<table class="tableformat1" border="0" cellspacing="0" cellpadding="5">
<tbody>
<tr>
<td>Video standard</td>
<td>Fps</td>
<td>Rate (kbps)</td>
<td>Resolution(WxH)</td>
</tr>
<tr>
<td>CIF</td>
<td>30</td>
<td>510</td>
<td>352x288</td>
</tr>
<tr>
<td>480p</td>
<td>30</td>
<td>1480</td>
<td>720x480</td>
</tr>
<tr>
<td>720p</td>
<td>30</td>
<td>4400</td>
<td>1280x720</td>
</tr>
<tr>
<td>1080p</td>
<td>30</td>
<td>9800</td>
<td>1920x1080</td>
</tr>
</tbody>
</table>
<br />The media was encoded with H.264 for the video stream and AAC for the audio stream. Furthermore media playback with and without Helix HW acceleration was measured.<br /><br />Observe that 1080p is only supported for some of the Intel Atom™ SKUs.<br /><br />Note that other media frameworks such as GStreamer* also feature HW acceleration of video for the Intel® Atom™ platform.<br /><br />NetDAQ data was captured with C6 turned on and HT was toggled on/off depending on the target measurement.<br /><br /><strong>5.2.1. SW codecs vs. HW accelerated codecs</strong><br /><br />The normalized graphs below compare average normalized power and C0 state residency during SW codec media playback.<br /><br /><img src="http://software.intel.com/file/15737" alt="" /><br /><br />Decoding 480p (~3.5x more data than CIF handled) results in almost 2x in average processor power compared to CIF. Note that in using SW codecs, the processor is heavily utilized even for low resolution playback, as can be seen from the C0 residency graph.<br /><br />There is clearly a need for HW acceleration to allow playback of higher resolution video workloads. The following graph compares average normalized power and C0 state residency during playback with SW codecs vs. playback using HW accelerated codecs.<br /><br /><img src="http://software.intel.com/file/15738" alt="" /><br /><br />From the above graphs it is clear that HW accelerated codecs have great benefits with regards to average power during high definition video playback. The required processor power scales gracefully for increased video resolutions. For instance, using HW acceleration, the platform is able to process 20x more data playing back 1080p vs. CIF with only a minor increase (~25%) in processor power. The average chipset power using HW acceleration also scales well, as will be illustrated below.<br /><br />With regards to C0 state residency the processor for high resolution playback using HW acceleration, the processor shows moderate utilization.<br /><br /><strong><em>Note: The release of the Helix framework used was not optimized for the MID platform and some kernel bottlenecks were identified. These issues have been addressed in more recent Moblin releases leading to much fewer wakeups (reaping the benefits of C6 sleep state) and much improved C0 state residency all leading to lower average power footprint for HW accelerated video playback.</em></strong><br /><br />Note that using SW codecs, media with resolution greater than 480p cannot be played back due to performance limitations.<br /><br />For all HW accelerated workloads the processor spent &gt; 90% in the lowest frequency mode (LFM, 800MHz) P-state. Using SW codecs, the P-state residency indicates very high processor load. For instance, during 480p playback the processor spent just 3% in LFM.<br /><br />The normalized graph below compares average chipset for HW accelerated codec media playback vs. SW codec media playback.<br /><br /><img src="http://software.intel.com/file/15739" alt="" /><br /><br />From the graph is clear that not only does HW acceleration enable playback of 1080p, it also improves the average chipset power. As can be seen in the graph the chipset average power used scales gracefully for higher resolution content. Also note that playing back 1080p using HW acceleration requires about the same average chipset power as playing back CIF content using SW codecs.<br /><br />Data collected with PowerTOP indicates that the processor wakes up 300-600 times/s during video content playback, depending on the media format. The processor therefore has very limited benefits of the C6 sleep state.<br /><br /><strong>5.2.2. Memory load impact on power</strong><br /><br />Another important aspect of media playback is how frequent data is read/written to memory. Large volumes of data transferred to/from memory results in increased average system power. The normalized graph below illustrates the increased playback power use for various definitions of video content.<br /><br /><img src="http://software.intel.com/file/15740" alt="" /><br /><br />Platform memory subsystem uses on average 2.5x more power for 1080p playback vs. CIF playback.<br /><br />The RAM is exercised approximately to the same degree for both HW accelerated playback and playback using SW codecs.<br /><br />Note that several memory access improvements have been introduced to the framework and recent Linux kernels such as 2.6.28 have lead to improved average RAM power.<br /><br /><strong>5.3. Benefits of HT on threaded workloads</strong><br /><br />Below processor data was captured with HT turned on/off while running various multi-threaded SW video decode and audio transcode workloads. Observe that HW acceleration was not used for the following workloads.<br /><br />The following three graphs show typical relative processor performance, power and energy for the workloads with HT turned on/off. Analysis included a range of video workloads with various resolutions, one audio workload (transcoding "wav" to "mp3") and four Flash animation (no Flash video) workloads. The workloads tested were all multithreaded to take advantage of multithreaded processor architectures.<br /><br />Decoding was performed at highest possible rate (disregarding specified media rate) completing workload as fast as possible. When HT was turned on this generally resulted in higher power during workload execution, faster completion and thereby overall energy savings.<br /><br /><img src="http://software.intel.com/file/15741" alt="" /><br /><br />The graph clearly shows the performance benefit of the HT feature. Over the measured workloads we see a 32% geomean performance gain. The gain in performance naturally comes at an expense of average power. The graph below details the relative power overhead when HT is turned on/off.<br /><br /><img src="http://software.intel.com/file/15742" alt="" /><br /><br />From the measured data we see a geomean power overhead of 15%. Due to the increased performance the workloads generally completed faster which has an impact on the energy used by the processor. Below graph details the calculated processor energy benefits of the HT feature. <br /><br /><img src="http://software.intel.com/file/15743" alt="" /><br /><br />From the above graph we see 14% energy savings for the measured workloads.<br /><br />The benefits of increased performance can also be seen for workloads such as Flash video playback. Contrary to former workloads the following workloads do not complete faster with HT turned on. Instead the increased performance gained by HT enabled translates into an increased frame rate (Note that Flash will play back the media at highest possible frame rate, up to the specified media frame rate). <br /><br />The below graph shows measured frame rate for three different Flash video workloads with HT turned on/off.<br /><br /><img src="http://software.intel.com/file/15744" alt="" /><br /><br />From the above graph we measured a geomean frame rate gain of 14%. Besides the frame rate gains the use of HT also improves average power as the below graph illustrates.<br /><br /><img src="http://software.intel.com/file/15745" alt="" /><br /><br />From the measured data we found a geomean power saving of 19%, mainly due to extended time spent in lower P-state.<br /><br />The reason for the decreased power, for Flash video, with HT enabled is due to the increased ability to move to lower P-states. Note that this behaviour is dependent on power management policy and workload.<br /><br />In summary, for the workloads tested, the overall performance gain with HT activated compared to HT disabled was ~32% (ranging from 4-76%) while the overall power overhead with HT activated compared to HT disabled was ~15% (ranging from 5-26%). Due to the increased performance, with HT activated, the workload completion time was shortened leading to a net energy savings of ~14% (ranging from 0-28%). Flash video workloads showcase a frame rate gain of 14% and power savings of 19%.<br /><br /><strong>5.4. Browsing</strong><br /><br />The following NetDAQ data was captured with both C6 and HT enabled.<br /><br />Moblin browser, based on Firefox 3, was used. A very simple Flash content (swf) media file was opened up in browser. Flash content, displaying small flashing text was measured in "idle". The processor and chipset power was measured and compared to Browser idle power behaviour.<br /><br /><img src="http://software.intel.com/file/15746" alt="" /><br /><br />From the above normalized graph it is clear that even for the simplest Flash content the processor is very active. Additional data captured with PowerTOP reveals that the processor wakes up ~340 times/s compared to ~75 times/s when the Browser is in idle on default home page. <br /><br />If Flash content is heavily used during browsing, frequent processor activity will cause a significant decrease in the amount of time available on one battery charge.<br /><br /><em>As future editions of the Flash engine evolve make sure to utilize the latest Flash release as future releases does feature improved power efficiency.</em><br /><br />
<p class="sectionHeading">Appendix A - Atom™ processor specifications</p>
Details on available Intel® Atom™ processor SKUs including data on clock speed, TDP, idle power, FSB, sleep state details and more can be found on the Intel® Atom™ Processor Technology resource site. <a href="http://www.intel.com/products/atom/index.htm">http://www.intel.com/products/atom/index.htm</a><br /><br />
<p class="sectionHeading">Appendix B - HW setup and NetDAQ power measurement setup</p>
<strong>System setup overview</strong><br /><br /><img src="http://software.intel.com/file/15747" alt="" /><br /><br /><strong>Platform specification and configuration</strong><br /><br /> 
<table class="tableformat1" border="0" cellspacing="0" cellpadding="5">
<tbody>
<tr>
<td>Intel® Atom™ processor</td>
<td>B1</td>
</tr>
<tr>
<td>Intel® Poulsbo chipset (SCH)</td>
<td>C0</td>
</tr>
<tr>
<td>FSB implementation</td>
<td>CMOS type</td>
</tr>
<tr>
<td>RAM</td>
<td>1 Gb</td>
</tr>
<tr>
<td>LFM</td>
<td>800</td>
</tr>
<tr>
<td>HFM</td>
<td>1600</td>
</tr>
<tr>
<td>BIOS revision</td>
<td>70</td>
</tr>
<tr>
<td>PSB drivers</td>
<td></td>
</tr>
<tr>
<td>Drivers</td>
<td>0.9</td>
</tr>
<tr>
<td>Video</td>
<td>0.15</td>
</tr>
<tr>
<td>Xpsb</td>
<td>0.7</td>
</tr>
<tr>
<td>Helix codecs</td>
<td>0.262 beta 3</td>
</tr>
<tr>
<td>Resolution</td>
<td>1024x600</td>
</tr>
<tr>
<td>Screen brightness</td>
<td>Default</td>
</tr>
<tr>
<td>processor frequency governor</td>
<td>On-demand</td>
</tr>
</tbody>
</table>
<br />The SDP processor used is considered equivalent to the <strong>Intel® Atom™ Z530</strong> SKU.<br /><br /><strong>NetDAQ configuration</strong><br /><br /> 
<table class="tableformat1" border="0" cellspacing="0" cellpadding="5">
<tbody>
<tr>
<td>Sample interval</td>
<td>0.05s (20 times/s)</td>
</tr>
<tr>
<td>Measurement modules</td>
<td>4</td>
</tr>
<tr>
<td>Measurement points</td>
<td>36</td>
</tr>
<tr>
<td>Key power measurement objects</td>
<td></td>
</tr>
<tr>
<td>Total processor</td>
<td>VCC, VCC_CORE, VTT_processor</td>
</tr>
<tr>
<td>Total SCH (main)</td>
<td>VTT_SCH, SCH_VCORE, SCH(2), SCH_SUS, SM_SCH</td>
</tr>
<tr>
<td>RAM</td>
<td>DIMM</td>
</tr>
<tr>
<td>Total (main)</td>
<td>Total processor + Total SCH (main) + RAM</td>
</tr>
<tr>
<td>Other SCH</td>
<td>PCIE, DVLDS, SDVO, DPLLA, DPLLB, PCIEPLL, HPLL, AUSBPLL</td>
</tr>
<tr>
<td>Other board</td>
<td>MINIPCIE, DDR2, PWH, CH, KBC, PATA, USB, IMVP, processor_PHASE</td>
</tr>
<tr>
<td>Total</td>
<td>Total (main) + Other SCG + Other board</td>
</tr>
</tbody>
</table>
<br />Instrumented SDP was connected to NetDAQ for measurements via the 4 modules connected to the sense resistors on board. The NetDAQ was in its turn connected via Ethernet loopback cable to host PC where the measurements were collected. The SDP was additionally connected to external LCD kit via USB and to keyboard via PS/2.<br /><br />Fluke NetDAQ collects measured current and voltage from the board sense resistors and transfers the data to the NetDAQ SW tool on the host machine which calculates, adjusts for board specific offsets and accumulates power data according to the power measurement objects listed above.<br /><br />
<p class="sectionHeading">Acronyms</p>
<table class="tableformat1" border="0" cellspacing="0" cellpadding="5">
<tbody>
<tr>
<td><strong>CIF</strong></td>
<td>Common Intermediate Format. Video media format of resolution 352x288</td>
</tr>
<tr>
<td><strong>C-state</strong></td>
<td>Processor Sleep state. C1 - C6 sleep states are available on Intel® Atom™. (Observe that C0 should be considered running state)</td>
</tr>
<tr>
<td><strong>FSB</strong></td>
<td>Front Side Bus. Interface between processor and SCH</td>
</tr>
<tr>
<td><strong>HDD</strong></td>
<td>Hard Disk Drive</td>
</tr>
<tr>
<td><strong>Helix</strong></td>
<td>Multimedia framework used as part of Moblin stack. https://helixcommunity.org/ https://rp4mid.helixcommunity.org/</td>
</tr>
<tr>
<td><strong>HFM</strong></td>
<td>Highest Frequency Mode</td>
</tr>
<tr>
<td><strong>HTT</strong></td>
<td>Hyper Threading Technology. Also Simultaneous Multi-Threading (SMT)</td>
</tr>
<tr>
<td><strong>LFM</strong></td>
<td>Lowest Frequency Mode</td>
</tr>
<tr>
<td><strong>MID</strong></td>
<td>Mobile Internet Device. Category of mobile devices based on the Intel® Atom™ processor.</td>
</tr>
<tr>
<td><strong>Moblin</strong></td>
<td>Open Source community for sharing and creating Linux reference stack for MID. http://moblin.org/</td>
</tr>
<tr>
<td><strong>NetDAQ</strong></td>
<td>Networked Data Acquisition Unit. HW from Fluke used to measure discrete component data such as Voltage and Current. http://us.fluke.com/usen/products/NetDAQ.htm?catalog_name=FlukeUnitedStates</td>
</tr>
<tr>
<td><strong>OpenGL</strong></td>
<td>Open Graphics Library. Used by the Clutter reference UI.</td>
</tr>
<tr>
<td><strong>PATA</strong></td>
<td>Parallel ATA (Advanced Technology Attachment). Interface for connecting storage devices such as HD or CD/DVD</td>
</tr>
<tr>
<td><strong>PowerTOP</strong></td>
<td>Measures system/application use of various hardware power-saving features. http://www.lesswatts.org/projects/powertop/</td>
</tr>
<tr>
<td><strong>PSB</strong></td>
<td>Intel® Atom™ MID chipset (also SCH)</td>
</tr>
<tr>
<td><strong>P-state</strong></td>
<td>Processor Execution state. LFM -&gt; HFM</td>
</tr>
<tr>
<td><strong>SCH</strong></td>
<td>System Controller Hub, aka. Poulsbo.</td>
</tr>
<tr>
<td><strong>SDP</strong></td>
<td>Software Development Platform. For the targeted platform also named Crown Beach.</td>
</tr>
<tr>
<td><strong>SIMD</strong></td>
<td>Single Instruction Multiple Data allowing data level parallelism</td>
</tr>
<tr>
<td><strong>SSE</strong></td>
<td>Streaming SIMD Extensions. Extended instruction set</td>
</tr>
<tr>
<td><strong>SMT</strong></td>
<td>Simultaneous Multi-Threading. Also. Hyper Threading Technology (HTT)</td>
</tr>
<tr>
<td><strong>SSD</strong></td>
<td>Solid State Disk</td>
</tr>
<tr>
<td><strong>TDP</strong></td>
<td>Thermal Design Power. Represents the maximum amount of power the thermal solution is required to dissipate</td>
</tr>
<tr>
<td><strong>Workload</strong></td>
<td>Isolated execution object with well defined behavior</td>
</tr>
</tbody>
</table> ]]></description>
      <link>http://software.intel.com/en-us/articles/power-efficiency-analysis-and-sw-development-recommendations-for-intel-atom-based-mid-platforms-2</link>
      <pubDate>Tue, 21 Apr 2009 09:39:36 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/power-efficiency-analysis-and-sw-development-recommendations-for-intel-atom-based-mid-platforms-2#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/power-efficiency-analysis-and-sw-development-recommendations-for-intel-atom-based-mid-platforms-2</guid>
      <category>Mobility</category>
      <category>Intel® Atom™ Software Developer Community</category>
    </item>
    <item>
      <title>Power Efficiency – Analysis and SW Development Recommendations for Intel® Atom™ based MID platforms</title>
      <description><![CDATA[ <p class="sectionHeading">Download PDF</p>
<p><a href="http://software.intel.com/file/15306"><br />Power Efficiency – Analysis and SW Development Recommendations for Intel® Atom™ processor based MID platforms</a> [PDF | 2MB ]</p>
<p class="sectionHeading">Background</p>
<p>The objective of this paper is to investigate Intel® Atom™ processor based MID (Mobile Internet Device) platform power (including chipset components) characteristics for typical workloads, such as media playback, browsing, idle, etc. The results are aimed at providing recommendations for SW developers on how to best optimize applications for power efficiency.<br />The platform power characteristics were captured using two methods:</p>
<ul>
<li>Instrumented Crown Beach/Menlow Software Development Platform (SDP) (including Intel® Atom™ processor and chipset) enabling discrete component power measurements using Fluke NetDAQ* equipment</li>
<li>Linux* tool, <a href="http://www.lesswatts.org/projects/powertop/">PowerTOP*</a>, to extract information on processor C-state (sleep) residency, P-state (execution) residency and wakeup characteristics.</li>
</ul>
<p>The Intel® Atom™ processor provides low power features such as:</p>
<ul>
<li>New core x86 micro-architecture    
<ul>
<li>In-order execution</li>
<li>Multithreading support. Hyper Threading Technology (HT) aka. Simultaneous Multi-Threading (SMT). <em>Not available for all Atom SKUs.</em></li>
<li>Enhanced macro-op execution</li>
</ul>
</li>
<li>45nm technology</li>
<li>Enhanced Intel® SpeedStep® Technology </li>
<li>Up to SSSE3 instruction set support</li>
<li>Deep Power-Down Technology - C6 processor sleep state</li>
<li>Dynamic cache sizing</li>
<li>Enhanced dynamic clock gating</li>
<li>Enhanced L2 data pre-fetcher</li>
</ul>
<p>The chipset provides features such as:</p>
<ul>
<li>Graphics HW acceleration (including video acceleration used by media player)</li>
<li>Intel® Display Power Saving Technology</li>
<li>Intel® Rapid Memory Power Management</li>
</ul>
<p>The OS/SW stack used for this investigation is <a href="http://moblin.org/" target="_top">Moblin* Linux</a> with the <a href="https://helixcommunity.org/" target="_top">Helix* media framework</a> using HW accelerated video codecs. Other OS or SW stacks such as RedFlag*, MIDinux*, or Microsoft Windows* Vista are out of scope for this investigation.</p>
<p>The "Recommendations" chapter summarizes the findings from the analysis and provides guidelines on how to develop power efficient SW on the MID platform. The following chapters are divided into "Technical Background", which describes some key technical concepts, "Measurement procedure", which outlines the methods used to capture the data presented in this paper and "Workloads", which breaks down results for each of the workloads analyzed.</p>
<p><em>To read the rest of the article, please download the PDF below.</em></p>
<p class="sectionHeading">Recommendations</p>
From the Intel Atom™ processor platform power data analyzed in the following chapters a number of recommendations were assembled on how to design SW for power efficiency on the MID platform.<br /><br />In essence the goal is to maintain the performance while improving application power efficiency leading to extended device use time between charges.<br /><br /><strong>2.1. Reduce application demands for processor wakeups</strong><br /><br />By minimizing the frequency (or coalescing) of wakeups, the processor is able to move to, and reside longer in, deeper sleep states such as C6, allowing lower average processor power. Using C6 deep sleep state the processor is able to operate at an average power of 80mW when idle.<br /><br />Optimally, a power efficient application in idle shall showcase the same (or minimal difference) processor wakeups per second as when system is in idle (application not running). A basic approach to measure the above is measuring "power at the wall" or verifying application wakeup behavior using PowerTOP. PowerTOP provides a very good method for measuring the C/P state residency of the system and for finding main sources of wakeups.<br /><br />Refer to chapter 5.1.1: Processor sleep behaviour" and "5.2: Video playback" for details.<br /><br /><strong>2.2. Utilize an energy-efficient UI and framework technology</strong><br /><br />It is important to be aware of the UI power implications regardless if your application is native or if it runs on-top of a runtime environment or framework. If possible, when developing the application try to select a UI, runtime and framework that are energy efficient. For instance, an application based on Flash will be less power friendly due to the high number of wake ups in idle and the runtime overhead.<br /><br />Although somewhat OEM specific, if possible, utilize a home screen solution (application launcher) with low average idle power footprint such as an HTML or OpenGL based solution.<br /><br />Refer to chapter "5.1.2: Processor &amp; Chipset power usage in Idle modes" for details.<br /><br /><strong>2.3. Thread applications well, even for single core processors</strong><br /><br />When HT is enabled it will allow an additional thread to execute per processor core in case the first thread is stalled. This will in many cases improve performance for well threaded workloads. Additionally, threaded video workloads often experience increased frame rate, due to the increased performance.<br /><br />The use of HT for threaded workloads increases average power but due to improved performance workloads will complete faster, resulting in lower net energy compared to executing the workload with HT disabled. In essence, if an application exploits multi threading well, energy can be decreased significantly, improving battery life.<br /><br />Observe that some of the Intel® Atom™ processor SKUs do not feature HT.<br /><br />Refer to chapter "5.3: Benefits of HT on threaded workloads": Benefits of HT on threaded workloads" for details.<br /><br /><strong>2.4. Media Workloads: Take full advantage of hardware accelerated codecs</strong><br /><br />Media frameworks such as the Helix framework, provide HW accelerated codecs for video standards such as H.264. HW acceleration greatly improves average power footprint and device up-time. Another benefit with HW acceleration is that processor is offloaded allowing it to perform other tasks.<br /><br />Higher definition video scales well and does not significantly increase average power footprint of chipset and processor. Although, it is important to note that the average power required by memory increases rapidly for higher definition content due to greatly increased memory access.<br /><br />It is not recommended to use SW codecs for Intel® Atom™ processor based platforms as the processor gets maxed out even at low resolutions (480p and below) resulting in very high average power.<br /><br />Refer to chapter "5.2: Video playback" for details.<br /><br />HW accelerated codecs for the Linux MID platform are available through the Helix community, <a href="https://rp4mid.helixcommunity.org/" target="_blank">https://rp4mid.helixcommunity.org/</a>.<br /><br /><strong>2.5. General power efficiency recommendations</strong><br /><ol>
<li>Be aware that one power inefficient application in Idle is enough to cripple battery life for the whole system.</li>
<li>Develop context aware applications that adapt to system state changes Refer to <a href="http://software.intel.com/en-us/articles/energy-efficient-software-developing-power-aware-apps">http://software.intel.com/en-us/articles/energy-efficient-software-developing-power-aware-apps</a> for articles on developing for context awareness.    
<ul>
<li>Power state change (system sleep/wake transitions): The application shall handle system power state change gracefully and not incur unnecessary delays. The application shall not prevent system from changing power state unless absolutely necessary. </li>
<li>Battery state change: Adapt behavior due to switch from AC to/from battery power. Some features, such as automatic updates, could potentially be deactivated to save power when powered by battery.</li>
<li>Network state change: Adapt application behavior to network connect/disconnect events. Some features could potentially be deactivated, saving power when not connected to network (flight mode). </li>
</ul>
</li>
<li>Develop "Data Efficient" applications that minimize data movement to/from external storage or RAM. Also investigate if data movement can be grouped or batched to decrease frequency of drive spin up/down.</li>
<li>Utilize extended SIMD instruction sets such as SSE3, improving performance and indirectly reducing application energy usage.</li>
<li>Utilize tools to achieve power optimizations or identify power optimization opportunities   
<ul>
<li>Utilize the Intel® Compiler for MID to compile the code into a binary specifically adapted to the Intel® Atom™ micro-architecture. This has the potential to greatly improve performance and in some cases also energy efficiency</li>
<li>Utilize PowerTOP to find components waking up the system excessively</li>
<li>Utilize Application Energy Toolkit to graph/analyze energy consumption</li>
</ul>
</li>
</ol><strong>2.6. Platform configuration recommendations</strong><br />Note that the following recommendations are somewhat OEM SW/OS specific and sometimes not applicable to application development.<br /><ol>
<li>Make sure the system is configured to power the screen off if there is no user input for a suitable time interval. This reduces the average power in the chipset and allows additional power savings from LCD power down.<br /><br />Refer to chapter "5.1.2: Processor &amp; Chipset power usage in Idle mode" for details.</li>
<li>Using on-demand governor to regulate P-state, depending on workload, improves system power efficiency.</li>
</ol><strong>2.7. Suggested power optimization process</strong><br /><br /><ol>
<li>Optimize to meet performance goals</li>
<li>Establish baseline before power optimizations    
<ul>
<li>Gather data using PowerTOP in single threaded mode (Powertop currently not as accurate in HT mode) <ol>
<li>Wakeups/s </li>
<li>Cx state residency</li>
<li>Px state residency</li>
</ol></li>
<li>If possible utilize external power meter to measure average power during application idle compared to system idle and during key workload execution</li>
</ul>
</li>
<li>Investigate behavior during application idle compared to system idle. Explore difference in wakeups/s, Cx/Px states. Optimally an application in idle should have none or minimal impact on total system idle power</li>
<li>Use Intel® VTune™ for MID to identify functions that show high C0 residency running key application workloads. Utilize processor "unhalted ref clock" counter to assess C0 residency. Note that "Unhalted core clock" is unreliable due to frequency change (if Intel® SpeedStep® Technology is enabled) and that "Time stamp counter" is unreliable at and below C4 due to disabled PLL. "unhalted ref clock" / wall clock time can be used to compute true C0 residency.</li>
<li>Re-architect/re-code    
<ul>
<li>Look for activities that force processor into C0 state (interrupts)</li>
<li>Coalesce or remove unnecessary activities to reduce wakeups</li>
<li>Look into data efficiency bottlenecks (disk, memory, network)</li>
<li>Note that optimizing for speed may increase C0% which might be OK since overall energy reduces due to performance speed up</li>
</ul>
</li>
</ol>
<p>For further details on the above and related topics please find detailed articles at Intel Software Network (ISN): Energy Efficient Software <a href="http://software.intel.com/en-us/articles/energy-efficient-software/">http://software.intel.com/en-us/articles/energy-efficient-software/</a>.</p>
<p class="sectionHeading">Technical Background</p>
<p>This chapter explains some of the technologies in focus for this paper.</p>
<strong>3.1. C6 - Deep Power Down State</strong><br /><br />The Intel® Atom™ processor features a new deep sleep state named C6. The new sleep state enables the processor to move into deeper sleep during inactive intervals between executions. The benefit of the new state is a much lower average power in idle mode in comparison to the C4 sleep state.<br /><br /><img src="http://software.intel.com/file/15733" alt="" /><br /><br />The above illustration shows the impact on the processor when C6 is active. For instance in deep power down the core voltage is substantially decreased (~0.3V) and the caches are turned off (flushed) leading to significant power savings. Observe that the bars do not depict the exact values but illustrate the value relative to other states.<br /><br />The deeper sleep state has a side effect in that the processor has a much longer wake-up time compared to wake-up from C4. Depending on the frequency of processor wakeups the benefit of C6 will vary. On average, if the processor has ~200 wakeups per second the benefits of C6 are lost due to the latency/power cost sleep state transitions. For clear benefits of C6 we recommend &lt;100 wakeups per second.<br /><br />The applications running on the platform are very much affecting the frequency of the processor wakeups. For instance, by carefully selecting periodic timers with longest possible interval, the application allows the processor to move to and stay longer in deeper sleep states.<br /><br /><strong>3.2. Hyper-Threading Technology (HT)</strong><br /><br />Hyper-Threading Technology (also Simultaneous Multi-threading (SMT)) improves processor performance under certain workloads by providing useful work for execution units that would otherwise be idle. The benefit is especially useful for a single core processor such as Intel® Atom™ processor , as it enables execution of an additional thread while execution is stalled for first thread, for instance due to a cache miss.<br /><br />Observe that the OS scheduler perceives the processor as having two cores when HT is enabled. <br /><br />HT may improve the performance for multithreaded code running on the processor. The exact performance benefit depends on the specific workload and on how well threaded the code is.<br /><br />
<p class="sectionHeading">Measurement Procedure</p>
<p>Note that this paper does not analyze all component parts of a typical MID form factor device. MID devices will feature a range of wireless communication components such as WiFi, WiMax, WWAN or BT all increasing the average platform power footprint. Extended analysis of form factor devices might include networked workloads such as audio/video streaming, Chat or Email, VOIP, P2P solutions, connected browsing and gaming.</p>
<strong>4.1. System setup</strong><br /><br />The system BIOS menu provides access to settings for several key processor features such as turning HT on/off, selecting "deepest" sleep state (C4 and C6 used for this study).<br /><br />After system start-up, the "on-demand" power governor was activated, enabling the processor to throttle P-state depending on the performance needs of the workload.<br /><br />Refer to chapter 7: "Appendix B" for details on system configuration and setup.<br /><br /><strong>4.2. NetDAQ measurements</strong><br /><br />Using Fluke NetDAQ equipment we were able to measure voltage and current for discrete components on the instrumented Crown Beach/Menlow platform board. The board was instrumented by connecting wires from 4 NetDAQ measurement modules to sense resistors on the board. This enabled us to capture voltage and current for components such as processor, chipset, RAM, PATA and PCI-bus etc. and calculate the power usage per component or group of components.<br /><br />Several measurements for all workloads were collected, abnormal captures omitted and most common representative collection of measured data selected.<br /><br />Refer to chapter 7: "Appendix B" for details on NetDAQ setup.<br /><br /><strong>4.3. PowerTOP measurements</strong><br /><br />PowerTOP (<a href="http://www.lesswatts.org/projects/powertop/" target="_blank">http://www.lesswatts.org/projects/powertop/</a>) is a Linux tool that measures how well the system uses various hardware power-saving features. It also highlights culprit software components that prevent optimal usage of hardware power savings and provides tuning suggestions. Furthermore the tool provides measured C (sleep) and P (execution) state residency, and the number of wakeups/s for the processor as a whole and for top software component culprits.<br /><br />For this investigation some automated scripts were created to launch the workload and then capture PowerTOP data over an interval of time. Several measurements for all workloads were collected, abnormal captures omitted and most common representative collection of measured data was selected.<br /><br />The PowerTOP measurements were not synchronized with measurements gathered using the NetDAQ, as a direct correlation technique was not available.<br /><br />To examine the actual processor C-state residency it is important to understand the mapping between the ACPI C-state (presented by PowerTOP) and the actual processor C-state. Unfortunately ACPI in its current form does not provide greater granularity. Refer to the below table for mapping ACPI C-state to processor C-state (depending on lowest sleep mode selected in BIOS).<br /><br /> 
<table class="tableformat1" border="0" cellspacing="0" cellpadding="5">
<tbody>
<tr>
<td>ACPI: C-state</td>
<td>Processor: C-state (with C6 activated in BIOS)</td>
<td>Processor: C-state (with C6 deactivated in BIOS)</td>
</tr>
<tr>
<td>C1</td>
<td>C1</td>
<td>C1</td>
</tr>
<tr>
<td>C2</td>
<td>C2</td>
<td>C2</td>
</tr>
<tr>
<td>C3</td>
<td>C4</td>
<td>C4</td>
</tr>
<tr>
<td>C4</td>
<td>C6</td>
<td>-</td>
</tr>
</tbody>
</table>
<br />Below is an example of a typical PowerTOP dialog, where C0 is computed by PowerTOP from the captured C1-C4 (ACPI) data.<br /><br /><img src="http://software.intel.com/file/15734" alt="" /><br /><br /><em>In the above example, PowerTOP indicates that, over the measurement interval, the system was in C2 87.1% of the time and at the lowest P-state (600MHz) 89.4% of the time. Wakeups per second during the interval averaged 81.2. PowerTOP also suggests that turning off Bluetooth will save power.<br /><br /></em><a href="http://software.intel.com/en-us/articles/power-efficiency-analysis-and-sw-development-recommendations-for-intel-atom-based-mid-platforms-2/">Continue to Part 2 of this article.</a><em></em> ]]></description>
      <link>http://software.intel.com/en-us/articles/power-efficiency-analysis-and-sw-development-recommendations-for-intel-atom-based-mid-platforms</link>
      <pubDate>Mon, 20 Apr 2009 15:49:21 -0700</pubDate>
      <comments>http://software.intel.com/en-us/articles/power-efficiency-analysis-and-sw-development-recommendations-for-intel-atom-based-mid-platforms#comments</comments>
      <guid isPermaLink="true">http://software.intel.com/en-us/articles/power-efficiency-analysis-and-sw-development-recommendations-for-intel-atom-based-mid-platforms</guid>
      <category>Mobility</category>
      <category>Intel® Atom™ Software Developer Community</category>
    </item>
  </channel></rss>