<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.meego.com/skins/common/feed.css?270"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.meego.com/index.php?title=Special:Contributions/Noel&amp;feed=atom&amp;limit=50&amp;target=Noel&amp;year=&amp;month=</id>
		<title>MeeGo wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.meego.com/index.php?title=Special:Contributions/Noel&amp;feed=atom&amp;limit=50&amp;target=Noel&amp;year=&amp;month="/>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Special:Contributions/Noel"/>
		<updated>2013-05-25T04:18:13Z</updated>
		<subtitle>From MeeGo wiki</subtitle>
		<generator>MediaWiki 1.16.2</generator>

	<entry>
		<id>http://wiki.meego.com/UMMS_Architecture</id>
		<title>UMMS Architecture</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/UMMS_Architecture"/>
				<updated>2012-04-23T01:07:23Z</updated>
		
		<summary type="html">&lt;p&gt;Noel: /* How to develop a backend */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= UMMS Architecture =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
This page describes the architecture of umms-0.1. You can get the code from: git://gitorious.org:meego-middleware/umms.git&amp;lt;br&amp;gt;&lt;br /&gt;
The UMMS general description can found on the '''[[Umms|main page]]'''&lt;br /&gt;
&lt;br /&gt;
== Class Diagram ==&lt;br /&gt;
[[File:ClassDiagramUmms-0.1.png]]&lt;br /&gt;
&lt;br /&gt;
*'''UmmsAudioManager'''&lt;br /&gt;
Class to implement '''''com.UMMS.AudioManager''''' interface which provide client with audio output control service.&lt;br /&gt;
&lt;br /&gt;
*'''UmmsVideoOutput'''&lt;br /&gt;
Class to implement '''''com.UMMS.VideoOutput''''' interface which provide client with video output control service.&lt;br /&gt;
&lt;br /&gt;
*'''UmmsPlayingContentMetadataViewer'''&lt;br /&gt;
Class to implement '''''com.UMMS.PlayingContentMetadataViewer''''' interface which allow the client to query the current playing content on server side.&lt;br /&gt;
&lt;br /&gt;
*'''UmmsObjectManager'''&lt;br /&gt;
Class to manage MediaPlayer objects, including create/destory, register/unregister MediaPlayer objects.&lt;br /&gt;
&lt;br /&gt;
*'''UmmsMediaPlayer'''&lt;br /&gt;
Class to implement the '''''com.UMMS.MediaPlayer''''' interface which provide media playback service for client.&lt;br /&gt;
&lt;br /&gt;
*'''UmmsPlayerBackend'''&lt;br /&gt;
A base class which defined internal interface for media playback. UmmsMediaPlayer uses this class to handle the service request. Backend developer need to subclass it.&lt;br /&gt;
&lt;br /&gt;
*'''UmmsAudioManagerBackend'''&lt;br /&gt;
A base class which defined internal interface for controlling audio output. UmmsAudioManager uses this class to handle the service request. Backend developer need to subclass it.&lt;br /&gt;
&lt;br /&gt;
*'''UmmsVideoOutputBackend'''&lt;br /&gt;
A base class which defined internal interface for controlling video output. UmmsVideoOutput uses this class to handle the service request. Backend developer need to subclass it.&lt;br /&gt;
&lt;br /&gt;
*'''UmmsPlugin'''&lt;br /&gt;
A class which defined the plugin mechanism. All backend should be implemented as a UmmsPlugin.  &lt;br /&gt;
&lt;br /&gt;
*'''Player'''&lt;br /&gt;
An implementation of UmmsPlayerBackend.&lt;br /&gt;
&lt;br /&gt;
*'''AudioManger'''&lt;br /&gt;
An implementation of UmmsAudioBackend.&lt;br /&gt;
&lt;br /&gt;
*'''VideoOutput'''&lt;br /&gt;
An implementation of UmmsVideoOutput.&lt;br /&gt;
&lt;br /&gt;
Note that, '''Player''','''AudioManger''','''VideoOutput''' are plugins and will not provide by umms-1.0.&lt;br /&gt;
&lt;br /&gt;
== How to develop a backend ==&lt;br /&gt;
Suppose you are going to develop a player backend.&lt;br /&gt;
*'''Step 1: Subclass UmmsPlayerBackend'''&lt;br /&gt;
The UmmsPlayerBackend is an internal interface to abstract all the media playback control. The backend developer should subclass this class and implement its vmethods. Of course, you can just implement a subset of the virtual methods defined in UmmsPlayerBackendClass struct, for example. For the dvb player backend, it is optional to implement the &amp;quot;pause&amp;quot; method. If you want to add the time-shifting feature for DVB playback, implementing &amp;quot;pause&amp;quot; method is a choice.&lt;br /&gt;
&lt;br /&gt;
*'''Step 2: Fill the UmmsPlugin struct in your PlayerBackend.c file and export it'''&lt;br /&gt;
The definition of struct UmmsPlugin:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
typedef struct _UmmsPlugin {&lt;br /&gt;
  gint major_version;//the major version number of umms core that plugin was compiled for&lt;br /&gt;
  gint minor_version;//the minor version number of core that plugin was compiled for&lt;br /&gt;
  UmmsPluginType type;&lt;br /&gt;
  const gchar *filename;//set by &amp;quot;plugin loader&amp;quot; when this plugin loaded.&lt;br /&gt;
  const gchar *name;&lt;br /&gt;
  const gchar *description;&lt;br /&gt;
&lt;br /&gt;
  /*&lt;br /&gt;
   * Used for plugins of UMMS_PLUGIN_TYPE_PLAYER_BACKEND type.&lt;br /&gt;
   * If supported_uri_protocols is empty, unsupported_uri_protocols is respected&lt;br /&gt;
   * as a &amp;quot;black list&amp;quot; of uri. If supported_uri_protocols is not empty, ignore&lt;br /&gt;
   * unsupported_uri_protocols.&lt;br /&gt;
   * For example, the implementor can create a black list for its plugin like this:&lt;br /&gt;
   * supported_uri_protocols = {NULL};&lt;br /&gt;
   * unsupported_uri_protocols = {&amp;quot;dvb&amp;quot;};&lt;br /&gt;
   * that means the plugin can handle all uri protocols unless &amp;quot;dvb&amp;quot;.&lt;br /&gt;
   */&lt;br /&gt;
  const gchar **supported_uri_protocols;&lt;br /&gt;
  const gchar **unsupported_uri_protocols;&lt;br /&gt;
&lt;br /&gt;
  /*vmethod to create the instance of backend.*/&lt;br /&gt;
  gpointer (*backend_new_func) (void);&lt;br /&gt;
}UmmsPlugin;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The most important fields are supported_uri_protocols, unsupported_uri_protocols, and backend_new_func. The following is code snapshot to fill the struct:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
static gchar *supported_prots[] = {&lt;br /&gt;
  NULL&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
static gchar *unsupported_prots[] = {&lt;br /&gt;
 &amp;quot;dvb&amp;quot;, NULL&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
MyPlayerBackend *my_player_backend_new (void)&lt;br /&gt;
{&lt;br /&gt;
  return g_object_new (MY_TYPE_PLAYER_BACKEND, NULL);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/*Plugin description*/&lt;br /&gt;
G_MODULE_EXPORT&lt;br /&gt;
UmmsPlugin umms_plugin = {&lt;br /&gt;
        UMMS_VERSION_MAJOR;&lt;br /&gt;
        UMMS_VERSION_MINOR;&lt;br /&gt;
        UMMS_PLUGIN_TYPE_PLAYER_BACKEND,&lt;br /&gt;
        NULL,//should set by loader&lt;br /&gt;
        &amp;quot;Player&amp;quot;,&lt;br /&gt;
        &amp;quot;Player to handle non-dvb URI&amp;quot;,&lt;br /&gt;
        (const gchar **)&amp;amp;supported_prots,&lt;br /&gt;
        (const gchar **)&amp;amp;unsupported_prots,&lt;br /&gt;
        (gpointer (*) (void)) my_player_backend_new&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here is a sample player backend: [http://wiki.meego.com/images/Sample-player-backend-0.0.1.tar.gz]&lt;/div&gt;</summary>
		<author><name>Noel</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/UMMS_Architecture</id>
		<title>UMMS Architecture</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/UMMS_Architecture"/>
				<updated>2012-04-23T01:03:16Z</updated>
		
		<summary type="html">&lt;p&gt;Noel: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= UMMS Architecture =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
This page describes the architecture of umms-0.1. You can get the code from: git://gitorious.org:meego-middleware/umms.git&amp;lt;br&amp;gt;&lt;br /&gt;
The UMMS general description can found on the '''[[Umms|main page]]'''&lt;br /&gt;
&lt;br /&gt;
== Class Diagram ==&lt;br /&gt;
[[File:ClassDiagramUmms-0.1.png]]&lt;br /&gt;
&lt;br /&gt;
*'''UmmsAudioManager'''&lt;br /&gt;
Class to implement '''''com.UMMS.AudioManager''''' interface which provide client with audio output control service.&lt;br /&gt;
&lt;br /&gt;
*'''UmmsVideoOutput'''&lt;br /&gt;
Class to implement '''''com.UMMS.VideoOutput''''' interface which provide client with video output control service.&lt;br /&gt;
&lt;br /&gt;
*'''UmmsPlayingContentMetadataViewer'''&lt;br /&gt;
Class to implement '''''com.UMMS.PlayingContentMetadataViewer''''' interface which allow the client to query the current playing content on server side.&lt;br /&gt;
&lt;br /&gt;
*'''UmmsObjectManager'''&lt;br /&gt;
Class to manage MediaPlayer objects, including create/destory, register/unregister MediaPlayer objects.&lt;br /&gt;
&lt;br /&gt;
*'''UmmsMediaPlayer'''&lt;br /&gt;
Class to implement the '''''com.UMMS.MediaPlayer''''' interface which provide media playback service for client.&lt;br /&gt;
&lt;br /&gt;
*'''UmmsPlayerBackend'''&lt;br /&gt;
A base class which defined internal interface for media playback. UmmsMediaPlayer uses this class to handle the service request. Backend developer need to subclass it.&lt;br /&gt;
&lt;br /&gt;
*'''UmmsAudioManagerBackend'''&lt;br /&gt;
A base class which defined internal interface for controlling audio output. UmmsAudioManager uses this class to handle the service request. Backend developer need to subclass it.&lt;br /&gt;
&lt;br /&gt;
*'''UmmsVideoOutputBackend'''&lt;br /&gt;
A base class which defined internal interface for controlling video output. UmmsVideoOutput uses this class to handle the service request. Backend developer need to subclass it.&lt;br /&gt;
&lt;br /&gt;
*'''UmmsPlugin'''&lt;br /&gt;
A class which defined the plugin mechanism. All backend should be implemented as a UmmsPlugin.  &lt;br /&gt;
&lt;br /&gt;
*'''Player'''&lt;br /&gt;
An implementation of UmmsPlayerBackend.&lt;br /&gt;
&lt;br /&gt;
*'''AudioManger'''&lt;br /&gt;
An implementation of UmmsAudioBackend.&lt;br /&gt;
&lt;br /&gt;
*'''VideoOutput'''&lt;br /&gt;
An implementation of UmmsVideoOutput.&lt;br /&gt;
&lt;br /&gt;
Note that, '''Player''','''AudioManger''','''VideoOutput''' are plugins and will not provide by umms-1.0.&lt;br /&gt;
&lt;br /&gt;
== How to develop a backend ==&lt;br /&gt;
Suppose you are going to develop a player backend.&lt;br /&gt;
*'''Step 1: Subclass UmmsPlayerBackend'''&lt;br /&gt;
The UmmsPlayerBackend is internal interface to abstract all the media playback control. Backend developer should subclass this class and implement its vmethods. Of cause, you can just implement a subset of the virtual methods defined in UmmsPlayerBackendClass struct, e.g. For dvb player backend, it is optional to implement the &amp;quot;pause&amp;quot; method. If you want to add time-shifting feature for DVB playback, implementing &amp;quot;pause&amp;quot; method is a choice.&lt;br /&gt;
&lt;br /&gt;
*'''Step 2: Fill the UmmsPlugin struct in your PlayerBackend.c file and export it'''&lt;br /&gt;
The definition of struct UmmsPlugin:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
typedef struct _UmmsPlugin {&lt;br /&gt;
  gint major_version;//the major version number of umms core that plugin was compiled for&lt;br /&gt;
  gint minor_version;//the minor version number of core that plugin was compiled for&lt;br /&gt;
  UmmsPluginType type;&lt;br /&gt;
  const gchar *filename;//set by &amp;quot;plugin loader&amp;quot; when this plugin loaded.&lt;br /&gt;
  const gchar *name;&lt;br /&gt;
  const gchar *description;&lt;br /&gt;
&lt;br /&gt;
  /*&lt;br /&gt;
   * Used for plugins of UMMS_PLUGIN_TYPE_PLAYER_BACKEND type.&lt;br /&gt;
   * If supported_uri_protocols is empty, unsupported_uri_protocols is respected&lt;br /&gt;
   * as a &amp;quot;black list&amp;quot; of uri. If supported_uri_protocols is not empty, ignore&lt;br /&gt;
   * unsupported_uri_protocols.&lt;br /&gt;
   * e.g. The implementor can create a black list for its plugin like this:&lt;br /&gt;
   * supported_uri_protocols = {NULL};&lt;br /&gt;
   * unsupported_uri_protocols = {&amp;quot;dvb&amp;quot;};&lt;br /&gt;
   * that means the plugin can handle all uri protocols unless &amp;quot;dvb&amp;quot;.&lt;br /&gt;
   */&lt;br /&gt;
  const gchar **supported_uri_protocols;&lt;br /&gt;
  const gchar **unsupported_uri_protocols;&lt;br /&gt;
&lt;br /&gt;
  /*vmethod to create the instance of backend.*/&lt;br /&gt;
  gpointer (*backend_new_func) (void);&lt;br /&gt;
}UmmsPlugin;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The most important fields are supported_uri_protocols, unsupported_uri_protocols and backend_new_func. The following is code snapshot to fill the struct:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
static gchar *supported_prots[] = {&lt;br /&gt;
  NULL&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
static gchar *unsupported_prots[] = {&lt;br /&gt;
 &amp;quot;dvb&amp;quot;, NULL&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
MyPlayerBackend *my_player_backend_new (void)&lt;br /&gt;
{&lt;br /&gt;
  return g_object_new (MY_TYPE_PLAYER_BACKEND, NULL);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/*Plugin description*/&lt;br /&gt;
G_MODULE_EXPORT&lt;br /&gt;
UmmsPlugin umms_plugin = {&lt;br /&gt;
        UMMS_VERSION_MAJOR;&lt;br /&gt;
        UMMS_VERSION_MINOR;&lt;br /&gt;
        UMMS_PLUGIN_TYPE_PLAYER_BACKEND,&lt;br /&gt;
        NULL,//should set by loader&lt;br /&gt;
        &amp;quot;Player&amp;quot;,&lt;br /&gt;
        &amp;quot;Player to handle non-dvb URI&amp;quot;,&lt;br /&gt;
        (const gchar **)&amp;amp;supported_prots,&lt;br /&gt;
        (const gchar **)&amp;amp;unsupported_prots,&lt;br /&gt;
        (gpointer (*) (void)) my_player_backend_new&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
A sample player backend is here: [http://wiki.meego.com/images/Sample-player-backend-0.0.1.tar.gz]&lt;/div&gt;</summary>
		<author><name>Noel</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/UMMS_User_Manual</id>
		<title>UMMS User Manual</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/UMMS_User_Manual"/>
				<updated>2012-04-23T01:00:16Z</updated>
		
		<summary type="html">&lt;p&gt;Noel: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= UMMS User Manual and Sample code =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
This page is the user manual and some sample code for the Universal Multi Media Service (UMMS).&amp;lt;br&amp;gt;&lt;br /&gt;
The UMMS general description is on the '''[[Umms|main page]]'''. &lt;br /&gt;
You can get the code from: &lt;br /&gt;
git://gitorious.org/meego-middleware/umms.git&lt;br /&gt;
&lt;br /&gt;
== Service Name ==&lt;br /&gt;
com.UMMS&lt;br /&gt;
&lt;br /&gt;
== Objects and Interfaces ==&lt;br /&gt;
''ObjectManager'': Object to create and remove ''MediaPlayer'' object.&lt;br /&gt;
  Path:      /com/UMMS/ObjectManager&lt;br /&gt;
  Interface: com.UMMS.ObjectManager.iface&lt;br /&gt;
&lt;br /&gt;
''MediaPlayer'': Player object to control the playback of media assets.&lt;br /&gt;
  Path:      Returned by ''ObjectManager''&lt;br /&gt;
  Interface: com.UMMS.MediaPlayer&lt;br /&gt;
&lt;br /&gt;
''AudioManager'': Object to manage the system audio output.&lt;br /&gt;
  Path:      /com/UMMS/AudioManager&lt;br /&gt;
  Interface: com.UMMS.AudioManger&lt;br /&gt;
&lt;br /&gt;
''VideoOutput'': Object to control the display.&lt;br /&gt;
  Path:      /com/UMMS/VideoOutput&lt;br /&gt;
  Interface: com.UMMS.VideoOutput&lt;br /&gt;
&lt;br /&gt;
''PlayingContentMetadataViewer'': Object to provide the metadata of all current playing content.&lt;br /&gt;
  Path:      /com/UMMS/PlayingContentMetadataViewer&lt;br /&gt;
  Interface: com.UMMS.PlayingContentMetadataViewer&lt;br /&gt;
&lt;br /&gt;
== API Reference ==&lt;br /&gt;
* '''''Interface com.UMMS.ObjectManager.iface'''''&lt;br /&gt;
&lt;br /&gt;
Methods:&lt;br /&gt;
&lt;br /&gt;
   RequestMediaPlayer(s(out): object_path)&lt;br /&gt;
     Request a ''MediaPlayer'' object operate in attended-execution mode. The ''ObjectManager'' will creat a new ''MediaPlayer'' object,&lt;br /&gt;
     register the object on the bus and return the object path to client.&lt;br /&gt;
     Parameters: &lt;br /&gt;
         object_path(out): The object path belongs to the newly created ''MediaPlayer'' object.&lt;br /&gt;
&lt;br /&gt;
   RequestMediaPlayerUnattended(d: time_to_execution, s(out): token, s(out): object_path)&lt;br /&gt;
     Request a ''MediaPlayer'' object operate in unattended-execution mode. The ''ObjectManager'' will creat a new ''MediaPlayer'' object,&lt;br /&gt;
     register it on the bus and return the object path to client.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                time_to_execution: Times in seconds for which this ''MediaPlayer'' object keep alive.&lt;br /&gt;
                token(out):        The unique token belongs to this execution. Application can use it to identify the execution log file which &lt;br /&gt;
                                   named by the token. &lt;br /&gt;
                object_path(out):  The object path belongs to the newly created ''MediaPlayer'' object.&lt;br /&gt;
&lt;br /&gt;
   RequestScheduledRecorder(d: start_time, d: duration, s: uri, s: location, s(out): token, s(out): object_path)&lt;br /&gt;
     Request a ''MediaPlayer'' object operate in unattended-execution mode and schedule it to record the media pointed by &amp;quot;uri&amp;quot;. The ''ObjectManager'' will creat a &lt;br /&gt;
     new ''MediaPlayer'' object, register it on the bus and return the object path to client.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                start_time:        The delay to start recording in seconds.&lt;br /&gt;
                duration:          How long to record, in seconds.&lt;br /&gt;
                uri:               Specify the media to record.&lt;br /&gt;
                location:          Location to store the recorded media.&lt;br /&gt;
                token(out):        The unique token belongs to this execution. Application can use it to identify the execution log file which &lt;br /&gt;
                                   named by the token. &lt;br /&gt;
                object_path(out):  The object path belongs to the newly created ''MediaPlayer'' object.&lt;br /&gt;
&lt;br /&gt;
   RemoveMediaPlayer(s: object_path)&lt;br /&gt;
     Remove the ''MediaPlayer'' object which was exposed on the object_path.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                object_path: The path on which this object was exposed.&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''''Interface com.UMMS.MediaPlayer'''''&lt;br /&gt;
&lt;br /&gt;
Methods:&lt;br /&gt;
&lt;br /&gt;
   SetUri(s: uri)&lt;br /&gt;
     Set URI to UMMS.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                uri: URI to set.&lt;br /&gt;
&lt;br /&gt;
   SetSubtitleUri(s: sub_uri)&lt;br /&gt;
     Set subtitle URI to UMMS.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                sub_uri: URI to identify the subtitle file.&lt;br /&gt;
&lt;br /&gt;
   GetCurrentUri(s(out): current_uri)&lt;br /&gt;
     Get current URI.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                current_uri(out): current URI.&lt;br /&gt;
&lt;br /&gt;
   SetTarget(i: type, a{sv}: param)&lt;br /&gt;
     Set video target and pass all target parameters to UMMS. The video target is where your decoded video data should be rendered.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                type:  The type of video target.&lt;br /&gt;
                       0:XWindow,       the video data will be rendered on the X Window.&lt;br /&gt;
                       1:DataCopy,      the video data will be copied to a memory instead of directly rendering. E.g. copied to a GL Texture. &lt;br /&gt;
                       2:Socket,        the video data will sent to a socket.&lt;br /&gt;
                       3:ReservedType0, reserved for custom target.&lt;br /&gt;
                       4:ReservedType1, reserved for custom target.&lt;br /&gt;
                       5:ReservedType2, reserved for custom target.&lt;br /&gt;
                       6:ReservedType3, reserved for custom target.&lt;br /&gt;
                param: The list of key-value pair to specify the attributes of the target. The definition of attribute structure is &lt;br /&gt;
                       target-specific and up to the implementor. The UMMS framwork just defined the XWindow target attribute: &lt;br /&gt;
                       Key          Value&lt;br /&gt;
                       &amp;quot;window-id&amp;quot;  value of &amp;quot;i&amp;quot; type indicates the window id. &lt;br /&gt;
&lt;br /&gt;
   Play()&lt;br /&gt;
&lt;br /&gt;
   Pause()&lt;br /&gt;
&lt;br /&gt;
   Stop()&lt;br /&gt;
&lt;br /&gt;
   SetPosition(x: pos)&lt;br /&gt;
     Seek to position.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                pos: Stream position in millisecond.&lt;br /&gt;
&lt;br /&gt;
   GetPosition(x(out): pos)&lt;br /&gt;
     Get the current position of stream in millisecond.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                pos(out): The current stream position.&lt;br /&gt;
&lt;br /&gt;
   SetPlaybackRate(d: rate）&lt;br /&gt;
      Set the playback rate. &lt;br /&gt;
     Parameters:&lt;br /&gt;
                rate: rate to playback the media asset.&lt;br /&gt;
&lt;br /&gt;
   GetPlaybackRate(d(out): rate）&lt;br /&gt;
      Get current playback rate.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                rate(out): The current playback rate.&lt;br /&gt;
&lt;br /&gt;
   SetVolume(i: volume)&lt;br /&gt;
&lt;br /&gt;
   GetVolume(i(out): volume)&lt;br /&gt;
&lt;br /&gt;
   SetVideoSize(u: x, u: y, u: w, u: h)&lt;br /&gt;
     Set video dimension.&lt;br /&gt;
     Paramters:&lt;br /&gt;
               x: X coordinate of top-left.&lt;br /&gt;
               y: Y coordinate of top-left.&lt;br /&gt;
               w: Width of video rectangle.&lt;br /&gt;
               h: Height of video rectangle.&lt;br /&gt;
&lt;br /&gt;
   GetVideoSize(u(out): w, u(out): h)&lt;br /&gt;
     Get current width and height of video rectangle.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                w(out): Width of current video rectangle.&lt;br /&gt;
                h(out): Height of current video rectangle.&lt;br /&gt;
&lt;br /&gt;
   GetBufferedTime(x(out): length_time)&lt;br /&gt;
     Get the approximate duration of playable data downloaded so far in millisecond.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                length_time(out): amount of playable data downloaded so far in millisecond.&lt;br /&gt;
&lt;br /&gt;
   GetBufferedBytes(x(out): length_byte)&lt;br /&gt;
     Get the approximate amount of playable data downloaded so far in bytes. &lt;br /&gt;
     Parameters:&lt;br /&gt;
                length_byte(out): amount of playable data downloaded so far in byte.&lt;br /&gt;
&lt;br /&gt;
   GetMediaSizeTime(x(out): duration)&lt;br /&gt;
     Get the duration of the media.&lt;br /&gt;
     Parameters: &lt;br /&gt;
                duration(out): duration in millisecond.&lt;br /&gt;
&lt;br /&gt;
   GetMediaSizeBytes(x(out): size)&lt;br /&gt;
     Get the total size of the media file.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                size(out): total size of the media file.&lt;br /&gt;
&lt;br /&gt;
   HasVideo(b(out): has_video)&lt;br /&gt;
     Indicates the existance of video stream in the media asset.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                has_video(out): True if media asset has video. False otherwise.&lt;br /&gt;
&lt;br /&gt;
   HasAudio(b(out): has_audio)&lt;br /&gt;
     Indicates the existance of audio stream in the media asset.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                has_audio(out): True if media asset has audio. False otherwise. &lt;br /&gt;
&lt;br /&gt;
   IsStreaming(b(out): is_stream)&lt;br /&gt;
     Indicates whether the URI represents a stream media.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                is_stream(out): True for stream media. False otherwise.&lt;br /&gt;
&lt;br /&gt;
   IsSeekable(b(out): is_seekable)&lt;br /&gt;
     Indicates whether this media asset is seekable.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                is_seekable(out): True for seekable. False otherwise.&lt;br /&gt;
&lt;br /&gt;
   SupportFullScreen(b(out): support_fullscreen)&lt;br /&gt;
     Indicates whether the backend supports a fullscreen mode.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                support_fullscreen(out): True if backend supports fullscreen. False otherwise.&lt;br /&gt;
&lt;br /&gt;
   GetPlayerState(i(out): current_state)&lt;br /&gt;
     Get current state of ''MediaPlayer'' object.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                current_state(out): &lt;br /&gt;
                                   0:Null,&lt;br /&gt;
                                   1:Stopped,&lt;br /&gt;
                                   2:Paused,&lt;br /&gt;
                                   3:Playing&lt;br /&gt;
&lt;br /&gt;
   Reply()&lt;br /&gt;
     Response the UMMS server’s heartbeat check. In the attended-execution mode, client should connect to NeedReply&lt;br /&gt;
     signal with a callback in which Reply() method should be called.&lt;br /&gt;
&lt;br /&gt;
   SetProxy(a{sv}: param)&lt;br /&gt;
     Set proxy stuffs.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                param: A list of key-value pair to sepcify the proxy attributes.&lt;br /&gt;
                       The attribute structure is defined as:&lt;br /&gt;
                       Key          Value&lt;br /&gt;
                       &amp;quot;proxy-uri&amp;quot;  value of &amp;quot;s&amp;quot; type indicates HTTP proxy server URIl&lt;br /&gt;
                       &amp;quot;proxy-id&amp;quot;   value of &amp;quot;s&amp;quot; type indicates HTTP proxy user id for authentication.&lt;br /&gt;
                       &amp;quot;proxy-pw&amp;quot;   value of &amp;quot;s&amp;quot; type indicates HTTP proxy user password for authentication&lt;br /&gt;
&lt;br /&gt;
   Suspend()&lt;br /&gt;
     Suspend current execution of player. After this invoking, all the resources ocuppied by this session will be released.&lt;br /&gt;
&lt;br /&gt;
   Restore()&lt;br /&gt;
     Play the media asset from the position at where it suspended.&lt;br /&gt;
&lt;br /&gt;
   GetCurrentVideo(i(out): current_video)&lt;br /&gt;
     Get current playing video stream.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                current_video(out): stream number of current playing video.&lt;br /&gt;
&lt;br /&gt;
   GetCurrentAudio(i(out): current_audio)&lt;br /&gt;
     Get current playing audio stream.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                current_audio(out): stream number of current playing audio.&lt;br /&gt;
&lt;br /&gt;
   GetCurrentSubtitle(i(out): current_sub)&lt;br /&gt;
     Get current playing subtitle stream.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                current_sub(out): stream number of current playing subtitle.&lt;br /&gt;
&lt;br /&gt;
   SetCurrentVideo(i: current_video)&lt;br /&gt;
     Choose the video stream to play.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                current_video: stream number of video stream choosed to play.&lt;br /&gt;
&lt;br /&gt;
   SetCurrentAudio(i: current_audio)&lt;br /&gt;
     Choose the audio stream to play.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                current_audio: stream number of audio stream choosed to play.&lt;br /&gt;
&lt;br /&gt;
   SetCurrentSubtitle(i: current_sub)&lt;br /&gt;
     Choose the subtitle stream to play. This method is for the media asset with embedded subtitle.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                current_sub: stream number of subtitle stream choosed to play.&lt;br /&gt;
&lt;br /&gt;
   GetVideoNum(i(out): video_num)&lt;br /&gt;
     Get total number of video streams.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                video_num(out): Total number of video streams.&lt;br /&gt;
&lt;br /&gt;
   GetAudioNum(i(out): audio_num)&lt;br /&gt;
     Get total number of audio streams.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                audio_num(out): Total number of audio streams.&lt;br /&gt;
        &lt;br /&gt;
   SetBufferDepth(i: format, x: buf_depth)&lt;br /&gt;
     Set buffer depth when buffering network streams.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                format: 0 for Time, 1 for Btye.&lt;br /&gt;
                buf_depth: The depth to buffer data. &lt;br /&gt;
&lt;br /&gt;
   GetBufferDepth(i: format, x(out): buf_depth)&lt;br /&gt;
     Get buffer depth.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                format: 0 for Time, 1 for Btye.&lt;br /&gt;
                buf_depth(out): The depth to buffer data. &lt;br /&gt;
&lt;br /&gt;
   SetMute(i: is_mute)&lt;br /&gt;
     Mute the audio.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                is_mute: 0 for unmute, 1 for mute.&lt;br /&gt;
&lt;br /&gt;
   IsMute(i(out): is_mute)&lt;br /&gt;
      Get the mute state.&lt;br /&gt;
      Parameters:&lt;br /&gt;
                 is_mute(out): 0 for unmute, 1 for mute.&lt;br /&gt;
&lt;br /&gt;
   SetScaleMode(i: mode)&lt;br /&gt;
      Set the scale mode.&lt;br /&gt;
      Parameters:&lt;br /&gt;
                 mode: &lt;br /&gt;
                      0: do not scale.&lt;br /&gt;
                      1: fill entire target, regardless of original video aspect ratio.&lt;br /&gt;
                      2: scale the video with respect to original video aspect ratio.&lt;br /&gt;
                      3: fill the whole screen but keep the ratio, some part of video may out of screen.&lt;br /&gt;
&lt;br /&gt;
   GetScaleMode(i(out): mode)&lt;br /&gt;
      Get the scale mode.&lt;br /&gt;
      Parameters:&lt;br /&gt;
                 mode(out): &lt;br /&gt;
                      0: do not scale.&lt;br /&gt;
                      1: fill entire target, regardless of original video aspect ratio.&lt;br /&gt;
                      2: scale the video with respect to original video aspect ratio.&lt;br /&gt;
                      3: fill the whole screen but keep the ratio, some part of video may out of screen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   GetVideoCodec(i: num, s(out): video_codec)&lt;br /&gt;
      Get the codec of video stream specified by the &amp;quot;num&amp;quot;.&lt;br /&gt;
      Parameters:&lt;br /&gt;
                 num: video stream number.&lt;br /&gt;
                 video_codec(out): codec string.&lt;br /&gt;
&lt;br /&gt;
   GetAudioCodec(i: num, s(out): audio_codec)&lt;br /&gt;
      Get the codec of audio stream specified by the &amp;quot;num&amp;quot;.&lt;br /&gt;
      Parameters:&lt;br /&gt;
                 num: audio stream number.&lt;br /&gt;
                 audio_codec(out): codec string.&lt;br /&gt;
&lt;br /&gt;
   GetVideoBitrate(i: num, i(out): video_bitrate)&lt;br /&gt;
     Get the bitrate of video stream specified by the &amp;quot;num&amp;quot;.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                 num: video stream number.&lt;br /&gt;
                 video_bitrate(out): bitrate of the video stream.&lt;br /&gt;
&lt;br /&gt;
   GetAudioBitrate(i: channel, i(out): audio_bitrate)&lt;br /&gt;
     Get the bitrate of audio stream specified by the &amp;quot;num&amp;quot;.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                 num: audio stream number.&lt;br /&gt;
                 audio_bitrate(out): bitrate of the audio stream.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   GetEncapsulation(s(out): encapsulation)&lt;br /&gt;
     Get the container format.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                encapsulation(out): the container format.&lt;br /&gt;
&lt;br /&gt;
   GetAudioSampleRate(i: num, i(out): sample_rate)&lt;br /&gt;
     Get the sample rate of audio stream specified by the &amp;quot;num&amp;quot;.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                num:              audio stream number.&lt;br /&gt;
                sample_rate(out): sample rate of the audio stream.&lt;br /&gt;
&lt;br /&gt;
   GetVideoFrameRate(i: num, i(out): frame_rate_num, i(out): frame_rate_denum)&lt;br /&gt;
     Get the frame rate of video stream specified by the &amp;quot;num&amp;quot;.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                num:                   video stream number.&lt;br /&gt;
                frame_rate_num(out):   numerator of frame rate.&lt;br /&gt;
                frame_rate_denum(out): denumerator of frame rate.&lt;br /&gt;
&lt;br /&gt;
   GetVideoResolution(i: num, i(out): width, i(out): height)&lt;br /&gt;
     Get the original resolution of the video stream specified by the &amp;quot;num&amp;quot;.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                num:         video stream number.&lt;br /&gt;
                width(out):  width of video.&lt;br /&gt;
                height(out): height of video.&lt;br /&gt;
&lt;br /&gt;
   GetVideoAspectRatio(i: num, i(out): ratio_num, i(out): ratio_denum)&lt;br /&gt;
     Get the original aspect ratio of the video stream specified by the &amp;quot;num&amp;quot;.      &lt;br /&gt;
     Parameters:&lt;br /&gt;
                num:              video stream number.&lt;br /&gt;
                ratio_num(out):   numerator of the aspect ratio.&lt;br /&gt;
                ratio_denum(out): denumerator of the aspect ratio.&lt;br /&gt;
&lt;br /&gt;
   GetProtocolName(s(out): protocol_name)&lt;br /&gt;
     Get the tranport protocol name.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                protocol_name(out): name of the protocol.&lt;br /&gt;
&lt;br /&gt;
   Record(b: to_record, s: location)&lt;br /&gt;
     Start or stop the recording of current playing DVB stream.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                to_record: True to start recording, False to stop recording.&lt;br /&gt;
                location:  path to store the record file.&lt;br /&gt;
&lt;br /&gt;
   GetPat(aa{sv}(out): pat)&lt;br /&gt;
     Get the &amp;quot;Program Association Table&amp;quot;.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                pat(out): the &amp;quot;Program Association Table&amp;quot;. &lt;br /&gt;
                          The structure of pat is a list of mapping table. Each mapping table has two key-value pairs:&lt;br /&gt;
                          Key               Value&lt;br /&gt;
                          &amp;quot;program-number&amp;quot;  value of &amp;quot;u&amp;quot; type which indicates the program number. &lt;br /&gt;
                          &amp;quot;pid&amp;quot;:            value of &amp;quot;u&amp;quot; type which indicates the pid of the pat.&lt;br /&gt;
&lt;br /&gt;
   GetPmt(u(out): program_number, u(out): pcr_pid, aa{sv}(out): stream_info)&lt;br /&gt;
     Get the &amp;quot;Program Map Table&amp;quot; of current playing DVB program.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                program_number(out): the number of current playing program.&lt;br /&gt;
                pcr_pid(out):        the pcr pid.&lt;br /&gt;
                stream_info(out):    the information of all elementary streams multiplexed in this program.&lt;br /&gt;
                                     The structure of stream_info is a list of mapping table. Each mapping table has two key-value pairs:&lt;br /&gt;
                                     Key            Value&lt;br /&gt;
                                     &amp;quot;stream-type&amp;quot;  value of &amp;quot;u&amp;quot; type indicates the stream type.&lt;br /&gt;
                                     &amp;quot;pid&amp;quot;          value of &amp;quot;u&amp;quot; type indicates the pid of the elementary stream.&lt;br /&gt;
&lt;br /&gt;
   GetAssociatedDataChannel(s(out): ip, i(out): port)&lt;br /&gt;
     Get the ip and port from which the client can retrive DVB associated data(ts packets).&lt;br /&gt;
     Parameters:&lt;br /&gt;
                ip(out):   ip string&lt;br /&gt;
                port(out): port string&lt;br /&gt;
&lt;br /&gt;
Signals:&lt;br /&gt;
   Initialized&lt;br /&gt;
     Pipeline engine initialized.&lt;br /&gt;
&lt;br /&gt;
   Eof&lt;br /&gt;
     End of file or stream.&lt;br /&gt;
&lt;br /&gt;
   Error(u: id, s: message)&lt;br /&gt;
     Error happened.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                id:      error id.&lt;br /&gt;
                message: error message.&lt;br /&gt;
&lt;br /&gt;
   Buffering(i: percent)&lt;br /&gt;
     Buffering percent, from 0 to 100.&lt;br /&gt;
&lt;br /&gt;
   Seeked&lt;br /&gt;
    Seeking done.&lt;br /&gt;
&lt;br /&gt;
   Stopped&lt;br /&gt;
    Player stopped.&lt;br /&gt;
&lt;br /&gt;
   PlayerStateChanged(i: old_state, i: new_state)&lt;br /&gt;
    Player state changed.&lt;br /&gt;
    Parameters:&lt;br /&gt;
               old_state: previous state of player, value definition is the same as state parameter of GetPlayerState. &lt;br /&gt;
               new_state: current state of player, value definition is the same as state parameter of GetPlayerState.&lt;br /&gt;
&lt;br /&gt;
   NeedReply&lt;br /&gt;
    Singal to request the client to reply. This is for client existence checking. The client should call the Reply() method to response this &lt;br /&gt;
    signal.&lt;br /&gt;
&lt;br /&gt;
   Suspended&lt;br /&gt;
    The player has been suspended. That means all the resources ocuppied by this player has been released.&lt;br /&gt;
&lt;br /&gt;
   Restored&lt;br /&gt;
    The player restored from suspened.&lt;br /&gt;
&lt;br /&gt;
   NoResource&lt;br /&gt;
    Resource unavailable.&lt;br /&gt;
&lt;br /&gt;
   VideoTagChanged(i: video_number)&lt;br /&gt;
    The metadata of video stream changed.&lt;br /&gt;
    Parameters:&lt;br /&gt;
               video_number: video stream number.&lt;br /&gt;
&lt;br /&gt;
   AudioTagChanged(i: audio_number)&lt;br /&gt;
    The metadata of audio stream changed.&lt;br /&gt;
    Parameters:&lt;br /&gt;
               audio_number: audio stream number.&lt;br /&gt;
&lt;br /&gt;
   TextTagChanged(i: text_number)&lt;br /&gt;
    The metadata of text stream changed.&lt;br /&gt;
    Parameters:&lt;br /&gt;
               text_number: text stream number.&lt;br /&gt;
&lt;br /&gt;
   RecordStart&lt;br /&gt;
    The recording started.&lt;br /&gt;
&lt;br /&gt;
   RecordStop&lt;br /&gt;
    The recording stopped.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''''Interface: com.UMMS.AudioManger'''''&lt;br /&gt;
&lt;br /&gt;
Methods:&lt;br /&gt;
   SetVolume(i: output_type, i: volume)&lt;br /&gt;
     Set the global audio volume on audio output specified by &amp;quot;output_type&amp;quot;.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                output_type: output type id.&lt;br /&gt;
                             0, hdmi&lt;br /&gt;
                             1, spidf&lt;br /&gt;
                             2, i2s0&lt;br /&gt;
                             3, i2s1&lt;br /&gt;
                volume:      volume to set, range [0, 100]&lt;br /&gt;
&lt;br /&gt;
   GetVolume(i: output_type, i(out): volume)&lt;br /&gt;
     Set the global audio volume on audio output specified by &amp;quot;output_type&amp;quot;.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                output_type: output type id.&lt;br /&gt;
                volume(out): current volume.&lt;br /&gt;
&lt;br /&gt;
   SetState(i: output_type, i: state)&lt;br /&gt;
     Mute/Unmute the audio output.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                 output_type: output type id.&lt;br /&gt;
                 state:       0 to unmute, 1 to mute.&lt;br /&gt;
&lt;br /&gt;
   GetState(i: output_type, i(out): state)&lt;br /&gt;
     Get the mute state of audio output.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                 output_type: output type id.&lt;br /&gt;
                 state(out):  0 for unmute, 1 for mute.&lt;br /&gt;
&lt;br /&gt;
* '''''Interface: com.UMMS.VideoOutput'''''&lt;br /&gt;
&lt;br /&gt;
Methods:&lt;br /&gt;
   GetValidVideoOutput(as(out): outputs)&lt;br /&gt;
     Get name of all the outputs.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                outputs(out): output names.&lt;br /&gt;
&lt;br /&gt;
   GetValidMode(s:output_name, as(out): modes)&lt;br /&gt;
     Get valid display modes of a output specified by output_name&lt;br /&gt;
     Parameters:&lt;br /&gt;
                output_name：output name.&lt;br /&gt;
                modes(out):  valid display modes.&lt;br /&gt;
&lt;br /&gt;
   SetMode(s:output_name, s: mode)&lt;br /&gt;
     Set display mode of the output.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                output_name：output name.&lt;br /&gt;
                mode:       mode to set.&lt;br /&gt;
&lt;br /&gt;
   GetMode(s:output_name, s(out): mode)&lt;br /&gt;
     Get current display mode of the output.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                output_name：output name.&lt;br /&gt;
                mode(out):   current display mode.&lt;br /&gt;
&lt;br /&gt;
* '''''Interface: com.UMMS.PlayingContentMetadataViewer'''''&lt;br /&gt;
&lt;br /&gt;
Methods:&lt;br /&gt;
   GetPlayingContentMetadata(aa{sv}(out): playing_content_metadata)&lt;br /&gt;
     Get the current playing content metadata.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                playing_content_metadata(out): media content metadata&lt;br /&gt;
                                              The structure of playing_content_metadata is a list of mapping table. Each mapping table has 3 key-value pairs:&lt;br /&gt;
                                              Key                 Value&lt;br /&gt;
                                              &amp;quot;URI&amp;quot;               Value of &amp;quot;s&amp;quot; type indicates the current playing URI.&lt;br /&gt;
                                              &amp;quot;Title&amp;quot;             Value of &amp;quot;s&amp;quot; type indicates the title of the playing media content&lt;br /&gt;
                                              &amp;quot;Artist&amp;quot;            Value of &amp;quot;s&amp;quot; type indicates the artist of the playing media content&lt;br /&gt;
&lt;br /&gt;
Signals:&lt;br /&gt;
   MetadataUpdated(aa{sv}: metadata)&lt;br /&gt;
     Emitted when a metadata changed. e.g. A new player is requested to play a video.&lt;br /&gt;
     Parameters:&lt;br /&gt;
                metadata: The same as playing_content_metadata&lt;br /&gt;
&lt;br /&gt;
== Sample Code ==&lt;br /&gt;
This is a sample in python to play a URI by requesting a attended-execution. You can get the latest code from: git://gitorious.org:meego-middleware/umms.git&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import dbus&lt;br /&gt;
import dbus.mainloop.glib&lt;br /&gt;
import dbus.glib&lt;br /&gt;
&lt;br /&gt;
player_iface = None&lt;br /&gt;
loop = None&lt;br /&gt;
&lt;br /&gt;
def need_reply_cb ():&lt;br /&gt;
    player_iface.Reply()&lt;br /&gt;
&lt;br /&gt;
def eof_cb ():&lt;br /&gt;
  print &amp;quot;EOF....&amp;quot;&lt;br /&gt;
  loop.quit()&lt;br /&gt;
&lt;br /&gt;
#event loop&lt;br /&gt;
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)&lt;br /&gt;
&lt;br /&gt;
#get the system message deamon&lt;br /&gt;
bus=dbus.SystemBus()&lt;br /&gt;
&lt;br /&gt;
#get the 'com.UMMS.ObjectManager.iface'&lt;br /&gt;
bus_obj=bus.get_object('com.UMMS', '/com/UMMS/ObjectManager')&lt;br /&gt;
obj_mngr=dbus.Interface(bus_obj, 'com.UMMS.ObjectManager.iface')&lt;br /&gt;
&lt;br /&gt;
#request a media player for attended-execution&lt;br /&gt;
player_obj_path = obj_mngr.RequestMediaPlayer()&lt;br /&gt;
player_obj = bus.get_object(&amp;quot;com.UMMS&amp;quot;, player_obj_path)&lt;br /&gt;
player_iface =  dbus.Interface(player_obj, 'com.UMMS.MediaPlayer')&lt;br /&gt;
&lt;br /&gt;
#for the attended-execution, we must connect to the &amp;quot;NeedReply&amp;quot; signal&lt;br /&gt;
player_iface.connect_to_signal(&amp;quot;NeedReply&amp;quot;, need_reply_cb)&lt;br /&gt;
&lt;br /&gt;
#connect other signals you want&lt;br /&gt;
player_iface.connect_to_signal(&amp;quot;Eof&amp;quot;, eof_cb)&lt;br /&gt;
&lt;br /&gt;
#play a URI&lt;br /&gt;
player_iface.SetUri(&amp;quot;/tmp/sample.mp4&amp;quot;)&lt;br /&gt;
player_iface.Play()&lt;br /&gt;
&lt;br /&gt;
#event loop &lt;br /&gt;
loop = gobject.MainLoop()&lt;br /&gt;
loop.run()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Noel</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Umms</id>
		<title>Umms</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Umms"/>
				<updated>2012-04-23T00:57:23Z</updated>
		
		<summary type="html">&lt;p&gt;Noel: /* Universal Multimedia Service (UMMS) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Universal Multimedia Service (UMMS) =&lt;br /&gt;
&lt;br /&gt;
  1 Short description of the need&lt;br /&gt;
---------------------------------&lt;br /&gt;
Linux in general, including MeeGo in particular, lacks a unified solution for playing multimedia content. Almost every application has its own solution, limiting the opportunity to benefit from new hardware capabilities provided by modern chipsets on non-PC platforms, and reducing the scope of usability of high value multimedia content, which is often protected using a proprietary codec.&lt;br /&gt;
It isn't the first time that Linux has had to break boundaries and change established solutions to drastically improve its support for new services. In the recent past, we've seen the adoption of CUPS (1999-2002) for printing and Sane (2000-2005) for scanning, enabling the use of Linux in the office environment, which, before these two, seemed only possible for the geek in search of a long night enjoying troubleshooting fun.&lt;br /&gt;
The current proposition has no less of an outrageous ambition than creating a Unified Multi Media Service (UMMS), which will enable playing audio and video (AV) from an application on any Linux platform (starting from MeeGo), without having to worry about anything more than its position on the screen and its possible initial transparency over the User Interface graphics.&lt;br /&gt;
  2 Purpose/audience&lt;br /&gt;
--------------------&lt;br /&gt;
The purpose of this document is to provide an understanding of a solution which could be used to deliver a unified service. This would enable a large community of developers to benefit from the best possible audio and video capabilities provided by various Linux implementations, without having to worry about the supporting HW.&lt;br /&gt;
It addresses the managers who wish to understand the requirements and the constraints required for such a solution, as well as the developers who will have to deliver a working implementation.&lt;br /&gt;
It focuses on an initial application for MeeGo TV, but it has been designed with the vision to expand, in a second phase, to all MeeGo verticals, starting with tablets. It is intended to go beyond TV and tablets and further, and experience a general adoption by the larger Linux community. Only MeeGo needs are described in this initial document.&lt;br /&gt;
  3 Overview&lt;br /&gt;
------------&lt;br /&gt;
MeeGo is an open source version of Linux which targets Netbooks, Tablets, Mobiles, Connected TV, and Automotive domains. MeeGo has the goals of delivering an optimized user experience and also enabling a community of developers to service applications across domains.&lt;br /&gt;
Unfortunately, not only does Linux not have a standard set of APIs to play audio and video (AV), but the existing main Linux AV Player APIs (Mplayer and Totem) do not cater to TV's needs:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Programming language independence&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Management of protected high value content (Pay TV)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;GPL license isolation&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Support of TV features (broadcast, sub-title, language selection, aspect ratio, trick play, …)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sophisticated transport independence (smooth streaming, forward error correction, ...)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Multiple back-end video pipe support&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Support of new generation HW feature (for example, video as an OpenGL texture)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This document explains the constraints introduced by these requirements and provides possible solutions and recommendations.&lt;br /&gt;
&lt;br /&gt;
  4 Documentation&lt;br /&gt;
----------------------------&lt;br /&gt;
&lt;br /&gt;
Specifications [[File:Meego_Unified_MultiMedia_Service_V0.4.odt]] &amp;lt;br&amp;gt;&lt;br /&gt;
* [[UMMS_Architecture | General Architecture]] &amp;lt;br&amp;gt;&lt;br /&gt;
* [[UMMS_User_Manual | User Manual and Sample code]] &amp;lt;br&amp;gt;&lt;br /&gt;
* [[media:LinuxCon_2011_umms_introduction.pdf|Slides from Linux Conference Oct11 and Nov 11]]&lt;br /&gt;
&lt;br /&gt;
Javascript API&lt;br /&gt;
* [[TV Browser]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  5 Where is the code&lt;br /&gt;
-----------------&lt;br /&gt;
Visit MeeGo OBS and search for UMMS&lt;br /&gt;
https://build.meego.com&lt;br /&gt;
&lt;br /&gt;
or directly the GIT repo&lt;br /&gt;
git://gitorious.org/meego-middleware/umms.git&lt;/div&gt;</summary>
		<author><name>Noel</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Umms</id>
		<title>Umms</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Umms"/>
				<updated>2012-04-23T00:54:42Z</updated>
		
		<summary type="html">&lt;p&gt;Noel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Universal Multimedia Service (UMMS) =&lt;br /&gt;
&lt;br /&gt;
  1 Short description of the need&lt;br /&gt;
---------------------------------&lt;br /&gt;
Linux in general, including MeeGo in particular, lacks a unified solution for playing multimedia content. Almost every application has its own solution, limiting the opportunity to benefit from new hardware capabilities provided by modern chipsets on non-PC platforms, and reducing the scope of usability of high value multimedia content, which is often protected using a proprietary codec.&lt;br /&gt;
It isn't the first time that Linux has had to break boundaries and change established solutions to drastically improve its support for new services. In the recent past, we've seen the adoption of CUPS (1999-2002) for printing and Sane (2000-2005) for scanning, enabling the use of Linux in the office environment, which, before these two, seemed only possible for the geek in search of a long night enjoying troubleshooting fun.&lt;br /&gt;
The current proposition has no less of an outrageous ambition than creating a Unified Multi Media Service (UMMS), which will enable playing audio and video (AV) from an application on any Linux platform (starting from MeeGo), without having to worry about anything more than its position on the screen and its possible initial transparency over the User Interface graphics.&lt;br /&gt;
  2 Purpose/audience&lt;br /&gt;
--------------------&lt;br /&gt;
The purpose of this document is to provide an understanding of a solution which could be used to deliver a unified service. This would enable a large community of developers to benefit from the best possible audio and video capabilities provided by various Linux implementations, without having to worry about the supporting HW.&lt;br /&gt;
It addresses the managers who wish to understand the requirements and the constraints required for such a solution, as well as the developers who will have to deliver a working implementation.&lt;br /&gt;
It focuses on an initial application for MeeGo TV, but it has been designed with the vision to expand, in a second phase, to all MeeGo verticals, starting with tablets. It is intended to go beyond TV and tablets and further, and experience a general adoption by the larger Linux community. Only MeeGo needs are described in this initial document.&lt;br /&gt;
  3 Overview&lt;br /&gt;
------------&lt;br /&gt;
MeeGo is an open source version of Linux which targets Netbooks, Tablets, Mobiles, Connected TV, and Automotive domains. MeeGo has the goals of delivering an optimized user experience and also enabling a community of developers to service applications across domains.&lt;br /&gt;
Unfortunately, not only does Linux not have a standard set of APIs to play audio and video (AV), but the existing main Linux AV Player APIs (Mplayer and Totem) do not cater to TV's needs:&lt;br /&gt;
Programming language independence&lt;br /&gt;
Management of protected high value content (Pay TV)&lt;br /&gt;
GPL license isolation&lt;br /&gt;
Support of TV features (broadcast, sub-title, language selection, aspect ratio, trick play, …)&lt;br /&gt;
Sophisticated transport independence (smooth streaming, forward error correction, ...)&lt;br /&gt;
Multiple back-end video pipe support&lt;br /&gt;
Support of new generation HW feature (for example, video as an OpenGL texture)&lt;br /&gt;
This document explains the constraints introduced by these requirements and provides possible solutions and recommendations.&lt;br /&gt;
&lt;br /&gt;
  4 Documentation&lt;br /&gt;
----------------------------&lt;br /&gt;
&lt;br /&gt;
Specifications [[File:Meego_Unified_MultiMedia_Service_V0.4.odt]] &amp;lt;br&amp;gt;&lt;br /&gt;
* [[UMMS_Architecture | General Architecture]] &amp;lt;br&amp;gt;&lt;br /&gt;
* [[UMMS_User_Manual | User Manual and Sample code]] &amp;lt;br&amp;gt;&lt;br /&gt;
* [[media:LinuxCon_2011_umms_introduction.pdf|Slides from Linux Conference Oct11 and Nov 11]]&lt;br /&gt;
&lt;br /&gt;
Javascript API&lt;br /&gt;
* [[TV Browser]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  5 Where is the code&lt;br /&gt;
-----------------&lt;br /&gt;
Visit MeeGo OBS and search for UMMS&lt;br /&gt;
https://build.meego.com&lt;br /&gt;
&lt;br /&gt;
or directly the GIT repo&lt;br /&gt;
git://gitorious.org/meego-middleware/umms.git&lt;/div&gt;</summary>
		<author><name>Noel</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/TV_Browser</id>
		<title>TV Browser</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/TV_Browser"/>
				<updated>2012-04-23T00:30:56Z</updated>
		
		<summary type="html">&lt;p&gt;Noel: /* 4, Documentation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= MeeGo TV Browser =&lt;br /&gt;
&lt;br /&gt;
== 1, Short expression of the need ==&lt;br /&gt;
&lt;br /&gt;
The TV industry, and in particular IPTV, has used browsers for years to create TV portals. In IPTV, specialized companies, such as ANT (Cambridge, UK), Opera (Oslo, Norway), or Access (Tokyo, Japan) have created specialized browsers for these use cases.&lt;br /&gt;
These specialized browsers were optimized for TV, at the detriment of their potential to surf the open internet.&lt;br /&gt;
Today, the requirement to browse the open internet are imposed on TV, so there is a need to provide an “open internet” capable browser, which can be integrated in a TV and can be used to create TV portals.&lt;br /&gt;
These portals are commonly used to provide the business logic which runs locally on the device and is written in AJAX. To enable the control of the TV and Media Center, an API accessible from JavaScript must be added to the browser.&lt;br /&gt;
&lt;br /&gt;
== 2, Purpose/audience ==&lt;br /&gt;
The purpose of this document is to provide an understanding of the solution which has been developed by the MeeGo TV project. It addresses the developers who will deliver a working implementation.&lt;br /&gt;
&lt;br /&gt;
== 3, Overview ==&lt;br /&gt;
The internet world has created browsers for the PC. Assuming not only a mouse and a keyboard, but also 50 cm viewing with a multiple window presentation layer and a skilled human driving the beast.&lt;br /&gt;
Unfortunately, a TV has neither a keyboard or a mouse, the vision is done from 3m, there is no windowing concept, and the Live TV presentation remains in control of the UI all the time. The TV needs a browser which address some critical issues.&lt;br /&gt;
Controllable by an external application.&lt;br /&gt;
* Instant start&lt;br /&gt;
* Accept alternative input method&lt;br /&gt;
* Support HW accelerated Video&lt;br /&gt;
* Asset browsing&lt;br /&gt;
* Web API for TV (conform to [http://www.oipf.tv/docs/Release2/V2.1/OIPF-T1-R2-Specification-Volume-5-Declarative-Application-Environment-v2_1-2011-06-21.pdf OpenIPTV Forum DAE specification])&lt;br /&gt;
** Open IPTV Forum DAE configuration API (section 7.3)&lt;br /&gt;
** Open IPTV Forum DAE broadcasting API (section 7.13)&lt;br /&gt;
** Open IPTV video DAE playback control (section 7.14)&lt;br /&gt;
* [[TV Browser Control API]]&lt;br /&gt;
* [[TV Browser Javascript API]]&lt;br /&gt;
* [[TV Browser Video HW acceleration]]&lt;br /&gt;
* [[TV Browser Transparency Management]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 4, Documentation ==&lt;br /&gt;
&lt;br /&gt;
Requirements&lt;br /&gt;
* [[File:Meego TV JavaScriptAPI requirement.pdf | Requirement for a TV Javascript API]]&amp;lt;br&amp;gt;&lt;br /&gt;
* [[File:Meego TV Browser V0.2.odt | Requirement for TV Browser]] &amp;lt;br&amp;gt;&lt;br /&gt;
* [http://www.oipf.tv/docs/Release2/V2.1/OIPF-T1-R2-Specification-Volume-5-Declarative-Application-Environment-v2_1-2011-06-21.pdf Declarative Application Environment V2.1]&lt;br /&gt;
&lt;br /&gt;
User Manual&lt;br /&gt;
* [[TV Browser Control API]]&lt;br /&gt;
* [[TV Browser Javascript API]]&lt;br /&gt;
* [[TV Browser Video HW acceleration]]&lt;br /&gt;
* [[TV Browser Transparency Management]]&lt;br /&gt;
&lt;br /&gt;
Related Topics&lt;br /&gt;
* Universal Multi Media Service [[umms | UMMS]]&lt;br /&gt;
&lt;br /&gt;
== 5, Where is the code ==&lt;br /&gt;
Visit MeeGo OBS and search for meego-tv-browser &lt;br /&gt;
https://build.meego.com&lt;br /&gt;
&lt;br /&gt;
or directly in the GIT repo&amp;lt;br&amp;gt;&lt;br /&gt;
http://meego.gitorious.org/meego-middleware/meego-tv-browser   git branch 874-base-webkit &amp;lt;br&amp;gt;&lt;br /&gt;
http://meego.gitorious.org/meego-middleware/mutter-meego-tv&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 6, How to Build the MeeGo TV browser with UMMS support ==&lt;br /&gt;
Visit the &amp;quot;How to build&amp;quot; wiki page to build the browser&lt;br /&gt;
http://wiki.meego.com/TV_Browser_How_to_Build&lt;/div&gt;</summary>
		<author><name>Noel</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/TV_Browser</id>
		<title>TV Browser</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/TV_Browser"/>
				<updated>2012-04-23T00:30:15Z</updated>
		
		<summary type="html">&lt;p&gt;Noel: /* MeeGo TV Browser */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= MeeGo TV Browser =&lt;br /&gt;
&lt;br /&gt;
== 1, Short expression of the need ==&lt;br /&gt;
&lt;br /&gt;
The TV industry, and in particular IPTV, has used browsers for years to create TV portals. In IPTV, specialized companies, such as ANT (Cambridge, UK), Opera (Oslo, Norway), or Access (Tokyo, Japan) have created specialized browsers for these use cases.&lt;br /&gt;
These specialized browsers were optimized for TV, at the detriment of their potential to surf the open internet.&lt;br /&gt;
Today, the requirement to browse the open internet are imposed on TV, so there is a need to provide an “open internet” capable browser, which can be integrated in a TV and can be used to create TV portals.&lt;br /&gt;
These portals are commonly used to provide the business logic which runs locally on the device and is written in AJAX. To enable the control of the TV and Media Center, an API accessible from JavaScript must be added to the browser.&lt;br /&gt;
&lt;br /&gt;
== 2, Purpose/audience ==&lt;br /&gt;
The purpose of this document is to provide an understanding of the solution which has been developed by the MeeGo TV project. It addresses the developers who will deliver a working implementation.&lt;br /&gt;
&lt;br /&gt;
== 3, Overview ==&lt;br /&gt;
The internet world has created browsers for the PC. Assuming not only a mouse and a keyboard, but also 50 cm viewing with a multiple window presentation layer and a skilled human driving the beast.&lt;br /&gt;
Unfortunately, a TV has neither a keyboard or a mouse, the vision is done from 3m, there is no windowing concept, and the Live TV presentation remains in control of the UI all the time. The TV needs a browser which address some critical issues.&lt;br /&gt;
Controllable by an external application.&lt;br /&gt;
* Instant start&lt;br /&gt;
* Accept alternative input method&lt;br /&gt;
* Support HW accelerated Video&lt;br /&gt;
* Asset browsing&lt;br /&gt;
* Web API for TV (conform to [http://www.oipf.tv/docs/Release2/V2.1/OIPF-T1-R2-Specification-Volume-5-Declarative-Application-Environment-v2_1-2011-06-21.pdf OpenIPTV Forum DAE specification])&lt;br /&gt;
** Open IPTV Forum DAE configuration API (section 7.3)&lt;br /&gt;
** Open IPTV Forum DAE broadcasting API (section 7.13)&lt;br /&gt;
** Open IPTV video DAE playback control (section 7.14)&lt;br /&gt;
* [[TV Browser Control API]]&lt;br /&gt;
* [[TV Browser Javascript API]]&lt;br /&gt;
* [[TV Browser Video HW acceleration]]&lt;br /&gt;
* [[TV Browser Transparency Management]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 4, Documentation ==&lt;br /&gt;
&lt;br /&gt;
Requirements&lt;br /&gt;
* [[File:Meego TV JavaScriptAPI requirement.pdf | Requirement for a TV Javascript API]]&amp;lt;br&amp;gt;&lt;br /&gt;
* [[File:Meego TV Browser V0.2.odt | Requirement for TV Browser]] &amp;lt;br&amp;gt;&lt;br /&gt;
* [http://www.oipf.tv/docs/Release2/V2.1/OIPF-T1-R2-Specification-Volume-5-Declarative-Application-Environment-v2_1-2011-06-21.pdf Declarative Application Environment V2.1]&lt;br /&gt;
&lt;br /&gt;
User Manual&lt;br /&gt;
* [[TV Browser Control API]]&lt;br /&gt;
* [[TV Browser Javascript API]]&lt;br /&gt;
* [[TV Browser Video HW Acceleration]]&lt;br /&gt;
* [[TV Browser Transparency Management]]&lt;br /&gt;
&lt;br /&gt;
Related Topics&lt;br /&gt;
* Universal Multi Media Service [[umms | UMMS]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 5, Where is the code ==&lt;br /&gt;
Visit MeeGo OBS and search for meego-tv-browser &lt;br /&gt;
https://build.meego.com&lt;br /&gt;
&lt;br /&gt;
or directly in the GIT repo&amp;lt;br&amp;gt;&lt;br /&gt;
http://meego.gitorious.org/meego-middleware/meego-tv-browser   git branch 874-base-webkit &amp;lt;br&amp;gt;&lt;br /&gt;
http://meego.gitorious.org/meego-middleware/mutter-meego-tv&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 6, How to Build the MeeGo TV browser with UMMS support ==&lt;br /&gt;
Visit the &amp;quot;How to build&amp;quot; wiki page to build the browser&lt;br /&gt;
http://wiki.meego.com/TV_Browser_How_to_Build&lt;/div&gt;</summary>
		<author><name>Noel</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Image_Creation_For_Beginners</id>
		<title>Image Creation For Beginners</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Image_Creation_For_Beginners"/>
				<updated>2011-06-24T23:30:41Z</updated>
		
		<summary type="html">&lt;p&gt;Noel: /* Creating a MeeGo Image */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== Creating a MeeGo Image ==&lt;br /&gt;
&lt;br /&gt;
Here are the simple steps on how to create a MeeGo image.&lt;br /&gt;
&lt;br /&gt;
For more in-depth information, go to the main Image Creator developer's guide: [[Image Creation]]&lt;br /&gt;
&lt;br /&gt;
'''STEP 1 - Download Meego Image Creator (MIC)'''&lt;br /&gt;
&lt;br /&gt;
MeeGo Image Creator is the tool we use to create MeeGo images.  &lt;br /&gt;
&lt;br /&gt;
To get it, you can:&lt;br /&gt;
&lt;br /&gt;
* Download MIC source from Gitorious:&lt;br /&gt;
http://meego.gitorious.org/meego-developer-tools/image-creator&lt;br /&gt;
* Or, for Debian Squeeze, add the following line to /etc/apt/sources.list and install (using apt-get) ''mic2'':&lt;br /&gt;
 deb &amp;lt;nowiki&amp;gt;http://repo.meego.com/tools/repos/debian/5.0/&amp;lt;/nowiki&amp;gt; /&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More on installation dependencies and options on downloading MIC, go to the 'Installation' section here: [[Image_Creation#Requirements]]&lt;br /&gt;
&lt;br /&gt;
'''STEP 2 - Get MeeGo .ks File'''&lt;br /&gt;
&lt;br /&gt;
KickStart (.ks) configuration files are passed to MIC to create images. KickStart files specify what repos to pull from, what packages to include, what post-scripts to run and what type of images to create.&lt;br /&gt;
&lt;br /&gt;
*The official MeeGo .ks files for ARM based Nokia N900 are here: http://repo.meego.com/MeeGo/builds/trunk/ &amp;lt;version&amp;gt;/handset/images/meego-handset-armv7l-n900/&lt;br /&gt;
*The official MeeGo .ks files for Intel Atom based netbook and handset (Moorestown) are here:  http://repo.meego.com/MeeGo/builds/trunk/ &amp;lt;version&amp;gt;/{netbook,handset,ivi}/images&lt;br /&gt;
&lt;br /&gt;
You can download and use them as a base for the MeeGo images you create. Modify these .ks files as you wish to create tailored images. &lt;br /&gt;
&lt;br /&gt;
We will use the netbook kickstart file to create a MeeGo netbook image: http://repo.meego.com/MeeGo/builds/trunk/1.1.80.7.20101119.1/netbook/images/meego-netbook-ia32/meego-netbook-ia32-1.1.80.7.20101119.1.ks (This is the latest file on November 19, 2010. Please adjust the URL to get the latest version!)&lt;br /&gt;
&lt;br /&gt;
It seems that the &amp;quot;@Core&amp;quot; and &amp;quot;@Base&amp;quot; have been renamed &amp;quot;@Meego Core&amp;quot; and &amp;quot;@Meego Base&amp;quot;, so I suggest you to edit the .ks file to rename the package with the good name.&lt;br /&gt;
&lt;br /&gt;
'''STEP 3 - Create MeeGo Livecd Image'''&lt;br /&gt;
&lt;br /&gt;
MIC has to be run with root privileges using 'sudo'.&lt;br /&gt;
&lt;br /&gt;
Here is the command to create a MeeGo livecd image you can burn onto a CD.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo mic-image-creator --config=default.ks --format=livecd --cache=mycache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A file named meego-1.0-default-XX.iso is created.  This ISO image is a hybrid image and can be either written to a disk device or burned onto a cd. &lt;br /&gt;
&lt;br /&gt;
'''STEP 4 - Create MeeGo LiveUSB Image'''&lt;br /&gt;
&lt;br /&gt;
To create a MeeGo liveusb image that you can transfer to a USB stick.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo mic-image-creator --config=default.ks --format=liveusb --cache=mycache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A file named meego-1.0-default-XX.usbimg will be created. To burn it onto a USB stick, run the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo mic-image-writer meego-1.0-default-XX.usbimg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This image has a FAT file system and can be mounted easily on Windows and other OSes. &lt;br /&gt;
&lt;br /&gt;
'''---FOR ADDITIONAL INFORMATION ON MIC, PLEASE VISIT THE MIC DEVELOPER'S GUIDE HERE: [[Image Creation]]---'''&lt;br /&gt;
&lt;br /&gt;
== Configure Proxy and Other Variables ==&lt;br /&gt;
&lt;br /&gt;
~/.mic2.conf is a configuration file that can make your life easier by specifying proxy settings, cache directories, and other variables that you normally would have to re-type in your command-line. &lt;br /&gt;
&lt;br /&gt;
Copy and paste this into a file called:  ~/.mic2.conf&lt;br /&gt;
&lt;br /&gt;
Replace with your own relevant values.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[main]&lt;br /&gt;
cachedir=/home/user1/mycache&lt;br /&gt;
tmpdir=/home/user1/mystorage/tmp&lt;br /&gt;
outdir=/home/user1/mystorage&lt;br /&gt;
proxy=http://my.proxy.com:911/&lt;br /&gt;
no_proxy=localhost,127.0.0.0/8,.mysite.com,172.16.0.0/16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''cachedir'' = directory where the cached repo(s) will reside.  With this variable set, you do not need to pass the --cache flag in the command-line.&lt;br /&gt;
&lt;br /&gt;
''tmpdir'' = temporary directory used by mic2 when creating images.  With this variable set, you do not need to pass the --tmpdir flag in the command-line.&lt;br /&gt;
&lt;br /&gt;
''outdir'' = where your images will reside once they are created.  With this variable set, you do not need to pass the --outdir flag in the command-line.&lt;br /&gt;
&lt;br /&gt;
''proxy'' = specify your proxy if you're behind a behind a firewall.&lt;br /&gt;
&lt;br /&gt;
''no_proxy'' = specify what domains should not sure the proxy setting.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' When specifying proxy and no_proxy, you do not need to use the --proxy flag in your .ks files when referring to repos.&lt;br /&gt;
&lt;br /&gt;
'''---FOR ADDITIONAL INFORMATION ON MIC, PLEASE VISIT THE MIC DEVELOPER'S GUIDE HERE: [[Image_Creation]]---'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Another language version of this page ==&lt;br /&gt;
&lt;br /&gt;
* [[适合新手的镜像制作-_-简体中文]]&lt;/div&gt;</summary>
		<author><name>Noel</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/Image_Creation_For_Beginners</id>
		<title>Image Creation For Beginners</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/Image_Creation_For_Beginners"/>
				<updated>2011-06-24T23:28:58Z</updated>
		
		<summary type="html">&lt;p&gt;Noel: /* Creating a MeeGo Image */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== Creating a MeeGo Image ==&lt;br /&gt;
&lt;br /&gt;
Here are the simple steps on how to create a MeeGo image.&lt;br /&gt;
&lt;br /&gt;
For more in-depth information, go to the main Image Creator developer's guide: [[Image Creation]]&lt;br /&gt;
&lt;br /&gt;
'''STEP 1 - Download Meego Image Creator (MIC)'''&lt;br /&gt;
&lt;br /&gt;
MeeGo Image Creator is the tool we use to create MeeGo images.  &lt;br /&gt;
&lt;br /&gt;
To get it, you can:&lt;br /&gt;
&lt;br /&gt;
* Download MIC source from Gitorious:&lt;br /&gt;
http://meego.gitorious.org/meego-developer-tools/image-creator&lt;br /&gt;
* Or, for Debian Squeeze, add the following line to /etc/apt/sources.list and install (using apt-get) ''mic2'':&lt;br /&gt;
 deb &amp;lt;nowiki&amp;gt;http://repo.meego.com/tools/repos/debian/5.0/&amp;lt;/nowiki&amp;gt; /&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More on installation dependencies and options on downloading MIC, go to the 'Installation' section here: [[Image_Creation#Requirements]]&lt;br /&gt;
&lt;br /&gt;
'''STEP 2 - Get MeeGo .ks File'''&lt;br /&gt;
&lt;br /&gt;
KickStart (.ks) configuration files are passed to MIC to create images. KickStart files specify what repos to pull from, what packages to include, what post-scripts to run and what type of images to create.&lt;br /&gt;
&lt;br /&gt;
*The official MeeGo .ks files for ARM based Nokia N900 are here: http://repo.meego.com/MeeGo/builds/trunk/ &amp;lt;version&amp;gt;/handset/images/meego-handset-armv7l-n900/&lt;br /&gt;
*The official MeeGo .ks files for Intel Atom based netbook and handset (Moorestown) are here:  http://repo.meego.com/MeeGo/builds/trunk/ &amp;lt;version&amp;gt;/{netbook,handset,ivi}/images&lt;br /&gt;
&lt;br /&gt;
You can download and use them as a base for the MeeGo images you create. Modify these .ks files as you wish to create tailored images. &lt;br /&gt;
&lt;br /&gt;
We will use the netbook kickstart file to create a MeeGo netbook image: http://repo.meego.com/MeeGo/builds/trunk/1.1.80.7.20101119.1/netbook/images/meego-netbook-ia32/meego-netbook-ia32-1.1.80.7.20101119.1.ks (This is the latest file on November 19, 2010 hence please adjust the URL to get the latest version!)&lt;br /&gt;
&lt;br /&gt;
It seems that the &amp;quot;@Core&amp;quot; and &amp;quot;@Base&amp;quot; have been renamed to &amp;quot;@Meego Core&amp;quot; and &amp;quot;@Meego Base&amp;quot; so i suggest you to edit the .ks file to rename the package with the good name.&lt;br /&gt;
&lt;br /&gt;
'''STEP 3 - Create MeeGo Livecd Image'''&lt;br /&gt;
&lt;br /&gt;
MIC has to be run with root privileges using 'sudo'.&lt;br /&gt;
&lt;br /&gt;
Here is the command to create a MeeGo livecd image you can burn onto a CD.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo mic-image-creator --config=default.ks --format=livecd --cache=mycache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A file named meego-1.0-default-XX.iso is created.  This ISO image is a hybrid image and can be either written to a disk device or burned onto a cd. &lt;br /&gt;
&lt;br /&gt;
'''STEP 4 - Create MeeGo LiveUSB Image'''&lt;br /&gt;
&lt;br /&gt;
To create a MeeGo liveusb image that you can transfer to a USB stick.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo mic-image-creator --config=default.ks --format=liveusb --cache=mycache&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A file named meego-1.0-default-XX.usbimg will be created. To burn it onto a USB stick, run the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo mic-image-writer meego-1.0-default-XX.usbimg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This image has a FAT file system and can be mounted easily on Windows and other OSes. &lt;br /&gt;
&lt;br /&gt;
'''---FOR ADDITIONAL INFORMATION ON MIC, PLEASE VISIT THE MIC DEVELOPER'S GUIDE HERE: [[Image Creation]]---'''&lt;br /&gt;
&lt;br /&gt;
== Configure Proxy and Other Variables ==&lt;br /&gt;
&lt;br /&gt;
~/.mic2.conf is a configuration file that can make your life easier by specifying proxy settings, cache directories, and other variables that you normally would have to re-type in your command-line. &lt;br /&gt;
&lt;br /&gt;
Copy and paste this into a file called:  ~/.mic2.conf&lt;br /&gt;
&lt;br /&gt;
Replace with your own relevant values.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[main]&lt;br /&gt;
cachedir=/home/user1/mycache&lt;br /&gt;
tmpdir=/home/user1/mystorage/tmp&lt;br /&gt;
outdir=/home/user1/mystorage&lt;br /&gt;
proxy=http://my.proxy.com:911/&lt;br /&gt;
no_proxy=localhost,127.0.0.0/8,.mysite.com,172.16.0.0/16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''cachedir'' = directory where the cached repo(s) will reside.  With this variable set, you do not need to pass the --cache flag in the command-line.&lt;br /&gt;
&lt;br /&gt;
''tmpdir'' = temporary directory used by mic2 when creating images.  With this variable set, you do not need to pass the --tmpdir flag in the command-line.&lt;br /&gt;
&lt;br /&gt;
''outdir'' = where your images will reside once they are created.  With this variable set, you do not need to pass the --outdir flag in the command-line.&lt;br /&gt;
&lt;br /&gt;
''proxy'' = specify your proxy if you're behind a behind a firewall.&lt;br /&gt;
&lt;br /&gt;
''no_proxy'' = specify what domains should not sure the proxy setting.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' When specifying proxy and no_proxy, you do not need to use the --proxy flag in your .ks files when referring to repos.&lt;br /&gt;
&lt;br /&gt;
'''---FOR ADDITIONAL INFORMATION ON MIC, PLEASE VISIT THE MIC DEVELOPER'S GUIDE HERE: [[Image_Creation]]---'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Another language version of this page ==&lt;br /&gt;
&lt;br /&gt;
* [[适合新手的镜像制作-_-简体中文]]&lt;/div&gt;</summary>
		<author><name>Noel</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/MeeGo_Porting_Guide</id>
		<title>MeeGo Porting Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/MeeGo_Porting_Guide"/>
				<updated>2011-06-24T23:27:01Z</updated>
		
		<summary type="html">&lt;p&gt;Noel: /* Production Adaptation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The goal of MeeGo Porting Guide (MPG) is to provide valuable information and instructions to people who want to run MeeGo OS on their (new) HW and eventually create products based on the MeeGo OS. The MPG starts with an overview of the porting process, tools, and other related background information and then moves on to describing what the porting actually means in individual technical/functional areas.&lt;br /&gt;
&lt;br /&gt;
The porting guide is not strictly tied to any particular MeeGo OS version or device category. Instead, it tries to be general enough to cover the different device categories, as well as follow changes introduced in new MeeGo OS versions.&lt;br /&gt;
&lt;br /&gt;
Detailed porting information in the different technical areas is dependent on the respective [http://meego.com/developers/meego-architecture MeeGo architecture]. In some cases, this architecture may still be open and this is noted in the applicable sections.&lt;br /&gt;
&lt;br /&gt;
=== Feedback ===&lt;br /&gt;
&lt;br /&gt;
Contribution to these pages is open. Any MeeGo community member is free to ''improve'' these pages at any time. You can also leave feedback in the [http://lists.meego.com/listinfo/meego-porting MeeGo porting mailing list].&lt;br /&gt;
&lt;br /&gt;
== General porting information/guidelines ==&lt;br /&gt;
&lt;br /&gt;
=== MeeGo compliance ===&lt;br /&gt;
&lt;br /&gt;
Perhaps the most important piece of background information related to the MPG are the [[Quality/Compliance|MeeGo compliance requirements]]. A device that is meant to be MeeGo compliant will need to fulfill the requirements listed in the MeeGo compliance specification for the applicable device category (the first version of the specification is supposed to be available in October 2010). In short, a MeeGo compliant device will need to:&lt;br /&gt;
* Meet the minimum HW performance and component requirements for the applicable device category&lt;br /&gt;
* Include all SW components that form the MeeGo core OS&lt;br /&gt;
* Include the additional SW components required to be present in devices in the applicable device category&lt;br /&gt;
* Not break the API/ABI of any of the components coming from MeeGo&lt;br /&gt;
* Follow the MeeGo SW packaging conventions&lt;br /&gt;
&lt;br /&gt;
The compliance rules will also specify CPU architecture specific requirements concerning how MeeGo OS itself and MeeGo applications are to be compiled to different environments (instruction set used, compiler version, compiler options, etc.).&lt;br /&gt;
&lt;br /&gt;
A device vendor may include additional functionality, HW components and SW components in their devices, as long as they don't break MeeGo compliance. The vendor can also patch MeeGo OS components, if the patches don't break MeeGo compliance. A device vendor's own SW components can be either open source or closed source components, as long as they adhere to the rules set by the applicable SW licenses.&lt;br /&gt;
&lt;br /&gt;
From the MeeGo Porting Guide perspective, by defining the SW components and HW components that need to be present, the compliance requirements effectively define the minimum set of porting tasks required from a device vendor and what SW components are involved from MeeGo OS side.&lt;br /&gt;
&lt;br /&gt;
=== Porting process and tools ===&lt;br /&gt;
&lt;br /&gt;
==== Overview ====&lt;br /&gt;
&lt;br /&gt;
As long as a vendor's device is MeeGo compliant, as defined above, it is basically up to the vendor to decide how they build the SW that ends up in the device. The vendor may use their own build machinery or set up an OBS build system that is also used in MeeGo. Regardless of what the vendor's build system is, it needs to integrate with the MeeGo build infrastructure, at least to fetch the MeeGo source packages for the builds, as well as build each MeeGo component in the same way as it would be built in the MeeGo build system (such as with the same compiler and compiler options). Whatever the case, the intention in MeeGo is to use and offer an open toolset that any HW or SW vendor can use for efficient SW creation. It is likely that using the same toolset as MeeGo, will offer the easiest way to integrate vendor's own build system with the the MeeGo build infrastructure.&lt;br /&gt;
&lt;br /&gt;
The key ingredients of the MeeGo build infrastructure and toolset are:&lt;br /&gt;
* [http://meego.gitorious.org MeeGo Gitorious]&lt;br /&gt;
** A version control system for the source files of various MeeGo specific SW components and tools&lt;br /&gt;
* [http://build.meego.com MeeGo OBS]&lt;br /&gt;
** The build system that is used to build MeeGo packages (RPMs) from their sources&lt;br /&gt;
* [http://repo.meego.com MeeGo Repository]&lt;br /&gt;
** The place where the built MeeGo releases, that is where MeeGo packages and images are stored&lt;br /&gt;
* [http://wiki.meego.com/Image_Creation MeeGo Image Creator]&lt;br /&gt;
** The tool used to build MeeGo images that can be installed/flashed on HW&lt;br /&gt;
* MeeGo release tools&lt;br /&gt;
** Tools such as BOSS and REVS that are used in the creation of the MeeGo releases under repo.meego.com&lt;br /&gt;
&lt;br /&gt;
For additional information, see [[Build Infrastructure]], [[Release Infrastructure]] and [[Release Engineering]].&lt;br /&gt;
&lt;br /&gt;
For another overview of the MeeGo porting process, see [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process].&lt;br /&gt;
&lt;br /&gt;
==== Vendor's own OBS ====&lt;br /&gt;
&lt;br /&gt;
So, ultimately, when creating actual products running the MeeGo OS, the vendor may end up setting up their own OBS build system. Setting up your own OBS system may also be beneficial in earlier HW/product development phases, as it offers a flexible way to modify and build MeeGo OS to test it on the new HW. The vendor's own OBS system can link to the MeeGo OBS for handling packages that come directly from MeeGo and it can link to other sources for handling, such as closed source packages that are specific to the vendor. See [[Release_Engineering/Process#Making a product out of MeeGo Release|an overview picture of this setup]].&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Sets up their own OBS system&lt;br /&gt;
** [[User:Stskeeps/10_easy_steps_to_a_local_OBS|Instructions related to setting up an OBS system]],  [[Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE112|OBS Applicances]] [http://en.opensuse.org/openSUSE:Build_Service_private_instance Open Suse OBS Wiki].&lt;br /&gt;
* Creates projects under the their own OBS for their own components&lt;br /&gt;
* Links their own OBS to the MeeGo OBS for MeeGo components&lt;br /&gt;
* May have trial patches to MeeGo components in their own OBS&lt;br /&gt;
** NOTE. Eventually all patches to MeeGo components required in a final MeeGo based product ''should'' be pushed to MeeGo.com. However, this is not an absolute must requirement, as long as the MeeGo compliance requirements and applicable SW license rules are fulfilled. &lt;br /&gt;
** See [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below&lt;br /&gt;
* Needs to set up the necessary machinery to create releases and images from the packages built with OBS&lt;br /&gt;
** This machinery can be based on the toolset used in MeeGo (see above)&lt;br /&gt;
&lt;br /&gt;
==== Working under MeeGo.com ====&lt;br /&gt;
&lt;br /&gt;
Another way of porting MeeGo to some new HW is to get the new HW accepted as one MeeGo reference HW and have the MeeGo build machinery create builds for the reference HW as a part of the normal MeeGo release building cycle (see [[Release Engineering/Release Timeline|Release Timeline]] and [[Release Engineering/Process|Release Process]]). This setup can also include QA support for the reference HW on the MeeGo side (see [[Quality]]). At the time of this writing, the actual process of getting new reference HW to MeeGo is still somewhat unclear. In any case, this model requires active participation from the vendor in MeeGo work in general and especially in supporting their reference HW in MeeGo.&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Creates a device/platform development project under the MeeGo OBS for their components. The open source components would then get submitted to MeeGo Trunk:Testing and get reviewed like any other MeeGo component for inclusion.&lt;br /&gt;
** Note that it is also possible to have closed source binary components in the MeeGo OBS to be included in the MeeGo builds for some reference HW. These are submitted to the Trunk:non-oss repository. Licensing is usually required to at least include redistributability, as the components cannot be mirrored from or hosted at repo.meego.com otherwise. It is not possible to have components within Trunk:Testing require closed source dependencies.&lt;br /&gt;
* Pushes patches to other MeeGo components at MeeGo.com as necessary (see [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below)&lt;br /&gt;
* Creates (or supports the creation of) a MIC kickstart file for building images for their reference HW&lt;br /&gt;
* As necessary, supports adding support for their reference HW and SW components in the MeeGo build and release infrastructure tools&lt;br /&gt;
&lt;br /&gt;
==== Trials ====&lt;br /&gt;
&lt;br /&gt;
A lightweight but also more limited &amp;quot;try it out&amp;quot; alternative to the above processes is discussed below.&lt;br /&gt;
&lt;br /&gt;
===== Initial bring-up attempt =====&lt;br /&gt;
&lt;br /&gt;
* Grab the already built root filesystem / image for a MeeGo reference device that's the closest to your target. For ARMv7, this is typically the Nokia N900 handset image. For Atom, this could be netbook image or handset image.&lt;br /&gt;
* Build a Linux kernel for your device and install the modules into /lib/modules.&lt;br /&gt;
* Boot the root filesystem and modify the configuration and drop in components to bring up the device to UX. Note down the things you had to modify or add, as this will be input for your porting work.&lt;br /&gt;
&lt;br /&gt;
===== Building your first image =====&lt;br /&gt;
&lt;br /&gt;
The second step to a proper hardware adaptation is making sure you can build your own image. Because we based our work before on a reference device image, it makes sense to try to build this image first. MeeGo images are constructed on the basis of so called 'kickstart files', which describe the intended contents of an image. &lt;br /&gt;
&lt;br /&gt;
* Install the MeeGo Image Creator tool (MIC)&lt;br /&gt;
* Download the kickstart file (.ks) from the same directory you found your reference device image. &lt;br /&gt;
* Create a image using mic-image-creator (should be elaborated).&lt;br /&gt;
* Test out your freshly baked image as in the previous step.&lt;br /&gt;
&lt;br /&gt;
===== Building your port's first reproduciable image =====&lt;br /&gt;
&lt;br /&gt;
* Download the MeeGo kernel, possibly modifying the kernel with additional patches (including new device drivers) and building the kernel (see [[#Getting_new_chipset_support_to_the_MeeGo_kernel|''Getting new chipset support to the MeeGo kernel'']] below). &lt;br /&gt;
* Add the repository containing your kernel package to the kickstart file (to be elaborated)&lt;br /&gt;
* Remove parts of the kickstart file specific to the reference device.&lt;br /&gt;
* Add a mention of your kernel package in the %packages section.&lt;br /&gt;
* Build packages or include shell scripts in %post section of kickstart file that adds/modifies configuration fitting your device.&lt;br /&gt;
&lt;br /&gt;
A detailed description of a variation of this model can be found from [[ARM/Meego on Beagleboard from scratch|here]] (Better description needed).&lt;br /&gt;
&lt;br /&gt;
==== Getting new chipset support to the MeeGo kernel ====&lt;br /&gt;
&lt;br /&gt;
See [[How-to: getting new chipset support to the MeeGo kernel]] for more detailed information about how to work with the MeeGo kernel and make it support new HW.&lt;br /&gt;
&lt;br /&gt;
=== Upstream projects, MeeGo, products, and patches ===&lt;br /&gt;
&lt;br /&gt;
When building a product based on MeeGo, the product vendor will typically augment the MeeGo OS with their own SW components, as well as make fixes and adjustments to the MeeGo OS code (in the limits set by the compliance rules). While vendors can manage their own SW components as they wish, the strong preference is that any changes made to the MeeGo OS SW components are delivered as patches primarily to the respective upstream projects or secondarily to MeeGo.com. In this way, vendors can relieve themselves of the burden of managing a potentially big patch set on top of MeeGo OS, and also verify the quality and safety of their patches. Having the patches in upstream projects again lessens the patch set management load at MeeGo.com.&lt;br /&gt;
&lt;br /&gt;
For information about pushing patches to MeeGo, see [http://meego.com/about/contribution-guidelines Contribution Guidelines] and [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process] (especially section ''How Do Patches Get Integrated and Accepted?'') and [http://meego.gitorious.org/meego-os-base/kernel-source/blobs/master/README.workflow Kernel workflow].&lt;br /&gt;
&lt;br /&gt;
=== Adaptation subsystems and interfaces ===&lt;br /&gt;
&lt;br /&gt;
In the MeeGo architecture model (see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view MeeGo Architecture Domain View]), adaptation is represented as adaptation subsystems. SW components in the adaptation subsystem ''realizations'' do things that are expected by the OS and communicate with the OS through interfaces defined by the OS.&lt;br /&gt;
 &lt;br /&gt;
The key goal in the sections below is to identify the interface(s) that the adaptation SW needs to implement/use to communicate with the OS in the required manner. Behind these interfaces, the adaptation SW can basically handle the required functionality as it sees best. In some cases, however, there may also be some preferred way of implementing the adaptation.&lt;br /&gt;
&lt;br /&gt;
In some areas, the adaptation work may consist of just writing a suitable Linux device driver for the HW in question. In some other areas, the adaptation work may consist of writing one or more device drivers, as well as one or more user space components (such as plugins to some user space SW frameworks). Various configuration file changes may also be required as a part of the adaptation work.&lt;br /&gt;
&lt;br /&gt;
== Porting by adaptation subsystems ==&lt;br /&gt;
&lt;br /&gt;
=== System Core Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Boot ====&lt;br /&gt;
&lt;br /&gt;
MeeGo places no restrictions as to what SW components are used to handle the pre-OS boot phases in a MeeGo compliant device. Thus, vendors are free to choose, for example, the boot loader, as they see fit. Note, however, that full use of the MeeGo platform security requires that the pre-OS boot phases form a trusted boot chain that ultimately builds on chipset-level security support.&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, MeeGo does not define anything special with regard to what information the boot loader is expected to pass to the Linux kernel, such as via the kernel command line.&lt;br /&gt;
&lt;br /&gt;
The kernel-level boot phases can be tailored, as necessary, to the specific CPU, chipset, or device in a standard Linux manner.&lt;br /&gt;
&lt;br /&gt;
The post-kernel boot phases (startup scripts) can be tailored by device vendors as necessary for their devices in the limits set by MeeGo compliance requirements (certain SW components need to be present in the system).&lt;br /&gt;
&lt;br /&gt;
==== Kernel fundamentals ====&lt;br /&gt;
&lt;br /&gt;
Regarding the Linux kernel, each MeeGo release defines the kernel version to be used and a set of patches on top of that. In addition, the Linux kernel used in MeeGo compliant devices is assumed to have been built with a set of fixed build-time configuration values that are not allowed to be changed. In addition to the fixed values, device vendors can define other kernel configuration values, as required by their devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo does not place any special requirements concerning how the boot loader passes information to the kernel or how the HW configuration and initialization of the system is handled.&lt;br /&gt;
&lt;br /&gt;
CPU, chipset (SoC), and device vendors are assumed to implement the elementary CPU architecture/chipset/device support for the Linux kernel used in MeeGo in a standard Linux manner. This includes:&lt;br /&gt;
* HW (board) configuration&lt;br /&gt;
* Mapping the fundamental Linux kernel functionality (such as IRQ, DMA, GPIO, RTC and memory handling) to the HW in question&lt;br /&gt;
* Creation/modification of the necessary device drivers to support the core SoC interfaces (such as I2C, SPI, SDIO)&lt;br /&gt;
* Permanent memory support&lt;br /&gt;
* Debugging and tracing support&lt;br /&gt;
&lt;br /&gt;
==== Power and thermal management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, the understanding is that MeeGo in general relies on established Linux kernel frameworks and APIs for power management. Some of these frameworks and APIs may be applicable only in certain CPU architectures. In addition, the HW capabilities related to power management may vary between different HW platforms potentially meaning that the SW is assumed perform somewhat different tasks in different environments.&lt;br /&gt;
&lt;br /&gt;
The Linux power management frameworks and APIs include:&lt;br /&gt;
* CPU frequency control (support for the different voltage and frequency operating points) via the cpufreq infrastructure&lt;br /&gt;
* CPU idle state management (different levels of sleep) through the cpuidle infrastructure&lt;br /&gt;
* Clock management through the clock framework&lt;br /&gt;
* Suspend/resume&lt;br /&gt;
* Runtime power management&lt;br /&gt;
* HW voltage/current regulator control via the regulator framework&lt;br /&gt;
* PM_QOS (power management quality of service) framework for making and listening to PM QoS requests&lt;br /&gt;
&lt;br /&gt;
Whether MeeGo will have some user space SW components or framework related to power management is under discussion at the time of this writing.&lt;br /&gt;
&lt;br /&gt;
In the thermal management area, the Device State Management Entity (DSME) component in the Device Health subsystem is supposed to make thermal state management decisions in the system. The DSME has a thermal manager module that again uses other DSME modules (thermal objects) to access the actual thermal sensor information in the HW. To port this functionality to new HW, one or more DSME thermal object modules need to be implemented.&lt;br /&gt;
&lt;br /&gt;
The APIs that the thermal object modules use to access the thermal sensor information are not strictly defined by MeeGo. At device driver level, however, the preferred approach is to use standard Linux interfaces such as the generic thermal sysfs API or the hwmon sysfs API.&lt;br /&gt;
&lt;br /&gt;
==== Energy management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, basically the only thing that MeeGo requires from HW adaptation in the energy management area (battery charging and monitoring) is support for the Linux power supply sysfs class. Additional energy management related functionality can be handled in a vendor specific manner.&lt;br /&gt;
&lt;br /&gt;
==== Device state ====&lt;br /&gt;
&lt;br /&gt;
The DSME component participates in device state management, such as by managing device run level, reboot, and shutdown, by monitoring the device thermal state, and shutting down the device in fatal thermal conditions, and by handling HW watchdog kicking activity.&lt;br /&gt;
&lt;br /&gt;
In a new HW environment, the DSME needs to be adapted to handle the watchdog kicking through the right device driver interfaces and at the right intervals. In addition, to port the DSME thermal management functionality to new HW, one or more DSME thermal object modules need to be implemented as described above, in the [[#Power_and_thermal_management|''Power and thermal management'']] section.&lt;br /&gt;
&lt;br /&gt;
=== Security Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Work is ongoing in bringing platform security functionality to the MeeGo OS based on the Mandatory Access Control (MAC), Integrity Measurement Architecture (IMA) and Extended Verification Module (EVM) technologies in the Linux kernel. Maximum security can be reached if the MeeGo platform security functionality can rely on trusted platform support &amp;quot;below&amp;quot; the Linux kernel, effectively in the HW and the boot loader(s). MeeGo, however, places no strict requirements as to how the trusted platform support is implemented in MeeGo based devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo also includes the OpenSSL open source toolkit implementing general purpose cryptography functionality. Algorithms and operations supported by the OpenSSL toolkit can be accelerated in HW by using the OpenSSL engine architecture. OpenSSL also supports a cryptodev engine that uses crypto algorithms implemented in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Some devices may have a security watchdog in the HW that needs &amp;quot;kicking&amp;quot; at regular intervals to keep the device up and running. In MeeGo, watchdog kicking functionality is implemented in the Device State Management Entity (DSME) component. If security watchdog kicking is needed, the DSME needs to be adapted to handle that through the right device driver interface and at the right intervals.&lt;br /&gt;
&lt;br /&gt;
=== Device Mode Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Resource Policy ====&lt;br /&gt;
&lt;br /&gt;
The Resource (Policy) Manager component in the Device Health subsystem offers a generic framework for:&lt;br /&gt;
* Monitoring device and application events&lt;br /&gt;
* Managing policies that specify rules about what should happen in the device when certain events occur&lt;br /&gt;
* Making policy decisions when events occur (determining the needed changes in the device)&lt;br /&gt;
* Enforcing changes in the system through policy enforcement points&lt;br /&gt;
&lt;br /&gt;
The Resource Manager can be used, for example, to change the audio routing in the device, when the user attaches a wired headset to the device.&lt;br /&gt;
&lt;br /&gt;
Event listening and change enforcement in the Resource Manager happens through plugin modules. Using the MeeGo OS in some new device effectively involves creating suitable Resource Manager policies and writing the necessary plugins for listening device/application events and changing device behavior accordingly. Though not pure HW adaptation, this can be considered a form of MeeGo OS &amp;quot;device adaptation&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Mode Control Entity (MCE) ====&lt;br /&gt;
&lt;br /&gt;
The MCE component (starting from MeeGo 1.2) can be used to listen to events that have an impact to the device mode (such as touch screen locked vs. unlocked) and change the device mode accordingly. The MCE is used, for example, to: &lt;br /&gt;
* Listen to various keys and switches in the device (such as power key, volume key, camera button, slider switch)&lt;br /&gt;
* Control LEDs&lt;br /&gt;
* Enabling/disabling touch screen or HW keyboard, depending on device state&lt;br /&gt;
* Control keyboard backlight&lt;br /&gt;
* Control display state (on/off) and brightness&lt;br /&gt;
&lt;br /&gt;
The MCE has its own plugin architecture that can be used to adapt it to different HW environments.&lt;br /&gt;
&lt;br /&gt;
=== Display and Graphics Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo visual services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view]. &lt;br /&gt;
&lt;br /&gt;
The key ingredients of the display and graphics architecture in MeeGo are the X Window System (X Server with its extensions) and the Khronos graphics APIs (OpenGL ES, OpenVG, and EGL with their extensions).&lt;br /&gt;
&lt;br /&gt;
The display and graphics HW adaptation SW needs to enable the X Window System and the Khronos APIs to function on the device HW. In practice, the adaptation SW needs to have an X display/video driver (hosted inside the X Server) and libraries that implement the Khronos graphics APIs, both supporting the features and functionality required by MeeGo. Also, some configuration file changes may be needed. Any additional user space and kernel space components needed for the HW adaptation are implementation dependent.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering display content to external displays, the Resource Manager component may be used to coordinate the display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Audio Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The audio architecture in MeeGo is centered around the GStreamer and PulseAudio frameworks. In addition, the Resource Manager plays a role in coordinating the audio related behavior of the device (audio routings). The audio HW adaptation SW needs to provide GStreamer elements and PulseAudio plugins that enable the GStreamer and PulseAudio client interfaces used, for example, for audio playback, recording, and volume control to work on the device. Typical required components include, for example, codec elements for GStreamer and sink/source plugins for PulseAudio.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer and PulseAudio plugins, the audio HW adaptation SW can be implemented with different technologies and APIs, including ALSA and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework, as needed. Use of the ALSA framework and APIs is encouraged, however, as they allow significant reuse of components and functionality on the PulseAudio level and are already a part of the upstream Linux kernel. If ALSA is not used to implement the kernel side parts of the audio adaptation, the solution that is used instead should still be aligned with the upstream Linux kernel.&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo media services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view].&lt;br /&gt;
&lt;br /&gt;
=== Camera Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo still imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework and the CameraBin GStreamer element. The still imaging HW adaptation SW is required to contain a GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element. Thus, the required HW adaptation interfaces are the relevant GStreamer plugin interfaces and especially the interfaces expected by the CameraBin element, in particular the GstPhotography interface.&lt;br /&gt;
&lt;br /&gt;
If HW accelerated encoders are supported, they should be also offered to the system as GStreamer elements.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
=== Video and Imaging Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo video imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework, the CameraBin GStreamer element (video recording) and the Playbin2 GStreamer element (video playback). The video imaging HW adaptation SW is required to contain:&lt;br /&gt;
:* A GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element (this is common with still imaging) &lt;br /&gt;
:* If HW accelerated codecs are supported, GStreamer elements that wrap the codecs&lt;br /&gt;
:* If HW accelerated filters are supported (such as video scaler, rotation engines, color conversion engines), GStreamer elements that wrap the filters&lt;br /&gt;
:* A GStreamer video sink element that offers the GStreamer X Overlay Interface. Note that if the XVideo extension is supported on the X Server side, the xvimagesink element can be used as the video sink element and no new elements are needed.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the video imaging HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering video content to external displays, the Resource Manager component may be used to coordinate the video/display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Communications Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo communications services architecture, see [http://meego.com/developers/meego-architecture/comms-services Comms Services].&lt;br /&gt;
&lt;br /&gt;
==== Cellular ====&lt;br /&gt;
&lt;br /&gt;
The cellular telephony architecture in MeeGo is centered on the oFono, PulseAudio, and Telepathy frameworks. In addition, the Resource Manager plays a role in coordinating the device behavior during voice calls.&lt;br /&gt;
&lt;br /&gt;
The cellular modem HW adaptation SW must implement the following interfaces towards the MeeGo OS:&lt;br /&gt;
:* oFono modem plugin/driver API&lt;br /&gt;
:* Linux network interface for the Linux TCP/IP stack (for data communications)&lt;br /&gt;
:* Relevant PulseAudio plugin interfaces for cellular voice call audio handling&lt;br /&gt;
&lt;br /&gt;
For more detailed information about the oFono APIs, see the documentation and source code available at [http://git.kernel.org/?p=network/ofono/ofono.git;a=summary oFono git].&lt;br /&gt;
&lt;br /&gt;
==== USB ====&lt;br /&gt;
&lt;br /&gt;
The foundation of MeeGo USB functionality is the standard Linux USB subsystem. The Linux USB subsystem defines the USB related HW adaptation interfaces that need to be supported in MeeGo. In practice, these are kernel side interfaces between the generic USB functionality and a HW dependent USB host controller driver.&lt;br /&gt;
&lt;br /&gt;
==== WLAN ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo WLAN architecture is centered on the [http://linuxwireless.org/ Linux wireless] (IEEE-802.11) subsystem. The Linux wireless SW stack defines the WLAN HW adaptation SW interfaces that need to be used in MeeGo. In practice, the required interfaces are defined by cfg80211 for FullMAC WLAN devices and by mac80211 for SoftMAC WLAN devices. In addition, a Linux network interface needs to be supported towards the Linux TCP/IP stack.&lt;br /&gt;
&lt;br /&gt;
==== Bluetooth ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Bluetooth architecture is centered on the [http://www.bluez.org/ BlueZ] SW stack. The BlueZ SW stack defines the Bluetooth HW adaptation SW interfaces that need to be used in MeeGo. In practice, these are Linux kernel side interfaces between the generic HCI (Host Controller Interface) core and a HW specific HCI driver.&lt;br /&gt;
&lt;br /&gt;
=== Location Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The MeeGo location architecture is based on [http://http://labs.trolltech.com/page/Projects/QtMobility| QtMobility Location API].  The QtMobility 1.0 Location API provides geographic coordinates only.  The QtMobility 1.1 Location API provides geocoding and reverse geocoding, POI search, navigation, and mapping.  The 1.0 Location API is available in MeeGo 1.1.  The 1.1 or later Location API will be available in MeeGo 1.2.  The Location API uses a plugin system for implementations of the underlying backend.  MeeGo compliance requirements require support for the QtMobility Location API and thus require one or more plugins to support these APIs.  MeeGo places no restrictions as to how the plugins are implemented, however. Adaptation to location related HW may be done by manufacturers or service providers and the way how it's done is not defined by the API.&lt;br /&gt;
&lt;br /&gt;
MeeGo will use [http://www.freedesktop.org/wiki/Software/GeoClue GeoClue] as the reference location framework and the reference implementation of the Qt Mobility location API backend will be written on top of GeoClue. GeoClue defines a set of (D-Bus) APIs for accessing location services provided by service providers implemented as D-Bus services. In addition, GeoClue includes a set of service provider implementations and (at the time of this writing) an experimental master service provider that can act as a proxy between clients and the actual service providers. If a device vendor wants to take advantage of this existing functionality, the vendor can implement their location services &amp;quot;behind&amp;quot; the GeoClue APIs as GeoClue service providers. In such a case, adaptation to the location related HW would happen inside the service providers as defined by the service provider designs.&lt;br /&gt;
&lt;br /&gt;
=== Sensor Adaptation === &lt;br /&gt;
&lt;br /&gt;
The key component in the MeeGo sensor handling architecture is the Sensor Framework. The Sensor Framework uses both HW independent logical sensor plugins and HW dependent sensor adaptor plugins in its operation. The required sensor HW adaptation interfaces in MeeGo are the interfaces that the Sensor Framework and the logical sensor plugins define for the sensor adaptor plugins to implement. The sensor adaptor plugins typically communicate directly with sensor HW drivers in the Linux kernel. The interfaces that the sensor HW drivers expose to the user space are not defined by MeeGo. Sensor HW adaptation in MeeGo thus consists of adaptor plugins in the Sensor Framework and sensor HW drivers in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Note that thermal sensors are handled in a different manner as described in the [[#Power and thermal management|''Power and thermal management'']] section above.&lt;br /&gt;
&lt;br /&gt;
=== Input Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Touch ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the touch input handling path in MeeGo are the touch HW device driver, Linux kernel input subsystem, X server, X input driver, Qt, and finally the MeeGo Touch Framework. Enabling touch support for some new HW requires at least the implementation of the corresponding touch HW device driver in the Linux kernel. If this driver communicates touch events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, basically the existing functionality in X server (such as evdev input driver) and above can be used as such. In case the kernel-to-user-space interface is non-standard, it is also possible to implement a new X input driver as a part of the touch HW adaptation.&lt;br /&gt;
&lt;br /&gt;
Multi-touch support in X requires a new version, 2.1, of the [http://cgit.freedesktop.org/~whot/inputproto/tree/XI2proto.txt?h=multitouch X Input Extension] and this also requires support from the client side, in this case Qt's multi-touch support. Once this support has been implemented throughout the SW stack, including X evdev input driver, supporting multi-touch for some new HW should require only the implementation of a touch HW device driver that implements the standard Linux multi-touch interface. This should be the case in MeeGo 1.2. &lt;br /&gt;
&lt;br /&gt;
Before 1.2, multi-touch support in MeeGo uses a special X input driver (mtev), X server multi-pointer support (MPX) and Qt multi-touch support written on top of MPX. This solution requires the touch HW device driver to expose a user-space interface that is compatible with mtev.&lt;br /&gt;
&lt;br /&gt;
==== HW keyboard ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the HW keyboard input handling path in MeeGo are the keyboard HW device driver, Linux kernel input subsystem, X server, X input driver, and Qt. Enabling keyboard support for some new HW requires typically only the implementation of the corresponding keyboard HW device driver in the Linux kernel. If this driver communicates key events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, the existing functionality in X server (such as evdev input driver) and above should work as such. In case the kernel-to-user space interface is non-standard, it is also possible to implement a new X input driver as a part of the keyboard HW adaptation.&lt;br /&gt;
&lt;br /&gt;
==== Buttons and switches ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo includes the MCE and System SW Qt API (QmSystem) components. The MCE can be used to control the device mode and it listens to power button events and, for example, device open/close switch events via the respective device driver interfaces. The System SW Qt API on the other hand provides a Qt API to various system information, including events from various physical buttons in the device (such as volume button, camera button). The System SW Qt API gets the button events either by listening to the relevant device driver interfaces or through the MCE component.&lt;br /&gt;
&lt;br /&gt;
Both the MCE and the System SW Qt API components can be adapted to new devices by device vendors.&lt;br /&gt;
&lt;br /&gt;
=== Haptics and Vibra Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Haptics ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Touch Framework present (at least) in the MeeGo handset device category contains a component called Feedback Framework (meegotouch-feedback) that handles the creation of auditory and/or haptic feedback to touch events. The haptic feedback can be created with, for example, vibra motors or piezo elements. In the Feedback Framework, the different types of feedback are created by backend libraries implemented as plugins. &lt;br /&gt;
&lt;br /&gt;
The haptics-related HW adaptation interface, from the MeeGo OS perspective, is the backend plugin interface defined by the Feedback Framework. The plugins can then communicate with the HW either through some device driver interface or some intermediate SW layers (MeeGo places no restrictions as to how the plugins are implemented).&lt;br /&gt;
&lt;br /&gt;
==== Vibra (notifications/alerts) ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo (at least the handset category) will include a component called Non-Graphical Feedback Framework (NGF). This component offers the capability of playing, for example, audio, vibra or led as an indication of events, such as incoming call/message, clock and calendar alarms, missed calls, unread messages, etc. The NGF also integrates with the Resource Policy to decide about the available playback resources based on policy rules and the current system state.&lt;br /&gt;
&lt;br /&gt;
The actual playback of the different types of notifications is handled by NGF plugins that can be created by device vendors. The plugins communicate with the relevant HW as they see best, such as directly through some device driver interface or via some intermediate user space SW components. The plugin interfaces defined by NGF thus form the notification/alert vibra adaptation interface in MeeGo.&lt;br /&gt;
&lt;br /&gt;
=== Production Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Production deals with areas, such as flashing, testing, tuning and certification. The current understanding is that these areas are handled in a vendor specific manner, including the adaptation.&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Noel</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/MeeGo_Porting_Guide</id>
		<title>MeeGo Porting Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/MeeGo_Porting_Guide"/>
				<updated>2011-06-24T23:26:44Z</updated>
		
		<summary type="html">&lt;p&gt;Noel: /* Vibra (notifications/alerts) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The goal of MeeGo Porting Guide (MPG) is to provide valuable information and instructions to people who want to run MeeGo OS on their (new) HW and eventually create products based on the MeeGo OS. The MPG starts with an overview of the porting process, tools, and other related background information and then moves on to describing what the porting actually means in individual technical/functional areas.&lt;br /&gt;
&lt;br /&gt;
The porting guide is not strictly tied to any particular MeeGo OS version or device category. Instead, it tries to be general enough to cover the different device categories, as well as follow changes introduced in new MeeGo OS versions.&lt;br /&gt;
&lt;br /&gt;
Detailed porting information in the different technical areas is dependent on the respective [http://meego.com/developers/meego-architecture MeeGo architecture]. In some cases, this architecture may still be open and this is noted in the applicable sections.&lt;br /&gt;
&lt;br /&gt;
=== Feedback ===&lt;br /&gt;
&lt;br /&gt;
Contribution to these pages is open. Any MeeGo community member is free to ''improve'' these pages at any time. You can also leave feedback in the [http://lists.meego.com/listinfo/meego-porting MeeGo porting mailing list].&lt;br /&gt;
&lt;br /&gt;
== General porting information/guidelines ==&lt;br /&gt;
&lt;br /&gt;
=== MeeGo compliance ===&lt;br /&gt;
&lt;br /&gt;
Perhaps the most important piece of background information related to the MPG are the [[Quality/Compliance|MeeGo compliance requirements]]. A device that is meant to be MeeGo compliant will need to fulfill the requirements listed in the MeeGo compliance specification for the applicable device category (the first version of the specification is supposed to be available in October 2010). In short, a MeeGo compliant device will need to:&lt;br /&gt;
* Meet the minimum HW performance and component requirements for the applicable device category&lt;br /&gt;
* Include all SW components that form the MeeGo core OS&lt;br /&gt;
* Include the additional SW components required to be present in devices in the applicable device category&lt;br /&gt;
* Not break the API/ABI of any of the components coming from MeeGo&lt;br /&gt;
* Follow the MeeGo SW packaging conventions&lt;br /&gt;
&lt;br /&gt;
The compliance rules will also specify CPU architecture specific requirements concerning how MeeGo OS itself and MeeGo applications are to be compiled to different environments (instruction set used, compiler version, compiler options, etc.).&lt;br /&gt;
&lt;br /&gt;
A device vendor may include additional functionality, HW components and SW components in their devices, as long as they don't break MeeGo compliance. The vendor can also patch MeeGo OS components, if the patches don't break MeeGo compliance. A device vendor's own SW components can be either open source or closed source components, as long as they adhere to the rules set by the applicable SW licenses.&lt;br /&gt;
&lt;br /&gt;
From the MeeGo Porting Guide perspective, by defining the SW components and HW components that need to be present, the compliance requirements effectively define the minimum set of porting tasks required from a device vendor and what SW components are involved from MeeGo OS side.&lt;br /&gt;
&lt;br /&gt;
=== Porting process and tools ===&lt;br /&gt;
&lt;br /&gt;
==== Overview ====&lt;br /&gt;
&lt;br /&gt;
As long as a vendor's device is MeeGo compliant, as defined above, it is basically up to the vendor to decide how they build the SW that ends up in the device. The vendor may use their own build machinery or set up an OBS build system that is also used in MeeGo. Regardless of what the vendor's build system is, it needs to integrate with the MeeGo build infrastructure, at least to fetch the MeeGo source packages for the builds, as well as build each MeeGo component in the same way as it would be built in the MeeGo build system (such as with the same compiler and compiler options). Whatever the case, the intention in MeeGo is to use and offer an open toolset that any HW or SW vendor can use for efficient SW creation. It is likely that using the same toolset as MeeGo, will offer the easiest way to integrate vendor's own build system with the the MeeGo build infrastructure.&lt;br /&gt;
&lt;br /&gt;
The key ingredients of the MeeGo build infrastructure and toolset are:&lt;br /&gt;
* [http://meego.gitorious.org MeeGo Gitorious]&lt;br /&gt;
** A version control system for the source files of various MeeGo specific SW components and tools&lt;br /&gt;
* [http://build.meego.com MeeGo OBS]&lt;br /&gt;
** The build system that is used to build MeeGo packages (RPMs) from their sources&lt;br /&gt;
* [http://repo.meego.com MeeGo Repository]&lt;br /&gt;
** The place where the built MeeGo releases, that is where MeeGo packages and images are stored&lt;br /&gt;
* [http://wiki.meego.com/Image_Creation MeeGo Image Creator]&lt;br /&gt;
** The tool used to build MeeGo images that can be installed/flashed on HW&lt;br /&gt;
* MeeGo release tools&lt;br /&gt;
** Tools such as BOSS and REVS that are used in the creation of the MeeGo releases under repo.meego.com&lt;br /&gt;
&lt;br /&gt;
For additional information, see [[Build Infrastructure]], [[Release Infrastructure]] and [[Release Engineering]].&lt;br /&gt;
&lt;br /&gt;
For another overview of the MeeGo porting process, see [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process].&lt;br /&gt;
&lt;br /&gt;
==== Vendor's own OBS ====&lt;br /&gt;
&lt;br /&gt;
So, ultimately, when creating actual products running the MeeGo OS, the vendor may end up setting up their own OBS build system. Setting up your own OBS system may also be beneficial in earlier HW/product development phases, as it offers a flexible way to modify and build MeeGo OS to test it on the new HW. The vendor's own OBS system can link to the MeeGo OBS for handling packages that come directly from MeeGo and it can link to other sources for handling, such as closed source packages that are specific to the vendor. See [[Release_Engineering/Process#Making a product out of MeeGo Release|an overview picture of this setup]].&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Sets up their own OBS system&lt;br /&gt;
** [[User:Stskeeps/10_easy_steps_to_a_local_OBS|Instructions related to setting up an OBS system]],  [[Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE112|OBS Applicances]] [http://en.opensuse.org/openSUSE:Build_Service_private_instance Open Suse OBS Wiki].&lt;br /&gt;
* Creates projects under the their own OBS for their own components&lt;br /&gt;
* Links their own OBS to the MeeGo OBS for MeeGo components&lt;br /&gt;
* May have trial patches to MeeGo components in their own OBS&lt;br /&gt;
** NOTE. Eventually all patches to MeeGo components required in a final MeeGo based product ''should'' be pushed to MeeGo.com. However, this is not an absolute must requirement, as long as the MeeGo compliance requirements and applicable SW license rules are fulfilled. &lt;br /&gt;
** See [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below&lt;br /&gt;
* Needs to set up the necessary machinery to create releases and images from the packages built with OBS&lt;br /&gt;
** This machinery can be based on the toolset used in MeeGo (see above)&lt;br /&gt;
&lt;br /&gt;
==== Working under MeeGo.com ====&lt;br /&gt;
&lt;br /&gt;
Another way of porting MeeGo to some new HW is to get the new HW accepted as one MeeGo reference HW and have the MeeGo build machinery create builds for the reference HW as a part of the normal MeeGo release building cycle (see [[Release Engineering/Release Timeline|Release Timeline]] and [[Release Engineering/Process|Release Process]]). This setup can also include QA support for the reference HW on the MeeGo side (see [[Quality]]). At the time of this writing, the actual process of getting new reference HW to MeeGo is still somewhat unclear. In any case, this model requires active participation from the vendor in MeeGo work in general and especially in supporting their reference HW in MeeGo.&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Creates a device/platform development project under the MeeGo OBS for their components. The open source components would then get submitted to MeeGo Trunk:Testing and get reviewed like any other MeeGo component for inclusion.&lt;br /&gt;
** Note that it is also possible to have closed source binary components in the MeeGo OBS to be included in the MeeGo builds for some reference HW. These are submitted to the Trunk:non-oss repository. Licensing is usually required to at least include redistributability, as the components cannot be mirrored from or hosted at repo.meego.com otherwise. It is not possible to have components within Trunk:Testing require closed source dependencies.&lt;br /&gt;
* Pushes patches to other MeeGo components at MeeGo.com as necessary (see [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below)&lt;br /&gt;
* Creates (or supports the creation of) a MIC kickstart file for building images for their reference HW&lt;br /&gt;
* As necessary, supports adding support for their reference HW and SW components in the MeeGo build and release infrastructure tools&lt;br /&gt;
&lt;br /&gt;
==== Trials ====&lt;br /&gt;
&lt;br /&gt;
A lightweight but also more limited &amp;quot;try it out&amp;quot; alternative to the above processes is discussed below.&lt;br /&gt;
&lt;br /&gt;
===== Initial bring-up attempt =====&lt;br /&gt;
&lt;br /&gt;
* Grab the already built root filesystem / image for a MeeGo reference device that's the closest to your target. For ARMv7, this is typically the Nokia N900 handset image. For Atom, this could be netbook image or handset image.&lt;br /&gt;
* Build a Linux kernel for your device and install the modules into /lib/modules.&lt;br /&gt;
* Boot the root filesystem and modify the configuration and drop in components to bring up the device to UX. Note down the things you had to modify or add, as this will be input for your porting work.&lt;br /&gt;
&lt;br /&gt;
===== Building your first image =====&lt;br /&gt;
&lt;br /&gt;
The second step to a proper hardware adaptation is making sure you can build your own image. Because we based our work before on a reference device image, it makes sense to try to build this image first. MeeGo images are constructed on the basis of so called 'kickstart files', which describe the intended contents of an image. &lt;br /&gt;
&lt;br /&gt;
* Install the MeeGo Image Creator tool (MIC)&lt;br /&gt;
* Download the kickstart file (.ks) from the same directory you found your reference device image. &lt;br /&gt;
* Create a image using mic-image-creator (should be elaborated).&lt;br /&gt;
* Test out your freshly baked image as in the previous step.&lt;br /&gt;
&lt;br /&gt;
===== Building your port's first reproduciable image =====&lt;br /&gt;
&lt;br /&gt;
* Download the MeeGo kernel, possibly modifying the kernel with additional patches (including new device drivers) and building the kernel (see [[#Getting_new_chipset_support_to_the_MeeGo_kernel|''Getting new chipset support to the MeeGo kernel'']] below). &lt;br /&gt;
* Add the repository containing your kernel package to the kickstart file (to be elaborated)&lt;br /&gt;
* Remove parts of the kickstart file specific to the reference device.&lt;br /&gt;
* Add a mention of your kernel package in the %packages section.&lt;br /&gt;
* Build packages or include shell scripts in %post section of kickstart file that adds/modifies configuration fitting your device.&lt;br /&gt;
&lt;br /&gt;
A detailed description of a variation of this model can be found from [[ARM/Meego on Beagleboard from scratch|here]] (Better description needed).&lt;br /&gt;
&lt;br /&gt;
==== Getting new chipset support to the MeeGo kernel ====&lt;br /&gt;
&lt;br /&gt;
See [[How-to: getting new chipset support to the MeeGo kernel]] for more detailed information about how to work with the MeeGo kernel and make it support new HW.&lt;br /&gt;
&lt;br /&gt;
=== Upstream projects, MeeGo, products, and patches ===&lt;br /&gt;
&lt;br /&gt;
When building a product based on MeeGo, the product vendor will typically augment the MeeGo OS with their own SW components, as well as make fixes and adjustments to the MeeGo OS code (in the limits set by the compliance rules). While vendors can manage their own SW components as they wish, the strong preference is that any changes made to the MeeGo OS SW components are delivered as patches primarily to the respective upstream projects or secondarily to MeeGo.com. In this way, vendors can relieve themselves of the burden of managing a potentially big patch set on top of MeeGo OS, and also verify the quality and safety of their patches. Having the patches in upstream projects again lessens the patch set management load at MeeGo.com.&lt;br /&gt;
&lt;br /&gt;
For information about pushing patches to MeeGo, see [http://meego.com/about/contribution-guidelines Contribution Guidelines] and [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process] (especially section ''How Do Patches Get Integrated and Accepted?'') and [http://meego.gitorious.org/meego-os-base/kernel-source/blobs/master/README.workflow Kernel workflow].&lt;br /&gt;
&lt;br /&gt;
=== Adaptation subsystems and interfaces ===&lt;br /&gt;
&lt;br /&gt;
In the MeeGo architecture model (see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view MeeGo Architecture Domain View]), adaptation is represented as adaptation subsystems. SW components in the adaptation subsystem ''realizations'' do things that are expected by the OS and communicate with the OS through interfaces defined by the OS.&lt;br /&gt;
 &lt;br /&gt;
The key goal in the sections below is to identify the interface(s) that the adaptation SW needs to implement/use to communicate with the OS in the required manner. Behind these interfaces, the adaptation SW can basically handle the required functionality as it sees best. In some cases, however, there may also be some preferred way of implementing the adaptation.&lt;br /&gt;
&lt;br /&gt;
In some areas, the adaptation work may consist of just writing a suitable Linux device driver for the HW in question. In some other areas, the adaptation work may consist of writing one or more device drivers, as well as one or more user space components (such as plugins to some user space SW frameworks). Various configuration file changes may also be required as a part of the adaptation work.&lt;br /&gt;
&lt;br /&gt;
== Porting by adaptation subsystems ==&lt;br /&gt;
&lt;br /&gt;
=== System Core Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Boot ====&lt;br /&gt;
&lt;br /&gt;
MeeGo places no restrictions as to what SW components are used to handle the pre-OS boot phases in a MeeGo compliant device. Thus, vendors are free to choose, for example, the boot loader, as they see fit. Note, however, that full use of the MeeGo platform security requires that the pre-OS boot phases form a trusted boot chain that ultimately builds on chipset-level security support.&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, MeeGo does not define anything special with regard to what information the boot loader is expected to pass to the Linux kernel, such as via the kernel command line.&lt;br /&gt;
&lt;br /&gt;
The kernel-level boot phases can be tailored, as necessary, to the specific CPU, chipset, or device in a standard Linux manner.&lt;br /&gt;
&lt;br /&gt;
The post-kernel boot phases (startup scripts) can be tailored by device vendors as necessary for their devices in the limits set by MeeGo compliance requirements (certain SW components need to be present in the system).&lt;br /&gt;
&lt;br /&gt;
==== Kernel fundamentals ====&lt;br /&gt;
&lt;br /&gt;
Regarding the Linux kernel, each MeeGo release defines the kernel version to be used and a set of patches on top of that. In addition, the Linux kernel used in MeeGo compliant devices is assumed to have been built with a set of fixed build-time configuration values that are not allowed to be changed. In addition to the fixed values, device vendors can define other kernel configuration values, as required by their devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo does not place any special requirements concerning how the boot loader passes information to the kernel or how the HW configuration and initialization of the system is handled.&lt;br /&gt;
&lt;br /&gt;
CPU, chipset (SoC), and device vendors are assumed to implement the elementary CPU architecture/chipset/device support for the Linux kernel used in MeeGo in a standard Linux manner. This includes:&lt;br /&gt;
* HW (board) configuration&lt;br /&gt;
* Mapping the fundamental Linux kernel functionality (such as IRQ, DMA, GPIO, RTC and memory handling) to the HW in question&lt;br /&gt;
* Creation/modification of the necessary device drivers to support the core SoC interfaces (such as I2C, SPI, SDIO)&lt;br /&gt;
* Permanent memory support&lt;br /&gt;
* Debugging and tracing support&lt;br /&gt;
&lt;br /&gt;
==== Power and thermal management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, the understanding is that MeeGo in general relies on established Linux kernel frameworks and APIs for power management. Some of these frameworks and APIs may be applicable only in certain CPU architectures. In addition, the HW capabilities related to power management may vary between different HW platforms potentially meaning that the SW is assumed perform somewhat different tasks in different environments.&lt;br /&gt;
&lt;br /&gt;
The Linux power management frameworks and APIs include:&lt;br /&gt;
* CPU frequency control (support for the different voltage and frequency operating points) via the cpufreq infrastructure&lt;br /&gt;
* CPU idle state management (different levels of sleep) through the cpuidle infrastructure&lt;br /&gt;
* Clock management through the clock framework&lt;br /&gt;
* Suspend/resume&lt;br /&gt;
* Runtime power management&lt;br /&gt;
* HW voltage/current regulator control via the regulator framework&lt;br /&gt;
* PM_QOS (power management quality of service) framework for making and listening to PM QoS requests&lt;br /&gt;
&lt;br /&gt;
Whether MeeGo will have some user space SW components or framework related to power management is under discussion at the time of this writing.&lt;br /&gt;
&lt;br /&gt;
In the thermal management area, the Device State Management Entity (DSME) component in the Device Health subsystem is supposed to make thermal state management decisions in the system. The DSME has a thermal manager module that again uses other DSME modules (thermal objects) to access the actual thermal sensor information in the HW. To port this functionality to new HW, one or more DSME thermal object modules need to be implemented.&lt;br /&gt;
&lt;br /&gt;
The APIs that the thermal object modules use to access the thermal sensor information are not strictly defined by MeeGo. At device driver level, however, the preferred approach is to use standard Linux interfaces such as the generic thermal sysfs API or the hwmon sysfs API.&lt;br /&gt;
&lt;br /&gt;
==== Energy management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, basically the only thing that MeeGo requires from HW adaptation in the energy management area (battery charging and monitoring) is support for the Linux power supply sysfs class. Additional energy management related functionality can be handled in a vendor specific manner.&lt;br /&gt;
&lt;br /&gt;
==== Device state ====&lt;br /&gt;
&lt;br /&gt;
The DSME component participates in device state management, such as by managing device run level, reboot, and shutdown, by monitoring the device thermal state, and shutting down the device in fatal thermal conditions, and by handling HW watchdog kicking activity.&lt;br /&gt;
&lt;br /&gt;
In a new HW environment, the DSME needs to be adapted to handle the watchdog kicking through the right device driver interfaces and at the right intervals. In addition, to port the DSME thermal management functionality to new HW, one or more DSME thermal object modules need to be implemented as described above, in the [[#Power_and_thermal_management|''Power and thermal management'']] section.&lt;br /&gt;
&lt;br /&gt;
=== Security Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Work is ongoing in bringing platform security functionality to the MeeGo OS based on the Mandatory Access Control (MAC), Integrity Measurement Architecture (IMA) and Extended Verification Module (EVM) technologies in the Linux kernel. Maximum security can be reached if the MeeGo platform security functionality can rely on trusted platform support &amp;quot;below&amp;quot; the Linux kernel, effectively in the HW and the boot loader(s). MeeGo, however, places no strict requirements as to how the trusted platform support is implemented in MeeGo based devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo also includes the OpenSSL open source toolkit implementing general purpose cryptography functionality. Algorithms and operations supported by the OpenSSL toolkit can be accelerated in HW by using the OpenSSL engine architecture. OpenSSL also supports a cryptodev engine that uses crypto algorithms implemented in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Some devices may have a security watchdog in the HW that needs &amp;quot;kicking&amp;quot; at regular intervals to keep the device up and running. In MeeGo, watchdog kicking functionality is implemented in the Device State Management Entity (DSME) component. If security watchdog kicking is needed, the DSME needs to be adapted to handle that through the right device driver interface and at the right intervals.&lt;br /&gt;
&lt;br /&gt;
=== Device Mode Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Resource Policy ====&lt;br /&gt;
&lt;br /&gt;
The Resource (Policy) Manager component in the Device Health subsystem offers a generic framework for:&lt;br /&gt;
* Monitoring device and application events&lt;br /&gt;
* Managing policies that specify rules about what should happen in the device when certain events occur&lt;br /&gt;
* Making policy decisions when events occur (determining the needed changes in the device)&lt;br /&gt;
* Enforcing changes in the system through policy enforcement points&lt;br /&gt;
&lt;br /&gt;
The Resource Manager can be used, for example, to change the audio routing in the device, when the user attaches a wired headset to the device.&lt;br /&gt;
&lt;br /&gt;
Event listening and change enforcement in the Resource Manager happens through plugin modules. Using the MeeGo OS in some new device effectively involves creating suitable Resource Manager policies and writing the necessary plugins for listening device/application events and changing device behavior accordingly. Though not pure HW adaptation, this can be considered a form of MeeGo OS &amp;quot;device adaptation&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Mode Control Entity (MCE) ====&lt;br /&gt;
&lt;br /&gt;
The MCE component (starting from MeeGo 1.2) can be used to listen to events that have an impact to the device mode (such as touch screen locked vs. unlocked) and change the device mode accordingly. The MCE is used, for example, to: &lt;br /&gt;
* Listen to various keys and switches in the device (such as power key, volume key, camera button, slider switch)&lt;br /&gt;
* Control LEDs&lt;br /&gt;
* Enabling/disabling touch screen or HW keyboard, depending on device state&lt;br /&gt;
* Control keyboard backlight&lt;br /&gt;
* Control display state (on/off) and brightness&lt;br /&gt;
&lt;br /&gt;
The MCE has its own plugin architecture that can be used to adapt it to different HW environments.&lt;br /&gt;
&lt;br /&gt;
=== Display and Graphics Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo visual services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view]. &lt;br /&gt;
&lt;br /&gt;
The key ingredients of the display and graphics architecture in MeeGo are the X Window System (X Server with its extensions) and the Khronos graphics APIs (OpenGL ES, OpenVG, and EGL with their extensions).&lt;br /&gt;
&lt;br /&gt;
The display and graphics HW adaptation SW needs to enable the X Window System and the Khronos APIs to function on the device HW. In practice, the adaptation SW needs to have an X display/video driver (hosted inside the X Server) and libraries that implement the Khronos graphics APIs, both supporting the features and functionality required by MeeGo. Also, some configuration file changes may be needed. Any additional user space and kernel space components needed for the HW adaptation are implementation dependent.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering display content to external displays, the Resource Manager component may be used to coordinate the display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Audio Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The audio architecture in MeeGo is centered around the GStreamer and PulseAudio frameworks. In addition, the Resource Manager plays a role in coordinating the audio related behavior of the device (audio routings). The audio HW adaptation SW needs to provide GStreamer elements and PulseAudio plugins that enable the GStreamer and PulseAudio client interfaces used, for example, for audio playback, recording, and volume control to work on the device. Typical required components include, for example, codec elements for GStreamer and sink/source plugins for PulseAudio.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer and PulseAudio plugins, the audio HW adaptation SW can be implemented with different technologies and APIs, including ALSA and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework, as needed. Use of the ALSA framework and APIs is encouraged, however, as they allow significant reuse of components and functionality on the PulseAudio level and are already a part of the upstream Linux kernel. If ALSA is not used to implement the kernel side parts of the audio adaptation, the solution that is used instead should still be aligned with the upstream Linux kernel.&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo media services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view].&lt;br /&gt;
&lt;br /&gt;
=== Camera Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo still imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework and the CameraBin GStreamer element. The still imaging HW adaptation SW is required to contain a GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element. Thus, the required HW adaptation interfaces are the relevant GStreamer plugin interfaces and especially the interfaces expected by the CameraBin element, in particular the GstPhotography interface.&lt;br /&gt;
&lt;br /&gt;
If HW accelerated encoders are supported, they should be also offered to the system as GStreamer elements.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
=== Video and Imaging Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo video imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework, the CameraBin GStreamer element (video recording) and the Playbin2 GStreamer element (video playback). The video imaging HW adaptation SW is required to contain:&lt;br /&gt;
:* A GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element (this is common with still imaging) &lt;br /&gt;
:* If HW accelerated codecs are supported, GStreamer elements that wrap the codecs&lt;br /&gt;
:* If HW accelerated filters are supported (such as video scaler, rotation engines, color conversion engines), GStreamer elements that wrap the filters&lt;br /&gt;
:* A GStreamer video sink element that offers the GStreamer X Overlay Interface. Note that if the XVideo extension is supported on the X Server side, the xvimagesink element can be used as the video sink element and no new elements are needed.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the video imaging HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering video content to external displays, the Resource Manager component may be used to coordinate the video/display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Communications Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo communications services architecture, see [http://meego.com/developers/meego-architecture/comms-services Comms Services].&lt;br /&gt;
&lt;br /&gt;
==== Cellular ====&lt;br /&gt;
&lt;br /&gt;
The cellular telephony architecture in MeeGo is centered on the oFono, PulseAudio, and Telepathy frameworks. In addition, the Resource Manager plays a role in coordinating the device behavior during voice calls.&lt;br /&gt;
&lt;br /&gt;
The cellular modem HW adaptation SW must implement the following interfaces towards the MeeGo OS:&lt;br /&gt;
:* oFono modem plugin/driver API&lt;br /&gt;
:* Linux network interface for the Linux TCP/IP stack (for data communications)&lt;br /&gt;
:* Relevant PulseAudio plugin interfaces for cellular voice call audio handling&lt;br /&gt;
&lt;br /&gt;
For more detailed information about the oFono APIs, see the documentation and source code available at [http://git.kernel.org/?p=network/ofono/ofono.git;a=summary oFono git].&lt;br /&gt;
&lt;br /&gt;
==== USB ====&lt;br /&gt;
&lt;br /&gt;
The foundation of MeeGo USB functionality is the standard Linux USB subsystem. The Linux USB subsystem defines the USB related HW adaptation interfaces that need to be supported in MeeGo. In practice, these are kernel side interfaces between the generic USB functionality and a HW dependent USB host controller driver.&lt;br /&gt;
&lt;br /&gt;
==== WLAN ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo WLAN architecture is centered on the [http://linuxwireless.org/ Linux wireless] (IEEE-802.11) subsystem. The Linux wireless SW stack defines the WLAN HW adaptation SW interfaces that need to be used in MeeGo. In practice, the required interfaces are defined by cfg80211 for FullMAC WLAN devices and by mac80211 for SoftMAC WLAN devices. In addition, a Linux network interface needs to be supported towards the Linux TCP/IP stack.&lt;br /&gt;
&lt;br /&gt;
==== Bluetooth ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Bluetooth architecture is centered on the [http://www.bluez.org/ BlueZ] SW stack. The BlueZ SW stack defines the Bluetooth HW adaptation SW interfaces that need to be used in MeeGo. In practice, these are Linux kernel side interfaces between the generic HCI (Host Controller Interface) core and a HW specific HCI driver.&lt;br /&gt;
&lt;br /&gt;
=== Location Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The MeeGo location architecture is based on [http://http://labs.trolltech.com/page/Projects/QtMobility| QtMobility Location API].  The QtMobility 1.0 Location API provides geographic coordinates only.  The QtMobility 1.1 Location API provides geocoding and reverse geocoding, POI search, navigation, and mapping.  The 1.0 Location API is available in MeeGo 1.1.  The 1.1 or later Location API will be available in MeeGo 1.2.  The Location API uses a plugin system for implementations of the underlying backend.  MeeGo compliance requirements require support for the QtMobility Location API and thus require one or more plugins to support these APIs.  MeeGo places no restrictions as to how the plugins are implemented, however. Adaptation to location related HW may be done by manufacturers or service providers and the way how it's done is not defined by the API.&lt;br /&gt;
&lt;br /&gt;
MeeGo will use [http://www.freedesktop.org/wiki/Software/GeoClue GeoClue] as the reference location framework and the reference implementation of the Qt Mobility location API backend will be written on top of GeoClue. GeoClue defines a set of (D-Bus) APIs for accessing location services provided by service providers implemented as D-Bus services. In addition, GeoClue includes a set of service provider implementations and (at the time of this writing) an experimental master service provider that can act as a proxy between clients and the actual service providers. If a device vendor wants to take advantage of this existing functionality, the vendor can implement their location services &amp;quot;behind&amp;quot; the GeoClue APIs as GeoClue service providers. In such a case, adaptation to the location related HW would happen inside the service providers as defined by the service provider designs.&lt;br /&gt;
&lt;br /&gt;
=== Sensor Adaptation === &lt;br /&gt;
&lt;br /&gt;
The key component in the MeeGo sensor handling architecture is the Sensor Framework. The Sensor Framework uses both HW independent logical sensor plugins and HW dependent sensor adaptor plugins in its operation. The required sensor HW adaptation interfaces in MeeGo are the interfaces that the Sensor Framework and the logical sensor plugins define for the sensor adaptor plugins to implement. The sensor adaptor plugins typically communicate directly with sensor HW drivers in the Linux kernel. The interfaces that the sensor HW drivers expose to the user space are not defined by MeeGo. Sensor HW adaptation in MeeGo thus consists of adaptor plugins in the Sensor Framework and sensor HW drivers in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Note that thermal sensors are handled in a different manner as described in the [[#Power and thermal management|''Power and thermal management'']] section above.&lt;br /&gt;
&lt;br /&gt;
=== Input Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Touch ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the touch input handling path in MeeGo are the touch HW device driver, Linux kernel input subsystem, X server, X input driver, Qt, and finally the MeeGo Touch Framework. Enabling touch support for some new HW requires at least the implementation of the corresponding touch HW device driver in the Linux kernel. If this driver communicates touch events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, basically the existing functionality in X server (such as evdev input driver) and above can be used as such. In case the kernel-to-user-space interface is non-standard, it is also possible to implement a new X input driver as a part of the touch HW adaptation.&lt;br /&gt;
&lt;br /&gt;
Multi-touch support in X requires a new version, 2.1, of the [http://cgit.freedesktop.org/~whot/inputproto/tree/XI2proto.txt?h=multitouch X Input Extension] and this also requires support from the client side, in this case Qt's multi-touch support. Once this support has been implemented throughout the SW stack, including X evdev input driver, supporting multi-touch for some new HW should require only the implementation of a touch HW device driver that implements the standard Linux multi-touch interface. This should be the case in MeeGo 1.2. &lt;br /&gt;
&lt;br /&gt;
Before 1.2, multi-touch support in MeeGo uses a special X input driver (mtev), X server multi-pointer support (MPX) and Qt multi-touch support written on top of MPX. This solution requires the touch HW device driver to expose a user-space interface that is compatible with mtev.&lt;br /&gt;
&lt;br /&gt;
==== HW keyboard ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the HW keyboard input handling path in MeeGo are the keyboard HW device driver, Linux kernel input subsystem, X server, X input driver, and Qt. Enabling keyboard support for some new HW requires typically only the implementation of the corresponding keyboard HW device driver in the Linux kernel. If this driver communicates key events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, the existing functionality in X server (such as evdev input driver) and above should work as such. In case the kernel-to-user space interface is non-standard, it is also possible to implement a new X input driver as a part of the keyboard HW adaptation.&lt;br /&gt;
&lt;br /&gt;
==== Buttons and switches ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo includes the MCE and System SW Qt API (QmSystem) components. The MCE can be used to control the device mode and it listens to power button events and, for example, device open/close switch events via the respective device driver interfaces. The System SW Qt API on the other hand provides a Qt API to various system information, including events from various physical buttons in the device (such as volume button, camera button). The System SW Qt API gets the button events either by listening to the relevant device driver interfaces or through the MCE component.&lt;br /&gt;
&lt;br /&gt;
Both the MCE and the System SW Qt API components can be adapted to new devices by device vendors.&lt;br /&gt;
&lt;br /&gt;
=== Haptics and Vibra Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Haptics ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Touch Framework present (at least) in the MeeGo handset device category contains a component called Feedback Framework (meegotouch-feedback) that handles the creation of auditory and/or haptic feedback to touch events. The haptic feedback can be created with, for example, vibra motors or piezo elements. In the Feedback Framework, the different types of feedback are created by backend libraries implemented as plugins. &lt;br /&gt;
&lt;br /&gt;
The haptics-related HW adaptation interface, from the MeeGo OS perspective, is the backend plugin interface defined by the Feedback Framework. The plugins can then communicate with the HW either through some device driver interface or some intermediate SW layers (MeeGo places no restrictions as to how the plugins are implemented).&lt;br /&gt;
&lt;br /&gt;
==== Vibra (notifications/alerts) ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo (at least the handset category) will include a component called Non-Graphical Feedback Framework (NGF). This component offers the capability of playing, for example, audio, vibra or led as an indication of events, such as incoming call/message, clock and calendar alarms, missed calls, unread messages, etc. The NGF also integrates with the Resource Policy to decide about the available playback resources based on policy rules and the current system state.&lt;br /&gt;
&lt;br /&gt;
The actual playback of the different types of notifications is handled by NGF plugins that can be created by device vendors. The plugins communicate with the relevant HW as they see best, such as directly through some device driver interface or via some intermediate user space SW components. The plugin interfaces defined by NGF thus form the notification/alert vibra adaptation interface in MeeGo.&lt;br /&gt;
&lt;br /&gt;
=== Production Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Production deals with areas such as flashing, testing, tuning and certification. The current understanding is that these areas are handled in a vendor specific manner, including the adaptation.&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Noel</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/MeeGo_Porting_Guide</id>
		<title>MeeGo Porting Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/MeeGo_Porting_Guide"/>
				<updated>2011-06-24T23:25:20Z</updated>
		
		<summary type="html">&lt;p&gt;Noel: /* Vibra (notifications/alerts) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The goal of MeeGo Porting Guide (MPG) is to provide valuable information and instructions to people who want to run MeeGo OS on their (new) HW and eventually create products based on the MeeGo OS. The MPG starts with an overview of the porting process, tools, and other related background information and then moves on to describing what the porting actually means in individual technical/functional areas.&lt;br /&gt;
&lt;br /&gt;
The porting guide is not strictly tied to any particular MeeGo OS version or device category. Instead, it tries to be general enough to cover the different device categories, as well as follow changes introduced in new MeeGo OS versions.&lt;br /&gt;
&lt;br /&gt;
Detailed porting information in the different technical areas is dependent on the respective [http://meego.com/developers/meego-architecture MeeGo architecture]. In some cases, this architecture may still be open and this is noted in the applicable sections.&lt;br /&gt;
&lt;br /&gt;
=== Feedback ===&lt;br /&gt;
&lt;br /&gt;
Contribution to these pages is open. Any MeeGo community member is free to ''improve'' these pages at any time. You can also leave feedback in the [http://lists.meego.com/listinfo/meego-porting MeeGo porting mailing list].&lt;br /&gt;
&lt;br /&gt;
== General porting information/guidelines ==&lt;br /&gt;
&lt;br /&gt;
=== MeeGo compliance ===&lt;br /&gt;
&lt;br /&gt;
Perhaps the most important piece of background information related to the MPG are the [[Quality/Compliance|MeeGo compliance requirements]]. A device that is meant to be MeeGo compliant will need to fulfill the requirements listed in the MeeGo compliance specification for the applicable device category (the first version of the specification is supposed to be available in October 2010). In short, a MeeGo compliant device will need to:&lt;br /&gt;
* Meet the minimum HW performance and component requirements for the applicable device category&lt;br /&gt;
* Include all SW components that form the MeeGo core OS&lt;br /&gt;
* Include the additional SW components required to be present in devices in the applicable device category&lt;br /&gt;
* Not break the API/ABI of any of the components coming from MeeGo&lt;br /&gt;
* Follow the MeeGo SW packaging conventions&lt;br /&gt;
&lt;br /&gt;
The compliance rules will also specify CPU architecture specific requirements concerning how MeeGo OS itself and MeeGo applications are to be compiled to different environments (instruction set used, compiler version, compiler options, etc.).&lt;br /&gt;
&lt;br /&gt;
A device vendor may include additional functionality, HW components and SW components in their devices, as long as they don't break MeeGo compliance. The vendor can also patch MeeGo OS components, if the patches don't break MeeGo compliance. A device vendor's own SW components can be either open source or closed source components, as long as they adhere to the rules set by the applicable SW licenses.&lt;br /&gt;
&lt;br /&gt;
From the MeeGo Porting Guide perspective, by defining the SW components and HW components that need to be present, the compliance requirements effectively define the minimum set of porting tasks required from a device vendor and what SW components are involved from MeeGo OS side.&lt;br /&gt;
&lt;br /&gt;
=== Porting process and tools ===&lt;br /&gt;
&lt;br /&gt;
==== Overview ====&lt;br /&gt;
&lt;br /&gt;
As long as a vendor's device is MeeGo compliant, as defined above, it is basically up to the vendor to decide how they build the SW that ends up in the device. The vendor may use their own build machinery or set up an OBS build system that is also used in MeeGo. Regardless of what the vendor's build system is, it needs to integrate with the MeeGo build infrastructure, at least to fetch the MeeGo source packages for the builds, as well as build each MeeGo component in the same way as it would be built in the MeeGo build system (such as with the same compiler and compiler options). Whatever the case, the intention in MeeGo is to use and offer an open toolset that any HW or SW vendor can use for efficient SW creation. It is likely that using the same toolset as MeeGo, will offer the easiest way to integrate vendor's own build system with the the MeeGo build infrastructure.&lt;br /&gt;
&lt;br /&gt;
The key ingredients of the MeeGo build infrastructure and toolset are:&lt;br /&gt;
* [http://meego.gitorious.org MeeGo Gitorious]&lt;br /&gt;
** A version control system for the source files of various MeeGo specific SW components and tools&lt;br /&gt;
* [http://build.meego.com MeeGo OBS]&lt;br /&gt;
** The build system that is used to build MeeGo packages (RPMs) from their sources&lt;br /&gt;
* [http://repo.meego.com MeeGo Repository]&lt;br /&gt;
** The place where the built MeeGo releases, that is where MeeGo packages and images are stored&lt;br /&gt;
* [http://wiki.meego.com/Image_Creation MeeGo Image Creator]&lt;br /&gt;
** The tool used to build MeeGo images that can be installed/flashed on HW&lt;br /&gt;
* MeeGo release tools&lt;br /&gt;
** Tools such as BOSS and REVS that are used in the creation of the MeeGo releases under repo.meego.com&lt;br /&gt;
&lt;br /&gt;
For additional information, see [[Build Infrastructure]], [[Release Infrastructure]] and [[Release Engineering]].&lt;br /&gt;
&lt;br /&gt;
For another overview of the MeeGo porting process, see [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process].&lt;br /&gt;
&lt;br /&gt;
==== Vendor's own OBS ====&lt;br /&gt;
&lt;br /&gt;
So, ultimately, when creating actual products running the MeeGo OS, the vendor may end up setting up their own OBS build system. Setting up your own OBS system may also be beneficial in earlier HW/product development phases, as it offers a flexible way to modify and build MeeGo OS to test it on the new HW. The vendor's own OBS system can link to the MeeGo OBS for handling packages that come directly from MeeGo and it can link to other sources for handling, such as closed source packages that are specific to the vendor. See [[Release_Engineering/Process#Making a product out of MeeGo Release|an overview picture of this setup]].&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Sets up their own OBS system&lt;br /&gt;
** [[User:Stskeeps/10_easy_steps_to_a_local_OBS|Instructions related to setting up an OBS system]],  [[Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE112|OBS Applicances]] [http://en.opensuse.org/openSUSE:Build_Service_private_instance Open Suse OBS Wiki].&lt;br /&gt;
* Creates projects under the their own OBS for their own components&lt;br /&gt;
* Links their own OBS to the MeeGo OBS for MeeGo components&lt;br /&gt;
* May have trial patches to MeeGo components in their own OBS&lt;br /&gt;
** NOTE. Eventually all patches to MeeGo components required in a final MeeGo based product ''should'' be pushed to MeeGo.com. However, this is not an absolute must requirement, as long as the MeeGo compliance requirements and applicable SW license rules are fulfilled. &lt;br /&gt;
** See [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below&lt;br /&gt;
* Needs to set up the necessary machinery to create releases and images from the packages built with OBS&lt;br /&gt;
** This machinery can be based on the toolset used in MeeGo (see above)&lt;br /&gt;
&lt;br /&gt;
==== Working under MeeGo.com ====&lt;br /&gt;
&lt;br /&gt;
Another way of porting MeeGo to some new HW is to get the new HW accepted as one MeeGo reference HW and have the MeeGo build machinery create builds for the reference HW as a part of the normal MeeGo release building cycle (see [[Release Engineering/Release Timeline|Release Timeline]] and [[Release Engineering/Process|Release Process]]). This setup can also include QA support for the reference HW on the MeeGo side (see [[Quality]]). At the time of this writing, the actual process of getting new reference HW to MeeGo is still somewhat unclear. In any case, this model requires active participation from the vendor in MeeGo work in general and especially in supporting their reference HW in MeeGo.&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Creates a device/platform development project under the MeeGo OBS for their components. The open source components would then get submitted to MeeGo Trunk:Testing and get reviewed like any other MeeGo component for inclusion.&lt;br /&gt;
** Note that it is also possible to have closed source binary components in the MeeGo OBS to be included in the MeeGo builds for some reference HW. These are submitted to the Trunk:non-oss repository. Licensing is usually required to at least include redistributability, as the components cannot be mirrored from or hosted at repo.meego.com otherwise. It is not possible to have components within Trunk:Testing require closed source dependencies.&lt;br /&gt;
* Pushes patches to other MeeGo components at MeeGo.com as necessary (see [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below)&lt;br /&gt;
* Creates (or supports the creation of) a MIC kickstart file for building images for their reference HW&lt;br /&gt;
* As necessary, supports adding support for their reference HW and SW components in the MeeGo build and release infrastructure tools&lt;br /&gt;
&lt;br /&gt;
==== Trials ====&lt;br /&gt;
&lt;br /&gt;
A lightweight but also more limited &amp;quot;try it out&amp;quot; alternative to the above processes is discussed below.&lt;br /&gt;
&lt;br /&gt;
===== Initial bring-up attempt =====&lt;br /&gt;
&lt;br /&gt;
* Grab the already built root filesystem / image for a MeeGo reference device that's the closest to your target. For ARMv7, this is typically the Nokia N900 handset image. For Atom, this could be netbook image or handset image.&lt;br /&gt;
* Build a Linux kernel for your device and install the modules into /lib/modules.&lt;br /&gt;
* Boot the root filesystem and modify the configuration and drop in components to bring up the device to UX. Note down the things you had to modify or add, as this will be input for your porting work.&lt;br /&gt;
&lt;br /&gt;
===== Building your first image =====&lt;br /&gt;
&lt;br /&gt;
The second step to a proper hardware adaptation is making sure you can build your own image. Because we based our work before on a reference device image, it makes sense to try to build this image first. MeeGo images are constructed on the basis of so called 'kickstart files', which describe the intended contents of an image. &lt;br /&gt;
&lt;br /&gt;
* Install the MeeGo Image Creator tool (MIC)&lt;br /&gt;
* Download the kickstart file (.ks) from the same directory you found your reference device image. &lt;br /&gt;
* Create a image using mic-image-creator (should be elaborated).&lt;br /&gt;
* Test out your freshly baked image as in the previous step.&lt;br /&gt;
&lt;br /&gt;
===== Building your port's first reproduciable image =====&lt;br /&gt;
&lt;br /&gt;
* Download the MeeGo kernel, possibly modifying the kernel with additional patches (including new device drivers) and building the kernel (see [[#Getting_new_chipset_support_to_the_MeeGo_kernel|''Getting new chipset support to the MeeGo kernel'']] below). &lt;br /&gt;
* Add the repository containing your kernel package to the kickstart file (to be elaborated)&lt;br /&gt;
* Remove parts of the kickstart file specific to the reference device.&lt;br /&gt;
* Add a mention of your kernel package in the %packages section.&lt;br /&gt;
* Build packages or include shell scripts in %post section of kickstart file that adds/modifies configuration fitting your device.&lt;br /&gt;
&lt;br /&gt;
A detailed description of a variation of this model can be found from [[ARM/Meego on Beagleboard from scratch|here]] (Better description needed).&lt;br /&gt;
&lt;br /&gt;
==== Getting new chipset support to the MeeGo kernel ====&lt;br /&gt;
&lt;br /&gt;
See [[How-to: getting new chipset support to the MeeGo kernel]] for more detailed information about how to work with the MeeGo kernel and make it support new HW.&lt;br /&gt;
&lt;br /&gt;
=== Upstream projects, MeeGo, products, and patches ===&lt;br /&gt;
&lt;br /&gt;
When building a product based on MeeGo, the product vendor will typically augment the MeeGo OS with their own SW components, as well as make fixes and adjustments to the MeeGo OS code (in the limits set by the compliance rules). While vendors can manage their own SW components as they wish, the strong preference is that any changes made to the MeeGo OS SW components are delivered as patches primarily to the respective upstream projects or secondarily to MeeGo.com. In this way, vendors can relieve themselves of the burden of managing a potentially big patch set on top of MeeGo OS, and also verify the quality and safety of their patches. Having the patches in upstream projects again lessens the patch set management load at MeeGo.com.&lt;br /&gt;
&lt;br /&gt;
For information about pushing patches to MeeGo, see [http://meego.com/about/contribution-guidelines Contribution Guidelines] and [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process] (especially section ''How Do Patches Get Integrated and Accepted?'') and [http://meego.gitorious.org/meego-os-base/kernel-source/blobs/master/README.workflow Kernel workflow].&lt;br /&gt;
&lt;br /&gt;
=== Adaptation subsystems and interfaces ===&lt;br /&gt;
&lt;br /&gt;
In the MeeGo architecture model (see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view MeeGo Architecture Domain View]), adaptation is represented as adaptation subsystems. SW components in the adaptation subsystem ''realizations'' do things that are expected by the OS and communicate with the OS through interfaces defined by the OS.&lt;br /&gt;
 &lt;br /&gt;
The key goal in the sections below is to identify the interface(s) that the adaptation SW needs to implement/use to communicate with the OS in the required manner. Behind these interfaces, the adaptation SW can basically handle the required functionality as it sees best. In some cases, however, there may also be some preferred way of implementing the adaptation.&lt;br /&gt;
&lt;br /&gt;
In some areas, the adaptation work may consist of just writing a suitable Linux device driver for the HW in question. In some other areas, the adaptation work may consist of writing one or more device drivers, as well as one or more user space components (such as plugins to some user space SW frameworks). Various configuration file changes may also be required as a part of the adaptation work.&lt;br /&gt;
&lt;br /&gt;
== Porting by adaptation subsystems ==&lt;br /&gt;
&lt;br /&gt;
=== System Core Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Boot ====&lt;br /&gt;
&lt;br /&gt;
MeeGo places no restrictions as to what SW components are used to handle the pre-OS boot phases in a MeeGo compliant device. Thus, vendors are free to choose, for example, the boot loader, as they see fit. Note, however, that full use of the MeeGo platform security requires that the pre-OS boot phases form a trusted boot chain that ultimately builds on chipset-level security support.&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, MeeGo does not define anything special with regard to what information the boot loader is expected to pass to the Linux kernel, such as via the kernel command line.&lt;br /&gt;
&lt;br /&gt;
The kernel-level boot phases can be tailored, as necessary, to the specific CPU, chipset, or device in a standard Linux manner.&lt;br /&gt;
&lt;br /&gt;
The post-kernel boot phases (startup scripts) can be tailored by device vendors as necessary for their devices in the limits set by MeeGo compliance requirements (certain SW components need to be present in the system).&lt;br /&gt;
&lt;br /&gt;
==== Kernel fundamentals ====&lt;br /&gt;
&lt;br /&gt;
Regarding the Linux kernel, each MeeGo release defines the kernel version to be used and a set of patches on top of that. In addition, the Linux kernel used in MeeGo compliant devices is assumed to have been built with a set of fixed build-time configuration values that are not allowed to be changed. In addition to the fixed values, device vendors can define other kernel configuration values, as required by their devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo does not place any special requirements concerning how the boot loader passes information to the kernel or how the HW configuration and initialization of the system is handled.&lt;br /&gt;
&lt;br /&gt;
CPU, chipset (SoC), and device vendors are assumed to implement the elementary CPU architecture/chipset/device support for the Linux kernel used in MeeGo in a standard Linux manner. This includes:&lt;br /&gt;
* HW (board) configuration&lt;br /&gt;
* Mapping the fundamental Linux kernel functionality (such as IRQ, DMA, GPIO, RTC and memory handling) to the HW in question&lt;br /&gt;
* Creation/modification of the necessary device drivers to support the core SoC interfaces (such as I2C, SPI, SDIO)&lt;br /&gt;
* Permanent memory support&lt;br /&gt;
* Debugging and tracing support&lt;br /&gt;
&lt;br /&gt;
==== Power and thermal management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, the understanding is that MeeGo in general relies on established Linux kernel frameworks and APIs for power management. Some of these frameworks and APIs may be applicable only in certain CPU architectures. In addition, the HW capabilities related to power management may vary between different HW platforms potentially meaning that the SW is assumed perform somewhat different tasks in different environments.&lt;br /&gt;
&lt;br /&gt;
The Linux power management frameworks and APIs include:&lt;br /&gt;
* CPU frequency control (support for the different voltage and frequency operating points) via the cpufreq infrastructure&lt;br /&gt;
* CPU idle state management (different levels of sleep) through the cpuidle infrastructure&lt;br /&gt;
* Clock management through the clock framework&lt;br /&gt;
* Suspend/resume&lt;br /&gt;
* Runtime power management&lt;br /&gt;
* HW voltage/current regulator control via the regulator framework&lt;br /&gt;
* PM_QOS (power management quality of service) framework for making and listening to PM QoS requests&lt;br /&gt;
&lt;br /&gt;
Whether MeeGo will have some user space SW components or framework related to power management is under discussion at the time of this writing.&lt;br /&gt;
&lt;br /&gt;
In the thermal management area, the Device State Management Entity (DSME) component in the Device Health subsystem is supposed to make thermal state management decisions in the system. The DSME has a thermal manager module that again uses other DSME modules (thermal objects) to access the actual thermal sensor information in the HW. To port this functionality to new HW, one or more DSME thermal object modules need to be implemented.&lt;br /&gt;
&lt;br /&gt;
The APIs that the thermal object modules use to access the thermal sensor information are not strictly defined by MeeGo. At device driver level, however, the preferred approach is to use standard Linux interfaces such as the generic thermal sysfs API or the hwmon sysfs API.&lt;br /&gt;
&lt;br /&gt;
==== Energy management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, basically the only thing that MeeGo requires from HW adaptation in the energy management area (battery charging and monitoring) is support for the Linux power supply sysfs class. Additional energy management related functionality can be handled in a vendor specific manner.&lt;br /&gt;
&lt;br /&gt;
==== Device state ====&lt;br /&gt;
&lt;br /&gt;
The DSME component participates in device state management, such as by managing device run level, reboot, and shutdown, by monitoring the device thermal state, and shutting down the device in fatal thermal conditions, and by handling HW watchdog kicking activity.&lt;br /&gt;
&lt;br /&gt;
In a new HW environment, the DSME needs to be adapted to handle the watchdog kicking through the right device driver interfaces and at the right intervals. In addition, to port the DSME thermal management functionality to new HW, one or more DSME thermal object modules need to be implemented as described above, in the [[#Power_and_thermal_management|''Power and thermal management'']] section.&lt;br /&gt;
&lt;br /&gt;
=== Security Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Work is ongoing in bringing platform security functionality to the MeeGo OS based on the Mandatory Access Control (MAC), Integrity Measurement Architecture (IMA) and Extended Verification Module (EVM) technologies in the Linux kernel. Maximum security can be reached if the MeeGo platform security functionality can rely on trusted platform support &amp;quot;below&amp;quot; the Linux kernel, effectively in the HW and the boot loader(s). MeeGo, however, places no strict requirements as to how the trusted platform support is implemented in MeeGo based devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo also includes the OpenSSL open source toolkit implementing general purpose cryptography functionality. Algorithms and operations supported by the OpenSSL toolkit can be accelerated in HW by using the OpenSSL engine architecture. OpenSSL also supports a cryptodev engine that uses crypto algorithms implemented in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Some devices may have a security watchdog in the HW that needs &amp;quot;kicking&amp;quot; at regular intervals to keep the device up and running. In MeeGo, watchdog kicking functionality is implemented in the Device State Management Entity (DSME) component. If security watchdog kicking is needed, the DSME needs to be adapted to handle that through the right device driver interface and at the right intervals.&lt;br /&gt;
&lt;br /&gt;
=== Device Mode Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Resource Policy ====&lt;br /&gt;
&lt;br /&gt;
The Resource (Policy) Manager component in the Device Health subsystem offers a generic framework for:&lt;br /&gt;
* Monitoring device and application events&lt;br /&gt;
* Managing policies that specify rules about what should happen in the device when certain events occur&lt;br /&gt;
* Making policy decisions when events occur (determining the needed changes in the device)&lt;br /&gt;
* Enforcing changes in the system through policy enforcement points&lt;br /&gt;
&lt;br /&gt;
The Resource Manager can be used, for example, to change the audio routing in the device, when the user attaches a wired headset to the device.&lt;br /&gt;
&lt;br /&gt;
Event listening and change enforcement in the Resource Manager happens through plugin modules. Using the MeeGo OS in some new device effectively involves creating suitable Resource Manager policies and writing the necessary plugins for listening device/application events and changing device behavior accordingly. Though not pure HW adaptation, this can be considered a form of MeeGo OS &amp;quot;device adaptation&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Mode Control Entity (MCE) ====&lt;br /&gt;
&lt;br /&gt;
The MCE component (starting from MeeGo 1.2) can be used to listen to events that have an impact to the device mode (such as touch screen locked vs. unlocked) and change the device mode accordingly. The MCE is used, for example, to: &lt;br /&gt;
* Listen to various keys and switches in the device (such as power key, volume key, camera button, slider switch)&lt;br /&gt;
* Control LEDs&lt;br /&gt;
* Enabling/disabling touch screen or HW keyboard, depending on device state&lt;br /&gt;
* Control keyboard backlight&lt;br /&gt;
* Control display state (on/off) and brightness&lt;br /&gt;
&lt;br /&gt;
The MCE has its own plugin architecture that can be used to adapt it to different HW environments.&lt;br /&gt;
&lt;br /&gt;
=== Display and Graphics Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo visual services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view]. &lt;br /&gt;
&lt;br /&gt;
The key ingredients of the display and graphics architecture in MeeGo are the X Window System (X Server with its extensions) and the Khronos graphics APIs (OpenGL ES, OpenVG, and EGL with their extensions).&lt;br /&gt;
&lt;br /&gt;
The display and graphics HW adaptation SW needs to enable the X Window System and the Khronos APIs to function on the device HW. In practice, the adaptation SW needs to have an X display/video driver (hosted inside the X Server) and libraries that implement the Khronos graphics APIs, both supporting the features and functionality required by MeeGo. Also, some configuration file changes may be needed. Any additional user space and kernel space components needed for the HW adaptation are implementation dependent.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering display content to external displays, the Resource Manager component may be used to coordinate the display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Audio Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The audio architecture in MeeGo is centered around the GStreamer and PulseAudio frameworks. In addition, the Resource Manager plays a role in coordinating the audio related behavior of the device (audio routings). The audio HW adaptation SW needs to provide GStreamer elements and PulseAudio plugins that enable the GStreamer and PulseAudio client interfaces used, for example, for audio playback, recording, and volume control to work on the device. Typical required components include, for example, codec elements for GStreamer and sink/source plugins for PulseAudio.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer and PulseAudio plugins, the audio HW adaptation SW can be implemented with different technologies and APIs, including ALSA and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework, as needed. Use of the ALSA framework and APIs is encouraged, however, as they allow significant reuse of components and functionality on the PulseAudio level and are already a part of the upstream Linux kernel. If ALSA is not used to implement the kernel side parts of the audio adaptation, the solution that is used instead should still be aligned with the upstream Linux kernel.&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo media services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view].&lt;br /&gt;
&lt;br /&gt;
=== Camera Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo still imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework and the CameraBin GStreamer element. The still imaging HW adaptation SW is required to contain a GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element. Thus, the required HW adaptation interfaces are the relevant GStreamer plugin interfaces and especially the interfaces expected by the CameraBin element, in particular the GstPhotography interface.&lt;br /&gt;
&lt;br /&gt;
If HW accelerated encoders are supported, they should be also offered to the system as GStreamer elements.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
=== Video and Imaging Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo video imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework, the CameraBin GStreamer element (video recording) and the Playbin2 GStreamer element (video playback). The video imaging HW adaptation SW is required to contain:&lt;br /&gt;
:* A GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element (this is common with still imaging) &lt;br /&gt;
:* If HW accelerated codecs are supported, GStreamer elements that wrap the codecs&lt;br /&gt;
:* If HW accelerated filters are supported (such as video scaler, rotation engines, color conversion engines), GStreamer elements that wrap the filters&lt;br /&gt;
:* A GStreamer video sink element that offers the GStreamer X Overlay Interface. Note that if the XVideo extension is supported on the X Server side, the xvimagesink element can be used as the video sink element and no new elements are needed.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the video imaging HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering video content to external displays, the Resource Manager component may be used to coordinate the video/display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Communications Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo communications services architecture, see [http://meego.com/developers/meego-architecture/comms-services Comms Services].&lt;br /&gt;
&lt;br /&gt;
==== Cellular ====&lt;br /&gt;
&lt;br /&gt;
The cellular telephony architecture in MeeGo is centered on the oFono, PulseAudio, and Telepathy frameworks. In addition, the Resource Manager plays a role in coordinating the device behavior during voice calls.&lt;br /&gt;
&lt;br /&gt;
The cellular modem HW adaptation SW must implement the following interfaces towards the MeeGo OS:&lt;br /&gt;
:* oFono modem plugin/driver API&lt;br /&gt;
:* Linux network interface for the Linux TCP/IP stack (for data communications)&lt;br /&gt;
:* Relevant PulseAudio plugin interfaces for cellular voice call audio handling&lt;br /&gt;
&lt;br /&gt;
For more detailed information about the oFono APIs, see the documentation and source code available at [http://git.kernel.org/?p=network/ofono/ofono.git;a=summary oFono git].&lt;br /&gt;
&lt;br /&gt;
==== USB ====&lt;br /&gt;
&lt;br /&gt;
The foundation of MeeGo USB functionality is the standard Linux USB subsystem. The Linux USB subsystem defines the USB related HW adaptation interfaces that need to be supported in MeeGo. In practice, these are kernel side interfaces between the generic USB functionality and a HW dependent USB host controller driver.&lt;br /&gt;
&lt;br /&gt;
==== WLAN ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo WLAN architecture is centered on the [http://linuxwireless.org/ Linux wireless] (IEEE-802.11) subsystem. The Linux wireless SW stack defines the WLAN HW adaptation SW interfaces that need to be used in MeeGo. In practice, the required interfaces are defined by cfg80211 for FullMAC WLAN devices and by mac80211 for SoftMAC WLAN devices. In addition, a Linux network interface needs to be supported towards the Linux TCP/IP stack.&lt;br /&gt;
&lt;br /&gt;
==== Bluetooth ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Bluetooth architecture is centered on the [http://www.bluez.org/ BlueZ] SW stack. The BlueZ SW stack defines the Bluetooth HW adaptation SW interfaces that need to be used in MeeGo. In practice, these are Linux kernel side interfaces between the generic HCI (Host Controller Interface) core and a HW specific HCI driver.&lt;br /&gt;
&lt;br /&gt;
=== Location Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The MeeGo location architecture is based on [http://http://labs.trolltech.com/page/Projects/QtMobility| QtMobility Location API].  The QtMobility 1.0 Location API provides geographic coordinates only.  The QtMobility 1.1 Location API provides geocoding and reverse geocoding, POI search, navigation, and mapping.  The 1.0 Location API is available in MeeGo 1.1.  The 1.1 or later Location API will be available in MeeGo 1.2.  The Location API uses a plugin system for implementations of the underlying backend.  MeeGo compliance requirements require support for the QtMobility Location API and thus require one or more plugins to support these APIs.  MeeGo places no restrictions as to how the plugins are implemented, however. Adaptation to location related HW may be done by manufacturers or service providers and the way how it's done is not defined by the API.&lt;br /&gt;
&lt;br /&gt;
MeeGo will use [http://www.freedesktop.org/wiki/Software/GeoClue GeoClue] as the reference location framework and the reference implementation of the Qt Mobility location API backend will be written on top of GeoClue. GeoClue defines a set of (D-Bus) APIs for accessing location services provided by service providers implemented as D-Bus services. In addition, GeoClue includes a set of service provider implementations and (at the time of this writing) an experimental master service provider that can act as a proxy between clients and the actual service providers. If a device vendor wants to take advantage of this existing functionality, the vendor can implement their location services &amp;quot;behind&amp;quot; the GeoClue APIs as GeoClue service providers. In such a case, adaptation to the location related HW would happen inside the service providers as defined by the service provider designs.&lt;br /&gt;
&lt;br /&gt;
=== Sensor Adaptation === &lt;br /&gt;
&lt;br /&gt;
The key component in the MeeGo sensor handling architecture is the Sensor Framework. The Sensor Framework uses both HW independent logical sensor plugins and HW dependent sensor adaptor plugins in its operation. The required sensor HW adaptation interfaces in MeeGo are the interfaces that the Sensor Framework and the logical sensor plugins define for the sensor adaptor plugins to implement. The sensor adaptor plugins typically communicate directly with sensor HW drivers in the Linux kernel. The interfaces that the sensor HW drivers expose to the user space are not defined by MeeGo. Sensor HW adaptation in MeeGo thus consists of adaptor plugins in the Sensor Framework and sensor HW drivers in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Note that thermal sensors are handled in a different manner as described in the [[#Power and thermal management|''Power and thermal management'']] section above.&lt;br /&gt;
&lt;br /&gt;
=== Input Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Touch ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the touch input handling path in MeeGo are the touch HW device driver, Linux kernel input subsystem, X server, X input driver, Qt, and finally the MeeGo Touch Framework. Enabling touch support for some new HW requires at least the implementation of the corresponding touch HW device driver in the Linux kernel. If this driver communicates touch events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, basically the existing functionality in X server (such as evdev input driver) and above can be used as such. In case the kernel-to-user-space interface is non-standard, it is also possible to implement a new X input driver as a part of the touch HW adaptation.&lt;br /&gt;
&lt;br /&gt;
Multi-touch support in X requires a new version, 2.1, of the [http://cgit.freedesktop.org/~whot/inputproto/tree/XI2proto.txt?h=multitouch X Input Extension] and this also requires support from the client side, in this case Qt's multi-touch support. Once this support has been implemented throughout the SW stack, including X evdev input driver, supporting multi-touch for some new HW should require only the implementation of a touch HW device driver that implements the standard Linux multi-touch interface. This should be the case in MeeGo 1.2. &lt;br /&gt;
&lt;br /&gt;
Before 1.2, multi-touch support in MeeGo uses a special X input driver (mtev), X server multi-pointer support (MPX) and Qt multi-touch support written on top of MPX. This solution requires the touch HW device driver to expose a user-space interface that is compatible with mtev.&lt;br /&gt;
&lt;br /&gt;
==== HW keyboard ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the HW keyboard input handling path in MeeGo are the keyboard HW device driver, Linux kernel input subsystem, X server, X input driver, and Qt. Enabling keyboard support for some new HW requires typically only the implementation of the corresponding keyboard HW device driver in the Linux kernel. If this driver communicates key events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, the existing functionality in X server (such as evdev input driver) and above should work as such. In case the kernel-to-user space interface is non-standard, it is also possible to implement a new X input driver as a part of the keyboard HW adaptation.&lt;br /&gt;
&lt;br /&gt;
==== Buttons and switches ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo includes the MCE and System SW Qt API (QmSystem) components. The MCE can be used to control the device mode and it listens to power button events and, for example, device open/close switch events via the respective device driver interfaces. The System SW Qt API on the other hand provides a Qt API to various system information, including events from various physical buttons in the device (such as volume button, camera button). The System SW Qt API gets the button events either by listening to the relevant device driver interfaces or through the MCE component.&lt;br /&gt;
&lt;br /&gt;
Both the MCE and the System SW Qt API components can be adapted to new devices by device vendors.&lt;br /&gt;
&lt;br /&gt;
=== Haptics and Vibra Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Haptics ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Touch Framework present (at least) in the MeeGo handset device category contains a component called Feedback Framework (meegotouch-feedback) that handles the creation of auditory and/or haptic feedback to touch events. The haptic feedback can be created with, for example, vibra motors or piezo elements. In the Feedback Framework, the different types of feedback are created by backend libraries implemented as plugins. &lt;br /&gt;
&lt;br /&gt;
The haptics-related HW adaptation interface, from the MeeGo OS perspective, is the backend plugin interface defined by the Feedback Framework. The plugins can then communicate with the HW either through some device driver interface or some intermediate SW layers (MeeGo places no restrictions as to how the plugins are implemented).&lt;br /&gt;
&lt;br /&gt;
==== Vibra (notifications/alerts) ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo (at least the handset category) will include a component called Non-Graphical Feedback Framework (NGF). This component offers the capability of playing, for exmaple, audio, vibra or led as an indication of events such as incoming call/message, clock and calendar alarms, missed calls, unread messages etc. The NGF also integrates with the Resource Policy to decide about the available playback resources based on policy rules and the current system state.&lt;br /&gt;
&lt;br /&gt;
The actual playback of the different types of notifications is handled by NGF plugins that can be created by device vendors. The plugins communicate with the relevant HW as they see best, such as directly through some device driver interface or via some intermediate user space SW components. The plugin interfaces defined by NGF thus form the notification/alert vibra adaptation interface in MeeGo.&lt;br /&gt;
&lt;br /&gt;
=== Production Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Production deals with areas such as flashing, testing, tuning and certification. The current understanding is that these areas are handled in a vendor specific manner, including the adaptation.&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Noel</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/MeeGo_Porting_Guide</id>
		<title>MeeGo Porting Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/MeeGo_Porting_Guide"/>
				<updated>2011-06-24T23:24:31Z</updated>
		
		<summary type="html">&lt;p&gt;Noel: /* Haptics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The goal of MeeGo Porting Guide (MPG) is to provide valuable information and instructions to people who want to run MeeGo OS on their (new) HW and eventually create products based on the MeeGo OS. The MPG starts with an overview of the porting process, tools, and other related background information and then moves on to describing what the porting actually means in individual technical/functional areas.&lt;br /&gt;
&lt;br /&gt;
The porting guide is not strictly tied to any particular MeeGo OS version or device category. Instead, it tries to be general enough to cover the different device categories, as well as follow changes introduced in new MeeGo OS versions.&lt;br /&gt;
&lt;br /&gt;
Detailed porting information in the different technical areas is dependent on the respective [http://meego.com/developers/meego-architecture MeeGo architecture]. In some cases, this architecture may still be open and this is noted in the applicable sections.&lt;br /&gt;
&lt;br /&gt;
=== Feedback ===&lt;br /&gt;
&lt;br /&gt;
Contribution to these pages is open. Any MeeGo community member is free to ''improve'' these pages at any time. You can also leave feedback in the [http://lists.meego.com/listinfo/meego-porting MeeGo porting mailing list].&lt;br /&gt;
&lt;br /&gt;
== General porting information/guidelines ==&lt;br /&gt;
&lt;br /&gt;
=== MeeGo compliance ===&lt;br /&gt;
&lt;br /&gt;
Perhaps the most important piece of background information related to the MPG are the [[Quality/Compliance|MeeGo compliance requirements]]. A device that is meant to be MeeGo compliant will need to fulfill the requirements listed in the MeeGo compliance specification for the applicable device category (the first version of the specification is supposed to be available in October 2010). In short, a MeeGo compliant device will need to:&lt;br /&gt;
* Meet the minimum HW performance and component requirements for the applicable device category&lt;br /&gt;
* Include all SW components that form the MeeGo core OS&lt;br /&gt;
* Include the additional SW components required to be present in devices in the applicable device category&lt;br /&gt;
* Not break the API/ABI of any of the components coming from MeeGo&lt;br /&gt;
* Follow the MeeGo SW packaging conventions&lt;br /&gt;
&lt;br /&gt;
The compliance rules will also specify CPU architecture specific requirements concerning how MeeGo OS itself and MeeGo applications are to be compiled to different environments (instruction set used, compiler version, compiler options, etc.).&lt;br /&gt;
&lt;br /&gt;
A device vendor may include additional functionality, HW components and SW components in their devices, as long as they don't break MeeGo compliance. The vendor can also patch MeeGo OS components, if the patches don't break MeeGo compliance. A device vendor's own SW components can be either open source or closed source components, as long as they adhere to the rules set by the applicable SW licenses.&lt;br /&gt;
&lt;br /&gt;
From the MeeGo Porting Guide perspective, by defining the SW components and HW components that need to be present, the compliance requirements effectively define the minimum set of porting tasks required from a device vendor and what SW components are involved from MeeGo OS side.&lt;br /&gt;
&lt;br /&gt;
=== Porting process and tools ===&lt;br /&gt;
&lt;br /&gt;
==== Overview ====&lt;br /&gt;
&lt;br /&gt;
As long as a vendor's device is MeeGo compliant, as defined above, it is basically up to the vendor to decide how they build the SW that ends up in the device. The vendor may use their own build machinery or set up an OBS build system that is also used in MeeGo. Regardless of what the vendor's build system is, it needs to integrate with the MeeGo build infrastructure, at least to fetch the MeeGo source packages for the builds, as well as build each MeeGo component in the same way as it would be built in the MeeGo build system (such as with the same compiler and compiler options). Whatever the case, the intention in MeeGo is to use and offer an open toolset that any HW or SW vendor can use for efficient SW creation. It is likely that using the same toolset as MeeGo, will offer the easiest way to integrate vendor's own build system with the the MeeGo build infrastructure.&lt;br /&gt;
&lt;br /&gt;
The key ingredients of the MeeGo build infrastructure and toolset are:&lt;br /&gt;
* [http://meego.gitorious.org MeeGo Gitorious]&lt;br /&gt;
** A version control system for the source files of various MeeGo specific SW components and tools&lt;br /&gt;
* [http://build.meego.com MeeGo OBS]&lt;br /&gt;
** The build system that is used to build MeeGo packages (RPMs) from their sources&lt;br /&gt;
* [http://repo.meego.com MeeGo Repository]&lt;br /&gt;
** The place where the built MeeGo releases, that is where MeeGo packages and images are stored&lt;br /&gt;
* [http://wiki.meego.com/Image_Creation MeeGo Image Creator]&lt;br /&gt;
** The tool used to build MeeGo images that can be installed/flashed on HW&lt;br /&gt;
* MeeGo release tools&lt;br /&gt;
** Tools such as BOSS and REVS that are used in the creation of the MeeGo releases under repo.meego.com&lt;br /&gt;
&lt;br /&gt;
For additional information, see [[Build Infrastructure]], [[Release Infrastructure]] and [[Release Engineering]].&lt;br /&gt;
&lt;br /&gt;
For another overview of the MeeGo porting process, see [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process].&lt;br /&gt;
&lt;br /&gt;
==== Vendor's own OBS ====&lt;br /&gt;
&lt;br /&gt;
So, ultimately, when creating actual products running the MeeGo OS, the vendor may end up setting up their own OBS build system. Setting up your own OBS system may also be beneficial in earlier HW/product development phases, as it offers a flexible way to modify and build MeeGo OS to test it on the new HW. The vendor's own OBS system can link to the MeeGo OBS for handling packages that come directly from MeeGo and it can link to other sources for handling, such as closed source packages that are specific to the vendor. See [[Release_Engineering/Process#Making a product out of MeeGo Release|an overview picture of this setup]].&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Sets up their own OBS system&lt;br /&gt;
** [[User:Stskeeps/10_easy_steps_to_a_local_OBS|Instructions related to setting up an OBS system]],  [[Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE112|OBS Applicances]] [http://en.opensuse.org/openSUSE:Build_Service_private_instance Open Suse OBS Wiki].&lt;br /&gt;
* Creates projects under the their own OBS for their own components&lt;br /&gt;
* Links their own OBS to the MeeGo OBS for MeeGo components&lt;br /&gt;
* May have trial patches to MeeGo components in their own OBS&lt;br /&gt;
** NOTE. Eventually all patches to MeeGo components required in a final MeeGo based product ''should'' be pushed to MeeGo.com. However, this is not an absolute must requirement, as long as the MeeGo compliance requirements and applicable SW license rules are fulfilled. &lt;br /&gt;
** See [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below&lt;br /&gt;
* Needs to set up the necessary machinery to create releases and images from the packages built with OBS&lt;br /&gt;
** This machinery can be based on the toolset used in MeeGo (see above)&lt;br /&gt;
&lt;br /&gt;
==== Working under MeeGo.com ====&lt;br /&gt;
&lt;br /&gt;
Another way of porting MeeGo to some new HW is to get the new HW accepted as one MeeGo reference HW and have the MeeGo build machinery create builds for the reference HW as a part of the normal MeeGo release building cycle (see [[Release Engineering/Release Timeline|Release Timeline]] and [[Release Engineering/Process|Release Process]]). This setup can also include QA support for the reference HW on the MeeGo side (see [[Quality]]). At the time of this writing, the actual process of getting new reference HW to MeeGo is still somewhat unclear. In any case, this model requires active participation from the vendor in MeeGo work in general and especially in supporting their reference HW in MeeGo.&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Creates a device/platform development project under the MeeGo OBS for their components. The open source components would then get submitted to MeeGo Trunk:Testing and get reviewed like any other MeeGo component for inclusion.&lt;br /&gt;
** Note that it is also possible to have closed source binary components in the MeeGo OBS to be included in the MeeGo builds for some reference HW. These are submitted to the Trunk:non-oss repository. Licensing is usually required to at least include redistributability, as the components cannot be mirrored from or hosted at repo.meego.com otherwise. It is not possible to have components within Trunk:Testing require closed source dependencies.&lt;br /&gt;
* Pushes patches to other MeeGo components at MeeGo.com as necessary (see [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below)&lt;br /&gt;
* Creates (or supports the creation of) a MIC kickstart file for building images for their reference HW&lt;br /&gt;
* As necessary, supports adding support for their reference HW and SW components in the MeeGo build and release infrastructure tools&lt;br /&gt;
&lt;br /&gt;
==== Trials ====&lt;br /&gt;
&lt;br /&gt;
A lightweight but also more limited &amp;quot;try it out&amp;quot; alternative to the above processes is discussed below.&lt;br /&gt;
&lt;br /&gt;
===== Initial bring-up attempt =====&lt;br /&gt;
&lt;br /&gt;
* Grab the already built root filesystem / image for a MeeGo reference device that's the closest to your target. For ARMv7, this is typically the Nokia N900 handset image. For Atom, this could be netbook image or handset image.&lt;br /&gt;
* Build a Linux kernel for your device and install the modules into /lib/modules.&lt;br /&gt;
* Boot the root filesystem and modify the configuration and drop in components to bring up the device to UX. Note down the things you had to modify or add, as this will be input for your porting work.&lt;br /&gt;
&lt;br /&gt;
===== Building your first image =====&lt;br /&gt;
&lt;br /&gt;
The second step to a proper hardware adaptation is making sure you can build your own image. Because we based our work before on a reference device image, it makes sense to try to build this image first. MeeGo images are constructed on the basis of so called 'kickstart files', which describe the intended contents of an image. &lt;br /&gt;
&lt;br /&gt;
* Install the MeeGo Image Creator tool (MIC)&lt;br /&gt;
* Download the kickstart file (.ks) from the same directory you found your reference device image. &lt;br /&gt;
* Create a image using mic-image-creator (should be elaborated).&lt;br /&gt;
* Test out your freshly baked image as in the previous step.&lt;br /&gt;
&lt;br /&gt;
===== Building your port's first reproduciable image =====&lt;br /&gt;
&lt;br /&gt;
* Download the MeeGo kernel, possibly modifying the kernel with additional patches (including new device drivers) and building the kernel (see [[#Getting_new_chipset_support_to_the_MeeGo_kernel|''Getting new chipset support to the MeeGo kernel'']] below). &lt;br /&gt;
* Add the repository containing your kernel package to the kickstart file (to be elaborated)&lt;br /&gt;
* Remove parts of the kickstart file specific to the reference device.&lt;br /&gt;
* Add a mention of your kernel package in the %packages section.&lt;br /&gt;
* Build packages or include shell scripts in %post section of kickstart file that adds/modifies configuration fitting your device.&lt;br /&gt;
&lt;br /&gt;
A detailed description of a variation of this model can be found from [[ARM/Meego on Beagleboard from scratch|here]] (Better description needed).&lt;br /&gt;
&lt;br /&gt;
==== Getting new chipset support to the MeeGo kernel ====&lt;br /&gt;
&lt;br /&gt;
See [[How-to: getting new chipset support to the MeeGo kernel]] for more detailed information about how to work with the MeeGo kernel and make it support new HW.&lt;br /&gt;
&lt;br /&gt;
=== Upstream projects, MeeGo, products, and patches ===&lt;br /&gt;
&lt;br /&gt;
When building a product based on MeeGo, the product vendor will typically augment the MeeGo OS with their own SW components, as well as make fixes and adjustments to the MeeGo OS code (in the limits set by the compliance rules). While vendors can manage their own SW components as they wish, the strong preference is that any changes made to the MeeGo OS SW components are delivered as patches primarily to the respective upstream projects or secondarily to MeeGo.com. In this way, vendors can relieve themselves of the burden of managing a potentially big patch set on top of MeeGo OS, and also verify the quality and safety of their patches. Having the patches in upstream projects again lessens the patch set management load at MeeGo.com.&lt;br /&gt;
&lt;br /&gt;
For information about pushing patches to MeeGo, see [http://meego.com/about/contribution-guidelines Contribution Guidelines] and [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process] (especially section ''How Do Patches Get Integrated and Accepted?'') and [http://meego.gitorious.org/meego-os-base/kernel-source/blobs/master/README.workflow Kernel workflow].&lt;br /&gt;
&lt;br /&gt;
=== Adaptation subsystems and interfaces ===&lt;br /&gt;
&lt;br /&gt;
In the MeeGo architecture model (see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view MeeGo Architecture Domain View]), adaptation is represented as adaptation subsystems. SW components in the adaptation subsystem ''realizations'' do things that are expected by the OS and communicate with the OS through interfaces defined by the OS.&lt;br /&gt;
 &lt;br /&gt;
The key goal in the sections below is to identify the interface(s) that the adaptation SW needs to implement/use to communicate with the OS in the required manner. Behind these interfaces, the adaptation SW can basically handle the required functionality as it sees best. In some cases, however, there may also be some preferred way of implementing the adaptation.&lt;br /&gt;
&lt;br /&gt;
In some areas, the adaptation work may consist of just writing a suitable Linux device driver for the HW in question. In some other areas, the adaptation work may consist of writing one or more device drivers, as well as one or more user space components (such as plugins to some user space SW frameworks). Various configuration file changes may also be required as a part of the adaptation work.&lt;br /&gt;
&lt;br /&gt;
== Porting by adaptation subsystems ==&lt;br /&gt;
&lt;br /&gt;
=== System Core Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Boot ====&lt;br /&gt;
&lt;br /&gt;
MeeGo places no restrictions as to what SW components are used to handle the pre-OS boot phases in a MeeGo compliant device. Thus, vendors are free to choose, for example, the boot loader, as they see fit. Note, however, that full use of the MeeGo platform security requires that the pre-OS boot phases form a trusted boot chain that ultimately builds on chipset-level security support.&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, MeeGo does not define anything special with regard to what information the boot loader is expected to pass to the Linux kernel, such as via the kernel command line.&lt;br /&gt;
&lt;br /&gt;
The kernel-level boot phases can be tailored, as necessary, to the specific CPU, chipset, or device in a standard Linux manner.&lt;br /&gt;
&lt;br /&gt;
The post-kernel boot phases (startup scripts) can be tailored by device vendors as necessary for their devices in the limits set by MeeGo compliance requirements (certain SW components need to be present in the system).&lt;br /&gt;
&lt;br /&gt;
==== Kernel fundamentals ====&lt;br /&gt;
&lt;br /&gt;
Regarding the Linux kernel, each MeeGo release defines the kernel version to be used and a set of patches on top of that. In addition, the Linux kernel used in MeeGo compliant devices is assumed to have been built with a set of fixed build-time configuration values that are not allowed to be changed. In addition to the fixed values, device vendors can define other kernel configuration values, as required by their devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo does not place any special requirements concerning how the boot loader passes information to the kernel or how the HW configuration and initialization of the system is handled.&lt;br /&gt;
&lt;br /&gt;
CPU, chipset (SoC), and device vendors are assumed to implement the elementary CPU architecture/chipset/device support for the Linux kernel used in MeeGo in a standard Linux manner. This includes:&lt;br /&gt;
* HW (board) configuration&lt;br /&gt;
* Mapping the fundamental Linux kernel functionality (such as IRQ, DMA, GPIO, RTC and memory handling) to the HW in question&lt;br /&gt;
* Creation/modification of the necessary device drivers to support the core SoC interfaces (such as I2C, SPI, SDIO)&lt;br /&gt;
* Permanent memory support&lt;br /&gt;
* Debugging and tracing support&lt;br /&gt;
&lt;br /&gt;
==== Power and thermal management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, the understanding is that MeeGo in general relies on established Linux kernel frameworks and APIs for power management. Some of these frameworks and APIs may be applicable only in certain CPU architectures. In addition, the HW capabilities related to power management may vary between different HW platforms potentially meaning that the SW is assumed perform somewhat different tasks in different environments.&lt;br /&gt;
&lt;br /&gt;
The Linux power management frameworks and APIs include:&lt;br /&gt;
* CPU frequency control (support for the different voltage and frequency operating points) via the cpufreq infrastructure&lt;br /&gt;
* CPU idle state management (different levels of sleep) through the cpuidle infrastructure&lt;br /&gt;
* Clock management through the clock framework&lt;br /&gt;
* Suspend/resume&lt;br /&gt;
* Runtime power management&lt;br /&gt;
* HW voltage/current regulator control via the regulator framework&lt;br /&gt;
* PM_QOS (power management quality of service) framework for making and listening to PM QoS requests&lt;br /&gt;
&lt;br /&gt;
Whether MeeGo will have some user space SW components or framework related to power management is under discussion at the time of this writing.&lt;br /&gt;
&lt;br /&gt;
In the thermal management area, the Device State Management Entity (DSME) component in the Device Health subsystem is supposed to make thermal state management decisions in the system. The DSME has a thermal manager module that again uses other DSME modules (thermal objects) to access the actual thermal sensor information in the HW. To port this functionality to new HW, one or more DSME thermal object modules need to be implemented.&lt;br /&gt;
&lt;br /&gt;
The APIs that the thermal object modules use to access the thermal sensor information are not strictly defined by MeeGo. At device driver level, however, the preferred approach is to use standard Linux interfaces such as the generic thermal sysfs API or the hwmon sysfs API.&lt;br /&gt;
&lt;br /&gt;
==== Energy management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, basically the only thing that MeeGo requires from HW adaptation in the energy management area (battery charging and monitoring) is support for the Linux power supply sysfs class. Additional energy management related functionality can be handled in a vendor specific manner.&lt;br /&gt;
&lt;br /&gt;
==== Device state ====&lt;br /&gt;
&lt;br /&gt;
The DSME component participates in device state management, such as by managing device run level, reboot, and shutdown, by monitoring the device thermal state, and shutting down the device in fatal thermal conditions, and by handling HW watchdog kicking activity.&lt;br /&gt;
&lt;br /&gt;
In a new HW environment, the DSME needs to be adapted to handle the watchdog kicking through the right device driver interfaces and at the right intervals. In addition, to port the DSME thermal management functionality to new HW, one or more DSME thermal object modules need to be implemented as described above, in the [[#Power_and_thermal_management|''Power and thermal management'']] section.&lt;br /&gt;
&lt;br /&gt;
=== Security Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Work is ongoing in bringing platform security functionality to the MeeGo OS based on the Mandatory Access Control (MAC), Integrity Measurement Architecture (IMA) and Extended Verification Module (EVM) technologies in the Linux kernel. Maximum security can be reached if the MeeGo platform security functionality can rely on trusted platform support &amp;quot;below&amp;quot; the Linux kernel, effectively in the HW and the boot loader(s). MeeGo, however, places no strict requirements as to how the trusted platform support is implemented in MeeGo based devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo also includes the OpenSSL open source toolkit implementing general purpose cryptography functionality. Algorithms and operations supported by the OpenSSL toolkit can be accelerated in HW by using the OpenSSL engine architecture. OpenSSL also supports a cryptodev engine that uses crypto algorithms implemented in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Some devices may have a security watchdog in the HW that needs &amp;quot;kicking&amp;quot; at regular intervals to keep the device up and running. In MeeGo, watchdog kicking functionality is implemented in the Device State Management Entity (DSME) component. If security watchdog kicking is needed, the DSME needs to be adapted to handle that through the right device driver interface and at the right intervals.&lt;br /&gt;
&lt;br /&gt;
=== Device Mode Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Resource Policy ====&lt;br /&gt;
&lt;br /&gt;
The Resource (Policy) Manager component in the Device Health subsystem offers a generic framework for:&lt;br /&gt;
* Monitoring device and application events&lt;br /&gt;
* Managing policies that specify rules about what should happen in the device when certain events occur&lt;br /&gt;
* Making policy decisions when events occur (determining the needed changes in the device)&lt;br /&gt;
* Enforcing changes in the system through policy enforcement points&lt;br /&gt;
&lt;br /&gt;
The Resource Manager can be used, for example, to change the audio routing in the device, when the user attaches a wired headset to the device.&lt;br /&gt;
&lt;br /&gt;
Event listening and change enforcement in the Resource Manager happens through plugin modules. Using the MeeGo OS in some new device effectively involves creating suitable Resource Manager policies and writing the necessary plugins for listening device/application events and changing device behavior accordingly. Though not pure HW adaptation, this can be considered a form of MeeGo OS &amp;quot;device adaptation&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Mode Control Entity (MCE) ====&lt;br /&gt;
&lt;br /&gt;
The MCE component (starting from MeeGo 1.2) can be used to listen to events that have an impact to the device mode (such as touch screen locked vs. unlocked) and change the device mode accordingly. The MCE is used, for example, to: &lt;br /&gt;
* Listen to various keys and switches in the device (such as power key, volume key, camera button, slider switch)&lt;br /&gt;
* Control LEDs&lt;br /&gt;
* Enabling/disabling touch screen or HW keyboard, depending on device state&lt;br /&gt;
* Control keyboard backlight&lt;br /&gt;
* Control display state (on/off) and brightness&lt;br /&gt;
&lt;br /&gt;
The MCE has its own plugin architecture that can be used to adapt it to different HW environments.&lt;br /&gt;
&lt;br /&gt;
=== Display and Graphics Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo visual services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view]. &lt;br /&gt;
&lt;br /&gt;
The key ingredients of the display and graphics architecture in MeeGo are the X Window System (X Server with its extensions) and the Khronos graphics APIs (OpenGL ES, OpenVG, and EGL with their extensions).&lt;br /&gt;
&lt;br /&gt;
The display and graphics HW adaptation SW needs to enable the X Window System and the Khronos APIs to function on the device HW. In practice, the adaptation SW needs to have an X display/video driver (hosted inside the X Server) and libraries that implement the Khronos graphics APIs, both supporting the features and functionality required by MeeGo. Also, some configuration file changes may be needed. Any additional user space and kernel space components needed for the HW adaptation are implementation dependent.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering display content to external displays, the Resource Manager component may be used to coordinate the display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Audio Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The audio architecture in MeeGo is centered around the GStreamer and PulseAudio frameworks. In addition, the Resource Manager plays a role in coordinating the audio related behavior of the device (audio routings). The audio HW adaptation SW needs to provide GStreamer elements and PulseAudio plugins that enable the GStreamer and PulseAudio client interfaces used, for example, for audio playback, recording, and volume control to work on the device. Typical required components include, for example, codec elements for GStreamer and sink/source plugins for PulseAudio.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer and PulseAudio plugins, the audio HW adaptation SW can be implemented with different technologies and APIs, including ALSA and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework, as needed. Use of the ALSA framework and APIs is encouraged, however, as they allow significant reuse of components and functionality on the PulseAudio level and are already a part of the upstream Linux kernel. If ALSA is not used to implement the kernel side parts of the audio adaptation, the solution that is used instead should still be aligned with the upstream Linux kernel.&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo media services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view].&lt;br /&gt;
&lt;br /&gt;
=== Camera Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo still imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework and the CameraBin GStreamer element. The still imaging HW adaptation SW is required to contain a GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element. Thus, the required HW adaptation interfaces are the relevant GStreamer plugin interfaces and especially the interfaces expected by the CameraBin element, in particular the GstPhotography interface.&lt;br /&gt;
&lt;br /&gt;
If HW accelerated encoders are supported, they should be also offered to the system as GStreamer elements.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
=== Video and Imaging Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo video imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework, the CameraBin GStreamer element (video recording) and the Playbin2 GStreamer element (video playback). The video imaging HW adaptation SW is required to contain:&lt;br /&gt;
:* A GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element (this is common with still imaging) &lt;br /&gt;
:* If HW accelerated codecs are supported, GStreamer elements that wrap the codecs&lt;br /&gt;
:* If HW accelerated filters are supported (such as video scaler, rotation engines, color conversion engines), GStreamer elements that wrap the filters&lt;br /&gt;
:* A GStreamer video sink element that offers the GStreamer X Overlay Interface. Note that if the XVideo extension is supported on the X Server side, the xvimagesink element can be used as the video sink element and no new elements are needed.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the video imaging HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering video content to external displays, the Resource Manager component may be used to coordinate the video/display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Communications Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo communications services architecture, see [http://meego.com/developers/meego-architecture/comms-services Comms Services].&lt;br /&gt;
&lt;br /&gt;
==== Cellular ====&lt;br /&gt;
&lt;br /&gt;
The cellular telephony architecture in MeeGo is centered on the oFono, PulseAudio, and Telepathy frameworks. In addition, the Resource Manager plays a role in coordinating the device behavior during voice calls.&lt;br /&gt;
&lt;br /&gt;
The cellular modem HW adaptation SW must implement the following interfaces towards the MeeGo OS:&lt;br /&gt;
:* oFono modem plugin/driver API&lt;br /&gt;
:* Linux network interface for the Linux TCP/IP stack (for data communications)&lt;br /&gt;
:* Relevant PulseAudio plugin interfaces for cellular voice call audio handling&lt;br /&gt;
&lt;br /&gt;
For more detailed information about the oFono APIs, see the documentation and source code available at [http://git.kernel.org/?p=network/ofono/ofono.git;a=summary oFono git].&lt;br /&gt;
&lt;br /&gt;
==== USB ====&lt;br /&gt;
&lt;br /&gt;
The foundation of MeeGo USB functionality is the standard Linux USB subsystem. The Linux USB subsystem defines the USB related HW adaptation interfaces that need to be supported in MeeGo. In practice, these are kernel side interfaces between the generic USB functionality and a HW dependent USB host controller driver.&lt;br /&gt;
&lt;br /&gt;
==== WLAN ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo WLAN architecture is centered on the [http://linuxwireless.org/ Linux wireless] (IEEE-802.11) subsystem. The Linux wireless SW stack defines the WLAN HW adaptation SW interfaces that need to be used in MeeGo. In practice, the required interfaces are defined by cfg80211 for FullMAC WLAN devices and by mac80211 for SoftMAC WLAN devices. In addition, a Linux network interface needs to be supported towards the Linux TCP/IP stack.&lt;br /&gt;
&lt;br /&gt;
==== Bluetooth ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Bluetooth architecture is centered on the [http://www.bluez.org/ BlueZ] SW stack. The BlueZ SW stack defines the Bluetooth HW adaptation SW interfaces that need to be used in MeeGo. In practice, these are Linux kernel side interfaces between the generic HCI (Host Controller Interface) core and a HW specific HCI driver.&lt;br /&gt;
&lt;br /&gt;
=== Location Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The MeeGo location architecture is based on [http://http://labs.trolltech.com/page/Projects/QtMobility| QtMobility Location API].  The QtMobility 1.0 Location API provides geographic coordinates only.  The QtMobility 1.1 Location API provides geocoding and reverse geocoding, POI search, navigation, and mapping.  The 1.0 Location API is available in MeeGo 1.1.  The 1.1 or later Location API will be available in MeeGo 1.2.  The Location API uses a plugin system for implementations of the underlying backend.  MeeGo compliance requirements require support for the QtMobility Location API and thus require one or more plugins to support these APIs.  MeeGo places no restrictions as to how the plugins are implemented, however. Adaptation to location related HW may be done by manufacturers or service providers and the way how it's done is not defined by the API.&lt;br /&gt;
&lt;br /&gt;
MeeGo will use [http://www.freedesktop.org/wiki/Software/GeoClue GeoClue] as the reference location framework and the reference implementation of the Qt Mobility location API backend will be written on top of GeoClue. GeoClue defines a set of (D-Bus) APIs for accessing location services provided by service providers implemented as D-Bus services. In addition, GeoClue includes a set of service provider implementations and (at the time of this writing) an experimental master service provider that can act as a proxy between clients and the actual service providers. If a device vendor wants to take advantage of this existing functionality, the vendor can implement their location services &amp;quot;behind&amp;quot; the GeoClue APIs as GeoClue service providers. In such a case, adaptation to the location related HW would happen inside the service providers as defined by the service provider designs.&lt;br /&gt;
&lt;br /&gt;
=== Sensor Adaptation === &lt;br /&gt;
&lt;br /&gt;
The key component in the MeeGo sensor handling architecture is the Sensor Framework. The Sensor Framework uses both HW independent logical sensor plugins and HW dependent sensor adaptor plugins in its operation. The required sensor HW adaptation interfaces in MeeGo are the interfaces that the Sensor Framework and the logical sensor plugins define for the sensor adaptor plugins to implement. The sensor adaptor plugins typically communicate directly with sensor HW drivers in the Linux kernel. The interfaces that the sensor HW drivers expose to the user space are not defined by MeeGo. Sensor HW adaptation in MeeGo thus consists of adaptor plugins in the Sensor Framework and sensor HW drivers in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Note that thermal sensors are handled in a different manner as described in the [[#Power and thermal management|''Power and thermal management'']] section above.&lt;br /&gt;
&lt;br /&gt;
=== Input Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Touch ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the touch input handling path in MeeGo are the touch HW device driver, Linux kernel input subsystem, X server, X input driver, Qt, and finally the MeeGo Touch Framework. Enabling touch support for some new HW requires at least the implementation of the corresponding touch HW device driver in the Linux kernel. If this driver communicates touch events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, basically the existing functionality in X server (such as evdev input driver) and above can be used as such. In case the kernel-to-user-space interface is non-standard, it is also possible to implement a new X input driver as a part of the touch HW adaptation.&lt;br /&gt;
&lt;br /&gt;
Multi-touch support in X requires a new version, 2.1, of the [http://cgit.freedesktop.org/~whot/inputproto/tree/XI2proto.txt?h=multitouch X Input Extension] and this also requires support from the client side, in this case Qt's multi-touch support. Once this support has been implemented throughout the SW stack, including X evdev input driver, supporting multi-touch for some new HW should require only the implementation of a touch HW device driver that implements the standard Linux multi-touch interface. This should be the case in MeeGo 1.2. &lt;br /&gt;
&lt;br /&gt;
Before 1.2, multi-touch support in MeeGo uses a special X input driver (mtev), X server multi-pointer support (MPX) and Qt multi-touch support written on top of MPX. This solution requires the touch HW device driver to expose a user-space interface that is compatible with mtev.&lt;br /&gt;
&lt;br /&gt;
==== HW keyboard ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the HW keyboard input handling path in MeeGo are the keyboard HW device driver, Linux kernel input subsystem, X server, X input driver, and Qt. Enabling keyboard support for some new HW requires typically only the implementation of the corresponding keyboard HW device driver in the Linux kernel. If this driver communicates key events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, the existing functionality in X server (such as evdev input driver) and above should work as such. In case the kernel-to-user space interface is non-standard, it is also possible to implement a new X input driver as a part of the keyboard HW adaptation.&lt;br /&gt;
&lt;br /&gt;
==== Buttons and switches ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo includes the MCE and System SW Qt API (QmSystem) components. The MCE can be used to control the device mode and it listens to power button events and, for example, device open/close switch events via the respective device driver interfaces. The System SW Qt API on the other hand provides a Qt API to various system information, including events from various physical buttons in the device (such as volume button, camera button). The System SW Qt API gets the button events either by listening to the relevant device driver interfaces or through the MCE component.&lt;br /&gt;
&lt;br /&gt;
Both the MCE and the System SW Qt API components can be adapted to new devices by device vendors.&lt;br /&gt;
&lt;br /&gt;
=== Haptics and Vibra Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Haptics ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Touch Framework present (at least) in the MeeGo handset device category contains a component called Feedback Framework (meegotouch-feedback) that handles the creation of auditory and/or haptic feedback to touch events. The haptic feedback can be created with, for example, vibra motors or piezo elements. In the Feedback Framework, the different types of feedback are created by backend libraries implemented as plugins. &lt;br /&gt;
&lt;br /&gt;
The haptics-related HW adaptation interface, from the MeeGo OS perspective, is the backend plugin interface defined by the Feedback Framework. The plugins can then communicate with the HW either through some device driver interface or some intermediate SW layers (MeeGo places no restrictions as to how the plugins are implemented).&lt;br /&gt;
&lt;br /&gt;
==== Vibra (notifications/alerts) ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo (at least the handset category) will include a component called Non-Graphical Feedback Framework (NGF). This component offers the capability of playing e.g. audio, vibra or led as an indication of events such as incoming call/message, clock and calendar alarms, missed calls, unread messages etc. The NGF also integrates with the Resource Policy to decide about the available playback resources based on policy rules and the current system state.&lt;br /&gt;
&lt;br /&gt;
The actual playback of the different types of notifications is handled by NGF plugins that can be created by device vendors. The plugins communicate with the relevant HW as they see best, e.g. directly through some device driver interface or via some intermediate user space SW components. The plugin interfaces defined by NGF thus form the notification/alert vibra adaptation interface in MeeGo.&lt;br /&gt;
&lt;br /&gt;
=== Production Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Production deals with areas such as flashing, testing, tuning and certification. The current understanding is that these areas are handled in a vendor specific manner, including the adaptation.&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Noel</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/MeeGo_Porting_Guide</id>
		<title>MeeGo Porting Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/MeeGo_Porting_Guide"/>
				<updated>2011-06-24T23:23:00Z</updated>
		
		<summary type="html">&lt;p&gt;Noel: /* Buttons and switches */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The goal of MeeGo Porting Guide (MPG) is to provide valuable information and instructions to people who want to run MeeGo OS on their (new) HW and eventually create products based on the MeeGo OS. The MPG starts with an overview of the porting process, tools, and other related background information and then moves on to describing what the porting actually means in individual technical/functional areas.&lt;br /&gt;
&lt;br /&gt;
The porting guide is not strictly tied to any particular MeeGo OS version or device category. Instead, it tries to be general enough to cover the different device categories, as well as follow changes introduced in new MeeGo OS versions.&lt;br /&gt;
&lt;br /&gt;
Detailed porting information in the different technical areas is dependent on the respective [http://meego.com/developers/meego-architecture MeeGo architecture]. In some cases, this architecture may still be open and this is noted in the applicable sections.&lt;br /&gt;
&lt;br /&gt;
=== Feedback ===&lt;br /&gt;
&lt;br /&gt;
Contribution to these pages is open. Any MeeGo community member is free to ''improve'' these pages at any time. You can also leave feedback in the [http://lists.meego.com/listinfo/meego-porting MeeGo porting mailing list].&lt;br /&gt;
&lt;br /&gt;
== General porting information/guidelines ==&lt;br /&gt;
&lt;br /&gt;
=== MeeGo compliance ===&lt;br /&gt;
&lt;br /&gt;
Perhaps the most important piece of background information related to the MPG are the [[Quality/Compliance|MeeGo compliance requirements]]. A device that is meant to be MeeGo compliant will need to fulfill the requirements listed in the MeeGo compliance specification for the applicable device category (the first version of the specification is supposed to be available in October 2010). In short, a MeeGo compliant device will need to:&lt;br /&gt;
* Meet the minimum HW performance and component requirements for the applicable device category&lt;br /&gt;
* Include all SW components that form the MeeGo core OS&lt;br /&gt;
* Include the additional SW components required to be present in devices in the applicable device category&lt;br /&gt;
* Not break the API/ABI of any of the components coming from MeeGo&lt;br /&gt;
* Follow the MeeGo SW packaging conventions&lt;br /&gt;
&lt;br /&gt;
The compliance rules will also specify CPU architecture specific requirements concerning how MeeGo OS itself and MeeGo applications are to be compiled to different environments (instruction set used, compiler version, compiler options, etc.).&lt;br /&gt;
&lt;br /&gt;
A device vendor may include additional functionality, HW components and SW components in their devices, as long as they don't break MeeGo compliance. The vendor can also patch MeeGo OS components, if the patches don't break MeeGo compliance. A device vendor's own SW components can be either open source or closed source components, as long as they adhere to the rules set by the applicable SW licenses.&lt;br /&gt;
&lt;br /&gt;
From the MeeGo Porting Guide perspective, by defining the SW components and HW components that need to be present, the compliance requirements effectively define the minimum set of porting tasks required from a device vendor and what SW components are involved from MeeGo OS side.&lt;br /&gt;
&lt;br /&gt;
=== Porting process and tools ===&lt;br /&gt;
&lt;br /&gt;
==== Overview ====&lt;br /&gt;
&lt;br /&gt;
As long as a vendor's device is MeeGo compliant, as defined above, it is basically up to the vendor to decide how they build the SW that ends up in the device. The vendor may use their own build machinery or set up an OBS build system that is also used in MeeGo. Regardless of what the vendor's build system is, it needs to integrate with the MeeGo build infrastructure, at least to fetch the MeeGo source packages for the builds, as well as build each MeeGo component in the same way as it would be built in the MeeGo build system (such as with the same compiler and compiler options). Whatever the case, the intention in MeeGo is to use and offer an open toolset that any HW or SW vendor can use for efficient SW creation. It is likely that using the same toolset as MeeGo, will offer the easiest way to integrate vendor's own build system with the the MeeGo build infrastructure.&lt;br /&gt;
&lt;br /&gt;
The key ingredients of the MeeGo build infrastructure and toolset are:&lt;br /&gt;
* [http://meego.gitorious.org MeeGo Gitorious]&lt;br /&gt;
** A version control system for the source files of various MeeGo specific SW components and tools&lt;br /&gt;
* [http://build.meego.com MeeGo OBS]&lt;br /&gt;
** The build system that is used to build MeeGo packages (RPMs) from their sources&lt;br /&gt;
* [http://repo.meego.com MeeGo Repository]&lt;br /&gt;
** The place where the built MeeGo releases, that is where MeeGo packages and images are stored&lt;br /&gt;
* [http://wiki.meego.com/Image_Creation MeeGo Image Creator]&lt;br /&gt;
** The tool used to build MeeGo images that can be installed/flashed on HW&lt;br /&gt;
* MeeGo release tools&lt;br /&gt;
** Tools such as BOSS and REVS that are used in the creation of the MeeGo releases under repo.meego.com&lt;br /&gt;
&lt;br /&gt;
For additional information, see [[Build Infrastructure]], [[Release Infrastructure]] and [[Release Engineering]].&lt;br /&gt;
&lt;br /&gt;
For another overview of the MeeGo porting process, see [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process].&lt;br /&gt;
&lt;br /&gt;
==== Vendor's own OBS ====&lt;br /&gt;
&lt;br /&gt;
So, ultimately, when creating actual products running the MeeGo OS, the vendor may end up setting up their own OBS build system. Setting up your own OBS system may also be beneficial in earlier HW/product development phases, as it offers a flexible way to modify and build MeeGo OS to test it on the new HW. The vendor's own OBS system can link to the MeeGo OBS for handling packages that come directly from MeeGo and it can link to other sources for handling, such as closed source packages that are specific to the vendor. See [[Release_Engineering/Process#Making a product out of MeeGo Release|an overview picture of this setup]].&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Sets up their own OBS system&lt;br /&gt;
** [[User:Stskeeps/10_easy_steps_to_a_local_OBS|Instructions related to setting up an OBS system]],  [[Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE112|OBS Applicances]] [http://en.opensuse.org/openSUSE:Build_Service_private_instance Open Suse OBS Wiki].&lt;br /&gt;
* Creates projects under the their own OBS for their own components&lt;br /&gt;
* Links their own OBS to the MeeGo OBS for MeeGo components&lt;br /&gt;
* May have trial patches to MeeGo components in their own OBS&lt;br /&gt;
** NOTE. Eventually all patches to MeeGo components required in a final MeeGo based product ''should'' be pushed to MeeGo.com. However, this is not an absolute must requirement, as long as the MeeGo compliance requirements and applicable SW license rules are fulfilled. &lt;br /&gt;
** See [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below&lt;br /&gt;
* Needs to set up the necessary machinery to create releases and images from the packages built with OBS&lt;br /&gt;
** This machinery can be based on the toolset used in MeeGo (see above)&lt;br /&gt;
&lt;br /&gt;
==== Working under MeeGo.com ====&lt;br /&gt;
&lt;br /&gt;
Another way of porting MeeGo to some new HW is to get the new HW accepted as one MeeGo reference HW and have the MeeGo build machinery create builds for the reference HW as a part of the normal MeeGo release building cycle (see [[Release Engineering/Release Timeline|Release Timeline]] and [[Release Engineering/Process|Release Process]]). This setup can also include QA support for the reference HW on the MeeGo side (see [[Quality]]). At the time of this writing, the actual process of getting new reference HW to MeeGo is still somewhat unclear. In any case, this model requires active participation from the vendor in MeeGo work in general and especially in supporting their reference HW in MeeGo.&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Creates a device/platform development project under the MeeGo OBS for their components. The open source components would then get submitted to MeeGo Trunk:Testing and get reviewed like any other MeeGo component for inclusion.&lt;br /&gt;
** Note that it is also possible to have closed source binary components in the MeeGo OBS to be included in the MeeGo builds for some reference HW. These are submitted to the Trunk:non-oss repository. Licensing is usually required to at least include redistributability, as the components cannot be mirrored from or hosted at repo.meego.com otherwise. It is not possible to have components within Trunk:Testing require closed source dependencies.&lt;br /&gt;
* Pushes patches to other MeeGo components at MeeGo.com as necessary (see [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below)&lt;br /&gt;
* Creates (or supports the creation of) a MIC kickstart file for building images for their reference HW&lt;br /&gt;
* As necessary, supports adding support for their reference HW and SW components in the MeeGo build and release infrastructure tools&lt;br /&gt;
&lt;br /&gt;
==== Trials ====&lt;br /&gt;
&lt;br /&gt;
A lightweight but also more limited &amp;quot;try it out&amp;quot; alternative to the above processes is discussed below.&lt;br /&gt;
&lt;br /&gt;
===== Initial bring-up attempt =====&lt;br /&gt;
&lt;br /&gt;
* Grab the already built root filesystem / image for a MeeGo reference device that's the closest to your target. For ARMv7, this is typically the Nokia N900 handset image. For Atom, this could be netbook image or handset image.&lt;br /&gt;
* Build a Linux kernel for your device and install the modules into /lib/modules.&lt;br /&gt;
* Boot the root filesystem and modify the configuration and drop in components to bring up the device to UX. Note down the things you had to modify or add, as this will be input for your porting work.&lt;br /&gt;
&lt;br /&gt;
===== Building your first image =====&lt;br /&gt;
&lt;br /&gt;
The second step to a proper hardware adaptation is making sure you can build your own image. Because we based our work before on a reference device image, it makes sense to try to build this image first. MeeGo images are constructed on the basis of so called 'kickstart files', which describe the intended contents of an image. &lt;br /&gt;
&lt;br /&gt;
* Install the MeeGo Image Creator tool (MIC)&lt;br /&gt;
* Download the kickstart file (.ks) from the same directory you found your reference device image. &lt;br /&gt;
* Create a image using mic-image-creator (should be elaborated).&lt;br /&gt;
* Test out your freshly baked image as in the previous step.&lt;br /&gt;
&lt;br /&gt;
===== Building your port's first reproduciable image =====&lt;br /&gt;
&lt;br /&gt;
* Download the MeeGo kernel, possibly modifying the kernel with additional patches (including new device drivers) and building the kernel (see [[#Getting_new_chipset_support_to_the_MeeGo_kernel|''Getting new chipset support to the MeeGo kernel'']] below). &lt;br /&gt;
* Add the repository containing your kernel package to the kickstart file (to be elaborated)&lt;br /&gt;
* Remove parts of the kickstart file specific to the reference device.&lt;br /&gt;
* Add a mention of your kernel package in the %packages section.&lt;br /&gt;
* Build packages or include shell scripts in %post section of kickstart file that adds/modifies configuration fitting your device.&lt;br /&gt;
&lt;br /&gt;
A detailed description of a variation of this model can be found from [[ARM/Meego on Beagleboard from scratch|here]] (Better description needed).&lt;br /&gt;
&lt;br /&gt;
==== Getting new chipset support to the MeeGo kernel ====&lt;br /&gt;
&lt;br /&gt;
See [[How-to: getting new chipset support to the MeeGo kernel]] for more detailed information about how to work with the MeeGo kernel and make it support new HW.&lt;br /&gt;
&lt;br /&gt;
=== Upstream projects, MeeGo, products, and patches ===&lt;br /&gt;
&lt;br /&gt;
When building a product based on MeeGo, the product vendor will typically augment the MeeGo OS with their own SW components, as well as make fixes and adjustments to the MeeGo OS code (in the limits set by the compliance rules). While vendors can manage their own SW components as they wish, the strong preference is that any changes made to the MeeGo OS SW components are delivered as patches primarily to the respective upstream projects or secondarily to MeeGo.com. In this way, vendors can relieve themselves of the burden of managing a potentially big patch set on top of MeeGo OS, and also verify the quality and safety of their patches. Having the patches in upstream projects again lessens the patch set management load at MeeGo.com.&lt;br /&gt;
&lt;br /&gt;
For information about pushing patches to MeeGo, see [http://meego.com/about/contribution-guidelines Contribution Guidelines] and [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process] (especially section ''How Do Patches Get Integrated and Accepted?'') and [http://meego.gitorious.org/meego-os-base/kernel-source/blobs/master/README.workflow Kernel workflow].&lt;br /&gt;
&lt;br /&gt;
=== Adaptation subsystems and interfaces ===&lt;br /&gt;
&lt;br /&gt;
In the MeeGo architecture model (see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view MeeGo Architecture Domain View]), adaptation is represented as adaptation subsystems. SW components in the adaptation subsystem ''realizations'' do things that are expected by the OS and communicate with the OS through interfaces defined by the OS.&lt;br /&gt;
 &lt;br /&gt;
The key goal in the sections below is to identify the interface(s) that the adaptation SW needs to implement/use to communicate with the OS in the required manner. Behind these interfaces, the adaptation SW can basically handle the required functionality as it sees best. In some cases, however, there may also be some preferred way of implementing the adaptation.&lt;br /&gt;
&lt;br /&gt;
In some areas, the adaptation work may consist of just writing a suitable Linux device driver for the HW in question. In some other areas, the adaptation work may consist of writing one or more device drivers, as well as one or more user space components (such as plugins to some user space SW frameworks). Various configuration file changes may also be required as a part of the adaptation work.&lt;br /&gt;
&lt;br /&gt;
== Porting by adaptation subsystems ==&lt;br /&gt;
&lt;br /&gt;
=== System Core Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Boot ====&lt;br /&gt;
&lt;br /&gt;
MeeGo places no restrictions as to what SW components are used to handle the pre-OS boot phases in a MeeGo compliant device. Thus, vendors are free to choose, for example, the boot loader, as they see fit. Note, however, that full use of the MeeGo platform security requires that the pre-OS boot phases form a trusted boot chain that ultimately builds on chipset-level security support.&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, MeeGo does not define anything special with regard to what information the boot loader is expected to pass to the Linux kernel, such as via the kernel command line.&lt;br /&gt;
&lt;br /&gt;
The kernel-level boot phases can be tailored, as necessary, to the specific CPU, chipset, or device in a standard Linux manner.&lt;br /&gt;
&lt;br /&gt;
The post-kernel boot phases (startup scripts) can be tailored by device vendors as necessary for their devices in the limits set by MeeGo compliance requirements (certain SW components need to be present in the system).&lt;br /&gt;
&lt;br /&gt;
==== Kernel fundamentals ====&lt;br /&gt;
&lt;br /&gt;
Regarding the Linux kernel, each MeeGo release defines the kernel version to be used and a set of patches on top of that. In addition, the Linux kernel used in MeeGo compliant devices is assumed to have been built with a set of fixed build-time configuration values that are not allowed to be changed. In addition to the fixed values, device vendors can define other kernel configuration values, as required by their devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo does not place any special requirements concerning how the boot loader passes information to the kernel or how the HW configuration and initialization of the system is handled.&lt;br /&gt;
&lt;br /&gt;
CPU, chipset (SoC), and device vendors are assumed to implement the elementary CPU architecture/chipset/device support for the Linux kernel used in MeeGo in a standard Linux manner. This includes:&lt;br /&gt;
* HW (board) configuration&lt;br /&gt;
* Mapping the fundamental Linux kernel functionality (such as IRQ, DMA, GPIO, RTC and memory handling) to the HW in question&lt;br /&gt;
* Creation/modification of the necessary device drivers to support the core SoC interfaces (such as I2C, SPI, SDIO)&lt;br /&gt;
* Permanent memory support&lt;br /&gt;
* Debugging and tracing support&lt;br /&gt;
&lt;br /&gt;
==== Power and thermal management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, the understanding is that MeeGo in general relies on established Linux kernel frameworks and APIs for power management. Some of these frameworks and APIs may be applicable only in certain CPU architectures. In addition, the HW capabilities related to power management may vary between different HW platforms potentially meaning that the SW is assumed perform somewhat different tasks in different environments.&lt;br /&gt;
&lt;br /&gt;
The Linux power management frameworks and APIs include:&lt;br /&gt;
* CPU frequency control (support for the different voltage and frequency operating points) via the cpufreq infrastructure&lt;br /&gt;
* CPU idle state management (different levels of sleep) through the cpuidle infrastructure&lt;br /&gt;
* Clock management through the clock framework&lt;br /&gt;
* Suspend/resume&lt;br /&gt;
* Runtime power management&lt;br /&gt;
* HW voltage/current regulator control via the regulator framework&lt;br /&gt;
* PM_QOS (power management quality of service) framework for making and listening to PM QoS requests&lt;br /&gt;
&lt;br /&gt;
Whether MeeGo will have some user space SW components or framework related to power management is under discussion at the time of this writing.&lt;br /&gt;
&lt;br /&gt;
In the thermal management area, the Device State Management Entity (DSME) component in the Device Health subsystem is supposed to make thermal state management decisions in the system. The DSME has a thermal manager module that again uses other DSME modules (thermal objects) to access the actual thermal sensor information in the HW. To port this functionality to new HW, one or more DSME thermal object modules need to be implemented.&lt;br /&gt;
&lt;br /&gt;
The APIs that the thermal object modules use to access the thermal sensor information are not strictly defined by MeeGo. At device driver level, however, the preferred approach is to use standard Linux interfaces such as the generic thermal sysfs API or the hwmon sysfs API.&lt;br /&gt;
&lt;br /&gt;
==== Energy management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, basically the only thing that MeeGo requires from HW adaptation in the energy management area (battery charging and monitoring) is support for the Linux power supply sysfs class. Additional energy management related functionality can be handled in a vendor specific manner.&lt;br /&gt;
&lt;br /&gt;
==== Device state ====&lt;br /&gt;
&lt;br /&gt;
The DSME component participates in device state management, such as by managing device run level, reboot, and shutdown, by monitoring the device thermal state, and shutting down the device in fatal thermal conditions, and by handling HW watchdog kicking activity.&lt;br /&gt;
&lt;br /&gt;
In a new HW environment, the DSME needs to be adapted to handle the watchdog kicking through the right device driver interfaces and at the right intervals. In addition, to port the DSME thermal management functionality to new HW, one or more DSME thermal object modules need to be implemented as described above, in the [[#Power_and_thermal_management|''Power and thermal management'']] section.&lt;br /&gt;
&lt;br /&gt;
=== Security Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Work is ongoing in bringing platform security functionality to the MeeGo OS based on the Mandatory Access Control (MAC), Integrity Measurement Architecture (IMA) and Extended Verification Module (EVM) technologies in the Linux kernel. Maximum security can be reached if the MeeGo platform security functionality can rely on trusted platform support &amp;quot;below&amp;quot; the Linux kernel, effectively in the HW and the boot loader(s). MeeGo, however, places no strict requirements as to how the trusted platform support is implemented in MeeGo based devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo also includes the OpenSSL open source toolkit implementing general purpose cryptography functionality. Algorithms and operations supported by the OpenSSL toolkit can be accelerated in HW by using the OpenSSL engine architecture. OpenSSL also supports a cryptodev engine that uses crypto algorithms implemented in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Some devices may have a security watchdog in the HW that needs &amp;quot;kicking&amp;quot; at regular intervals to keep the device up and running. In MeeGo, watchdog kicking functionality is implemented in the Device State Management Entity (DSME) component. If security watchdog kicking is needed, the DSME needs to be adapted to handle that through the right device driver interface and at the right intervals.&lt;br /&gt;
&lt;br /&gt;
=== Device Mode Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Resource Policy ====&lt;br /&gt;
&lt;br /&gt;
The Resource (Policy) Manager component in the Device Health subsystem offers a generic framework for:&lt;br /&gt;
* Monitoring device and application events&lt;br /&gt;
* Managing policies that specify rules about what should happen in the device when certain events occur&lt;br /&gt;
* Making policy decisions when events occur (determining the needed changes in the device)&lt;br /&gt;
* Enforcing changes in the system through policy enforcement points&lt;br /&gt;
&lt;br /&gt;
The Resource Manager can be used, for example, to change the audio routing in the device, when the user attaches a wired headset to the device.&lt;br /&gt;
&lt;br /&gt;
Event listening and change enforcement in the Resource Manager happens through plugin modules. Using the MeeGo OS in some new device effectively involves creating suitable Resource Manager policies and writing the necessary plugins for listening device/application events and changing device behavior accordingly. Though not pure HW adaptation, this can be considered a form of MeeGo OS &amp;quot;device adaptation&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Mode Control Entity (MCE) ====&lt;br /&gt;
&lt;br /&gt;
The MCE component (starting from MeeGo 1.2) can be used to listen to events that have an impact to the device mode (such as touch screen locked vs. unlocked) and change the device mode accordingly. The MCE is used, for example, to: &lt;br /&gt;
* Listen to various keys and switches in the device (such as power key, volume key, camera button, slider switch)&lt;br /&gt;
* Control LEDs&lt;br /&gt;
* Enabling/disabling touch screen or HW keyboard, depending on device state&lt;br /&gt;
* Control keyboard backlight&lt;br /&gt;
* Control display state (on/off) and brightness&lt;br /&gt;
&lt;br /&gt;
The MCE has its own plugin architecture that can be used to adapt it to different HW environments.&lt;br /&gt;
&lt;br /&gt;
=== Display and Graphics Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo visual services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view]. &lt;br /&gt;
&lt;br /&gt;
The key ingredients of the display and graphics architecture in MeeGo are the X Window System (X Server with its extensions) and the Khronos graphics APIs (OpenGL ES, OpenVG, and EGL with their extensions).&lt;br /&gt;
&lt;br /&gt;
The display and graphics HW adaptation SW needs to enable the X Window System and the Khronos APIs to function on the device HW. In practice, the adaptation SW needs to have an X display/video driver (hosted inside the X Server) and libraries that implement the Khronos graphics APIs, both supporting the features and functionality required by MeeGo. Also, some configuration file changes may be needed. Any additional user space and kernel space components needed for the HW adaptation are implementation dependent.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering display content to external displays, the Resource Manager component may be used to coordinate the display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Audio Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The audio architecture in MeeGo is centered around the GStreamer and PulseAudio frameworks. In addition, the Resource Manager plays a role in coordinating the audio related behavior of the device (audio routings). The audio HW adaptation SW needs to provide GStreamer elements and PulseAudio plugins that enable the GStreamer and PulseAudio client interfaces used, for example, for audio playback, recording, and volume control to work on the device. Typical required components include, for example, codec elements for GStreamer and sink/source plugins for PulseAudio.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer and PulseAudio plugins, the audio HW adaptation SW can be implemented with different technologies and APIs, including ALSA and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework, as needed. Use of the ALSA framework and APIs is encouraged, however, as they allow significant reuse of components and functionality on the PulseAudio level and are already a part of the upstream Linux kernel. If ALSA is not used to implement the kernel side parts of the audio adaptation, the solution that is used instead should still be aligned with the upstream Linux kernel.&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo media services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view].&lt;br /&gt;
&lt;br /&gt;
=== Camera Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo still imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework and the CameraBin GStreamer element. The still imaging HW adaptation SW is required to contain a GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element. Thus, the required HW adaptation interfaces are the relevant GStreamer plugin interfaces and especially the interfaces expected by the CameraBin element, in particular the GstPhotography interface.&lt;br /&gt;
&lt;br /&gt;
If HW accelerated encoders are supported, they should be also offered to the system as GStreamer elements.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
=== Video and Imaging Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo video imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework, the CameraBin GStreamer element (video recording) and the Playbin2 GStreamer element (video playback). The video imaging HW adaptation SW is required to contain:&lt;br /&gt;
:* A GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element (this is common with still imaging) &lt;br /&gt;
:* If HW accelerated codecs are supported, GStreamer elements that wrap the codecs&lt;br /&gt;
:* If HW accelerated filters are supported (such as video scaler, rotation engines, color conversion engines), GStreamer elements that wrap the filters&lt;br /&gt;
:* A GStreamer video sink element that offers the GStreamer X Overlay Interface. Note that if the XVideo extension is supported on the X Server side, the xvimagesink element can be used as the video sink element and no new elements are needed.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the video imaging HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering video content to external displays, the Resource Manager component may be used to coordinate the video/display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Communications Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo communications services architecture, see [http://meego.com/developers/meego-architecture/comms-services Comms Services].&lt;br /&gt;
&lt;br /&gt;
==== Cellular ====&lt;br /&gt;
&lt;br /&gt;
The cellular telephony architecture in MeeGo is centered on the oFono, PulseAudio, and Telepathy frameworks. In addition, the Resource Manager plays a role in coordinating the device behavior during voice calls.&lt;br /&gt;
&lt;br /&gt;
The cellular modem HW adaptation SW must implement the following interfaces towards the MeeGo OS:&lt;br /&gt;
:* oFono modem plugin/driver API&lt;br /&gt;
:* Linux network interface for the Linux TCP/IP stack (for data communications)&lt;br /&gt;
:* Relevant PulseAudio plugin interfaces for cellular voice call audio handling&lt;br /&gt;
&lt;br /&gt;
For more detailed information about the oFono APIs, see the documentation and source code available at [http://git.kernel.org/?p=network/ofono/ofono.git;a=summary oFono git].&lt;br /&gt;
&lt;br /&gt;
==== USB ====&lt;br /&gt;
&lt;br /&gt;
The foundation of MeeGo USB functionality is the standard Linux USB subsystem. The Linux USB subsystem defines the USB related HW adaptation interfaces that need to be supported in MeeGo. In practice, these are kernel side interfaces between the generic USB functionality and a HW dependent USB host controller driver.&lt;br /&gt;
&lt;br /&gt;
==== WLAN ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo WLAN architecture is centered on the [http://linuxwireless.org/ Linux wireless] (IEEE-802.11) subsystem. The Linux wireless SW stack defines the WLAN HW adaptation SW interfaces that need to be used in MeeGo. In practice, the required interfaces are defined by cfg80211 for FullMAC WLAN devices and by mac80211 for SoftMAC WLAN devices. In addition, a Linux network interface needs to be supported towards the Linux TCP/IP stack.&lt;br /&gt;
&lt;br /&gt;
==== Bluetooth ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Bluetooth architecture is centered on the [http://www.bluez.org/ BlueZ] SW stack. The BlueZ SW stack defines the Bluetooth HW adaptation SW interfaces that need to be used in MeeGo. In practice, these are Linux kernel side interfaces between the generic HCI (Host Controller Interface) core and a HW specific HCI driver.&lt;br /&gt;
&lt;br /&gt;
=== Location Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The MeeGo location architecture is based on [http://http://labs.trolltech.com/page/Projects/QtMobility| QtMobility Location API].  The QtMobility 1.0 Location API provides geographic coordinates only.  The QtMobility 1.1 Location API provides geocoding and reverse geocoding, POI search, navigation, and mapping.  The 1.0 Location API is available in MeeGo 1.1.  The 1.1 or later Location API will be available in MeeGo 1.2.  The Location API uses a plugin system for implementations of the underlying backend.  MeeGo compliance requirements require support for the QtMobility Location API and thus require one or more plugins to support these APIs.  MeeGo places no restrictions as to how the plugins are implemented, however. Adaptation to location related HW may be done by manufacturers or service providers and the way how it's done is not defined by the API.&lt;br /&gt;
&lt;br /&gt;
MeeGo will use [http://www.freedesktop.org/wiki/Software/GeoClue GeoClue] as the reference location framework and the reference implementation of the Qt Mobility location API backend will be written on top of GeoClue. GeoClue defines a set of (D-Bus) APIs for accessing location services provided by service providers implemented as D-Bus services. In addition, GeoClue includes a set of service provider implementations and (at the time of this writing) an experimental master service provider that can act as a proxy between clients and the actual service providers. If a device vendor wants to take advantage of this existing functionality, the vendor can implement their location services &amp;quot;behind&amp;quot; the GeoClue APIs as GeoClue service providers. In such a case, adaptation to the location related HW would happen inside the service providers as defined by the service provider designs.&lt;br /&gt;
&lt;br /&gt;
=== Sensor Adaptation === &lt;br /&gt;
&lt;br /&gt;
The key component in the MeeGo sensor handling architecture is the Sensor Framework. The Sensor Framework uses both HW independent logical sensor plugins and HW dependent sensor adaptor plugins in its operation. The required sensor HW adaptation interfaces in MeeGo are the interfaces that the Sensor Framework and the logical sensor plugins define for the sensor adaptor plugins to implement. The sensor adaptor plugins typically communicate directly with sensor HW drivers in the Linux kernel. The interfaces that the sensor HW drivers expose to the user space are not defined by MeeGo. Sensor HW adaptation in MeeGo thus consists of adaptor plugins in the Sensor Framework and sensor HW drivers in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Note that thermal sensors are handled in a different manner as described in the [[#Power and thermal management|''Power and thermal management'']] section above.&lt;br /&gt;
&lt;br /&gt;
=== Input Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Touch ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the touch input handling path in MeeGo are the touch HW device driver, Linux kernel input subsystem, X server, X input driver, Qt, and finally the MeeGo Touch Framework. Enabling touch support for some new HW requires at least the implementation of the corresponding touch HW device driver in the Linux kernel. If this driver communicates touch events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, basically the existing functionality in X server (such as evdev input driver) and above can be used as such. In case the kernel-to-user-space interface is non-standard, it is also possible to implement a new X input driver as a part of the touch HW adaptation.&lt;br /&gt;
&lt;br /&gt;
Multi-touch support in X requires a new version, 2.1, of the [http://cgit.freedesktop.org/~whot/inputproto/tree/XI2proto.txt?h=multitouch X Input Extension] and this also requires support from the client side, in this case Qt's multi-touch support. Once this support has been implemented throughout the SW stack, including X evdev input driver, supporting multi-touch for some new HW should require only the implementation of a touch HW device driver that implements the standard Linux multi-touch interface. This should be the case in MeeGo 1.2. &lt;br /&gt;
&lt;br /&gt;
Before 1.2, multi-touch support in MeeGo uses a special X input driver (mtev), X server multi-pointer support (MPX) and Qt multi-touch support written on top of MPX. This solution requires the touch HW device driver to expose a user-space interface that is compatible with mtev.&lt;br /&gt;
&lt;br /&gt;
==== HW keyboard ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the HW keyboard input handling path in MeeGo are the keyboard HW device driver, Linux kernel input subsystem, X server, X input driver, and Qt. Enabling keyboard support for some new HW requires typically only the implementation of the corresponding keyboard HW device driver in the Linux kernel. If this driver communicates key events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, the existing functionality in X server (such as evdev input driver) and above should work as such. In case the kernel-to-user space interface is non-standard, it is also possible to implement a new X input driver as a part of the keyboard HW adaptation.&lt;br /&gt;
&lt;br /&gt;
==== Buttons and switches ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo includes the MCE and System SW Qt API (QmSystem) components. The MCE can be used to control the device mode and it listens to power button events and, for example, device open/close switch events via the respective device driver interfaces. The System SW Qt API on the other hand provides a Qt API to various system information, including events from various physical buttons in the device (such as volume button, camera button). The System SW Qt API gets the button events either by listening to the relevant device driver interfaces or through the MCE component.&lt;br /&gt;
&lt;br /&gt;
Both the MCE and the System SW Qt API components can be adapted to new devices by device vendors.&lt;br /&gt;
&lt;br /&gt;
=== Haptics and Vibra Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Haptics ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Touch Framework present (at least) in the MeeGo handset device category contains a component called Feedback Framework (meegotouch-feedback) that handles the creation of auditory and/or haptic feedback to touch events. The haptic feedback can be created e.g. with vibra motors or piezo elements. In the Feedback Framework, the different types of feedback are created by backend libraries implemented as plugins. &lt;br /&gt;
&lt;br /&gt;
The haptics related HW adaptation interface from MeeGo OS perspective is the backend plugin interface defined by the Feedback Framework. The plugins can then communicate with the HW either through some device driver interface or some intermediate SW layers (MeeGo places no restrictions as to how the plugins are implemented).&lt;br /&gt;
&lt;br /&gt;
==== Vibra (notifications/alerts) ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo (at least the handset category) will include a component called Non-Graphical Feedback Framework (NGF). This component offers the capability of playing e.g. audio, vibra or led as an indication of events such as incoming call/message, clock and calendar alarms, missed calls, unread messages etc. The NGF also integrates with the Resource Policy to decide about the available playback resources based on policy rules and the current system state.&lt;br /&gt;
&lt;br /&gt;
The actual playback of the different types of notifications is handled by NGF plugins that can be created by device vendors. The plugins communicate with the relevant HW as they see best, e.g. directly through some device driver interface or via some intermediate user space SW components. The plugin interfaces defined by NGF thus form the notification/alert vibra adaptation interface in MeeGo.&lt;br /&gt;
&lt;br /&gt;
=== Production Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Production deals with areas such as flashing, testing, tuning and certification. The current understanding is that these areas are handled in a vendor specific manner, including the adaptation.&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Noel</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/MeeGo_Porting_Guide</id>
		<title>MeeGo Porting Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/MeeGo_Porting_Guide"/>
				<updated>2011-06-24T23:22:07Z</updated>
		
		<summary type="html">&lt;p&gt;Noel: /* HW keyboard */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The goal of MeeGo Porting Guide (MPG) is to provide valuable information and instructions to people who want to run MeeGo OS on their (new) HW and eventually create products based on the MeeGo OS. The MPG starts with an overview of the porting process, tools, and other related background information and then moves on to describing what the porting actually means in individual technical/functional areas.&lt;br /&gt;
&lt;br /&gt;
The porting guide is not strictly tied to any particular MeeGo OS version or device category. Instead, it tries to be general enough to cover the different device categories, as well as follow changes introduced in new MeeGo OS versions.&lt;br /&gt;
&lt;br /&gt;
Detailed porting information in the different technical areas is dependent on the respective [http://meego.com/developers/meego-architecture MeeGo architecture]. In some cases, this architecture may still be open and this is noted in the applicable sections.&lt;br /&gt;
&lt;br /&gt;
=== Feedback ===&lt;br /&gt;
&lt;br /&gt;
Contribution to these pages is open. Any MeeGo community member is free to ''improve'' these pages at any time. You can also leave feedback in the [http://lists.meego.com/listinfo/meego-porting MeeGo porting mailing list].&lt;br /&gt;
&lt;br /&gt;
== General porting information/guidelines ==&lt;br /&gt;
&lt;br /&gt;
=== MeeGo compliance ===&lt;br /&gt;
&lt;br /&gt;
Perhaps the most important piece of background information related to the MPG are the [[Quality/Compliance|MeeGo compliance requirements]]. A device that is meant to be MeeGo compliant will need to fulfill the requirements listed in the MeeGo compliance specification for the applicable device category (the first version of the specification is supposed to be available in October 2010). In short, a MeeGo compliant device will need to:&lt;br /&gt;
* Meet the minimum HW performance and component requirements for the applicable device category&lt;br /&gt;
* Include all SW components that form the MeeGo core OS&lt;br /&gt;
* Include the additional SW components required to be present in devices in the applicable device category&lt;br /&gt;
* Not break the API/ABI of any of the components coming from MeeGo&lt;br /&gt;
* Follow the MeeGo SW packaging conventions&lt;br /&gt;
&lt;br /&gt;
The compliance rules will also specify CPU architecture specific requirements concerning how MeeGo OS itself and MeeGo applications are to be compiled to different environments (instruction set used, compiler version, compiler options, etc.).&lt;br /&gt;
&lt;br /&gt;
A device vendor may include additional functionality, HW components and SW components in their devices, as long as they don't break MeeGo compliance. The vendor can also patch MeeGo OS components, if the patches don't break MeeGo compliance. A device vendor's own SW components can be either open source or closed source components, as long as they adhere to the rules set by the applicable SW licenses.&lt;br /&gt;
&lt;br /&gt;
From the MeeGo Porting Guide perspective, by defining the SW components and HW components that need to be present, the compliance requirements effectively define the minimum set of porting tasks required from a device vendor and what SW components are involved from MeeGo OS side.&lt;br /&gt;
&lt;br /&gt;
=== Porting process and tools ===&lt;br /&gt;
&lt;br /&gt;
==== Overview ====&lt;br /&gt;
&lt;br /&gt;
As long as a vendor's device is MeeGo compliant, as defined above, it is basically up to the vendor to decide how they build the SW that ends up in the device. The vendor may use their own build machinery or set up an OBS build system that is also used in MeeGo. Regardless of what the vendor's build system is, it needs to integrate with the MeeGo build infrastructure, at least to fetch the MeeGo source packages for the builds, as well as build each MeeGo component in the same way as it would be built in the MeeGo build system (such as with the same compiler and compiler options). Whatever the case, the intention in MeeGo is to use and offer an open toolset that any HW or SW vendor can use for efficient SW creation. It is likely that using the same toolset as MeeGo, will offer the easiest way to integrate vendor's own build system with the the MeeGo build infrastructure.&lt;br /&gt;
&lt;br /&gt;
The key ingredients of the MeeGo build infrastructure and toolset are:&lt;br /&gt;
* [http://meego.gitorious.org MeeGo Gitorious]&lt;br /&gt;
** A version control system for the source files of various MeeGo specific SW components and tools&lt;br /&gt;
* [http://build.meego.com MeeGo OBS]&lt;br /&gt;
** The build system that is used to build MeeGo packages (RPMs) from their sources&lt;br /&gt;
* [http://repo.meego.com MeeGo Repository]&lt;br /&gt;
** The place where the built MeeGo releases, that is where MeeGo packages and images are stored&lt;br /&gt;
* [http://wiki.meego.com/Image_Creation MeeGo Image Creator]&lt;br /&gt;
** The tool used to build MeeGo images that can be installed/flashed on HW&lt;br /&gt;
* MeeGo release tools&lt;br /&gt;
** Tools such as BOSS and REVS that are used in the creation of the MeeGo releases under repo.meego.com&lt;br /&gt;
&lt;br /&gt;
For additional information, see [[Build Infrastructure]], [[Release Infrastructure]] and [[Release Engineering]].&lt;br /&gt;
&lt;br /&gt;
For another overview of the MeeGo porting process, see [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process].&lt;br /&gt;
&lt;br /&gt;
==== Vendor's own OBS ====&lt;br /&gt;
&lt;br /&gt;
So, ultimately, when creating actual products running the MeeGo OS, the vendor may end up setting up their own OBS build system. Setting up your own OBS system may also be beneficial in earlier HW/product development phases, as it offers a flexible way to modify and build MeeGo OS to test it on the new HW. The vendor's own OBS system can link to the MeeGo OBS for handling packages that come directly from MeeGo and it can link to other sources for handling, such as closed source packages that are specific to the vendor. See [[Release_Engineering/Process#Making a product out of MeeGo Release|an overview picture of this setup]].&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Sets up their own OBS system&lt;br /&gt;
** [[User:Stskeeps/10_easy_steps_to_a_local_OBS|Instructions related to setting up an OBS system]],  [[Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE112|OBS Applicances]] [http://en.opensuse.org/openSUSE:Build_Service_private_instance Open Suse OBS Wiki].&lt;br /&gt;
* Creates projects under the their own OBS for their own components&lt;br /&gt;
* Links their own OBS to the MeeGo OBS for MeeGo components&lt;br /&gt;
* May have trial patches to MeeGo components in their own OBS&lt;br /&gt;
** NOTE. Eventually all patches to MeeGo components required in a final MeeGo based product ''should'' be pushed to MeeGo.com. However, this is not an absolute must requirement, as long as the MeeGo compliance requirements and applicable SW license rules are fulfilled. &lt;br /&gt;
** See [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below&lt;br /&gt;
* Needs to set up the necessary machinery to create releases and images from the packages built with OBS&lt;br /&gt;
** This machinery can be based on the toolset used in MeeGo (see above)&lt;br /&gt;
&lt;br /&gt;
==== Working under MeeGo.com ====&lt;br /&gt;
&lt;br /&gt;
Another way of porting MeeGo to some new HW is to get the new HW accepted as one MeeGo reference HW and have the MeeGo build machinery create builds for the reference HW as a part of the normal MeeGo release building cycle (see [[Release Engineering/Release Timeline|Release Timeline]] and [[Release Engineering/Process|Release Process]]). This setup can also include QA support for the reference HW on the MeeGo side (see [[Quality]]). At the time of this writing, the actual process of getting new reference HW to MeeGo is still somewhat unclear. In any case, this model requires active participation from the vendor in MeeGo work in general and especially in supporting their reference HW in MeeGo.&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Creates a device/platform development project under the MeeGo OBS for their components. The open source components would then get submitted to MeeGo Trunk:Testing and get reviewed like any other MeeGo component for inclusion.&lt;br /&gt;
** Note that it is also possible to have closed source binary components in the MeeGo OBS to be included in the MeeGo builds for some reference HW. These are submitted to the Trunk:non-oss repository. Licensing is usually required to at least include redistributability, as the components cannot be mirrored from or hosted at repo.meego.com otherwise. It is not possible to have components within Trunk:Testing require closed source dependencies.&lt;br /&gt;
* Pushes patches to other MeeGo components at MeeGo.com as necessary (see [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below)&lt;br /&gt;
* Creates (or supports the creation of) a MIC kickstart file for building images for their reference HW&lt;br /&gt;
* As necessary, supports adding support for their reference HW and SW components in the MeeGo build and release infrastructure tools&lt;br /&gt;
&lt;br /&gt;
==== Trials ====&lt;br /&gt;
&lt;br /&gt;
A lightweight but also more limited &amp;quot;try it out&amp;quot; alternative to the above processes is discussed below.&lt;br /&gt;
&lt;br /&gt;
===== Initial bring-up attempt =====&lt;br /&gt;
&lt;br /&gt;
* Grab the already built root filesystem / image for a MeeGo reference device that's the closest to your target. For ARMv7, this is typically the Nokia N900 handset image. For Atom, this could be netbook image or handset image.&lt;br /&gt;
* Build a Linux kernel for your device and install the modules into /lib/modules.&lt;br /&gt;
* Boot the root filesystem and modify the configuration and drop in components to bring up the device to UX. Note down the things you had to modify or add, as this will be input for your porting work.&lt;br /&gt;
&lt;br /&gt;
===== Building your first image =====&lt;br /&gt;
&lt;br /&gt;
The second step to a proper hardware adaptation is making sure you can build your own image. Because we based our work before on a reference device image, it makes sense to try to build this image first. MeeGo images are constructed on the basis of so called 'kickstart files', which describe the intended contents of an image. &lt;br /&gt;
&lt;br /&gt;
* Install the MeeGo Image Creator tool (MIC)&lt;br /&gt;
* Download the kickstart file (.ks) from the same directory you found your reference device image. &lt;br /&gt;
* Create a image using mic-image-creator (should be elaborated).&lt;br /&gt;
* Test out your freshly baked image as in the previous step.&lt;br /&gt;
&lt;br /&gt;
===== Building your port's first reproduciable image =====&lt;br /&gt;
&lt;br /&gt;
* Download the MeeGo kernel, possibly modifying the kernel with additional patches (including new device drivers) and building the kernel (see [[#Getting_new_chipset_support_to_the_MeeGo_kernel|''Getting new chipset support to the MeeGo kernel'']] below). &lt;br /&gt;
* Add the repository containing your kernel package to the kickstart file (to be elaborated)&lt;br /&gt;
* Remove parts of the kickstart file specific to the reference device.&lt;br /&gt;
* Add a mention of your kernel package in the %packages section.&lt;br /&gt;
* Build packages or include shell scripts in %post section of kickstart file that adds/modifies configuration fitting your device.&lt;br /&gt;
&lt;br /&gt;
A detailed description of a variation of this model can be found from [[ARM/Meego on Beagleboard from scratch|here]] (Better description needed).&lt;br /&gt;
&lt;br /&gt;
==== Getting new chipset support to the MeeGo kernel ====&lt;br /&gt;
&lt;br /&gt;
See [[How-to: getting new chipset support to the MeeGo kernel]] for more detailed information about how to work with the MeeGo kernel and make it support new HW.&lt;br /&gt;
&lt;br /&gt;
=== Upstream projects, MeeGo, products, and patches ===&lt;br /&gt;
&lt;br /&gt;
When building a product based on MeeGo, the product vendor will typically augment the MeeGo OS with their own SW components, as well as make fixes and adjustments to the MeeGo OS code (in the limits set by the compliance rules). While vendors can manage their own SW components as they wish, the strong preference is that any changes made to the MeeGo OS SW components are delivered as patches primarily to the respective upstream projects or secondarily to MeeGo.com. In this way, vendors can relieve themselves of the burden of managing a potentially big patch set on top of MeeGo OS, and also verify the quality and safety of their patches. Having the patches in upstream projects again lessens the patch set management load at MeeGo.com.&lt;br /&gt;
&lt;br /&gt;
For information about pushing patches to MeeGo, see [http://meego.com/about/contribution-guidelines Contribution Guidelines] and [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process] (especially section ''How Do Patches Get Integrated and Accepted?'') and [http://meego.gitorious.org/meego-os-base/kernel-source/blobs/master/README.workflow Kernel workflow].&lt;br /&gt;
&lt;br /&gt;
=== Adaptation subsystems and interfaces ===&lt;br /&gt;
&lt;br /&gt;
In the MeeGo architecture model (see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view MeeGo Architecture Domain View]), adaptation is represented as adaptation subsystems. SW components in the adaptation subsystem ''realizations'' do things that are expected by the OS and communicate with the OS through interfaces defined by the OS.&lt;br /&gt;
 &lt;br /&gt;
The key goal in the sections below is to identify the interface(s) that the adaptation SW needs to implement/use to communicate with the OS in the required manner. Behind these interfaces, the adaptation SW can basically handle the required functionality as it sees best. In some cases, however, there may also be some preferred way of implementing the adaptation.&lt;br /&gt;
&lt;br /&gt;
In some areas, the adaptation work may consist of just writing a suitable Linux device driver for the HW in question. In some other areas, the adaptation work may consist of writing one or more device drivers, as well as one or more user space components (such as plugins to some user space SW frameworks). Various configuration file changes may also be required as a part of the adaptation work.&lt;br /&gt;
&lt;br /&gt;
== Porting by adaptation subsystems ==&lt;br /&gt;
&lt;br /&gt;
=== System Core Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Boot ====&lt;br /&gt;
&lt;br /&gt;
MeeGo places no restrictions as to what SW components are used to handle the pre-OS boot phases in a MeeGo compliant device. Thus, vendors are free to choose, for example, the boot loader, as they see fit. Note, however, that full use of the MeeGo platform security requires that the pre-OS boot phases form a trusted boot chain that ultimately builds on chipset-level security support.&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, MeeGo does not define anything special with regard to what information the boot loader is expected to pass to the Linux kernel, such as via the kernel command line.&lt;br /&gt;
&lt;br /&gt;
The kernel-level boot phases can be tailored, as necessary, to the specific CPU, chipset, or device in a standard Linux manner.&lt;br /&gt;
&lt;br /&gt;
The post-kernel boot phases (startup scripts) can be tailored by device vendors as necessary for their devices in the limits set by MeeGo compliance requirements (certain SW components need to be present in the system).&lt;br /&gt;
&lt;br /&gt;
==== Kernel fundamentals ====&lt;br /&gt;
&lt;br /&gt;
Regarding the Linux kernel, each MeeGo release defines the kernel version to be used and a set of patches on top of that. In addition, the Linux kernel used in MeeGo compliant devices is assumed to have been built with a set of fixed build-time configuration values that are not allowed to be changed. In addition to the fixed values, device vendors can define other kernel configuration values, as required by their devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo does not place any special requirements concerning how the boot loader passes information to the kernel or how the HW configuration and initialization of the system is handled.&lt;br /&gt;
&lt;br /&gt;
CPU, chipset (SoC), and device vendors are assumed to implement the elementary CPU architecture/chipset/device support for the Linux kernel used in MeeGo in a standard Linux manner. This includes:&lt;br /&gt;
* HW (board) configuration&lt;br /&gt;
* Mapping the fundamental Linux kernel functionality (such as IRQ, DMA, GPIO, RTC and memory handling) to the HW in question&lt;br /&gt;
* Creation/modification of the necessary device drivers to support the core SoC interfaces (such as I2C, SPI, SDIO)&lt;br /&gt;
* Permanent memory support&lt;br /&gt;
* Debugging and tracing support&lt;br /&gt;
&lt;br /&gt;
==== Power and thermal management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, the understanding is that MeeGo in general relies on established Linux kernel frameworks and APIs for power management. Some of these frameworks and APIs may be applicable only in certain CPU architectures. In addition, the HW capabilities related to power management may vary between different HW platforms potentially meaning that the SW is assumed perform somewhat different tasks in different environments.&lt;br /&gt;
&lt;br /&gt;
The Linux power management frameworks and APIs include:&lt;br /&gt;
* CPU frequency control (support for the different voltage and frequency operating points) via the cpufreq infrastructure&lt;br /&gt;
* CPU idle state management (different levels of sleep) through the cpuidle infrastructure&lt;br /&gt;
* Clock management through the clock framework&lt;br /&gt;
* Suspend/resume&lt;br /&gt;
* Runtime power management&lt;br /&gt;
* HW voltage/current regulator control via the regulator framework&lt;br /&gt;
* PM_QOS (power management quality of service) framework for making and listening to PM QoS requests&lt;br /&gt;
&lt;br /&gt;
Whether MeeGo will have some user space SW components or framework related to power management is under discussion at the time of this writing.&lt;br /&gt;
&lt;br /&gt;
In the thermal management area, the Device State Management Entity (DSME) component in the Device Health subsystem is supposed to make thermal state management decisions in the system. The DSME has a thermal manager module that again uses other DSME modules (thermal objects) to access the actual thermal sensor information in the HW. To port this functionality to new HW, one or more DSME thermal object modules need to be implemented.&lt;br /&gt;
&lt;br /&gt;
The APIs that the thermal object modules use to access the thermal sensor information are not strictly defined by MeeGo. At device driver level, however, the preferred approach is to use standard Linux interfaces such as the generic thermal sysfs API or the hwmon sysfs API.&lt;br /&gt;
&lt;br /&gt;
==== Energy management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, basically the only thing that MeeGo requires from HW adaptation in the energy management area (battery charging and monitoring) is support for the Linux power supply sysfs class. Additional energy management related functionality can be handled in a vendor specific manner.&lt;br /&gt;
&lt;br /&gt;
==== Device state ====&lt;br /&gt;
&lt;br /&gt;
The DSME component participates in device state management, such as by managing device run level, reboot, and shutdown, by monitoring the device thermal state, and shutting down the device in fatal thermal conditions, and by handling HW watchdog kicking activity.&lt;br /&gt;
&lt;br /&gt;
In a new HW environment, the DSME needs to be adapted to handle the watchdog kicking through the right device driver interfaces and at the right intervals. In addition, to port the DSME thermal management functionality to new HW, one or more DSME thermal object modules need to be implemented as described above, in the [[#Power_and_thermal_management|''Power and thermal management'']] section.&lt;br /&gt;
&lt;br /&gt;
=== Security Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Work is ongoing in bringing platform security functionality to the MeeGo OS based on the Mandatory Access Control (MAC), Integrity Measurement Architecture (IMA) and Extended Verification Module (EVM) technologies in the Linux kernel. Maximum security can be reached if the MeeGo platform security functionality can rely on trusted platform support &amp;quot;below&amp;quot; the Linux kernel, effectively in the HW and the boot loader(s). MeeGo, however, places no strict requirements as to how the trusted platform support is implemented in MeeGo based devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo also includes the OpenSSL open source toolkit implementing general purpose cryptography functionality. Algorithms and operations supported by the OpenSSL toolkit can be accelerated in HW by using the OpenSSL engine architecture. OpenSSL also supports a cryptodev engine that uses crypto algorithms implemented in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Some devices may have a security watchdog in the HW that needs &amp;quot;kicking&amp;quot; at regular intervals to keep the device up and running. In MeeGo, watchdog kicking functionality is implemented in the Device State Management Entity (DSME) component. If security watchdog kicking is needed, the DSME needs to be adapted to handle that through the right device driver interface and at the right intervals.&lt;br /&gt;
&lt;br /&gt;
=== Device Mode Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Resource Policy ====&lt;br /&gt;
&lt;br /&gt;
The Resource (Policy) Manager component in the Device Health subsystem offers a generic framework for:&lt;br /&gt;
* Monitoring device and application events&lt;br /&gt;
* Managing policies that specify rules about what should happen in the device when certain events occur&lt;br /&gt;
* Making policy decisions when events occur (determining the needed changes in the device)&lt;br /&gt;
* Enforcing changes in the system through policy enforcement points&lt;br /&gt;
&lt;br /&gt;
The Resource Manager can be used, for example, to change the audio routing in the device, when the user attaches a wired headset to the device.&lt;br /&gt;
&lt;br /&gt;
Event listening and change enforcement in the Resource Manager happens through plugin modules. Using the MeeGo OS in some new device effectively involves creating suitable Resource Manager policies and writing the necessary plugins for listening device/application events and changing device behavior accordingly. Though not pure HW adaptation, this can be considered a form of MeeGo OS &amp;quot;device adaptation&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Mode Control Entity (MCE) ====&lt;br /&gt;
&lt;br /&gt;
The MCE component (starting from MeeGo 1.2) can be used to listen to events that have an impact to the device mode (such as touch screen locked vs. unlocked) and change the device mode accordingly. The MCE is used, for example, to: &lt;br /&gt;
* Listen to various keys and switches in the device (such as power key, volume key, camera button, slider switch)&lt;br /&gt;
* Control LEDs&lt;br /&gt;
* Enabling/disabling touch screen or HW keyboard, depending on device state&lt;br /&gt;
* Control keyboard backlight&lt;br /&gt;
* Control display state (on/off) and brightness&lt;br /&gt;
&lt;br /&gt;
The MCE has its own plugin architecture that can be used to adapt it to different HW environments.&lt;br /&gt;
&lt;br /&gt;
=== Display and Graphics Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo visual services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view]. &lt;br /&gt;
&lt;br /&gt;
The key ingredients of the display and graphics architecture in MeeGo are the X Window System (X Server with its extensions) and the Khronos graphics APIs (OpenGL ES, OpenVG, and EGL with their extensions).&lt;br /&gt;
&lt;br /&gt;
The display and graphics HW adaptation SW needs to enable the X Window System and the Khronos APIs to function on the device HW. In practice, the adaptation SW needs to have an X display/video driver (hosted inside the X Server) and libraries that implement the Khronos graphics APIs, both supporting the features and functionality required by MeeGo. Also, some configuration file changes may be needed. Any additional user space and kernel space components needed for the HW adaptation are implementation dependent.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering display content to external displays, the Resource Manager component may be used to coordinate the display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Audio Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The audio architecture in MeeGo is centered around the GStreamer and PulseAudio frameworks. In addition, the Resource Manager plays a role in coordinating the audio related behavior of the device (audio routings). The audio HW adaptation SW needs to provide GStreamer elements and PulseAudio plugins that enable the GStreamer and PulseAudio client interfaces used, for example, for audio playback, recording, and volume control to work on the device. Typical required components include, for example, codec elements for GStreamer and sink/source plugins for PulseAudio.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer and PulseAudio plugins, the audio HW adaptation SW can be implemented with different technologies and APIs, including ALSA and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework, as needed. Use of the ALSA framework and APIs is encouraged, however, as they allow significant reuse of components and functionality on the PulseAudio level and are already a part of the upstream Linux kernel. If ALSA is not used to implement the kernel side parts of the audio adaptation, the solution that is used instead should still be aligned with the upstream Linux kernel.&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo media services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view].&lt;br /&gt;
&lt;br /&gt;
=== Camera Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo still imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework and the CameraBin GStreamer element. The still imaging HW adaptation SW is required to contain a GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element. Thus, the required HW adaptation interfaces are the relevant GStreamer plugin interfaces and especially the interfaces expected by the CameraBin element, in particular the GstPhotography interface.&lt;br /&gt;
&lt;br /&gt;
If HW accelerated encoders are supported, they should be also offered to the system as GStreamer elements.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
=== Video and Imaging Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo video imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework, the CameraBin GStreamer element (video recording) and the Playbin2 GStreamer element (video playback). The video imaging HW adaptation SW is required to contain:&lt;br /&gt;
:* A GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element (this is common with still imaging) &lt;br /&gt;
:* If HW accelerated codecs are supported, GStreamer elements that wrap the codecs&lt;br /&gt;
:* If HW accelerated filters are supported (such as video scaler, rotation engines, color conversion engines), GStreamer elements that wrap the filters&lt;br /&gt;
:* A GStreamer video sink element that offers the GStreamer X Overlay Interface. Note that if the XVideo extension is supported on the X Server side, the xvimagesink element can be used as the video sink element and no new elements are needed.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the video imaging HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering video content to external displays, the Resource Manager component may be used to coordinate the video/display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Communications Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo communications services architecture, see [http://meego.com/developers/meego-architecture/comms-services Comms Services].&lt;br /&gt;
&lt;br /&gt;
==== Cellular ====&lt;br /&gt;
&lt;br /&gt;
The cellular telephony architecture in MeeGo is centered on the oFono, PulseAudio, and Telepathy frameworks. In addition, the Resource Manager plays a role in coordinating the device behavior during voice calls.&lt;br /&gt;
&lt;br /&gt;
The cellular modem HW adaptation SW must implement the following interfaces towards the MeeGo OS:&lt;br /&gt;
:* oFono modem plugin/driver API&lt;br /&gt;
:* Linux network interface for the Linux TCP/IP stack (for data communications)&lt;br /&gt;
:* Relevant PulseAudio plugin interfaces for cellular voice call audio handling&lt;br /&gt;
&lt;br /&gt;
For more detailed information about the oFono APIs, see the documentation and source code available at [http://git.kernel.org/?p=network/ofono/ofono.git;a=summary oFono git].&lt;br /&gt;
&lt;br /&gt;
==== USB ====&lt;br /&gt;
&lt;br /&gt;
The foundation of MeeGo USB functionality is the standard Linux USB subsystem. The Linux USB subsystem defines the USB related HW adaptation interfaces that need to be supported in MeeGo. In practice, these are kernel side interfaces between the generic USB functionality and a HW dependent USB host controller driver.&lt;br /&gt;
&lt;br /&gt;
==== WLAN ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo WLAN architecture is centered on the [http://linuxwireless.org/ Linux wireless] (IEEE-802.11) subsystem. The Linux wireless SW stack defines the WLAN HW adaptation SW interfaces that need to be used in MeeGo. In practice, the required interfaces are defined by cfg80211 for FullMAC WLAN devices and by mac80211 for SoftMAC WLAN devices. In addition, a Linux network interface needs to be supported towards the Linux TCP/IP stack.&lt;br /&gt;
&lt;br /&gt;
==== Bluetooth ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Bluetooth architecture is centered on the [http://www.bluez.org/ BlueZ] SW stack. The BlueZ SW stack defines the Bluetooth HW adaptation SW interfaces that need to be used in MeeGo. In practice, these are Linux kernel side interfaces between the generic HCI (Host Controller Interface) core and a HW specific HCI driver.&lt;br /&gt;
&lt;br /&gt;
=== Location Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The MeeGo location architecture is based on [http://http://labs.trolltech.com/page/Projects/QtMobility| QtMobility Location API].  The QtMobility 1.0 Location API provides geographic coordinates only.  The QtMobility 1.1 Location API provides geocoding and reverse geocoding, POI search, navigation, and mapping.  The 1.0 Location API is available in MeeGo 1.1.  The 1.1 or later Location API will be available in MeeGo 1.2.  The Location API uses a plugin system for implementations of the underlying backend.  MeeGo compliance requirements require support for the QtMobility Location API and thus require one or more plugins to support these APIs.  MeeGo places no restrictions as to how the plugins are implemented, however. Adaptation to location related HW may be done by manufacturers or service providers and the way how it's done is not defined by the API.&lt;br /&gt;
&lt;br /&gt;
MeeGo will use [http://www.freedesktop.org/wiki/Software/GeoClue GeoClue] as the reference location framework and the reference implementation of the Qt Mobility location API backend will be written on top of GeoClue. GeoClue defines a set of (D-Bus) APIs for accessing location services provided by service providers implemented as D-Bus services. In addition, GeoClue includes a set of service provider implementations and (at the time of this writing) an experimental master service provider that can act as a proxy between clients and the actual service providers. If a device vendor wants to take advantage of this existing functionality, the vendor can implement their location services &amp;quot;behind&amp;quot; the GeoClue APIs as GeoClue service providers. In such a case, adaptation to the location related HW would happen inside the service providers as defined by the service provider designs.&lt;br /&gt;
&lt;br /&gt;
=== Sensor Adaptation === &lt;br /&gt;
&lt;br /&gt;
The key component in the MeeGo sensor handling architecture is the Sensor Framework. The Sensor Framework uses both HW independent logical sensor plugins and HW dependent sensor adaptor plugins in its operation. The required sensor HW adaptation interfaces in MeeGo are the interfaces that the Sensor Framework and the logical sensor plugins define for the sensor adaptor plugins to implement. The sensor adaptor plugins typically communicate directly with sensor HW drivers in the Linux kernel. The interfaces that the sensor HW drivers expose to the user space are not defined by MeeGo. Sensor HW adaptation in MeeGo thus consists of adaptor plugins in the Sensor Framework and sensor HW drivers in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Note that thermal sensors are handled in a different manner as described in the [[#Power and thermal management|''Power and thermal management'']] section above.&lt;br /&gt;
&lt;br /&gt;
=== Input Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Touch ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the touch input handling path in MeeGo are the touch HW device driver, Linux kernel input subsystem, X server, X input driver, Qt, and finally the MeeGo Touch Framework. Enabling touch support for some new HW requires at least the implementation of the corresponding touch HW device driver in the Linux kernel. If this driver communicates touch events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, basically the existing functionality in X server (such as evdev input driver) and above can be used as such. In case the kernel-to-user-space interface is non-standard, it is also possible to implement a new X input driver as a part of the touch HW adaptation.&lt;br /&gt;
&lt;br /&gt;
Multi-touch support in X requires a new version, 2.1, of the [http://cgit.freedesktop.org/~whot/inputproto/tree/XI2proto.txt?h=multitouch X Input Extension] and this also requires support from the client side, in this case Qt's multi-touch support. Once this support has been implemented throughout the SW stack, including X evdev input driver, supporting multi-touch for some new HW should require only the implementation of a touch HW device driver that implements the standard Linux multi-touch interface. This should be the case in MeeGo 1.2. &lt;br /&gt;
&lt;br /&gt;
Before 1.2, multi-touch support in MeeGo uses a special X input driver (mtev), X server multi-pointer support (MPX) and Qt multi-touch support written on top of MPX. This solution requires the touch HW device driver to expose a user-space interface that is compatible with mtev.&lt;br /&gt;
&lt;br /&gt;
==== HW keyboard ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the HW keyboard input handling path in MeeGo are the keyboard HW device driver, Linux kernel input subsystem, X server, X input driver, and Qt. Enabling keyboard support for some new HW requires typically only the implementation of the corresponding keyboard HW device driver in the Linux kernel. If this driver communicates key events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, the existing functionality in X server (such as evdev input driver) and above should work as such. In case the kernel-to-user space interface is non-standard, it is also possible to implement a new X input driver as a part of the keyboard HW adaptation.&lt;br /&gt;
&lt;br /&gt;
==== Buttons and switches ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo includes the MCE and System SW Qt API (QmSystem) components. The MCE can be used to control the device mode and it listens to power button events and e.g. device open/close switch events via the respective device driver interfaces. The System SW Qt API on the other hand provides a Qt API to various system information, including events from various physical buttons in the device (e.g. volume button, camera button). The System SW Qt API gets the button events either by listening to the relevant device driver interfaces or through the MCE component.&lt;br /&gt;
&lt;br /&gt;
Both the MCE and the System SW Qt API components can be adapted to new devices by device vendors.&lt;br /&gt;
&lt;br /&gt;
=== Haptics and Vibra Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Haptics ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Touch Framework present (at least) in the MeeGo handset device category contains a component called Feedback Framework (meegotouch-feedback) that handles the creation of auditory and/or haptic feedback to touch events. The haptic feedback can be created e.g. with vibra motors or piezo elements. In the Feedback Framework, the different types of feedback are created by backend libraries implemented as plugins. &lt;br /&gt;
&lt;br /&gt;
The haptics related HW adaptation interface from MeeGo OS perspective is the backend plugin interface defined by the Feedback Framework. The plugins can then communicate with the HW either through some device driver interface or some intermediate SW layers (MeeGo places no restrictions as to how the plugins are implemented).&lt;br /&gt;
&lt;br /&gt;
==== Vibra (notifications/alerts) ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo (at least the handset category) will include a component called Non-Graphical Feedback Framework (NGF). This component offers the capability of playing e.g. audio, vibra or led as an indication of events such as incoming call/message, clock and calendar alarms, missed calls, unread messages etc. The NGF also integrates with the Resource Policy to decide about the available playback resources based on policy rules and the current system state.&lt;br /&gt;
&lt;br /&gt;
The actual playback of the different types of notifications is handled by NGF plugins that can be created by device vendors. The plugins communicate with the relevant HW as they see best, e.g. directly through some device driver interface or via some intermediate user space SW components. The plugin interfaces defined by NGF thus form the notification/alert vibra adaptation interface in MeeGo.&lt;br /&gt;
&lt;br /&gt;
=== Production Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Production deals with areas such as flashing, testing, tuning and certification. The current understanding is that these areas are handled in a vendor specific manner, including the adaptation.&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Noel</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/MeeGo_Porting_Guide</id>
		<title>MeeGo Porting Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/MeeGo_Porting_Guide"/>
				<updated>2011-06-24T23:20:17Z</updated>
		
		<summary type="html">&lt;p&gt;Noel: /* Touch */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The goal of MeeGo Porting Guide (MPG) is to provide valuable information and instructions to people who want to run MeeGo OS on their (new) HW and eventually create products based on the MeeGo OS. The MPG starts with an overview of the porting process, tools, and other related background information and then moves on to describing what the porting actually means in individual technical/functional areas.&lt;br /&gt;
&lt;br /&gt;
The porting guide is not strictly tied to any particular MeeGo OS version or device category. Instead, it tries to be general enough to cover the different device categories, as well as follow changes introduced in new MeeGo OS versions.&lt;br /&gt;
&lt;br /&gt;
Detailed porting information in the different technical areas is dependent on the respective [http://meego.com/developers/meego-architecture MeeGo architecture]. In some cases, this architecture may still be open and this is noted in the applicable sections.&lt;br /&gt;
&lt;br /&gt;
=== Feedback ===&lt;br /&gt;
&lt;br /&gt;
Contribution to these pages is open. Any MeeGo community member is free to ''improve'' these pages at any time. You can also leave feedback in the [http://lists.meego.com/listinfo/meego-porting MeeGo porting mailing list].&lt;br /&gt;
&lt;br /&gt;
== General porting information/guidelines ==&lt;br /&gt;
&lt;br /&gt;
=== MeeGo compliance ===&lt;br /&gt;
&lt;br /&gt;
Perhaps the most important piece of background information related to the MPG are the [[Quality/Compliance|MeeGo compliance requirements]]. A device that is meant to be MeeGo compliant will need to fulfill the requirements listed in the MeeGo compliance specification for the applicable device category (the first version of the specification is supposed to be available in October 2010). In short, a MeeGo compliant device will need to:&lt;br /&gt;
* Meet the minimum HW performance and component requirements for the applicable device category&lt;br /&gt;
* Include all SW components that form the MeeGo core OS&lt;br /&gt;
* Include the additional SW components required to be present in devices in the applicable device category&lt;br /&gt;
* Not break the API/ABI of any of the components coming from MeeGo&lt;br /&gt;
* Follow the MeeGo SW packaging conventions&lt;br /&gt;
&lt;br /&gt;
The compliance rules will also specify CPU architecture specific requirements concerning how MeeGo OS itself and MeeGo applications are to be compiled to different environments (instruction set used, compiler version, compiler options, etc.).&lt;br /&gt;
&lt;br /&gt;
A device vendor may include additional functionality, HW components and SW components in their devices, as long as they don't break MeeGo compliance. The vendor can also patch MeeGo OS components, if the patches don't break MeeGo compliance. A device vendor's own SW components can be either open source or closed source components, as long as they adhere to the rules set by the applicable SW licenses.&lt;br /&gt;
&lt;br /&gt;
From the MeeGo Porting Guide perspective, by defining the SW components and HW components that need to be present, the compliance requirements effectively define the minimum set of porting tasks required from a device vendor and what SW components are involved from MeeGo OS side.&lt;br /&gt;
&lt;br /&gt;
=== Porting process and tools ===&lt;br /&gt;
&lt;br /&gt;
==== Overview ====&lt;br /&gt;
&lt;br /&gt;
As long as a vendor's device is MeeGo compliant, as defined above, it is basically up to the vendor to decide how they build the SW that ends up in the device. The vendor may use their own build machinery or set up an OBS build system that is also used in MeeGo. Regardless of what the vendor's build system is, it needs to integrate with the MeeGo build infrastructure, at least to fetch the MeeGo source packages for the builds, as well as build each MeeGo component in the same way as it would be built in the MeeGo build system (such as with the same compiler and compiler options). Whatever the case, the intention in MeeGo is to use and offer an open toolset that any HW or SW vendor can use for efficient SW creation. It is likely that using the same toolset as MeeGo, will offer the easiest way to integrate vendor's own build system with the the MeeGo build infrastructure.&lt;br /&gt;
&lt;br /&gt;
The key ingredients of the MeeGo build infrastructure and toolset are:&lt;br /&gt;
* [http://meego.gitorious.org MeeGo Gitorious]&lt;br /&gt;
** A version control system for the source files of various MeeGo specific SW components and tools&lt;br /&gt;
* [http://build.meego.com MeeGo OBS]&lt;br /&gt;
** The build system that is used to build MeeGo packages (RPMs) from their sources&lt;br /&gt;
* [http://repo.meego.com MeeGo Repository]&lt;br /&gt;
** The place where the built MeeGo releases, that is where MeeGo packages and images are stored&lt;br /&gt;
* [http://wiki.meego.com/Image_Creation MeeGo Image Creator]&lt;br /&gt;
** The tool used to build MeeGo images that can be installed/flashed on HW&lt;br /&gt;
* MeeGo release tools&lt;br /&gt;
** Tools such as BOSS and REVS that are used in the creation of the MeeGo releases under repo.meego.com&lt;br /&gt;
&lt;br /&gt;
For additional information, see [[Build Infrastructure]], [[Release Infrastructure]] and [[Release Engineering]].&lt;br /&gt;
&lt;br /&gt;
For another overview of the MeeGo porting process, see [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process].&lt;br /&gt;
&lt;br /&gt;
==== Vendor's own OBS ====&lt;br /&gt;
&lt;br /&gt;
So, ultimately, when creating actual products running the MeeGo OS, the vendor may end up setting up their own OBS build system. Setting up your own OBS system may also be beneficial in earlier HW/product development phases, as it offers a flexible way to modify and build MeeGo OS to test it on the new HW. The vendor's own OBS system can link to the MeeGo OBS for handling packages that come directly from MeeGo and it can link to other sources for handling, such as closed source packages that are specific to the vendor. See [[Release_Engineering/Process#Making a product out of MeeGo Release|an overview picture of this setup]].&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Sets up their own OBS system&lt;br /&gt;
** [[User:Stskeeps/10_easy_steps_to_a_local_OBS|Instructions related to setting up an OBS system]],  [[Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE112|OBS Applicances]] [http://en.opensuse.org/openSUSE:Build_Service_private_instance Open Suse OBS Wiki].&lt;br /&gt;
* Creates projects under the their own OBS for their own components&lt;br /&gt;
* Links their own OBS to the MeeGo OBS for MeeGo components&lt;br /&gt;
* May have trial patches to MeeGo components in their own OBS&lt;br /&gt;
** NOTE. Eventually all patches to MeeGo components required in a final MeeGo based product ''should'' be pushed to MeeGo.com. However, this is not an absolute must requirement, as long as the MeeGo compliance requirements and applicable SW license rules are fulfilled. &lt;br /&gt;
** See [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below&lt;br /&gt;
* Needs to set up the necessary machinery to create releases and images from the packages built with OBS&lt;br /&gt;
** This machinery can be based on the toolset used in MeeGo (see above)&lt;br /&gt;
&lt;br /&gt;
==== Working under MeeGo.com ====&lt;br /&gt;
&lt;br /&gt;
Another way of porting MeeGo to some new HW is to get the new HW accepted as one MeeGo reference HW and have the MeeGo build machinery create builds for the reference HW as a part of the normal MeeGo release building cycle (see [[Release Engineering/Release Timeline|Release Timeline]] and [[Release Engineering/Process|Release Process]]). This setup can also include QA support for the reference HW on the MeeGo side (see [[Quality]]). At the time of this writing, the actual process of getting new reference HW to MeeGo is still somewhat unclear. In any case, this model requires active participation from the vendor in MeeGo work in general and especially in supporting their reference HW in MeeGo.&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Creates a device/platform development project under the MeeGo OBS for their components. The open source components would then get submitted to MeeGo Trunk:Testing and get reviewed like any other MeeGo component for inclusion.&lt;br /&gt;
** Note that it is also possible to have closed source binary components in the MeeGo OBS to be included in the MeeGo builds for some reference HW. These are submitted to the Trunk:non-oss repository. Licensing is usually required to at least include redistributability, as the components cannot be mirrored from or hosted at repo.meego.com otherwise. It is not possible to have components within Trunk:Testing require closed source dependencies.&lt;br /&gt;
* Pushes patches to other MeeGo components at MeeGo.com as necessary (see [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below)&lt;br /&gt;
* Creates (or supports the creation of) a MIC kickstart file for building images for their reference HW&lt;br /&gt;
* As necessary, supports adding support for their reference HW and SW components in the MeeGo build and release infrastructure tools&lt;br /&gt;
&lt;br /&gt;
==== Trials ====&lt;br /&gt;
&lt;br /&gt;
A lightweight but also more limited &amp;quot;try it out&amp;quot; alternative to the above processes is discussed below.&lt;br /&gt;
&lt;br /&gt;
===== Initial bring-up attempt =====&lt;br /&gt;
&lt;br /&gt;
* Grab the already built root filesystem / image for a MeeGo reference device that's the closest to your target. For ARMv7, this is typically the Nokia N900 handset image. For Atom, this could be netbook image or handset image.&lt;br /&gt;
* Build a Linux kernel for your device and install the modules into /lib/modules.&lt;br /&gt;
* Boot the root filesystem and modify the configuration and drop in components to bring up the device to UX. Note down the things you had to modify or add, as this will be input for your porting work.&lt;br /&gt;
&lt;br /&gt;
===== Building your first image =====&lt;br /&gt;
&lt;br /&gt;
The second step to a proper hardware adaptation is making sure you can build your own image. Because we based our work before on a reference device image, it makes sense to try to build this image first. MeeGo images are constructed on the basis of so called 'kickstart files', which describe the intended contents of an image. &lt;br /&gt;
&lt;br /&gt;
* Install the MeeGo Image Creator tool (MIC)&lt;br /&gt;
* Download the kickstart file (.ks) from the same directory you found your reference device image. &lt;br /&gt;
* Create a image using mic-image-creator (should be elaborated).&lt;br /&gt;
* Test out your freshly baked image as in the previous step.&lt;br /&gt;
&lt;br /&gt;
===== Building your port's first reproduciable image =====&lt;br /&gt;
&lt;br /&gt;
* Download the MeeGo kernel, possibly modifying the kernel with additional patches (including new device drivers) and building the kernel (see [[#Getting_new_chipset_support_to_the_MeeGo_kernel|''Getting new chipset support to the MeeGo kernel'']] below). &lt;br /&gt;
* Add the repository containing your kernel package to the kickstart file (to be elaborated)&lt;br /&gt;
* Remove parts of the kickstart file specific to the reference device.&lt;br /&gt;
* Add a mention of your kernel package in the %packages section.&lt;br /&gt;
* Build packages or include shell scripts in %post section of kickstart file that adds/modifies configuration fitting your device.&lt;br /&gt;
&lt;br /&gt;
A detailed description of a variation of this model can be found from [[ARM/Meego on Beagleboard from scratch|here]] (Better description needed).&lt;br /&gt;
&lt;br /&gt;
==== Getting new chipset support to the MeeGo kernel ====&lt;br /&gt;
&lt;br /&gt;
See [[How-to: getting new chipset support to the MeeGo kernel]] for more detailed information about how to work with the MeeGo kernel and make it support new HW.&lt;br /&gt;
&lt;br /&gt;
=== Upstream projects, MeeGo, products, and patches ===&lt;br /&gt;
&lt;br /&gt;
When building a product based on MeeGo, the product vendor will typically augment the MeeGo OS with their own SW components, as well as make fixes and adjustments to the MeeGo OS code (in the limits set by the compliance rules). While vendors can manage their own SW components as they wish, the strong preference is that any changes made to the MeeGo OS SW components are delivered as patches primarily to the respective upstream projects or secondarily to MeeGo.com. In this way, vendors can relieve themselves of the burden of managing a potentially big patch set on top of MeeGo OS, and also verify the quality and safety of their patches. Having the patches in upstream projects again lessens the patch set management load at MeeGo.com.&lt;br /&gt;
&lt;br /&gt;
For information about pushing patches to MeeGo, see [http://meego.com/about/contribution-guidelines Contribution Guidelines] and [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process] (especially section ''How Do Patches Get Integrated and Accepted?'') and [http://meego.gitorious.org/meego-os-base/kernel-source/blobs/master/README.workflow Kernel workflow].&lt;br /&gt;
&lt;br /&gt;
=== Adaptation subsystems and interfaces ===&lt;br /&gt;
&lt;br /&gt;
In the MeeGo architecture model (see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view MeeGo Architecture Domain View]), adaptation is represented as adaptation subsystems. SW components in the adaptation subsystem ''realizations'' do things that are expected by the OS and communicate with the OS through interfaces defined by the OS.&lt;br /&gt;
 &lt;br /&gt;
The key goal in the sections below is to identify the interface(s) that the adaptation SW needs to implement/use to communicate with the OS in the required manner. Behind these interfaces, the adaptation SW can basically handle the required functionality as it sees best. In some cases, however, there may also be some preferred way of implementing the adaptation.&lt;br /&gt;
&lt;br /&gt;
In some areas, the adaptation work may consist of just writing a suitable Linux device driver for the HW in question. In some other areas, the adaptation work may consist of writing one or more device drivers, as well as one or more user space components (such as plugins to some user space SW frameworks). Various configuration file changes may also be required as a part of the adaptation work.&lt;br /&gt;
&lt;br /&gt;
== Porting by adaptation subsystems ==&lt;br /&gt;
&lt;br /&gt;
=== System Core Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Boot ====&lt;br /&gt;
&lt;br /&gt;
MeeGo places no restrictions as to what SW components are used to handle the pre-OS boot phases in a MeeGo compliant device. Thus, vendors are free to choose, for example, the boot loader, as they see fit. Note, however, that full use of the MeeGo platform security requires that the pre-OS boot phases form a trusted boot chain that ultimately builds on chipset-level security support.&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, MeeGo does not define anything special with regard to what information the boot loader is expected to pass to the Linux kernel, such as via the kernel command line.&lt;br /&gt;
&lt;br /&gt;
The kernel-level boot phases can be tailored, as necessary, to the specific CPU, chipset, or device in a standard Linux manner.&lt;br /&gt;
&lt;br /&gt;
The post-kernel boot phases (startup scripts) can be tailored by device vendors as necessary for their devices in the limits set by MeeGo compliance requirements (certain SW components need to be present in the system).&lt;br /&gt;
&lt;br /&gt;
==== Kernel fundamentals ====&lt;br /&gt;
&lt;br /&gt;
Regarding the Linux kernel, each MeeGo release defines the kernel version to be used and a set of patches on top of that. In addition, the Linux kernel used in MeeGo compliant devices is assumed to have been built with a set of fixed build-time configuration values that are not allowed to be changed. In addition to the fixed values, device vendors can define other kernel configuration values, as required by their devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo does not place any special requirements concerning how the boot loader passes information to the kernel or how the HW configuration and initialization of the system is handled.&lt;br /&gt;
&lt;br /&gt;
CPU, chipset (SoC), and device vendors are assumed to implement the elementary CPU architecture/chipset/device support for the Linux kernel used in MeeGo in a standard Linux manner. This includes:&lt;br /&gt;
* HW (board) configuration&lt;br /&gt;
* Mapping the fundamental Linux kernel functionality (such as IRQ, DMA, GPIO, RTC and memory handling) to the HW in question&lt;br /&gt;
* Creation/modification of the necessary device drivers to support the core SoC interfaces (such as I2C, SPI, SDIO)&lt;br /&gt;
* Permanent memory support&lt;br /&gt;
* Debugging and tracing support&lt;br /&gt;
&lt;br /&gt;
==== Power and thermal management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, the understanding is that MeeGo in general relies on established Linux kernel frameworks and APIs for power management. Some of these frameworks and APIs may be applicable only in certain CPU architectures. In addition, the HW capabilities related to power management may vary between different HW platforms potentially meaning that the SW is assumed perform somewhat different tasks in different environments.&lt;br /&gt;
&lt;br /&gt;
The Linux power management frameworks and APIs include:&lt;br /&gt;
* CPU frequency control (support for the different voltage and frequency operating points) via the cpufreq infrastructure&lt;br /&gt;
* CPU idle state management (different levels of sleep) through the cpuidle infrastructure&lt;br /&gt;
* Clock management through the clock framework&lt;br /&gt;
* Suspend/resume&lt;br /&gt;
* Runtime power management&lt;br /&gt;
* HW voltage/current regulator control via the regulator framework&lt;br /&gt;
* PM_QOS (power management quality of service) framework for making and listening to PM QoS requests&lt;br /&gt;
&lt;br /&gt;
Whether MeeGo will have some user space SW components or framework related to power management is under discussion at the time of this writing.&lt;br /&gt;
&lt;br /&gt;
In the thermal management area, the Device State Management Entity (DSME) component in the Device Health subsystem is supposed to make thermal state management decisions in the system. The DSME has a thermal manager module that again uses other DSME modules (thermal objects) to access the actual thermal sensor information in the HW. To port this functionality to new HW, one or more DSME thermal object modules need to be implemented.&lt;br /&gt;
&lt;br /&gt;
The APIs that the thermal object modules use to access the thermal sensor information are not strictly defined by MeeGo. At device driver level, however, the preferred approach is to use standard Linux interfaces such as the generic thermal sysfs API or the hwmon sysfs API.&lt;br /&gt;
&lt;br /&gt;
==== Energy management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, basically the only thing that MeeGo requires from HW adaptation in the energy management area (battery charging and monitoring) is support for the Linux power supply sysfs class. Additional energy management related functionality can be handled in a vendor specific manner.&lt;br /&gt;
&lt;br /&gt;
==== Device state ====&lt;br /&gt;
&lt;br /&gt;
The DSME component participates in device state management, such as by managing device run level, reboot, and shutdown, by monitoring the device thermal state, and shutting down the device in fatal thermal conditions, and by handling HW watchdog kicking activity.&lt;br /&gt;
&lt;br /&gt;
In a new HW environment, the DSME needs to be adapted to handle the watchdog kicking through the right device driver interfaces and at the right intervals. In addition, to port the DSME thermal management functionality to new HW, one or more DSME thermal object modules need to be implemented as described above, in the [[#Power_and_thermal_management|''Power and thermal management'']] section.&lt;br /&gt;
&lt;br /&gt;
=== Security Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Work is ongoing in bringing platform security functionality to the MeeGo OS based on the Mandatory Access Control (MAC), Integrity Measurement Architecture (IMA) and Extended Verification Module (EVM) technologies in the Linux kernel. Maximum security can be reached if the MeeGo platform security functionality can rely on trusted platform support &amp;quot;below&amp;quot; the Linux kernel, effectively in the HW and the boot loader(s). MeeGo, however, places no strict requirements as to how the trusted platform support is implemented in MeeGo based devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo also includes the OpenSSL open source toolkit implementing general purpose cryptography functionality. Algorithms and operations supported by the OpenSSL toolkit can be accelerated in HW by using the OpenSSL engine architecture. OpenSSL also supports a cryptodev engine that uses crypto algorithms implemented in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Some devices may have a security watchdog in the HW that needs &amp;quot;kicking&amp;quot; at regular intervals to keep the device up and running. In MeeGo, watchdog kicking functionality is implemented in the Device State Management Entity (DSME) component. If security watchdog kicking is needed, the DSME needs to be adapted to handle that through the right device driver interface and at the right intervals.&lt;br /&gt;
&lt;br /&gt;
=== Device Mode Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Resource Policy ====&lt;br /&gt;
&lt;br /&gt;
The Resource (Policy) Manager component in the Device Health subsystem offers a generic framework for:&lt;br /&gt;
* Monitoring device and application events&lt;br /&gt;
* Managing policies that specify rules about what should happen in the device when certain events occur&lt;br /&gt;
* Making policy decisions when events occur (determining the needed changes in the device)&lt;br /&gt;
* Enforcing changes in the system through policy enforcement points&lt;br /&gt;
&lt;br /&gt;
The Resource Manager can be used, for example, to change the audio routing in the device, when the user attaches a wired headset to the device.&lt;br /&gt;
&lt;br /&gt;
Event listening and change enforcement in the Resource Manager happens through plugin modules. Using the MeeGo OS in some new device effectively involves creating suitable Resource Manager policies and writing the necessary plugins for listening device/application events and changing device behavior accordingly. Though not pure HW adaptation, this can be considered a form of MeeGo OS &amp;quot;device adaptation&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Mode Control Entity (MCE) ====&lt;br /&gt;
&lt;br /&gt;
The MCE component (starting from MeeGo 1.2) can be used to listen to events that have an impact to the device mode (such as touch screen locked vs. unlocked) and change the device mode accordingly. The MCE is used, for example, to: &lt;br /&gt;
* Listen to various keys and switches in the device (such as power key, volume key, camera button, slider switch)&lt;br /&gt;
* Control LEDs&lt;br /&gt;
* Enabling/disabling touch screen or HW keyboard, depending on device state&lt;br /&gt;
* Control keyboard backlight&lt;br /&gt;
* Control display state (on/off) and brightness&lt;br /&gt;
&lt;br /&gt;
The MCE has its own plugin architecture that can be used to adapt it to different HW environments.&lt;br /&gt;
&lt;br /&gt;
=== Display and Graphics Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo visual services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view]. &lt;br /&gt;
&lt;br /&gt;
The key ingredients of the display and graphics architecture in MeeGo are the X Window System (X Server with its extensions) and the Khronos graphics APIs (OpenGL ES, OpenVG, and EGL with their extensions).&lt;br /&gt;
&lt;br /&gt;
The display and graphics HW adaptation SW needs to enable the X Window System and the Khronos APIs to function on the device HW. In practice, the adaptation SW needs to have an X display/video driver (hosted inside the X Server) and libraries that implement the Khronos graphics APIs, both supporting the features and functionality required by MeeGo. Also, some configuration file changes may be needed. Any additional user space and kernel space components needed for the HW adaptation are implementation dependent.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering display content to external displays, the Resource Manager component may be used to coordinate the display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Audio Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The audio architecture in MeeGo is centered around the GStreamer and PulseAudio frameworks. In addition, the Resource Manager plays a role in coordinating the audio related behavior of the device (audio routings). The audio HW adaptation SW needs to provide GStreamer elements and PulseAudio plugins that enable the GStreamer and PulseAudio client interfaces used, for example, for audio playback, recording, and volume control to work on the device. Typical required components include, for example, codec elements for GStreamer and sink/source plugins for PulseAudio.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer and PulseAudio plugins, the audio HW adaptation SW can be implemented with different technologies and APIs, including ALSA and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework, as needed. Use of the ALSA framework and APIs is encouraged, however, as they allow significant reuse of components and functionality on the PulseAudio level and are already a part of the upstream Linux kernel. If ALSA is not used to implement the kernel side parts of the audio adaptation, the solution that is used instead should still be aligned with the upstream Linux kernel.&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo media services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view].&lt;br /&gt;
&lt;br /&gt;
=== Camera Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo still imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework and the CameraBin GStreamer element. The still imaging HW adaptation SW is required to contain a GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element. Thus, the required HW adaptation interfaces are the relevant GStreamer plugin interfaces and especially the interfaces expected by the CameraBin element, in particular the GstPhotography interface.&lt;br /&gt;
&lt;br /&gt;
If HW accelerated encoders are supported, they should be also offered to the system as GStreamer elements.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
=== Video and Imaging Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo video imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework, the CameraBin GStreamer element (video recording) and the Playbin2 GStreamer element (video playback). The video imaging HW adaptation SW is required to contain:&lt;br /&gt;
:* A GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element (this is common with still imaging) &lt;br /&gt;
:* If HW accelerated codecs are supported, GStreamer elements that wrap the codecs&lt;br /&gt;
:* If HW accelerated filters are supported (such as video scaler, rotation engines, color conversion engines), GStreamer elements that wrap the filters&lt;br /&gt;
:* A GStreamer video sink element that offers the GStreamer X Overlay Interface. Note that if the XVideo extension is supported on the X Server side, the xvimagesink element can be used as the video sink element and no new elements are needed.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the video imaging HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering video content to external displays, the Resource Manager component may be used to coordinate the video/display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Communications Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo communications services architecture, see [http://meego.com/developers/meego-architecture/comms-services Comms Services].&lt;br /&gt;
&lt;br /&gt;
==== Cellular ====&lt;br /&gt;
&lt;br /&gt;
The cellular telephony architecture in MeeGo is centered on the oFono, PulseAudio, and Telepathy frameworks. In addition, the Resource Manager plays a role in coordinating the device behavior during voice calls.&lt;br /&gt;
&lt;br /&gt;
The cellular modem HW adaptation SW must implement the following interfaces towards the MeeGo OS:&lt;br /&gt;
:* oFono modem plugin/driver API&lt;br /&gt;
:* Linux network interface for the Linux TCP/IP stack (for data communications)&lt;br /&gt;
:* Relevant PulseAudio plugin interfaces for cellular voice call audio handling&lt;br /&gt;
&lt;br /&gt;
For more detailed information about the oFono APIs, see the documentation and source code available at [http://git.kernel.org/?p=network/ofono/ofono.git;a=summary oFono git].&lt;br /&gt;
&lt;br /&gt;
==== USB ====&lt;br /&gt;
&lt;br /&gt;
The foundation of MeeGo USB functionality is the standard Linux USB subsystem. The Linux USB subsystem defines the USB related HW adaptation interfaces that need to be supported in MeeGo. In practice, these are kernel side interfaces between the generic USB functionality and a HW dependent USB host controller driver.&lt;br /&gt;
&lt;br /&gt;
==== WLAN ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo WLAN architecture is centered on the [http://linuxwireless.org/ Linux wireless] (IEEE-802.11) subsystem. The Linux wireless SW stack defines the WLAN HW adaptation SW interfaces that need to be used in MeeGo. In practice, the required interfaces are defined by cfg80211 for FullMAC WLAN devices and by mac80211 for SoftMAC WLAN devices. In addition, a Linux network interface needs to be supported towards the Linux TCP/IP stack.&lt;br /&gt;
&lt;br /&gt;
==== Bluetooth ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Bluetooth architecture is centered on the [http://www.bluez.org/ BlueZ] SW stack. The BlueZ SW stack defines the Bluetooth HW adaptation SW interfaces that need to be used in MeeGo. In practice, these are Linux kernel side interfaces between the generic HCI (Host Controller Interface) core and a HW specific HCI driver.&lt;br /&gt;
&lt;br /&gt;
=== Location Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The MeeGo location architecture is based on [http://http://labs.trolltech.com/page/Projects/QtMobility| QtMobility Location API].  The QtMobility 1.0 Location API provides geographic coordinates only.  The QtMobility 1.1 Location API provides geocoding and reverse geocoding, POI search, navigation, and mapping.  The 1.0 Location API is available in MeeGo 1.1.  The 1.1 or later Location API will be available in MeeGo 1.2.  The Location API uses a plugin system for implementations of the underlying backend.  MeeGo compliance requirements require support for the QtMobility Location API and thus require one or more plugins to support these APIs.  MeeGo places no restrictions as to how the plugins are implemented, however. Adaptation to location related HW may be done by manufacturers or service providers and the way how it's done is not defined by the API.&lt;br /&gt;
&lt;br /&gt;
MeeGo will use [http://www.freedesktop.org/wiki/Software/GeoClue GeoClue] as the reference location framework and the reference implementation of the Qt Mobility location API backend will be written on top of GeoClue. GeoClue defines a set of (D-Bus) APIs for accessing location services provided by service providers implemented as D-Bus services. In addition, GeoClue includes a set of service provider implementations and (at the time of this writing) an experimental master service provider that can act as a proxy between clients and the actual service providers. If a device vendor wants to take advantage of this existing functionality, the vendor can implement their location services &amp;quot;behind&amp;quot; the GeoClue APIs as GeoClue service providers. In such a case, adaptation to the location related HW would happen inside the service providers as defined by the service provider designs.&lt;br /&gt;
&lt;br /&gt;
=== Sensor Adaptation === &lt;br /&gt;
&lt;br /&gt;
The key component in the MeeGo sensor handling architecture is the Sensor Framework. The Sensor Framework uses both HW independent logical sensor plugins and HW dependent sensor adaptor plugins in its operation. The required sensor HW adaptation interfaces in MeeGo are the interfaces that the Sensor Framework and the logical sensor plugins define for the sensor adaptor plugins to implement. The sensor adaptor plugins typically communicate directly with sensor HW drivers in the Linux kernel. The interfaces that the sensor HW drivers expose to the user space are not defined by MeeGo. Sensor HW adaptation in MeeGo thus consists of adaptor plugins in the Sensor Framework and sensor HW drivers in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Note that thermal sensors are handled in a different manner as described in the [[#Power and thermal management|''Power and thermal management'']] section above.&lt;br /&gt;
&lt;br /&gt;
=== Input Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Touch ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the touch input handling path in MeeGo are the touch HW device driver, Linux kernel input subsystem, X server, X input driver, Qt, and finally the MeeGo Touch Framework. Enabling touch support for some new HW requires at least the implementation of the corresponding touch HW device driver in the Linux kernel. If this driver communicates touch events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, basically the existing functionality in X server (such as evdev input driver) and above can be used as such. In case the kernel-to-user-space interface is non-standard, it is also possible to implement a new X input driver as a part of the touch HW adaptation.&lt;br /&gt;
&lt;br /&gt;
Multi-touch support in X requires a new version, 2.1, of the [http://cgit.freedesktop.org/~whot/inputproto/tree/XI2proto.txt?h=multitouch X Input Extension] and this also requires support from the client side, in this case Qt's multi-touch support. Once this support has been implemented throughout the SW stack, including X evdev input driver, supporting multi-touch for some new HW should require only the implementation of a touch HW device driver that implements the standard Linux multi-touch interface. This should be the case in MeeGo 1.2. &lt;br /&gt;
&lt;br /&gt;
Before 1.2, multi-touch support in MeeGo uses a special X input driver (mtev), X server multi-pointer support (MPX) and Qt multi-touch support written on top of MPX. This solution requires the touch HW device driver to expose a user-space interface that is compatible with mtev.&lt;br /&gt;
&lt;br /&gt;
==== HW keyboard ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the HW keyboard input handling path in MeeGo are the keyboard HW device driver, Linux kernel input subsystem, X server, X input driver and Qt. Enabling keyboard support for some new HW requires typically only the implementation of the corresponding keyboard HW device driver in the Linux kernel. If this driver communicates key events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, the existing functionality in X server (e.g. evdev input driver) and above should work as such. In case the kernel-to-user space interface is non-standard, it is also possible to implement a new X input driver as a part of the keyboard HW adaptation.&lt;br /&gt;
&lt;br /&gt;
==== Buttons and switches ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo includes the MCE and System SW Qt API (QmSystem) components. The MCE can be used to control the device mode and it listens to power button events and e.g. device open/close switch events via the respective device driver interfaces. The System SW Qt API on the other hand provides a Qt API to various system information, including events from various physical buttons in the device (e.g. volume button, camera button). The System SW Qt API gets the button events either by listening to the relevant device driver interfaces or through the MCE component.&lt;br /&gt;
&lt;br /&gt;
Both the MCE and the System SW Qt API components can be adapted to new devices by device vendors.&lt;br /&gt;
&lt;br /&gt;
=== Haptics and Vibra Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Haptics ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Touch Framework present (at least) in the MeeGo handset device category contains a component called Feedback Framework (meegotouch-feedback) that handles the creation of auditory and/or haptic feedback to touch events. The haptic feedback can be created e.g. with vibra motors or piezo elements. In the Feedback Framework, the different types of feedback are created by backend libraries implemented as plugins. &lt;br /&gt;
&lt;br /&gt;
The haptics related HW adaptation interface from MeeGo OS perspective is the backend plugin interface defined by the Feedback Framework. The plugins can then communicate with the HW either through some device driver interface or some intermediate SW layers (MeeGo places no restrictions as to how the plugins are implemented).&lt;br /&gt;
&lt;br /&gt;
==== Vibra (notifications/alerts) ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo (at least the handset category) will include a component called Non-Graphical Feedback Framework (NGF). This component offers the capability of playing e.g. audio, vibra or led as an indication of events such as incoming call/message, clock and calendar alarms, missed calls, unread messages etc. The NGF also integrates with the Resource Policy to decide about the available playback resources based on policy rules and the current system state.&lt;br /&gt;
&lt;br /&gt;
The actual playback of the different types of notifications is handled by NGF plugins that can be created by device vendors. The plugins communicate with the relevant HW as they see best, e.g. directly through some device driver interface or via some intermediate user space SW components. The plugin interfaces defined by NGF thus form the notification/alert vibra adaptation interface in MeeGo.&lt;br /&gt;
&lt;br /&gt;
=== Production Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Production deals with areas such as flashing, testing, tuning and certification. The current understanding is that these areas are handled in a vendor specific manner, including the adaptation.&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Noel</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/MeeGo_Porting_Guide</id>
		<title>MeeGo Porting Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/MeeGo_Porting_Guide"/>
				<updated>2011-06-24T23:16:28Z</updated>
		
		<summary type="html">&lt;p&gt;Noel: /* USB */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The goal of MeeGo Porting Guide (MPG) is to provide valuable information and instructions to people who want to run MeeGo OS on their (new) HW and eventually create products based on the MeeGo OS. The MPG starts with an overview of the porting process, tools, and other related background information and then moves on to describing what the porting actually means in individual technical/functional areas.&lt;br /&gt;
&lt;br /&gt;
The porting guide is not strictly tied to any particular MeeGo OS version or device category. Instead, it tries to be general enough to cover the different device categories, as well as follow changes introduced in new MeeGo OS versions.&lt;br /&gt;
&lt;br /&gt;
Detailed porting information in the different technical areas is dependent on the respective [http://meego.com/developers/meego-architecture MeeGo architecture]. In some cases, this architecture may still be open and this is noted in the applicable sections.&lt;br /&gt;
&lt;br /&gt;
=== Feedback ===&lt;br /&gt;
&lt;br /&gt;
Contribution to these pages is open. Any MeeGo community member is free to ''improve'' these pages at any time. You can also leave feedback in the [http://lists.meego.com/listinfo/meego-porting MeeGo porting mailing list].&lt;br /&gt;
&lt;br /&gt;
== General porting information/guidelines ==&lt;br /&gt;
&lt;br /&gt;
=== MeeGo compliance ===&lt;br /&gt;
&lt;br /&gt;
Perhaps the most important piece of background information related to the MPG are the [[Quality/Compliance|MeeGo compliance requirements]]. A device that is meant to be MeeGo compliant will need to fulfill the requirements listed in the MeeGo compliance specification for the applicable device category (the first version of the specification is supposed to be available in October 2010). In short, a MeeGo compliant device will need to:&lt;br /&gt;
* Meet the minimum HW performance and component requirements for the applicable device category&lt;br /&gt;
* Include all SW components that form the MeeGo core OS&lt;br /&gt;
* Include the additional SW components required to be present in devices in the applicable device category&lt;br /&gt;
* Not break the API/ABI of any of the components coming from MeeGo&lt;br /&gt;
* Follow the MeeGo SW packaging conventions&lt;br /&gt;
&lt;br /&gt;
The compliance rules will also specify CPU architecture specific requirements concerning how MeeGo OS itself and MeeGo applications are to be compiled to different environments (instruction set used, compiler version, compiler options, etc.).&lt;br /&gt;
&lt;br /&gt;
A device vendor may include additional functionality, HW components and SW components in their devices, as long as they don't break MeeGo compliance. The vendor can also patch MeeGo OS components, if the patches don't break MeeGo compliance. A device vendor's own SW components can be either open source or closed source components, as long as they adhere to the rules set by the applicable SW licenses.&lt;br /&gt;
&lt;br /&gt;
From the MeeGo Porting Guide perspective, by defining the SW components and HW components that need to be present, the compliance requirements effectively define the minimum set of porting tasks required from a device vendor and what SW components are involved from MeeGo OS side.&lt;br /&gt;
&lt;br /&gt;
=== Porting process and tools ===&lt;br /&gt;
&lt;br /&gt;
==== Overview ====&lt;br /&gt;
&lt;br /&gt;
As long as a vendor's device is MeeGo compliant, as defined above, it is basically up to the vendor to decide how they build the SW that ends up in the device. The vendor may use their own build machinery or set up an OBS build system that is also used in MeeGo. Regardless of what the vendor's build system is, it needs to integrate with the MeeGo build infrastructure, at least to fetch the MeeGo source packages for the builds, as well as build each MeeGo component in the same way as it would be built in the MeeGo build system (such as with the same compiler and compiler options). Whatever the case, the intention in MeeGo is to use and offer an open toolset that any HW or SW vendor can use for efficient SW creation. It is likely that using the same toolset as MeeGo, will offer the easiest way to integrate vendor's own build system with the the MeeGo build infrastructure.&lt;br /&gt;
&lt;br /&gt;
The key ingredients of the MeeGo build infrastructure and toolset are:&lt;br /&gt;
* [http://meego.gitorious.org MeeGo Gitorious]&lt;br /&gt;
** A version control system for the source files of various MeeGo specific SW components and tools&lt;br /&gt;
* [http://build.meego.com MeeGo OBS]&lt;br /&gt;
** The build system that is used to build MeeGo packages (RPMs) from their sources&lt;br /&gt;
* [http://repo.meego.com MeeGo Repository]&lt;br /&gt;
** The place where the built MeeGo releases, that is where MeeGo packages and images are stored&lt;br /&gt;
* [http://wiki.meego.com/Image_Creation MeeGo Image Creator]&lt;br /&gt;
** The tool used to build MeeGo images that can be installed/flashed on HW&lt;br /&gt;
* MeeGo release tools&lt;br /&gt;
** Tools such as BOSS and REVS that are used in the creation of the MeeGo releases under repo.meego.com&lt;br /&gt;
&lt;br /&gt;
For additional information, see [[Build Infrastructure]], [[Release Infrastructure]] and [[Release Engineering]].&lt;br /&gt;
&lt;br /&gt;
For another overview of the MeeGo porting process, see [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process].&lt;br /&gt;
&lt;br /&gt;
==== Vendor's own OBS ====&lt;br /&gt;
&lt;br /&gt;
So, ultimately, when creating actual products running the MeeGo OS, the vendor may end up setting up their own OBS build system. Setting up your own OBS system may also be beneficial in earlier HW/product development phases, as it offers a flexible way to modify and build MeeGo OS to test it on the new HW. The vendor's own OBS system can link to the MeeGo OBS for handling packages that come directly from MeeGo and it can link to other sources for handling, such as closed source packages that are specific to the vendor. See [[Release_Engineering/Process#Making a product out of MeeGo Release|an overview picture of this setup]].&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Sets up their own OBS system&lt;br /&gt;
** [[User:Stskeeps/10_easy_steps_to_a_local_OBS|Instructions related to setting up an OBS system]],  [[Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE112|OBS Applicances]] [http://en.opensuse.org/openSUSE:Build_Service_private_instance Open Suse OBS Wiki].&lt;br /&gt;
* Creates projects under the their own OBS for their own components&lt;br /&gt;
* Links their own OBS to the MeeGo OBS for MeeGo components&lt;br /&gt;
* May have trial patches to MeeGo components in their own OBS&lt;br /&gt;
** NOTE. Eventually all patches to MeeGo components required in a final MeeGo based product ''should'' be pushed to MeeGo.com. However, this is not an absolute must requirement, as long as the MeeGo compliance requirements and applicable SW license rules are fulfilled. &lt;br /&gt;
** See [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below&lt;br /&gt;
* Needs to set up the necessary machinery to create releases and images from the packages built with OBS&lt;br /&gt;
** This machinery can be based on the toolset used in MeeGo (see above)&lt;br /&gt;
&lt;br /&gt;
==== Working under MeeGo.com ====&lt;br /&gt;
&lt;br /&gt;
Another way of porting MeeGo to some new HW is to get the new HW accepted as one MeeGo reference HW and have the MeeGo build machinery create builds for the reference HW as a part of the normal MeeGo release building cycle (see [[Release Engineering/Release Timeline|Release Timeline]] and [[Release Engineering/Process|Release Process]]). This setup can also include QA support for the reference HW on the MeeGo side (see [[Quality]]). At the time of this writing, the actual process of getting new reference HW to MeeGo is still somewhat unclear. In any case, this model requires active participation from the vendor in MeeGo work in general and especially in supporting their reference HW in MeeGo.&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Creates a device/platform development project under the MeeGo OBS for their components. The open source components would then get submitted to MeeGo Trunk:Testing and get reviewed like any other MeeGo component for inclusion.&lt;br /&gt;
** Note that it is also possible to have closed source binary components in the MeeGo OBS to be included in the MeeGo builds for some reference HW. These are submitted to the Trunk:non-oss repository. Licensing is usually required to at least include redistributability, as the components cannot be mirrored from or hosted at repo.meego.com otherwise. It is not possible to have components within Trunk:Testing require closed source dependencies.&lt;br /&gt;
* Pushes patches to other MeeGo components at MeeGo.com as necessary (see [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below)&lt;br /&gt;
* Creates (or supports the creation of) a MIC kickstart file for building images for their reference HW&lt;br /&gt;
* As necessary, supports adding support for their reference HW and SW components in the MeeGo build and release infrastructure tools&lt;br /&gt;
&lt;br /&gt;
==== Trials ====&lt;br /&gt;
&lt;br /&gt;
A lightweight but also more limited &amp;quot;try it out&amp;quot; alternative to the above processes is discussed below.&lt;br /&gt;
&lt;br /&gt;
===== Initial bring-up attempt =====&lt;br /&gt;
&lt;br /&gt;
* Grab the already built root filesystem / image for a MeeGo reference device that's the closest to your target. For ARMv7, this is typically the Nokia N900 handset image. For Atom, this could be netbook image or handset image.&lt;br /&gt;
* Build a Linux kernel for your device and install the modules into /lib/modules.&lt;br /&gt;
* Boot the root filesystem and modify the configuration and drop in components to bring up the device to UX. Note down the things you had to modify or add, as this will be input for your porting work.&lt;br /&gt;
&lt;br /&gt;
===== Building your first image =====&lt;br /&gt;
&lt;br /&gt;
The second step to a proper hardware adaptation is making sure you can build your own image. Because we based our work before on a reference device image, it makes sense to try to build this image first. MeeGo images are constructed on the basis of so called 'kickstart files', which describe the intended contents of an image. &lt;br /&gt;
&lt;br /&gt;
* Install the MeeGo Image Creator tool (MIC)&lt;br /&gt;
* Download the kickstart file (.ks) from the same directory you found your reference device image. &lt;br /&gt;
* Create a image using mic-image-creator (should be elaborated).&lt;br /&gt;
* Test out your freshly baked image as in the previous step.&lt;br /&gt;
&lt;br /&gt;
===== Building your port's first reproduciable image =====&lt;br /&gt;
&lt;br /&gt;
* Download the MeeGo kernel, possibly modifying the kernel with additional patches (including new device drivers) and building the kernel (see [[#Getting_new_chipset_support_to_the_MeeGo_kernel|''Getting new chipset support to the MeeGo kernel'']] below). &lt;br /&gt;
* Add the repository containing your kernel package to the kickstart file (to be elaborated)&lt;br /&gt;
* Remove parts of the kickstart file specific to the reference device.&lt;br /&gt;
* Add a mention of your kernel package in the %packages section.&lt;br /&gt;
* Build packages or include shell scripts in %post section of kickstart file that adds/modifies configuration fitting your device.&lt;br /&gt;
&lt;br /&gt;
A detailed description of a variation of this model can be found from [[ARM/Meego on Beagleboard from scratch|here]] (Better description needed).&lt;br /&gt;
&lt;br /&gt;
==== Getting new chipset support to the MeeGo kernel ====&lt;br /&gt;
&lt;br /&gt;
See [[How-to: getting new chipset support to the MeeGo kernel]] for more detailed information about how to work with the MeeGo kernel and make it support new HW.&lt;br /&gt;
&lt;br /&gt;
=== Upstream projects, MeeGo, products, and patches ===&lt;br /&gt;
&lt;br /&gt;
When building a product based on MeeGo, the product vendor will typically augment the MeeGo OS with their own SW components, as well as make fixes and adjustments to the MeeGo OS code (in the limits set by the compliance rules). While vendors can manage their own SW components as they wish, the strong preference is that any changes made to the MeeGo OS SW components are delivered as patches primarily to the respective upstream projects or secondarily to MeeGo.com. In this way, vendors can relieve themselves of the burden of managing a potentially big patch set on top of MeeGo OS, and also verify the quality and safety of their patches. Having the patches in upstream projects again lessens the patch set management load at MeeGo.com.&lt;br /&gt;
&lt;br /&gt;
For information about pushing patches to MeeGo, see [http://meego.com/about/contribution-guidelines Contribution Guidelines] and [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process] (especially section ''How Do Patches Get Integrated and Accepted?'') and [http://meego.gitorious.org/meego-os-base/kernel-source/blobs/master/README.workflow Kernel workflow].&lt;br /&gt;
&lt;br /&gt;
=== Adaptation subsystems and interfaces ===&lt;br /&gt;
&lt;br /&gt;
In the MeeGo architecture model (see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view MeeGo Architecture Domain View]), adaptation is represented as adaptation subsystems. SW components in the adaptation subsystem ''realizations'' do things that are expected by the OS and communicate with the OS through interfaces defined by the OS.&lt;br /&gt;
 &lt;br /&gt;
The key goal in the sections below is to identify the interface(s) that the adaptation SW needs to implement/use to communicate with the OS in the required manner. Behind these interfaces, the adaptation SW can basically handle the required functionality as it sees best. In some cases, however, there may also be some preferred way of implementing the adaptation.&lt;br /&gt;
&lt;br /&gt;
In some areas, the adaptation work may consist of just writing a suitable Linux device driver for the HW in question. In some other areas, the adaptation work may consist of writing one or more device drivers, as well as one or more user space components (such as plugins to some user space SW frameworks). Various configuration file changes may also be required as a part of the adaptation work.&lt;br /&gt;
&lt;br /&gt;
== Porting by adaptation subsystems ==&lt;br /&gt;
&lt;br /&gt;
=== System Core Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Boot ====&lt;br /&gt;
&lt;br /&gt;
MeeGo places no restrictions as to what SW components are used to handle the pre-OS boot phases in a MeeGo compliant device. Thus, vendors are free to choose, for example, the boot loader, as they see fit. Note, however, that full use of the MeeGo platform security requires that the pre-OS boot phases form a trusted boot chain that ultimately builds on chipset-level security support.&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, MeeGo does not define anything special with regard to what information the boot loader is expected to pass to the Linux kernel, such as via the kernel command line.&lt;br /&gt;
&lt;br /&gt;
The kernel-level boot phases can be tailored, as necessary, to the specific CPU, chipset, or device in a standard Linux manner.&lt;br /&gt;
&lt;br /&gt;
The post-kernel boot phases (startup scripts) can be tailored by device vendors as necessary for their devices in the limits set by MeeGo compliance requirements (certain SW components need to be present in the system).&lt;br /&gt;
&lt;br /&gt;
==== Kernel fundamentals ====&lt;br /&gt;
&lt;br /&gt;
Regarding the Linux kernel, each MeeGo release defines the kernel version to be used and a set of patches on top of that. In addition, the Linux kernel used in MeeGo compliant devices is assumed to have been built with a set of fixed build-time configuration values that are not allowed to be changed. In addition to the fixed values, device vendors can define other kernel configuration values, as required by their devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo does not place any special requirements concerning how the boot loader passes information to the kernel or how the HW configuration and initialization of the system is handled.&lt;br /&gt;
&lt;br /&gt;
CPU, chipset (SoC), and device vendors are assumed to implement the elementary CPU architecture/chipset/device support for the Linux kernel used in MeeGo in a standard Linux manner. This includes:&lt;br /&gt;
* HW (board) configuration&lt;br /&gt;
* Mapping the fundamental Linux kernel functionality (such as IRQ, DMA, GPIO, RTC and memory handling) to the HW in question&lt;br /&gt;
* Creation/modification of the necessary device drivers to support the core SoC interfaces (such as I2C, SPI, SDIO)&lt;br /&gt;
* Permanent memory support&lt;br /&gt;
* Debugging and tracing support&lt;br /&gt;
&lt;br /&gt;
==== Power and thermal management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, the understanding is that MeeGo in general relies on established Linux kernel frameworks and APIs for power management. Some of these frameworks and APIs may be applicable only in certain CPU architectures. In addition, the HW capabilities related to power management may vary between different HW platforms potentially meaning that the SW is assumed perform somewhat different tasks in different environments.&lt;br /&gt;
&lt;br /&gt;
The Linux power management frameworks and APIs include:&lt;br /&gt;
* CPU frequency control (support for the different voltage and frequency operating points) via the cpufreq infrastructure&lt;br /&gt;
* CPU idle state management (different levels of sleep) through the cpuidle infrastructure&lt;br /&gt;
* Clock management through the clock framework&lt;br /&gt;
* Suspend/resume&lt;br /&gt;
* Runtime power management&lt;br /&gt;
* HW voltage/current regulator control via the regulator framework&lt;br /&gt;
* PM_QOS (power management quality of service) framework for making and listening to PM QoS requests&lt;br /&gt;
&lt;br /&gt;
Whether MeeGo will have some user space SW components or framework related to power management is under discussion at the time of this writing.&lt;br /&gt;
&lt;br /&gt;
In the thermal management area, the Device State Management Entity (DSME) component in the Device Health subsystem is supposed to make thermal state management decisions in the system. The DSME has a thermal manager module that again uses other DSME modules (thermal objects) to access the actual thermal sensor information in the HW. To port this functionality to new HW, one or more DSME thermal object modules need to be implemented.&lt;br /&gt;
&lt;br /&gt;
The APIs that the thermal object modules use to access the thermal sensor information are not strictly defined by MeeGo. At device driver level, however, the preferred approach is to use standard Linux interfaces such as the generic thermal sysfs API or the hwmon sysfs API.&lt;br /&gt;
&lt;br /&gt;
==== Energy management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, basically the only thing that MeeGo requires from HW adaptation in the energy management area (battery charging and monitoring) is support for the Linux power supply sysfs class. Additional energy management related functionality can be handled in a vendor specific manner.&lt;br /&gt;
&lt;br /&gt;
==== Device state ====&lt;br /&gt;
&lt;br /&gt;
The DSME component participates in device state management, such as by managing device run level, reboot, and shutdown, by monitoring the device thermal state, and shutting down the device in fatal thermal conditions, and by handling HW watchdog kicking activity.&lt;br /&gt;
&lt;br /&gt;
In a new HW environment, the DSME needs to be adapted to handle the watchdog kicking through the right device driver interfaces and at the right intervals. In addition, to port the DSME thermal management functionality to new HW, one or more DSME thermal object modules need to be implemented as described above, in the [[#Power_and_thermal_management|''Power and thermal management'']] section.&lt;br /&gt;
&lt;br /&gt;
=== Security Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Work is ongoing in bringing platform security functionality to the MeeGo OS based on the Mandatory Access Control (MAC), Integrity Measurement Architecture (IMA) and Extended Verification Module (EVM) technologies in the Linux kernel. Maximum security can be reached if the MeeGo platform security functionality can rely on trusted platform support &amp;quot;below&amp;quot; the Linux kernel, effectively in the HW and the boot loader(s). MeeGo, however, places no strict requirements as to how the trusted platform support is implemented in MeeGo based devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo also includes the OpenSSL open source toolkit implementing general purpose cryptography functionality. Algorithms and operations supported by the OpenSSL toolkit can be accelerated in HW by using the OpenSSL engine architecture. OpenSSL also supports a cryptodev engine that uses crypto algorithms implemented in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Some devices may have a security watchdog in the HW that needs &amp;quot;kicking&amp;quot; at regular intervals to keep the device up and running. In MeeGo, watchdog kicking functionality is implemented in the Device State Management Entity (DSME) component. If security watchdog kicking is needed, the DSME needs to be adapted to handle that through the right device driver interface and at the right intervals.&lt;br /&gt;
&lt;br /&gt;
=== Device Mode Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Resource Policy ====&lt;br /&gt;
&lt;br /&gt;
The Resource (Policy) Manager component in the Device Health subsystem offers a generic framework for:&lt;br /&gt;
* Monitoring device and application events&lt;br /&gt;
* Managing policies that specify rules about what should happen in the device when certain events occur&lt;br /&gt;
* Making policy decisions when events occur (determining the needed changes in the device)&lt;br /&gt;
* Enforcing changes in the system through policy enforcement points&lt;br /&gt;
&lt;br /&gt;
The Resource Manager can be used, for example, to change the audio routing in the device, when the user attaches a wired headset to the device.&lt;br /&gt;
&lt;br /&gt;
Event listening and change enforcement in the Resource Manager happens through plugin modules. Using the MeeGo OS in some new device effectively involves creating suitable Resource Manager policies and writing the necessary plugins for listening device/application events and changing device behavior accordingly. Though not pure HW adaptation, this can be considered a form of MeeGo OS &amp;quot;device adaptation&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Mode Control Entity (MCE) ====&lt;br /&gt;
&lt;br /&gt;
The MCE component (starting from MeeGo 1.2) can be used to listen to events that have an impact to the device mode (such as touch screen locked vs. unlocked) and change the device mode accordingly. The MCE is used, for example, to: &lt;br /&gt;
* Listen to various keys and switches in the device (such as power key, volume key, camera button, slider switch)&lt;br /&gt;
* Control LEDs&lt;br /&gt;
* Enabling/disabling touch screen or HW keyboard, depending on device state&lt;br /&gt;
* Control keyboard backlight&lt;br /&gt;
* Control display state (on/off) and brightness&lt;br /&gt;
&lt;br /&gt;
The MCE has its own plugin architecture that can be used to adapt it to different HW environments.&lt;br /&gt;
&lt;br /&gt;
=== Display and Graphics Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo visual services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view]. &lt;br /&gt;
&lt;br /&gt;
The key ingredients of the display and graphics architecture in MeeGo are the X Window System (X Server with its extensions) and the Khronos graphics APIs (OpenGL ES, OpenVG, and EGL with their extensions).&lt;br /&gt;
&lt;br /&gt;
The display and graphics HW adaptation SW needs to enable the X Window System and the Khronos APIs to function on the device HW. In practice, the adaptation SW needs to have an X display/video driver (hosted inside the X Server) and libraries that implement the Khronos graphics APIs, both supporting the features and functionality required by MeeGo. Also, some configuration file changes may be needed. Any additional user space and kernel space components needed for the HW adaptation are implementation dependent.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering display content to external displays, the Resource Manager component may be used to coordinate the display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Audio Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The audio architecture in MeeGo is centered around the GStreamer and PulseAudio frameworks. In addition, the Resource Manager plays a role in coordinating the audio related behavior of the device (audio routings). The audio HW adaptation SW needs to provide GStreamer elements and PulseAudio plugins that enable the GStreamer and PulseAudio client interfaces used, for example, for audio playback, recording, and volume control to work on the device. Typical required components include, for example, codec elements for GStreamer and sink/source plugins for PulseAudio.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer and PulseAudio plugins, the audio HW adaptation SW can be implemented with different technologies and APIs, including ALSA and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework, as needed. Use of the ALSA framework and APIs is encouraged, however, as they allow significant reuse of components and functionality on the PulseAudio level and are already a part of the upstream Linux kernel. If ALSA is not used to implement the kernel side parts of the audio adaptation, the solution that is used instead should still be aligned with the upstream Linux kernel.&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo media services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view].&lt;br /&gt;
&lt;br /&gt;
=== Camera Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo still imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework and the CameraBin GStreamer element. The still imaging HW adaptation SW is required to contain a GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element. Thus, the required HW adaptation interfaces are the relevant GStreamer plugin interfaces and especially the interfaces expected by the CameraBin element, in particular the GstPhotography interface.&lt;br /&gt;
&lt;br /&gt;
If HW accelerated encoders are supported, they should be also offered to the system as GStreamer elements.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
=== Video and Imaging Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo video imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework, the CameraBin GStreamer element (video recording) and the Playbin2 GStreamer element (video playback). The video imaging HW adaptation SW is required to contain:&lt;br /&gt;
:* A GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element (this is common with still imaging) &lt;br /&gt;
:* If HW accelerated codecs are supported, GStreamer elements that wrap the codecs&lt;br /&gt;
:* If HW accelerated filters are supported (such as video scaler, rotation engines, color conversion engines), GStreamer elements that wrap the filters&lt;br /&gt;
:* A GStreamer video sink element that offers the GStreamer X Overlay Interface. Note that if the XVideo extension is supported on the X Server side, the xvimagesink element can be used as the video sink element and no new elements are needed.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the video imaging HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering video content to external displays, the Resource Manager component may be used to coordinate the video/display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Communications Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo communications services architecture, see [http://meego.com/developers/meego-architecture/comms-services Comms Services].&lt;br /&gt;
&lt;br /&gt;
==== Cellular ====&lt;br /&gt;
&lt;br /&gt;
The cellular telephony architecture in MeeGo is centered on the oFono, PulseAudio, and Telepathy frameworks. In addition, the Resource Manager plays a role in coordinating the device behavior during voice calls.&lt;br /&gt;
&lt;br /&gt;
The cellular modem HW adaptation SW must implement the following interfaces towards the MeeGo OS:&lt;br /&gt;
:* oFono modem plugin/driver API&lt;br /&gt;
:* Linux network interface for the Linux TCP/IP stack (for data communications)&lt;br /&gt;
:* Relevant PulseAudio plugin interfaces for cellular voice call audio handling&lt;br /&gt;
&lt;br /&gt;
For more detailed information about the oFono APIs, see the documentation and source code available at [http://git.kernel.org/?p=network/ofono/ofono.git;a=summary oFono git].&lt;br /&gt;
&lt;br /&gt;
==== USB ====&lt;br /&gt;
&lt;br /&gt;
The foundation of MeeGo USB functionality is the standard Linux USB subsystem. The Linux USB subsystem defines the USB related HW adaptation interfaces that need to be supported in MeeGo. In practice, these are kernel side interfaces between the generic USB functionality and a HW dependent USB host controller driver.&lt;br /&gt;
&lt;br /&gt;
==== WLAN ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo WLAN architecture is centered on the [http://linuxwireless.org/ Linux wireless] (IEEE-802.11) subsystem. The Linux wireless SW stack defines the WLAN HW adaptation SW interfaces that need to be used in MeeGo. In practice, the required interfaces are defined by cfg80211 for FullMAC WLAN devices and by mac80211 for SoftMAC WLAN devices. In addition, a Linux network interface needs to be supported towards the Linux TCP/IP stack.&lt;br /&gt;
&lt;br /&gt;
==== Bluetooth ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Bluetooth architecture is centered on the [http://www.bluez.org/ BlueZ] SW stack. The BlueZ SW stack defines the Bluetooth HW adaptation SW interfaces that need to be used in MeeGo. In practice, these are Linux kernel side interfaces between the generic HCI (Host Controller Interface) core and a HW specific HCI driver.&lt;br /&gt;
&lt;br /&gt;
=== Location Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The MeeGo location architecture is based on [http://http://labs.trolltech.com/page/Projects/QtMobility| QtMobility Location API].  The QtMobility 1.0 Location API provides geographic coordinates only.  The QtMobility 1.1 Location API provides geocoding and reverse geocoding, POI search, navigation, and mapping.  The 1.0 Location API is available in MeeGo 1.1.  The 1.1 or later Location API will be available in MeeGo 1.2.  The Location API uses a plugin system for implementations of the underlying backend.  MeeGo compliance requirements require support for the QtMobility Location API and thus require one or more plugins to support these APIs.  MeeGo places no restrictions as to how the plugins are implemented, however. Adaptation to location related HW may be done by manufacturers or service providers and the way how it's done is not defined by the API.&lt;br /&gt;
&lt;br /&gt;
MeeGo will use [http://www.freedesktop.org/wiki/Software/GeoClue GeoClue] as the reference location framework and the reference implementation of the Qt Mobility location API backend will be written on top of GeoClue. GeoClue defines a set of (D-Bus) APIs for accessing location services provided by service providers implemented as D-Bus services. In addition, GeoClue includes a set of service provider implementations and (at the time of this writing) an experimental master service provider that can act as a proxy between clients and the actual service providers. If a device vendor wants to take advantage of this existing functionality, the vendor can implement their location services &amp;quot;behind&amp;quot; the GeoClue APIs as GeoClue service providers. In such a case, adaptation to the location related HW would happen inside the service providers as defined by the service provider designs.&lt;br /&gt;
&lt;br /&gt;
=== Sensor Adaptation === &lt;br /&gt;
&lt;br /&gt;
The key component in the MeeGo sensor handling architecture is the Sensor Framework. The Sensor Framework uses both HW independent logical sensor plugins and HW dependent sensor adaptor plugins in its operation. The required sensor HW adaptation interfaces in MeeGo are the interfaces that the Sensor Framework and the logical sensor plugins define for the sensor adaptor plugins to implement. The sensor adaptor plugins typically communicate directly with sensor HW drivers in the Linux kernel. The interfaces that the sensor HW drivers expose to the user space are not defined by MeeGo. Sensor HW adaptation in MeeGo thus consists of adaptor plugins in the Sensor Framework and sensor HW drivers in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Note that thermal sensors are handled in a different manner as described in the [[#Power and thermal management|''Power and thermal management'']] section above.&lt;br /&gt;
&lt;br /&gt;
=== Input Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Touch ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the touch input handling path in MeeGo are the touch HW device driver, Linux kernel input subsystem, X server, X input driver, Qt and finally the MeeGo Touch Framework. Enabling touch support for some new HW requires at least the implementation of the corresponding touch HW device driver in the Linux kernel. If this driver communicates touch events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, basically the existing functionality in X server (e.g. evdev input driver) and above can be used as such. In case the kernel-to-user-space interface is non-standard, it is also possible to implement a new X input driver as a part of the touch HW adaptation.&lt;br /&gt;
&lt;br /&gt;
Multi-touch support in X requires a new version, 2.1, of the [http://cgit.freedesktop.org/~whot/inputproto/tree/XI2proto.txt?h=multitouch X Input Extension] and this also requires support from the client side, in this case Qt's multi-touch support. Once this support has been implemented throughout the SW stack, including X evdev input driver, supporting multi-touch for some new HW should require only the implementation of a touch HW device driver that implements the standard Linux multi-touch interface. This should be the case in MeeGo 1.2. &lt;br /&gt;
&lt;br /&gt;
Before 1.2, multi-touch support in MeeGo uses a special X input driver (mtev), X server multi-pointer support (MPX) and Qt multi-touch support written on top of MPX. This solution requires the touch HW device driver to expose a user-space interface that is compatible with mtev.&lt;br /&gt;
&lt;br /&gt;
==== HW keyboard ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the HW keyboard input handling path in MeeGo are the keyboard HW device driver, Linux kernel input subsystem, X server, X input driver and Qt. Enabling keyboard support for some new HW requires typically only the implementation of the corresponding keyboard HW device driver in the Linux kernel. If this driver communicates key events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, the existing functionality in X server (e.g. evdev input driver) and above should work as such. In case the kernel-to-user space interface is non-standard, it is also possible to implement a new X input driver as a part of the keyboard HW adaptation.&lt;br /&gt;
&lt;br /&gt;
==== Buttons and switches ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo includes the MCE and System SW Qt API (QmSystem) components. The MCE can be used to control the device mode and it listens to power button events and e.g. device open/close switch events via the respective device driver interfaces. The System SW Qt API on the other hand provides a Qt API to various system information, including events from various physical buttons in the device (e.g. volume button, camera button). The System SW Qt API gets the button events either by listening to the relevant device driver interfaces or through the MCE component.&lt;br /&gt;
&lt;br /&gt;
Both the MCE and the System SW Qt API components can be adapted to new devices by device vendors.&lt;br /&gt;
&lt;br /&gt;
=== Haptics and Vibra Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Haptics ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Touch Framework present (at least) in the MeeGo handset device category contains a component called Feedback Framework (meegotouch-feedback) that handles the creation of auditory and/or haptic feedback to touch events. The haptic feedback can be created e.g. with vibra motors or piezo elements. In the Feedback Framework, the different types of feedback are created by backend libraries implemented as plugins. &lt;br /&gt;
&lt;br /&gt;
The haptics related HW adaptation interface from MeeGo OS perspective is the backend plugin interface defined by the Feedback Framework. The plugins can then communicate with the HW either through some device driver interface or some intermediate SW layers (MeeGo places no restrictions as to how the plugins are implemented).&lt;br /&gt;
&lt;br /&gt;
==== Vibra (notifications/alerts) ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo (at least the handset category) will include a component called Non-Graphical Feedback Framework (NGF). This component offers the capability of playing e.g. audio, vibra or led as an indication of events such as incoming call/message, clock and calendar alarms, missed calls, unread messages etc. The NGF also integrates with the Resource Policy to decide about the available playback resources based on policy rules and the current system state.&lt;br /&gt;
&lt;br /&gt;
The actual playback of the different types of notifications is handled by NGF plugins that can be created by device vendors. The plugins communicate with the relevant HW as they see best, e.g. directly through some device driver interface or via some intermediate user space SW components. The plugin interfaces defined by NGF thus form the notification/alert vibra adaptation interface in MeeGo.&lt;br /&gt;
&lt;br /&gt;
=== Production Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Production deals with areas such as flashing, testing, tuning and certification. The current understanding is that these areas are handled in a vendor specific manner, including the adaptation.&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Noel</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/MeeGo_Porting_Guide</id>
		<title>MeeGo Porting Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/MeeGo_Porting_Guide"/>
				<updated>2011-06-24T23:15:20Z</updated>
		
		<summary type="html">&lt;p&gt;Noel: /* Cellular */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The goal of MeeGo Porting Guide (MPG) is to provide valuable information and instructions to people who want to run MeeGo OS on their (new) HW and eventually create products based on the MeeGo OS. The MPG starts with an overview of the porting process, tools, and other related background information and then moves on to describing what the porting actually means in individual technical/functional areas.&lt;br /&gt;
&lt;br /&gt;
The porting guide is not strictly tied to any particular MeeGo OS version or device category. Instead, it tries to be general enough to cover the different device categories, as well as follow changes introduced in new MeeGo OS versions.&lt;br /&gt;
&lt;br /&gt;
Detailed porting information in the different technical areas is dependent on the respective [http://meego.com/developers/meego-architecture MeeGo architecture]. In some cases, this architecture may still be open and this is noted in the applicable sections.&lt;br /&gt;
&lt;br /&gt;
=== Feedback ===&lt;br /&gt;
&lt;br /&gt;
Contribution to these pages is open. Any MeeGo community member is free to ''improve'' these pages at any time. You can also leave feedback in the [http://lists.meego.com/listinfo/meego-porting MeeGo porting mailing list].&lt;br /&gt;
&lt;br /&gt;
== General porting information/guidelines ==&lt;br /&gt;
&lt;br /&gt;
=== MeeGo compliance ===&lt;br /&gt;
&lt;br /&gt;
Perhaps the most important piece of background information related to the MPG are the [[Quality/Compliance|MeeGo compliance requirements]]. A device that is meant to be MeeGo compliant will need to fulfill the requirements listed in the MeeGo compliance specification for the applicable device category (the first version of the specification is supposed to be available in October 2010). In short, a MeeGo compliant device will need to:&lt;br /&gt;
* Meet the minimum HW performance and component requirements for the applicable device category&lt;br /&gt;
* Include all SW components that form the MeeGo core OS&lt;br /&gt;
* Include the additional SW components required to be present in devices in the applicable device category&lt;br /&gt;
* Not break the API/ABI of any of the components coming from MeeGo&lt;br /&gt;
* Follow the MeeGo SW packaging conventions&lt;br /&gt;
&lt;br /&gt;
The compliance rules will also specify CPU architecture specific requirements concerning how MeeGo OS itself and MeeGo applications are to be compiled to different environments (instruction set used, compiler version, compiler options, etc.).&lt;br /&gt;
&lt;br /&gt;
A device vendor may include additional functionality, HW components and SW components in their devices, as long as they don't break MeeGo compliance. The vendor can also patch MeeGo OS components, if the patches don't break MeeGo compliance. A device vendor's own SW components can be either open source or closed source components, as long as they adhere to the rules set by the applicable SW licenses.&lt;br /&gt;
&lt;br /&gt;
From the MeeGo Porting Guide perspective, by defining the SW components and HW components that need to be present, the compliance requirements effectively define the minimum set of porting tasks required from a device vendor and what SW components are involved from MeeGo OS side.&lt;br /&gt;
&lt;br /&gt;
=== Porting process and tools ===&lt;br /&gt;
&lt;br /&gt;
==== Overview ====&lt;br /&gt;
&lt;br /&gt;
As long as a vendor's device is MeeGo compliant, as defined above, it is basically up to the vendor to decide how they build the SW that ends up in the device. The vendor may use their own build machinery or set up an OBS build system that is also used in MeeGo. Regardless of what the vendor's build system is, it needs to integrate with the MeeGo build infrastructure, at least to fetch the MeeGo source packages for the builds, as well as build each MeeGo component in the same way as it would be built in the MeeGo build system (such as with the same compiler and compiler options). Whatever the case, the intention in MeeGo is to use and offer an open toolset that any HW or SW vendor can use for efficient SW creation. It is likely that using the same toolset as MeeGo, will offer the easiest way to integrate vendor's own build system with the the MeeGo build infrastructure.&lt;br /&gt;
&lt;br /&gt;
The key ingredients of the MeeGo build infrastructure and toolset are:&lt;br /&gt;
* [http://meego.gitorious.org MeeGo Gitorious]&lt;br /&gt;
** A version control system for the source files of various MeeGo specific SW components and tools&lt;br /&gt;
* [http://build.meego.com MeeGo OBS]&lt;br /&gt;
** The build system that is used to build MeeGo packages (RPMs) from their sources&lt;br /&gt;
* [http://repo.meego.com MeeGo Repository]&lt;br /&gt;
** The place where the built MeeGo releases, that is where MeeGo packages and images are stored&lt;br /&gt;
* [http://wiki.meego.com/Image_Creation MeeGo Image Creator]&lt;br /&gt;
** The tool used to build MeeGo images that can be installed/flashed on HW&lt;br /&gt;
* MeeGo release tools&lt;br /&gt;
** Tools such as BOSS and REVS that are used in the creation of the MeeGo releases under repo.meego.com&lt;br /&gt;
&lt;br /&gt;
For additional information, see [[Build Infrastructure]], [[Release Infrastructure]] and [[Release Engineering]].&lt;br /&gt;
&lt;br /&gt;
For another overview of the MeeGo porting process, see [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process].&lt;br /&gt;
&lt;br /&gt;
==== Vendor's own OBS ====&lt;br /&gt;
&lt;br /&gt;
So, ultimately, when creating actual products running the MeeGo OS, the vendor may end up setting up their own OBS build system. Setting up your own OBS system may also be beneficial in earlier HW/product development phases, as it offers a flexible way to modify and build MeeGo OS to test it on the new HW. The vendor's own OBS system can link to the MeeGo OBS for handling packages that come directly from MeeGo and it can link to other sources for handling, such as closed source packages that are specific to the vendor. See [[Release_Engineering/Process#Making a product out of MeeGo Release|an overview picture of this setup]].&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Sets up their own OBS system&lt;br /&gt;
** [[User:Stskeeps/10_easy_steps_to_a_local_OBS|Instructions related to setting up an OBS system]],  [[Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE112|OBS Applicances]] [http://en.opensuse.org/openSUSE:Build_Service_private_instance Open Suse OBS Wiki].&lt;br /&gt;
* Creates projects under the their own OBS for their own components&lt;br /&gt;
* Links their own OBS to the MeeGo OBS for MeeGo components&lt;br /&gt;
* May have trial patches to MeeGo components in their own OBS&lt;br /&gt;
** NOTE. Eventually all patches to MeeGo components required in a final MeeGo based product ''should'' be pushed to MeeGo.com. However, this is not an absolute must requirement, as long as the MeeGo compliance requirements and applicable SW license rules are fulfilled. &lt;br /&gt;
** See [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below&lt;br /&gt;
* Needs to set up the necessary machinery to create releases and images from the packages built with OBS&lt;br /&gt;
** This machinery can be based on the toolset used in MeeGo (see above)&lt;br /&gt;
&lt;br /&gt;
==== Working under MeeGo.com ====&lt;br /&gt;
&lt;br /&gt;
Another way of porting MeeGo to some new HW is to get the new HW accepted as one MeeGo reference HW and have the MeeGo build machinery create builds for the reference HW as a part of the normal MeeGo release building cycle (see [[Release Engineering/Release Timeline|Release Timeline]] and [[Release Engineering/Process|Release Process]]). This setup can also include QA support for the reference HW on the MeeGo side (see [[Quality]]). At the time of this writing, the actual process of getting new reference HW to MeeGo is still somewhat unclear. In any case, this model requires active participation from the vendor in MeeGo work in general and especially in supporting their reference HW in MeeGo.&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Creates a device/platform development project under the MeeGo OBS for their components. The open source components would then get submitted to MeeGo Trunk:Testing and get reviewed like any other MeeGo component for inclusion.&lt;br /&gt;
** Note that it is also possible to have closed source binary components in the MeeGo OBS to be included in the MeeGo builds for some reference HW. These are submitted to the Trunk:non-oss repository. Licensing is usually required to at least include redistributability, as the components cannot be mirrored from or hosted at repo.meego.com otherwise. It is not possible to have components within Trunk:Testing require closed source dependencies.&lt;br /&gt;
* Pushes patches to other MeeGo components at MeeGo.com as necessary (see [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below)&lt;br /&gt;
* Creates (or supports the creation of) a MIC kickstart file for building images for their reference HW&lt;br /&gt;
* As necessary, supports adding support for their reference HW and SW components in the MeeGo build and release infrastructure tools&lt;br /&gt;
&lt;br /&gt;
==== Trials ====&lt;br /&gt;
&lt;br /&gt;
A lightweight but also more limited &amp;quot;try it out&amp;quot; alternative to the above processes is discussed below.&lt;br /&gt;
&lt;br /&gt;
===== Initial bring-up attempt =====&lt;br /&gt;
&lt;br /&gt;
* Grab the already built root filesystem / image for a MeeGo reference device that's the closest to your target. For ARMv7, this is typically the Nokia N900 handset image. For Atom, this could be netbook image or handset image.&lt;br /&gt;
* Build a Linux kernel for your device and install the modules into /lib/modules.&lt;br /&gt;
* Boot the root filesystem and modify the configuration and drop in components to bring up the device to UX. Note down the things you had to modify or add, as this will be input for your porting work.&lt;br /&gt;
&lt;br /&gt;
===== Building your first image =====&lt;br /&gt;
&lt;br /&gt;
The second step to a proper hardware adaptation is making sure you can build your own image. Because we based our work before on a reference device image, it makes sense to try to build this image first. MeeGo images are constructed on the basis of so called 'kickstart files', which describe the intended contents of an image. &lt;br /&gt;
&lt;br /&gt;
* Install the MeeGo Image Creator tool (MIC)&lt;br /&gt;
* Download the kickstart file (.ks) from the same directory you found your reference device image. &lt;br /&gt;
* Create a image using mic-image-creator (should be elaborated).&lt;br /&gt;
* Test out your freshly baked image as in the previous step.&lt;br /&gt;
&lt;br /&gt;
===== Building your port's first reproduciable image =====&lt;br /&gt;
&lt;br /&gt;
* Download the MeeGo kernel, possibly modifying the kernel with additional patches (including new device drivers) and building the kernel (see [[#Getting_new_chipset_support_to_the_MeeGo_kernel|''Getting new chipset support to the MeeGo kernel'']] below). &lt;br /&gt;
* Add the repository containing your kernel package to the kickstart file (to be elaborated)&lt;br /&gt;
* Remove parts of the kickstart file specific to the reference device.&lt;br /&gt;
* Add a mention of your kernel package in the %packages section.&lt;br /&gt;
* Build packages or include shell scripts in %post section of kickstart file that adds/modifies configuration fitting your device.&lt;br /&gt;
&lt;br /&gt;
A detailed description of a variation of this model can be found from [[ARM/Meego on Beagleboard from scratch|here]] (Better description needed).&lt;br /&gt;
&lt;br /&gt;
==== Getting new chipset support to the MeeGo kernel ====&lt;br /&gt;
&lt;br /&gt;
See [[How-to: getting new chipset support to the MeeGo kernel]] for more detailed information about how to work with the MeeGo kernel and make it support new HW.&lt;br /&gt;
&lt;br /&gt;
=== Upstream projects, MeeGo, products, and patches ===&lt;br /&gt;
&lt;br /&gt;
When building a product based on MeeGo, the product vendor will typically augment the MeeGo OS with their own SW components, as well as make fixes and adjustments to the MeeGo OS code (in the limits set by the compliance rules). While vendors can manage their own SW components as they wish, the strong preference is that any changes made to the MeeGo OS SW components are delivered as patches primarily to the respective upstream projects or secondarily to MeeGo.com. In this way, vendors can relieve themselves of the burden of managing a potentially big patch set on top of MeeGo OS, and also verify the quality and safety of their patches. Having the patches in upstream projects again lessens the patch set management load at MeeGo.com.&lt;br /&gt;
&lt;br /&gt;
For information about pushing patches to MeeGo, see [http://meego.com/about/contribution-guidelines Contribution Guidelines] and [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process] (especially section ''How Do Patches Get Integrated and Accepted?'') and [http://meego.gitorious.org/meego-os-base/kernel-source/blobs/master/README.workflow Kernel workflow].&lt;br /&gt;
&lt;br /&gt;
=== Adaptation subsystems and interfaces ===&lt;br /&gt;
&lt;br /&gt;
In the MeeGo architecture model (see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view MeeGo Architecture Domain View]), adaptation is represented as adaptation subsystems. SW components in the adaptation subsystem ''realizations'' do things that are expected by the OS and communicate with the OS through interfaces defined by the OS.&lt;br /&gt;
 &lt;br /&gt;
The key goal in the sections below is to identify the interface(s) that the adaptation SW needs to implement/use to communicate with the OS in the required manner. Behind these interfaces, the adaptation SW can basically handle the required functionality as it sees best. In some cases, however, there may also be some preferred way of implementing the adaptation.&lt;br /&gt;
&lt;br /&gt;
In some areas, the adaptation work may consist of just writing a suitable Linux device driver for the HW in question. In some other areas, the adaptation work may consist of writing one or more device drivers, as well as one or more user space components (such as plugins to some user space SW frameworks). Various configuration file changes may also be required as a part of the adaptation work.&lt;br /&gt;
&lt;br /&gt;
== Porting by adaptation subsystems ==&lt;br /&gt;
&lt;br /&gt;
=== System Core Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Boot ====&lt;br /&gt;
&lt;br /&gt;
MeeGo places no restrictions as to what SW components are used to handle the pre-OS boot phases in a MeeGo compliant device. Thus, vendors are free to choose, for example, the boot loader, as they see fit. Note, however, that full use of the MeeGo platform security requires that the pre-OS boot phases form a trusted boot chain that ultimately builds on chipset-level security support.&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, MeeGo does not define anything special with regard to what information the boot loader is expected to pass to the Linux kernel, such as via the kernel command line.&lt;br /&gt;
&lt;br /&gt;
The kernel-level boot phases can be tailored, as necessary, to the specific CPU, chipset, or device in a standard Linux manner.&lt;br /&gt;
&lt;br /&gt;
The post-kernel boot phases (startup scripts) can be tailored by device vendors as necessary for their devices in the limits set by MeeGo compliance requirements (certain SW components need to be present in the system).&lt;br /&gt;
&lt;br /&gt;
==== Kernel fundamentals ====&lt;br /&gt;
&lt;br /&gt;
Regarding the Linux kernel, each MeeGo release defines the kernel version to be used and a set of patches on top of that. In addition, the Linux kernel used in MeeGo compliant devices is assumed to have been built with a set of fixed build-time configuration values that are not allowed to be changed. In addition to the fixed values, device vendors can define other kernel configuration values, as required by their devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo does not place any special requirements concerning how the boot loader passes information to the kernel or how the HW configuration and initialization of the system is handled.&lt;br /&gt;
&lt;br /&gt;
CPU, chipset (SoC), and device vendors are assumed to implement the elementary CPU architecture/chipset/device support for the Linux kernel used in MeeGo in a standard Linux manner. This includes:&lt;br /&gt;
* HW (board) configuration&lt;br /&gt;
* Mapping the fundamental Linux kernel functionality (such as IRQ, DMA, GPIO, RTC and memory handling) to the HW in question&lt;br /&gt;
* Creation/modification of the necessary device drivers to support the core SoC interfaces (such as I2C, SPI, SDIO)&lt;br /&gt;
* Permanent memory support&lt;br /&gt;
* Debugging and tracing support&lt;br /&gt;
&lt;br /&gt;
==== Power and thermal management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, the understanding is that MeeGo in general relies on established Linux kernel frameworks and APIs for power management. Some of these frameworks and APIs may be applicable only in certain CPU architectures. In addition, the HW capabilities related to power management may vary between different HW platforms potentially meaning that the SW is assumed perform somewhat different tasks in different environments.&lt;br /&gt;
&lt;br /&gt;
The Linux power management frameworks and APIs include:&lt;br /&gt;
* CPU frequency control (support for the different voltage and frequency operating points) via the cpufreq infrastructure&lt;br /&gt;
* CPU idle state management (different levels of sleep) through the cpuidle infrastructure&lt;br /&gt;
* Clock management through the clock framework&lt;br /&gt;
* Suspend/resume&lt;br /&gt;
* Runtime power management&lt;br /&gt;
* HW voltage/current regulator control via the regulator framework&lt;br /&gt;
* PM_QOS (power management quality of service) framework for making and listening to PM QoS requests&lt;br /&gt;
&lt;br /&gt;
Whether MeeGo will have some user space SW components or framework related to power management is under discussion at the time of this writing.&lt;br /&gt;
&lt;br /&gt;
In the thermal management area, the Device State Management Entity (DSME) component in the Device Health subsystem is supposed to make thermal state management decisions in the system. The DSME has a thermal manager module that again uses other DSME modules (thermal objects) to access the actual thermal sensor information in the HW. To port this functionality to new HW, one or more DSME thermal object modules need to be implemented.&lt;br /&gt;
&lt;br /&gt;
The APIs that the thermal object modules use to access the thermal sensor information are not strictly defined by MeeGo. At device driver level, however, the preferred approach is to use standard Linux interfaces such as the generic thermal sysfs API or the hwmon sysfs API.&lt;br /&gt;
&lt;br /&gt;
==== Energy management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, basically the only thing that MeeGo requires from HW adaptation in the energy management area (battery charging and monitoring) is support for the Linux power supply sysfs class. Additional energy management related functionality can be handled in a vendor specific manner.&lt;br /&gt;
&lt;br /&gt;
==== Device state ====&lt;br /&gt;
&lt;br /&gt;
The DSME component participates in device state management, such as by managing device run level, reboot, and shutdown, by monitoring the device thermal state, and shutting down the device in fatal thermal conditions, and by handling HW watchdog kicking activity.&lt;br /&gt;
&lt;br /&gt;
In a new HW environment, the DSME needs to be adapted to handle the watchdog kicking through the right device driver interfaces and at the right intervals. In addition, to port the DSME thermal management functionality to new HW, one or more DSME thermal object modules need to be implemented as described above, in the [[#Power_and_thermal_management|''Power and thermal management'']] section.&lt;br /&gt;
&lt;br /&gt;
=== Security Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Work is ongoing in bringing platform security functionality to the MeeGo OS based on the Mandatory Access Control (MAC), Integrity Measurement Architecture (IMA) and Extended Verification Module (EVM) technologies in the Linux kernel. Maximum security can be reached if the MeeGo platform security functionality can rely on trusted platform support &amp;quot;below&amp;quot; the Linux kernel, effectively in the HW and the boot loader(s). MeeGo, however, places no strict requirements as to how the trusted platform support is implemented in MeeGo based devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo also includes the OpenSSL open source toolkit implementing general purpose cryptography functionality. Algorithms and operations supported by the OpenSSL toolkit can be accelerated in HW by using the OpenSSL engine architecture. OpenSSL also supports a cryptodev engine that uses crypto algorithms implemented in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Some devices may have a security watchdog in the HW that needs &amp;quot;kicking&amp;quot; at regular intervals to keep the device up and running. In MeeGo, watchdog kicking functionality is implemented in the Device State Management Entity (DSME) component. If security watchdog kicking is needed, the DSME needs to be adapted to handle that through the right device driver interface and at the right intervals.&lt;br /&gt;
&lt;br /&gt;
=== Device Mode Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Resource Policy ====&lt;br /&gt;
&lt;br /&gt;
The Resource (Policy) Manager component in the Device Health subsystem offers a generic framework for:&lt;br /&gt;
* Monitoring device and application events&lt;br /&gt;
* Managing policies that specify rules about what should happen in the device when certain events occur&lt;br /&gt;
* Making policy decisions when events occur (determining the needed changes in the device)&lt;br /&gt;
* Enforcing changes in the system through policy enforcement points&lt;br /&gt;
&lt;br /&gt;
The Resource Manager can be used, for example, to change the audio routing in the device, when the user attaches a wired headset to the device.&lt;br /&gt;
&lt;br /&gt;
Event listening and change enforcement in the Resource Manager happens through plugin modules. Using the MeeGo OS in some new device effectively involves creating suitable Resource Manager policies and writing the necessary plugins for listening device/application events and changing device behavior accordingly. Though not pure HW adaptation, this can be considered a form of MeeGo OS &amp;quot;device adaptation&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Mode Control Entity (MCE) ====&lt;br /&gt;
&lt;br /&gt;
The MCE component (starting from MeeGo 1.2) can be used to listen to events that have an impact to the device mode (such as touch screen locked vs. unlocked) and change the device mode accordingly. The MCE is used, for example, to: &lt;br /&gt;
* Listen to various keys and switches in the device (such as power key, volume key, camera button, slider switch)&lt;br /&gt;
* Control LEDs&lt;br /&gt;
* Enabling/disabling touch screen or HW keyboard, depending on device state&lt;br /&gt;
* Control keyboard backlight&lt;br /&gt;
* Control display state (on/off) and brightness&lt;br /&gt;
&lt;br /&gt;
The MCE has its own plugin architecture that can be used to adapt it to different HW environments.&lt;br /&gt;
&lt;br /&gt;
=== Display and Graphics Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo visual services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view]. &lt;br /&gt;
&lt;br /&gt;
The key ingredients of the display and graphics architecture in MeeGo are the X Window System (X Server with its extensions) and the Khronos graphics APIs (OpenGL ES, OpenVG, and EGL with their extensions).&lt;br /&gt;
&lt;br /&gt;
The display and graphics HW adaptation SW needs to enable the X Window System and the Khronos APIs to function on the device HW. In practice, the adaptation SW needs to have an X display/video driver (hosted inside the X Server) and libraries that implement the Khronos graphics APIs, both supporting the features and functionality required by MeeGo. Also, some configuration file changes may be needed. Any additional user space and kernel space components needed for the HW adaptation are implementation dependent.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering display content to external displays, the Resource Manager component may be used to coordinate the display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Audio Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The audio architecture in MeeGo is centered around the GStreamer and PulseAudio frameworks. In addition, the Resource Manager plays a role in coordinating the audio related behavior of the device (audio routings). The audio HW adaptation SW needs to provide GStreamer elements and PulseAudio plugins that enable the GStreamer and PulseAudio client interfaces used, for example, for audio playback, recording, and volume control to work on the device. Typical required components include, for example, codec elements for GStreamer and sink/source plugins for PulseAudio.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer and PulseAudio plugins, the audio HW adaptation SW can be implemented with different technologies and APIs, including ALSA and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework, as needed. Use of the ALSA framework and APIs is encouraged, however, as they allow significant reuse of components and functionality on the PulseAudio level and are already a part of the upstream Linux kernel. If ALSA is not used to implement the kernel side parts of the audio adaptation, the solution that is used instead should still be aligned with the upstream Linux kernel.&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo media services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view].&lt;br /&gt;
&lt;br /&gt;
=== Camera Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo still imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework and the CameraBin GStreamer element. The still imaging HW adaptation SW is required to contain a GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element. Thus, the required HW adaptation interfaces are the relevant GStreamer plugin interfaces and especially the interfaces expected by the CameraBin element, in particular the GstPhotography interface.&lt;br /&gt;
&lt;br /&gt;
If HW accelerated encoders are supported, they should be also offered to the system as GStreamer elements.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
=== Video and Imaging Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo video imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework, the CameraBin GStreamer element (video recording) and the Playbin2 GStreamer element (video playback). The video imaging HW adaptation SW is required to contain:&lt;br /&gt;
:* A GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element (this is common with still imaging) &lt;br /&gt;
:* If HW accelerated codecs are supported, GStreamer elements that wrap the codecs&lt;br /&gt;
:* If HW accelerated filters are supported (such as video scaler, rotation engines, color conversion engines), GStreamer elements that wrap the filters&lt;br /&gt;
:* A GStreamer video sink element that offers the GStreamer X Overlay Interface. Note that if the XVideo extension is supported on the X Server side, the xvimagesink element can be used as the video sink element and no new elements are needed.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the video imaging HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering video content to external displays, the Resource Manager component may be used to coordinate the video/display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Communications Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo communications services architecture, see [http://meego.com/developers/meego-architecture/comms-services Comms Services].&lt;br /&gt;
&lt;br /&gt;
==== Cellular ====&lt;br /&gt;
&lt;br /&gt;
The cellular telephony architecture in MeeGo is centered on the oFono, PulseAudio, and Telepathy frameworks. In addition, the Resource Manager plays a role in coordinating the device behavior during voice calls.&lt;br /&gt;
&lt;br /&gt;
The cellular modem HW adaptation SW must implement the following interfaces towards the MeeGo OS:&lt;br /&gt;
:* oFono modem plugin/driver API&lt;br /&gt;
:* Linux network interface for the Linux TCP/IP stack (for data communications)&lt;br /&gt;
:* Relevant PulseAudio plugin interfaces for cellular voice call audio handling&lt;br /&gt;
&lt;br /&gt;
For more detailed information about the oFono APIs, see the documentation and source code available at [http://git.kernel.org/?p=network/ofono/ofono.git;a=summary oFono git].&lt;br /&gt;
&lt;br /&gt;
==== USB ====&lt;br /&gt;
&lt;br /&gt;
The foundation of the the MeeGo USB functionality is the standard Linux USB subsystem. The Linux USB subsystem defines the USB related HW adaptation interfaces that need to be supported in MeeGo. In practice, these are kernel side interfaces between the generic USB functionality and a HW dependent USB host controller driver.&lt;br /&gt;
&lt;br /&gt;
==== WLAN ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo WLAN architecture is centered on the [http://linuxwireless.org/ Linux wireless] (IEEE-802.11) subsystem. The Linux wireless SW stack defines the WLAN HW adaptation SW interfaces that need to be used in MeeGo. In practice, the required interfaces are defined by cfg80211 for FullMAC WLAN devices and by mac80211 for SoftMAC WLAN devices. In addition, a Linux network interface needs to be supported towards the Linux TCP/IP stack.&lt;br /&gt;
&lt;br /&gt;
==== Bluetooth ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Bluetooth architecture is centered on the [http://www.bluez.org/ BlueZ] SW stack. The BlueZ SW stack defines the Bluetooth HW adaptation SW interfaces that need to be used in MeeGo. In practice, these are Linux kernel side interfaces between the generic HCI (Host Controller Interface) core and a HW specific HCI driver.&lt;br /&gt;
&lt;br /&gt;
=== Location Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The MeeGo location architecture is based on [http://http://labs.trolltech.com/page/Projects/QtMobility| QtMobility Location API].  The QtMobility 1.0 Location API provides geographic coordinates only.  The QtMobility 1.1 Location API provides geocoding and reverse geocoding, POI search, navigation, and mapping.  The 1.0 Location API is available in MeeGo 1.1.  The 1.1 or later Location API will be available in MeeGo 1.2.  The Location API uses a plugin system for implementations of the underlying backend.  MeeGo compliance requirements require support for the QtMobility Location API and thus require one or more plugins to support these APIs.  MeeGo places no restrictions as to how the plugins are implemented, however. Adaptation to location related HW may be done by manufacturers or service providers and the way how it's done is not defined by the API.&lt;br /&gt;
&lt;br /&gt;
MeeGo will use [http://www.freedesktop.org/wiki/Software/GeoClue GeoClue] as the reference location framework and the reference implementation of the Qt Mobility location API backend will be written on top of GeoClue. GeoClue defines a set of (D-Bus) APIs for accessing location services provided by service providers implemented as D-Bus services. In addition, GeoClue includes a set of service provider implementations and (at the time of this writing) an experimental master service provider that can act as a proxy between clients and the actual service providers. If a device vendor wants to take advantage of this existing functionality, the vendor can implement their location services &amp;quot;behind&amp;quot; the GeoClue APIs as GeoClue service providers. In such a case, adaptation to the location related HW would happen inside the service providers as defined by the service provider designs.&lt;br /&gt;
&lt;br /&gt;
=== Sensor Adaptation === &lt;br /&gt;
&lt;br /&gt;
The key component in the MeeGo sensor handling architecture is the Sensor Framework. The Sensor Framework uses both HW independent logical sensor plugins and HW dependent sensor adaptor plugins in its operation. The required sensor HW adaptation interfaces in MeeGo are the interfaces that the Sensor Framework and the logical sensor plugins define for the sensor adaptor plugins to implement. The sensor adaptor plugins typically communicate directly with sensor HW drivers in the Linux kernel. The interfaces that the sensor HW drivers expose to the user space are not defined by MeeGo. Sensor HW adaptation in MeeGo thus consists of adaptor plugins in the Sensor Framework and sensor HW drivers in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Note that thermal sensors are handled in a different manner as described in the [[#Power and thermal management|''Power and thermal management'']] section above.&lt;br /&gt;
&lt;br /&gt;
=== Input Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Touch ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the touch input handling path in MeeGo are the touch HW device driver, Linux kernel input subsystem, X server, X input driver, Qt and finally the MeeGo Touch Framework. Enabling touch support for some new HW requires at least the implementation of the corresponding touch HW device driver in the Linux kernel. If this driver communicates touch events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, basically the existing functionality in X server (e.g. evdev input driver) and above can be used as such. In case the kernel-to-user-space interface is non-standard, it is also possible to implement a new X input driver as a part of the touch HW adaptation.&lt;br /&gt;
&lt;br /&gt;
Multi-touch support in X requires a new version, 2.1, of the [http://cgit.freedesktop.org/~whot/inputproto/tree/XI2proto.txt?h=multitouch X Input Extension] and this also requires support from the client side, in this case Qt's multi-touch support. Once this support has been implemented throughout the SW stack, including X evdev input driver, supporting multi-touch for some new HW should require only the implementation of a touch HW device driver that implements the standard Linux multi-touch interface. This should be the case in MeeGo 1.2. &lt;br /&gt;
&lt;br /&gt;
Before 1.2, multi-touch support in MeeGo uses a special X input driver (mtev), X server multi-pointer support (MPX) and Qt multi-touch support written on top of MPX. This solution requires the touch HW device driver to expose a user-space interface that is compatible with mtev.&lt;br /&gt;
&lt;br /&gt;
==== HW keyboard ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the HW keyboard input handling path in MeeGo are the keyboard HW device driver, Linux kernel input subsystem, X server, X input driver and Qt. Enabling keyboard support for some new HW requires typically only the implementation of the corresponding keyboard HW device driver in the Linux kernel. If this driver communicates key events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, the existing functionality in X server (e.g. evdev input driver) and above should work as such. In case the kernel-to-user space interface is non-standard, it is also possible to implement a new X input driver as a part of the keyboard HW adaptation.&lt;br /&gt;
&lt;br /&gt;
==== Buttons and switches ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo includes the MCE and System SW Qt API (QmSystem) components. The MCE can be used to control the device mode and it listens to power button events and e.g. device open/close switch events via the respective device driver interfaces. The System SW Qt API on the other hand provides a Qt API to various system information, including events from various physical buttons in the device (e.g. volume button, camera button). The System SW Qt API gets the button events either by listening to the relevant device driver interfaces or through the MCE component.&lt;br /&gt;
&lt;br /&gt;
Both the MCE and the System SW Qt API components can be adapted to new devices by device vendors.&lt;br /&gt;
&lt;br /&gt;
=== Haptics and Vibra Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Haptics ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Touch Framework present (at least) in the MeeGo handset device category contains a component called Feedback Framework (meegotouch-feedback) that handles the creation of auditory and/or haptic feedback to touch events. The haptic feedback can be created e.g. with vibra motors or piezo elements. In the Feedback Framework, the different types of feedback are created by backend libraries implemented as plugins. &lt;br /&gt;
&lt;br /&gt;
The haptics related HW adaptation interface from MeeGo OS perspective is the backend plugin interface defined by the Feedback Framework. The plugins can then communicate with the HW either through some device driver interface or some intermediate SW layers (MeeGo places no restrictions as to how the plugins are implemented).&lt;br /&gt;
&lt;br /&gt;
==== Vibra (notifications/alerts) ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo (at least the handset category) will include a component called Non-Graphical Feedback Framework (NGF). This component offers the capability of playing e.g. audio, vibra or led as an indication of events such as incoming call/message, clock and calendar alarms, missed calls, unread messages etc. The NGF also integrates with the Resource Policy to decide about the available playback resources based on policy rules and the current system state.&lt;br /&gt;
&lt;br /&gt;
The actual playback of the different types of notifications is handled by NGF plugins that can be created by device vendors. The plugins communicate with the relevant HW as they see best, e.g. directly through some device driver interface or via some intermediate user space SW components. The plugin interfaces defined by NGF thus form the notification/alert vibra adaptation interface in MeeGo.&lt;br /&gt;
&lt;br /&gt;
=== Production Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Production deals with areas such as flashing, testing, tuning and certification. The current understanding is that these areas are handled in a vendor specific manner, including the adaptation.&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Noel</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/MeeGo_Porting_Guide</id>
		<title>MeeGo Porting Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/MeeGo_Porting_Guide"/>
				<updated>2011-06-24T23:14:16Z</updated>
		
		<summary type="html">&lt;p&gt;Noel: /* Video and Imaging Adaptation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The goal of MeeGo Porting Guide (MPG) is to provide valuable information and instructions to people who want to run MeeGo OS on their (new) HW and eventually create products based on the MeeGo OS. The MPG starts with an overview of the porting process, tools, and other related background information and then moves on to describing what the porting actually means in individual technical/functional areas.&lt;br /&gt;
&lt;br /&gt;
The porting guide is not strictly tied to any particular MeeGo OS version or device category. Instead, it tries to be general enough to cover the different device categories, as well as follow changes introduced in new MeeGo OS versions.&lt;br /&gt;
&lt;br /&gt;
Detailed porting information in the different technical areas is dependent on the respective [http://meego.com/developers/meego-architecture MeeGo architecture]. In some cases, this architecture may still be open and this is noted in the applicable sections.&lt;br /&gt;
&lt;br /&gt;
=== Feedback ===&lt;br /&gt;
&lt;br /&gt;
Contribution to these pages is open. Any MeeGo community member is free to ''improve'' these pages at any time. You can also leave feedback in the [http://lists.meego.com/listinfo/meego-porting MeeGo porting mailing list].&lt;br /&gt;
&lt;br /&gt;
== General porting information/guidelines ==&lt;br /&gt;
&lt;br /&gt;
=== MeeGo compliance ===&lt;br /&gt;
&lt;br /&gt;
Perhaps the most important piece of background information related to the MPG are the [[Quality/Compliance|MeeGo compliance requirements]]. A device that is meant to be MeeGo compliant will need to fulfill the requirements listed in the MeeGo compliance specification for the applicable device category (the first version of the specification is supposed to be available in October 2010). In short, a MeeGo compliant device will need to:&lt;br /&gt;
* Meet the minimum HW performance and component requirements for the applicable device category&lt;br /&gt;
* Include all SW components that form the MeeGo core OS&lt;br /&gt;
* Include the additional SW components required to be present in devices in the applicable device category&lt;br /&gt;
* Not break the API/ABI of any of the components coming from MeeGo&lt;br /&gt;
* Follow the MeeGo SW packaging conventions&lt;br /&gt;
&lt;br /&gt;
The compliance rules will also specify CPU architecture specific requirements concerning how MeeGo OS itself and MeeGo applications are to be compiled to different environments (instruction set used, compiler version, compiler options, etc.).&lt;br /&gt;
&lt;br /&gt;
A device vendor may include additional functionality, HW components and SW components in their devices, as long as they don't break MeeGo compliance. The vendor can also patch MeeGo OS components, if the patches don't break MeeGo compliance. A device vendor's own SW components can be either open source or closed source components, as long as they adhere to the rules set by the applicable SW licenses.&lt;br /&gt;
&lt;br /&gt;
From the MeeGo Porting Guide perspective, by defining the SW components and HW components that need to be present, the compliance requirements effectively define the minimum set of porting tasks required from a device vendor and what SW components are involved from MeeGo OS side.&lt;br /&gt;
&lt;br /&gt;
=== Porting process and tools ===&lt;br /&gt;
&lt;br /&gt;
==== Overview ====&lt;br /&gt;
&lt;br /&gt;
As long as a vendor's device is MeeGo compliant, as defined above, it is basically up to the vendor to decide how they build the SW that ends up in the device. The vendor may use their own build machinery or set up an OBS build system that is also used in MeeGo. Regardless of what the vendor's build system is, it needs to integrate with the MeeGo build infrastructure, at least to fetch the MeeGo source packages for the builds, as well as build each MeeGo component in the same way as it would be built in the MeeGo build system (such as with the same compiler and compiler options). Whatever the case, the intention in MeeGo is to use and offer an open toolset that any HW or SW vendor can use for efficient SW creation. It is likely that using the same toolset as MeeGo, will offer the easiest way to integrate vendor's own build system with the the MeeGo build infrastructure.&lt;br /&gt;
&lt;br /&gt;
The key ingredients of the MeeGo build infrastructure and toolset are:&lt;br /&gt;
* [http://meego.gitorious.org MeeGo Gitorious]&lt;br /&gt;
** A version control system for the source files of various MeeGo specific SW components and tools&lt;br /&gt;
* [http://build.meego.com MeeGo OBS]&lt;br /&gt;
** The build system that is used to build MeeGo packages (RPMs) from their sources&lt;br /&gt;
* [http://repo.meego.com MeeGo Repository]&lt;br /&gt;
** The place where the built MeeGo releases, that is where MeeGo packages and images are stored&lt;br /&gt;
* [http://wiki.meego.com/Image_Creation MeeGo Image Creator]&lt;br /&gt;
** The tool used to build MeeGo images that can be installed/flashed on HW&lt;br /&gt;
* MeeGo release tools&lt;br /&gt;
** Tools such as BOSS and REVS that are used in the creation of the MeeGo releases under repo.meego.com&lt;br /&gt;
&lt;br /&gt;
For additional information, see [[Build Infrastructure]], [[Release Infrastructure]] and [[Release Engineering]].&lt;br /&gt;
&lt;br /&gt;
For another overview of the MeeGo porting process, see [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process].&lt;br /&gt;
&lt;br /&gt;
==== Vendor's own OBS ====&lt;br /&gt;
&lt;br /&gt;
So, ultimately, when creating actual products running the MeeGo OS, the vendor may end up setting up their own OBS build system. Setting up your own OBS system may also be beneficial in earlier HW/product development phases, as it offers a flexible way to modify and build MeeGo OS to test it on the new HW. The vendor's own OBS system can link to the MeeGo OBS for handling packages that come directly from MeeGo and it can link to other sources for handling, such as closed source packages that are specific to the vendor. See [[Release_Engineering/Process#Making a product out of MeeGo Release|an overview picture of this setup]].&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Sets up their own OBS system&lt;br /&gt;
** [[User:Stskeeps/10_easy_steps_to_a_local_OBS|Instructions related to setting up an OBS system]],  [[Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE112|OBS Applicances]] [http://en.opensuse.org/openSUSE:Build_Service_private_instance Open Suse OBS Wiki].&lt;br /&gt;
* Creates projects under the their own OBS for their own components&lt;br /&gt;
* Links their own OBS to the MeeGo OBS for MeeGo components&lt;br /&gt;
* May have trial patches to MeeGo components in their own OBS&lt;br /&gt;
** NOTE. Eventually all patches to MeeGo components required in a final MeeGo based product ''should'' be pushed to MeeGo.com. However, this is not an absolute must requirement, as long as the MeeGo compliance requirements and applicable SW license rules are fulfilled. &lt;br /&gt;
** See [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below&lt;br /&gt;
* Needs to set up the necessary machinery to create releases and images from the packages built with OBS&lt;br /&gt;
** This machinery can be based on the toolset used in MeeGo (see above)&lt;br /&gt;
&lt;br /&gt;
==== Working under MeeGo.com ====&lt;br /&gt;
&lt;br /&gt;
Another way of porting MeeGo to some new HW is to get the new HW accepted as one MeeGo reference HW and have the MeeGo build machinery create builds for the reference HW as a part of the normal MeeGo release building cycle (see [[Release Engineering/Release Timeline|Release Timeline]] and [[Release Engineering/Process|Release Process]]). This setup can also include QA support for the reference HW on the MeeGo side (see [[Quality]]). At the time of this writing, the actual process of getting new reference HW to MeeGo is still somewhat unclear. In any case, this model requires active participation from the vendor in MeeGo work in general and especially in supporting their reference HW in MeeGo.&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Creates a device/platform development project under the MeeGo OBS for their components. The open source components would then get submitted to MeeGo Trunk:Testing and get reviewed like any other MeeGo component for inclusion.&lt;br /&gt;
** Note that it is also possible to have closed source binary components in the MeeGo OBS to be included in the MeeGo builds for some reference HW. These are submitted to the Trunk:non-oss repository. Licensing is usually required to at least include redistributability, as the components cannot be mirrored from or hosted at repo.meego.com otherwise. It is not possible to have components within Trunk:Testing require closed source dependencies.&lt;br /&gt;
* Pushes patches to other MeeGo components at MeeGo.com as necessary (see [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below)&lt;br /&gt;
* Creates (or supports the creation of) a MIC kickstart file for building images for their reference HW&lt;br /&gt;
* As necessary, supports adding support for their reference HW and SW components in the MeeGo build and release infrastructure tools&lt;br /&gt;
&lt;br /&gt;
==== Trials ====&lt;br /&gt;
&lt;br /&gt;
A lightweight but also more limited &amp;quot;try it out&amp;quot; alternative to the above processes is discussed below.&lt;br /&gt;
&lt;br /&gt;
===== Initial bring-up attempt =====&lt;br /&gt;
&lt;br /&gt;
* Grab the already built root filesystem / image for a MeeGo reference device that's the closest to your target. For ARMv7, this is typically the Nokia N900 handset image. For Atom, this could be netbook image or handset image.&lt;br /&gt;
* Build a Linux kernel for your device and install the modules into /lib/modules.&lt;br /&gt;
* Boot the root filesystem and modify the configuration and drop in components to bring up the device to UX. Note down the things you had to modify or add, as this will be input for your porting work.&lt;br /&gt;
&lt;br /&gt;
===== Building your first image =====&lt;br /&gt;
&lt;br /&gt;
The second step to a proper hardware adaptation is making sure you can build your own image. Because we based our work before on a reference device image, it makes sense to try to build this image first. MeeGo images are constructed on the basis of so called 'kickstart files', which describe the intended contents of an image. &lt;br /&gt;
&lt;br /&gt;
* Install the MeeGo Image Creator tool (MIC)&lt;br /&gt;
* Download the kickstart file (.ks) from the same directory you found your reference device image. &lt;br /&gt;
* Create a image using mic-image-creator (should be elaborated).&lt;br /&gt;
* Test out your freshly baked image as in the previous step.&lt;br /&gt;
&lt;br /&gt;
===== Building your port's first reproduciable image =====&lt;br /&gt;
&lt;br /&gt;
* Download the MeeGo kernel, possibly modifying the kernel with additional patches (including new device drivers) and building the kernel (see [[#Getting_new_chipset_support_to_the_MeeGo_kernel|''Getting new chipset support to the MeeGo kernel'']] below). &lt;br /&gt;
* Add the repository containing your kernel package to the kickstart file (to be elaborated)&lt;br /&gt;
* Remove parts of the kickstart file specific to the reference device.&lt;br /&gt;
* Add a mention of your kernel package in the %packages section.&lt;br /&gt;
* Build packages or include shell scripts in %post section of kickstart file that adds/modifies configuration fitting your device.&lt;br /&gt;
&lt;br /&gt;
A detailed description of a variation of this model can be found from [[ARM/Meego on Beagleboard from scratch|here]] (Better description needed).&lt;br /&gt;
&lt;br /&gt;
==== Getting new chipset support to the MeeGo kernel ====&lt;br /&gt;
&lt;br /&gt;
See [[How-to: getting new chipset support to the MeeGo kernel]] for more detailed information about how to work with the MeeGo kernel and make it support new HW.&lt;br /&gt;
&lt;br /&gt;
=== Upstream projects, MeeGo, products, and patches ===&lt;br /&gt;
&lt;br /&gt;
When building a product based on MeeGo, the product vendor will typically augment the MeeGo OS with their own SW components, as well as make fixes and adjustments to the MeeGo OS code (in the limits set by the compliance rules). While vendors can manage their own SW components as they wish, the strong preference is that any changes made to the MeeGo OS SW components are delivered as patches primarily to the respective upstream projects or secondarily to MeeGo.com. In this way, vendors can relieve themselves of the burden of managing a potentially big patch set on top of MeeGo OS, and also verify the quality and safety of their patches. Having the patches in upstream projects again lessens the patch set management load at MeeGo.com.&lt;br /&gt;
&lt;br /&gt;
For information about pushing patches to MeeGo, see [http://meego.com/about/contribution-guidelines Contribution Guidelines] and [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process] (especially section ''How Do Patches Get Integrated and Accepted?'') and [http://meego.gitorious.org/meego-os-base/kernel-source/blobs/master/README.workflow Kernel workflow].&lt;br /&gt;
&lt;br /&gt;
=== Adaptation subsystems and interfaces ===&lt;br /&gt;
&lt;br /&gt;
In the MeeGo architecture model (see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view MeeGo Architecture Domain View]), adaptation is represented as adaptation subsystems. SW components in the adaptation subsystem ''realizations'' do things that are expected by the OS and communicate with the OS through interfaces defined by the OS.&lt;br /&gt;
 &lt;br /&gt;
The key goal in the sections below is to identify the interface(s) that the adaptation SW needs to implement/use to communicate with the OS in the required manner. Behind these interfaces, the adaptation SW can basically handle the required functionality as it sees best. In some cases, however, there may also be some preferred way of implementing the adaptation.&lt;br /&gt;
&lt;br /&gt;
In some areas, the adaptation work may consist of just writing a suitable Linux device driver for the HW in question. In some other areas, the adaptation work may consist of writing one or more device drivers, as well as one or more user space components (such as plugins to some user space SW frameworks). Various configuration file changes may also be required as a part of the adaptation work.&lt;br /&gt;
&lt;br /&gt;
== Porting by adaptation subsystems ==&lt;br /&gt;
&lt;br /&gt;
=== System Core Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Boot ====&lt;br /&gt;
&lt;br /&gt;
MeeGo places no restrictions as to what SW components are used to handle the pre-OS boot phases in a MeeGo compliant device. Thus, vendors are free to choose, for example, the boot loader, as they see fit. Note, however, that full use of the MeeGo platform security requires that the pre-OS boot phases form a trusted boot chain that ultimately builds on chipset-level security support.&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, MeeGo does not define anything special with regard to what information the boot loader is expected to pass to the Linux kernel, such as via the kernel command line.&lt;br /&gt;
&lt;br /&gt;
The kernel-level boot phases can be tailored, as necessary, to the specific CPU, chipset, or device in a standard Linux manner.&lt;br /&gt;
&lt;br /&gt;
The post-kernel boot phases (startup scripts) can be tailored by device vendors as necessary for their devices in the limits set by MeeGo compliance requirements (certain SW components need to be present in the system).&lt;br /&gt;
&lt;br /&gt;
==== Kernel fundamentals ====&lt;br /&gt;
&lt;br /&gt;
Regarding the Linux kernel, each MeeGo release defines the kernel version to be used and a set of patches on top of that. In addition, the Linux kernel used in MeeGo compliant devices is assumed to have been built with a set of fixed build-time configuration values that are not allowed to be changed. In addition to the fixed values, device vendors can define other kernel configuration values, as required by their devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo does not place any special requirements concerning how the boot loader passes information to the kernel or how the HW configuration and initialization of the system is handled.&lt;br /&gt;
&lt;br /&gt;
CPU, chipset (SoC), and device vendors are assumed to implement the elementary CPU architecture/chipset/device support for the Linux kernel used in MeeGo in a standard Linux manner. This includes:&lt;br /&gt;
* HW (board) configuration&lt;br /&gt;
* Mapping the fundamental Linux kernel functionality (such as IRQ, DMA, GPIO, RTC and memory handling) to the HW in question&lt;br /&gt;
* Creation/modification of the necessary device drivers to support the core SoC interfaces (such as I2C, SPI, SDIO)&lt;br /&gt;
* Permanent memory support&lt;br /&gt;
* Debugging and tracing support&lt;br /&gt;
&lt;br /&gt;
==== Power and thermal management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, the understanding is that MeeGo in general relies on established Linux kernel frameworks and APIs for power management. Some of these frameworks and APIs may be applicable only in certain CPU architectures. In addition, the HW capabilities related to power management may vary between different HW platforms potentially meaning that the SW is assumed perform somewhat different tasks in different environments.&lt;br /&gt;
&lt;br /&gt;
The Linux power management frameworks and APIs include:&lt;br /&gt;
* CPU frequency control (support for the different voltage and frequency operating points) via the cpufreq infrastructure&lt;br /&gt;
* CPU idle state management (different levels of sleep) through the cpuidle infrastructure&lt;br /&gt;
* Clock management through the clock framework&lt;br /&gt;
* Suspend/resume&lt;br /&gt;
* Runtime power management&lt;br /&gt;
* HW voltage/current regulator control via the regulator framework&lt;br /&gt;
* PM_QOS (power management quality of service) framework for making and listening to PM QoS requests&lt;br /&gt;
&lt;br /&gt;
Whether MeeGo will have some user space SW components or framework related to power management is under discussion at the time of this writing.&lt;br /&gt;
&lt;br /&gt;
In the thermal management area, the Device State Management Entity (DSME) component in the Device Health subsystem is supposed to make thermal state management decisions in the system. The DSME has a thermal manager module that again uses other DSME modules (thermal objects) to access the actual thermal sensor information in the HW. To port this functionality to new HW, one or more DSME thermal object modules need to be implemented.&lt;br /&gt;
&lt;br /&gt;
The APIs that the thermal object modules use to access the thermal sensor information are not strictly defined by MeeGo. At device driver level, however, the preferred approach is to use standard Linux interfaces such as the generic thermal sysfs API or the hwmon sysfs API.&lt;br /&gt;
&lt;br /&gt;
==== Energy management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, basically the only thing that MeeGo requires from HW adaptation in the energy management area (battery charging and monitoring) is support for the Linux power supply sysfs class. Additional energy management related functionality can be handled in a vendor specific manner.&lt;br /&gt;
&lt;br /&gt;
==== Device state ====&lt;br /&gt;
&lt;br /&gt;
The DSME component participates in device state management, such as by managing device run level, reboot, and shutdown, by monitoring the device thermal state, and shutting down the device in fatal thermal conditions, and by handling HW watchdog kicking activity.&lt;br /&gt;
&lt;br /&gt;
In a new HW environment, the DSME needs to be adapted to handle the watchdog kicking through the right device driver interfaces and at the right intervals. In addition, to port the DSME thermal management functionality to new HW, one or more DSME thermal object modules need to be implemented as described above, in the [[#Power_and_thermal_management|''Power and thermal management'']] section.&lt;br /&gt;
&lt;br /&gt;
=== Security Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Work is ongoing in bringing platform security functionality to the MeeGo OS based on the Mandatory Access Control (MAC), Integrity Measurement Architecture (IMA) and Extended Verification Module (EVM) technologies in the Linux kernel. Maximum security can be reached if the MeeGo platform security functionality can rely on trusted platform support &amp;quot;below&amp;quot; the Linux kernel, effectively in the HW and the boot loader(s). MeeGo, however, places no strict requirements as to how the trusted platform support is implemented in MeeGo based devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo also includes the OpenSSL open source toolkit implementing general purpose cryptography functionality. Algorithms and operations supported by the OpenSSL toolkit can be accelerated in HW by using the OpenSSL engine architecture. OpenSSL also supports a cryptodev engine that uses crypto algorithms implemented in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Some devices may have a security watchdog in the HW that needs &amp;quot;kicking&amp;quot; at regular intervals to keep the device up and running. In MeeGo, watchdog kicking functionality is implemented in the Device State Management Entity (DSME) component. If security watchdog kicking is needed, the DSME needs to be adapted to handle that through the right device driver interface and at the right intervals.&lt;br /&gt;
&lt;br /&gt;
=== Device Mode Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Resource Policy ====&lt;br /&gt;
&lt;br /&gt;
The Resource (Policy) Manager component in the Device Health subsystem offers a generic framework for:&lt;br /&gt;
* Monitoring device and application events&lt;br /&gt;
* Managing policies that specify rules about what should happen in the device when certain events occur&lt;br /&gt;
* Making policy decisions when events occur (determining the needed changes in the device)&lt;br /&gt;
* Enforcing changes in the system through policy enforcement points&lt;br /&gt;
&lt;br /&gt;
The Resource Manager can be used, for example, to change the audio routing in the device, when the user attaches a wired headset to the device.&lt;br /&gt;
&lt;br /&gt;
Event listening and change enforcement in the Resource Manager happens through plugin modules. Using the MeeGo OS in some new device effectively involves creating suitable Resource Manager policies and writing the necessary plugins for listening device/application events and changing device behavior accordingly. Though not pure HW adaptation, this can be considered a form of MeeGo OS &amp;quot;device adaptation&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Mode Control Entity (MCE) ====&lt;br /&gt;
&lt;br /&gt;
The MCE component (starting from MeeGo 1.2) can be used to listen to events that have an impact to the device mode (such as touch screen locked vs. unlocked) and change the device mode accordingly. The MCE is used, for example, to: &lt;br /&gt;
* Listen to various keys and switches in the device (such as power key, volume key, camera button, slider switch)&lt;br /&gt;
* Control LEDs&lt;br /&gt;
* Enabling/disabling touch screen or HW keyboard, depending on device state&lt;br /&gt;
* Control keyboard backlight&lt;br /&gt;
* Control display state (on/off) and brightness&lt;br /&gt;
&lt;br /&gt;
The MCE has its own plugin architecture that can be used to adapt it to different HW environments.&lt;br /&gt;
&lt;br /&gt;
=== Display and Graphics Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo visual services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view]. &lt;br /&gt;
&lt;br /&gt;
The key ingredients of the display and graphics architecture in MeeGo are the X Window System (X Server with its extensions) and the Khronos graphics APIs (OpenGL ES, OpenVG, and EGL with their extensions).&lt;br /&gt;
&lt;br /&gt;
The display and graphics HW adaptation SW needs to enable the X Window System and the Khronos APIs to function on the device HW. In practice, the adaptation SW needs to have an X display/video driver (hosted inside the X Server) and libraries that implement the Khronos graphics APIs, both supporting the features and functionality required by MeeGo. Also, some configuration file changes may be needed. Any additional user space and kernel space components needed for the HW adaptation are implementation dependent.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering display content to external displays, the Resource Manager component may be used to coordinate the display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Audio Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The audio architecture in MeeGo is centered around the GStreamer and PulseAudio frameworks. In addition, the Resource Manager plays a role in coordinating the audio related behavior of the device (audio routings). The audio HW adaptation SW needs to provide GStreamer elements and PulseAudio plugins that enable the GStreamer and PulseAudio client interfaces used, for example, for audio playback, recording, and volume control to work on the device. Typical required components include, for example, codec elements for GStreamer and sink/source plugins for PulseAudio.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer and PulseAudio plugins, the audio HW adaptation SW can be implemented with different technologies and APIs, including ALSA and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework, as needed. Use of the ALSA framework and APIs is encouraged, however, as they allow significant reuse of components and functionality on the PulseAudio level and are already a part of the upstream Linux kernel. If ALSA is not used to implement the kernel side parts of the audio adaptation, the solution that is used instead should still be aligned with the upstream Linux kernel.&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo media services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view].&lt;br /&gt;
&lt;br /&gt;
=== Camera Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo still imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework and the CameraBin GStreamer element. The still imaging HW adaptation SW is required to contain a GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element. Thus, the required HW adaptation interfaces are the relevant GStreamer plugin interfaces and especially the interfaces expected by the CameraBin element, in particular the GstPhotography interface.&lt;br /&gt;
&lt;br /&gt;
If HW accelerated encoders are supported, they should be also offered to the system as GStreamer elements.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
=== Video and Imaging Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo video imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework, the CameraBin GStreamer element (video recording) and the Playbin2 GStreamer element (video playback). The video imaging HW adaptation SW is required to contain:&lt;br /&gt;
:* A GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element (this is common with still imaging) &lt;br /&gt;
:* If HW accelerated codecs are supported, GStreamer elements that wrap the codecs&lt;br /&gt;
:* If HW accelerated filters are supported (such as video scaler, rotation engines, color conversion engines), GStreamer elements that wrap the filters&lt;br /&gt;
:* A GStreamer video sink element that offers the GStreamer X Overlay Interface. Note that if the XVideo extension is supported on the X Server side, the xvimagesink element can be used as the video sink element and no new elements are needed.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the video imaging HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering video content to external displays, the Resource Manager component may be used to coordinate the video/display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Communications Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo communications services architecture, see [http://meego.com/developers/meego-architecture/comms-services Comms Services].&lt;br /&gt;
&lt;br /&gt;
==== Cellular ====&lt;br /&gt;
&lt;br /&gt;
The cellular telephony architecture in MeeGo is centered on the oFono, PulseAudio and Telepathy frameworks. In addition, the Resource Manager plays a role in coordinating the device behavior during voice calls.&lt;br /&gt;
&lt;br /&gt;
The cellular modem HW adaptation SW must implement the following interfaces towards the MeeGo OS:&lt;br /&gt;
:* oFono modem plugin/driver API&lt;br /&gt;
:* Linux network interface for the Linux TCP/IP stack (for data communications)&lt;br /&gt;
:* Relevant PulseAudio plugin interfaces for cellular voice call audio handling&lt;br /&gt;
&lt;br /&gt;
For more detailed information about the oFono APIs, see the documentation and source code available at [http://git.kernel.org/?p=network/ofono/ofono.git;a=summary oFono git].&lt;br /&gt;
&lt;br /&gt;
==== USB ====&lt;br /&gt;
&lt;br /&gt;
The foundation of the the MeeGo USB functionality is the standard Linux USB subsystem. The Linux USB subsystem defines the USB related HW adaptation interfaces that need to be supported in MeeGo. In practice, these are kernel side interfaces between the generic USB functionality and a HW dependent USB host controller driver.&lt;br /&gt;
&lt;br /&gt;
==== WLAN ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo WLAN architecture is centered on the [http://linuxwireless.org/ Linux wireless] (IEEE-802.11) subsystem. The Linux wireless SW stack defines the WLAN HW adaptation SW interfaces that need to be used in MeeGo. In practice, the required interfaces are defined by cfg80211 for FullMAC WLAN devices and by mac80211 for SoftMAC WLAN devices. In addition, a Linux network interface needs to be supported towards the Linux TCP/IP stack.&lt;br /&gt;
&lt;br /&gt;
==== Bluetooth ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Bluetooth architecture is centered on the [http://www.bluez.org/ BlueZ] SW stack. The BlueZ SW stack defines the Bluetooth HW adaptation SW interfaces that need to be used in MeeGo. In practice, these are Linux kernel side interfaces between the generic HCI (Host Controller Interface) core and a HW specific HCI driver.&lt;br /&gt;
&lt;br /&gt;
=== Location Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The MeeGo location architecture is based on [http://http://labs.trolltech.com/page/Projects/QtMobility| QtMobility Location API].  The QtMobility 1.0 Location API provides geographic coordinates only.  The QtMobility 1.1 Location API provides geocoding and reverse geocoding, POI search, navigation, and mapping.  The 1.0 Location API is available in MeeGo 1.1.  The 1.1 or later Location API will be available in MeeGo 1.2.  The Location API uses a plugin system for implementations of the underlying backend.  MeeGo compliance requirements require support for the QtMobility Location API and thus require one or more plugins to support these APIs.  MeeGo places no restrictions as to how the plugins are implemented, however. Adaptation to location related HW may be done by manufacturers or service providers and the way how it's done is not defined by the API.&lt;br /&gt;
&lt;br /&gt;
MeeGo will use [http://www.freedesktop.org/wiki/Software/GeoClue GeoClue] as the reference location framework and the reference implementation of the Qt Mobility location API backend will be written on top of GeoClue. GeoClue defines a set of (D-Bus) APIs for accessing location services provided by service providers implemented as D-Bus services. In addition, GeoClue includes a set of service provider implementations and (at the time of this writing) an experimental master service provider that can act as a proxy between clients and the actual service providers. If a device vendor wants to take advantage of this existing functionality, the vendor can implement their location services &amp;quot;behind&amp;quot; the GeoClue APIs as GeoClue service providers. In such a case, adaptation to the location related HW would happen inside the service providers as defined by the service provider designs.&lt;br /&gt;
&lt;br /&gt;
=== Sensor Adaptation === &lt;br /&gt;
&lt;br /&gt;
The key component in the MeeGo sensor handling architecture is the Sensor Framework. The Sensor Framework uses both HW independent logical sensor plugins and HW dependent sensor adaptor plugins in its operation. The required sensor HW adaptation interfaces in MeeGo are the interfaces that the Sensor Framework and the logical sensor plugins define for the sensor adaptor plugins to implement. The sensor adaptor plugins typically communicate directly with sensor HW drivers in the Linux kernel. The interfaces that the sensor HW drivers expose to the user space are not defined by MeeGo. Sensor HW adaptation in MeeGo thus consists of adaptor plugins in the Sensor Framework and sensor HW drivers in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Note that thermal sensors are handled in a different manner as described in the [[#Power and thermal management|''Power and thermal management'']] section above.&lt;br /&gt;
&lt;br /&gt;
=== Input Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Touch ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the touch input handling path in MeeGo are the touch HW device driver, Linux kernel input subsystem, X server, X input driver, Qt and finally the MeeGo Touch Framework. Enabling touch support for some new HW requires at least the implementation of the corresponding touch HW device driver in the Linux kernel. If this driver communicates touch events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, basically the existing functionality in X server (e.g. evdev input driver) and above can be used as such. In case the kernel-to-user-space interface is non-standard, it is also possible to implement a new X input driver as a part of the touch HW adaptation.&lt;br /&gt;
&lt;br /&gt;
Multi-touch support in X requires a new version, 2.1, of the [http://cgit.freedesktop.org/~whot/inputproto/tree/XI2proto.txt?h=multitouch X Input Extension] and this also requires support from the client side, in this case Qt's multi-touch support. Once this support has been implemented throughout the SW stack, including X evdev input driver, supporting multi-touch for some new HW should require only the implementation of a touch HW device driver that implements the standard Linux multi-touch interface. This should be the case in MeeGo 1.2. &lt;br /&gt;
&lt;br /&gt;
Before 1.2, multi-touch support in MeeGo uses a special X input driver (mtev), X server multi-pointer support (MPX) and Qt multi-touch support written on top of MPX. This solution requires the touch HW device driver to expose a user-space interface that is compatible with mtev.&lt;br /&gt;
&lt;br /&gt;
==== HW keyboard ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the HW keyboard input handling path in MeeGo are the keyboard HW device driver, Linux kernel input subsystem, X server, X input driver and Qt. Enabling keyboard support for some new HW requires typically only the implementation of the corresponding keyboard HW device driver in the Linux kernel. If this driver communicates key events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, the existing functionality in X server (e.g. evdev input driver) and above should work as such. In case the kernel-to-user space interface is non-standard, it is also possible to implement a new X input driver as a part of the keyboard HW adaptation.&lt;br /&gt;
&lt;br /&gt;
==== Buttons and switches ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo includes the MCE and System SW Qt API (QmSystem) components. The MCE can be used to control the device mode and it listens to power button events and e.g. device open/close switch events via the respective device driver interfaces. The System SW Qt API on the other hand provides a Qt API to various system information, including events from various physical buttons in the device (e.g. volume button, camera button). The System SW Qt API gets the button events either by listening to the relevant device driver interfaces or through the MCE component.&lt;br /&gt;
&lt;br /&gt;
Both the MCE and the System SW Qt API components can be adapted to new devices by device vendors.&lt;br /&gt;
&lt;br /&gt;
=== Haptics and Vibra Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Haptics ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Touch Framework present (at least) in the MeeGo handset device category contains a component called Feedback Framework (meegotouch-feedback) that handles the creation of auditory and/or haptic feedback to touch events. The haptic feedback can be created e.g. with vibra motors or piezo elements. In the Feedback Framework, the different types of feedback are created by backend libraries implemented as plugins. &lt;br /&gt;
&lt;br /&gt;
The haptics related HW adaptation interface from MeeGo OS perspective is the backend plugin interface defined by the Feedback Framework. The plugins can then communicate with the HW either through some device driver interface or some intermediate SW layers (MeeGo places no restrictions as to how the plugins are implemented).&lt;br /&gt;
&lt;br /&gt;
==== Vibra (notifications/alerts) ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo (at least the handset category) will include a component called Non-Graphical Feedback Framework (NGF). This component offers the capability of playing e.g. audio, vibra or led as an indication of events such as incoming call/message, clock and calendar alarms, missed calls, unread messages etc. The NGF also integrates with the Resource Policy to decide about the available playback resources based on policy rules and the current system state.&lt;br /&gt;
&lt;br /&gt;
The actual playback of the different types of notifications is handled by NGF plugins that can be created by device vendors. The plugins communicate with the relevant HW as they see best, e.g. directly through some device driver interface or via some intermediate user space SW components. The plugin interfaces defined by NGF thus form the notification/alert vibra adaptation interface in MeeGo.&lt;br /&gt;
&lt;br /&gt;
=== Production Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Production deals with areas such as flashing, testing, tuning and certification. The current understanding is that these areas are handled in a vendor specific manner, including the adaptation.&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Noel</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/MeeGo_Porting_Guide</id>
		<title>MeeGo Porting Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/MeeGo_Porting_Guide"/>
				<updated>2011-06-24T23:12:24Z</updated>
		
		<summary type="html">&lt;p&gt;Noel: /* Audio Adaptation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The goal of MeeGo Porting Guide (MPG) is to provide valuable information and instructions to people who want to run MeeGo OS on their (new) HW and eventually create products based on the MeeGo OS. The MPG starts with an overview of the porting process, tools, and other related background information and then moves on to describing what the porting actually means in individual technical/functional areas.&lt;br /&gt;
&lt;br /&gt;
The porting guide is not strictly tied to any particular MeeGo OS version or device category. Instead, it tries to be general enough to cover the different device categories, as well as follow changes introduced in new MeeGo OS versions.&lt;br /&gt;
&lt;br /&gt;
Detailed porting information in the different technical areas is dependent on the respective [http://meego.com/developers/meego-architecture MeeGo architecture]. In some cases, this architecture may still be open and this is noted in the applicable sections.&lt;br /&gt;
&lt;br /&gt;
=== Feedback ===&lt;br /&gt;
&lt;br /&gt;
Contribution to these pages is open. Any MeeGo community member is free to ''improve'' these pages at any time. You can also leave feedback in the [http://lists.meego.com/listinfo/meego-porting MeeGo porting mailing list].&lt;br /&gt;
&lt;br /&gt;
== General porting information/guidelines ==&lt;br /&gt;
&lt;br /&gt;
=== MeeGo compliance ===&lt;br /&gt;
&lt;br /&gt;
Perhaps the most important piece of background information related to the MPG are the [[Quality/Compliance|MeeGo compliance requirements]]. A device that is meant to be MeeGo compliant will need to fulfill the requirements listed in the MeeGo compliance specification for the applicable device category (the first version of the specification is supposed to be available in October 2010). In short, a MeeGo compliant device will need to:&lt;br /&gt;
* Meet the minimum HW performance and component requirements for the applicable device category&lt;br /&gt;
* Include all SW components that form the MeeGo core OS&lt;br /&gt;
* Include the additional SW components required to be present in devices in the applicable device category&lt;br /&gt;
* Not break the API/ABI of any of the components coming from MeeGo&lt;br /&gt;
* Follow the MeeGo SW packaging conventions&lt;br /&gt;
&lt;br /&gt;
The compliance rules will also specify CPU architecture specific requirements concerning how MeeGo OS itself and MeeGo applications are to be compiled to different environments (instruction set used, compiler version, compiler options, etc.).&lt;br /&gt;
&lt;br /&gt;
A device vendor may include additional functionality, HW components and SW components in their devices, as long as they don't break MeeGo compliance. The vendor can also patch MeeGo OS components, if the patches don't break MeeGo compliance. A device vendor's own SW components can be either open source or closed source components, as long as they adhere to the rules set by the applicable SW licenses.&lt;br /&gt;
&lt;br /&gt;
From the MeeGo Porting Guide perspective, by defining the SW components and HW components that need to be present, the compliance requirements effectively define the minimum set of porting tasks required from a device vendor and what SW components are involved from MeeGo OS side.&lt;br /&gt;
&lt;br /&gt;
=== Porting process and tools ===&lt;br /&gt;
&lt;br /&gt;
==== Overview ====&lt;br /&gt;
&lt;br /&gt;
As long as a vendor's device is MeeGo compliant, as defined above, it is basically up to the vendor to decide how they build the SW that ends up in the device. The vendor may use their own build machinery or set up an OBS build system that is also used in MeeGo. Regardless of what the vendor's build system is, it needs to integrate with the MeeGo build infrastructure, at least to fetch the MeeGo source packages for the builds, as well as build each MeeGo component in the same way as it would be built in the MeeGo build system (such as with the same compiler and compiler options). Whatever the case, the intention in MeeGo is to use and offer an open toolset that any HW or SW vendor can use for efficient SW creation. It is likely that using the same toolset as MeeGo, will offer the easiest way to integrate vendor's own build system with the the MeeGo build infrastructure.&lt;br /&gt;
&lt;br /&gt;
The key ingredients of the MeeGo build infrastructure and toolset are:&lt;br /&gt;
* [http://meego.gitorious.org MeeGo Gitorious]&lt;br /&gt;
** A version control system for the source files of various MeeGo specific SW components and tools&lt;br /&gt;
* [http://build.meego.com MeeGo OBS]&lt;br /&gt;
** The build system that is used to build MeeGo packages (RPMs) from their sources&lt;br /&gt;
* [http://repo.meego.com MeeGo Repository]&lt;br /&gt;
** The place where the built MeeGo releases, that is where MeeGo packages and images are stored&lt;br /&gt;
* [http://wiki.meego.com/Image_Creation MeeGo Image Creator]&lt;br /&gt;
** The tool used to build MeeGo images that can be installed/flashed on HW&lt;br /&gt;
* MeeGo release tools&lt;br /&gt;
** Tools such as BOSS and REVS that are used in the creation of the MeeGo releases under repo.meego.com&lt;br /&gt;
&lt;br /&gt;
For additional information, see [[Build Infrastructure]], [[Release Infrastructure]] and [[Release Engineering]].&lt;br /&gt;
&lt;br /&gt;
For another overview of the MeeGo porting process, see [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process].&lt;br /&gt;
&lt;br /&gt;
==== Vendor's own OBS ====&lt;br /&gt;
&lt;br /&gt;
So, ultimately, when creating actual products running the MeeGo OS, the vendor may end up setting up their own OBS build system. Setting up your own OBS system may also be beneficial in earlier HW/product development phases, as it offers a flexible way to modify and build MeeGo OS to test it on the new HW. The vendor's own OBS system can link to the MeeGo OBS for handling packages that come directly from MeeGo and it can link to other sources for handling, such as closed source packages that are specific to the vendor. See [[Release_Engineering/Process#Making a product out of MeeGo Release|an overview picture of this setup]].&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Sets up their own OBS system&lt;br /&gt;
** [[User:Stskeeps/10_easy_steps_to_a_local_OBS|Instructions related to setting up an OBS system]],  [[Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE112|OBS Applicances]] [http://en.opensuse.org/openSUSE:Build_Service_private_instance Open Suse OBS Wiki].&lt;br /&gt;
* Creates projects under the their own OBS for their own components&lt;br /&gt;
* Links their own OBS to the MeeGo OBS for MeeGo components&lt;br /&gt;
* May have trial patches to MeeGo components in their own OBS&lt;br /&gt;
** NOTE. Eventually all patches to MeeGo components required in a final MeeGo based product ''should'' be pushed to MeeGo.com. However, this is not an absolute must requirement, as long as the MeeGo compliance requirements and applicable SW license rules are fulfilled. &lt;br /&gt;
** See [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below&lt;br /&gt;
* Needs to set up the necessary machinery to create releases and images from the packages built with OBS&lt;br /&gt;
** This machinery can be based on the toolset used in MeeGo (see above)&lt;br /&gt;
&lt;br /&gt;
==== Working under MeeGo.com ====&lt;br /&gt;
&lt;br /&gt;
Another way of porting MeeGo to some new HW is to get the new HW accepted as one MeeGo reference HW and have the MeeGo build machinery create builds for the reference HW as a part of the normal MeeGo release building cycle (see [[Release Engineering/Release Timeline|Release Timeline]] and [[Release Engineering/Process|Release Process]]). This setup can also include QA support for the reference HW on the MeeGo side (see [[Quality]]). At the time of this writing, the actual process of getting new reference HW to MeeGo is still somewhat unclear. In any case, this model requires active participation from the vendor in MeeGo work in general and especially in supporting their reference HW in MeeGo.&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Creates a device/platform development project under the MeeGo OBS for their components. The open source components would then get submitted to MeeGo Trunk:Testing and get reviewed like any other MeeGo component for inclusion.&lt;br /&gt;
** Note that it is also possible to have closed source binary components in the MeeGo OBS to be included in the MeeGo builds for some reference HW. These are submitted to the Trunk:non-oss repository. Licensing is usually required to at least include redistributability, as the components cannot be mirrored from or hosted at repo.meego.com otherwise. It is not possible to have components within Trunk:Testing require closed source dependencies.&lt;br /&gt;
* Pushes patches to other MeeGo components at MeeGo.com as necessary (see [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below)&lt;br /&gt;
* Creates (or supports the creation of) a MIC kickstart file for building images for their reference HW&lt;br /&gt;
* As necessary, supports adding support for their reference HW and SW components in the MeeGo build and release infrastructure tools&lt;br /&gt;
&lt;br /&gt;
==== Trials ====&lt;br /&gt;
&lt;br /&gt;
A lightweight but also more limited &amp;quot;try it out&amp;quot; alternative to the above processes is discussed below.&lt;br /&gt;
&lt;br /&gt;
===== Initial bring-up attempt =====&lt;br /&gt;
&lt;br /&gt;
* Grab the already built root filesystem / image for a MeeGo reference device that's the closest to your target. For ARMv7, this is typically the Nokia N900 handset image. For Atom, this could be netbook image or handset image.&lt;br /&gt;
* Build a Linux kernel for your device and install the modules into /lib/modules.&lt;br /&gt;
* Boot the root filesystem and modify the configuration and drop in components to bring up the device to UX. Note down the things you had to modify or add, as this will be input for your porting work.&lt;br /&gt;
&lt;br /&gt;
===== Building your first image =====&lt;br /&gt;
&lt;br /&gt;
The second step to a proper hardware adaptation is making sure you can build your own image. Because we based our work before on a reference device image, it makes sense to try to build this image first. MeeGo images are constructed on the basis of so called 'kickstart files', which describe the intended contents of an image. &lt;br /&gt;
&lt;br /&gt;
* Install the MeeGo Image Creator tool (MIC)&lt;br /&gt;
* Download the kickstart file (.ks) from the same directory you found your reference device image. &lt;br /&gt;
* Create a image using mic-image-creator (should be elaborated).&lt;br /&gt;
* Test out your freshly baked image as in the previous step.&lt;br /&gt;
&lt;br /&gt;
===== Building your port's first reproduciable image =====&lt;br /&gt;
&lt;br /&gt;
* Download the MeeGo kernel, possibly modifying the kernel with additional patches (including new device drivers) and building the kernel (see [[#Getting_new_chipset_support_to_the_MeeGo_kernel|''Getting new chipset support to the MeeGo kernel'']] below). &lt;br /&gt;
* Add the repository containing your kernel package to the kickstart file (to be elaborated)&lt;br /&gt;
* Remove parts of the kickstart file specific to the reference device.&lt;br /&gt;
* Add a mention of your kernel package in the %packages section.&lt;br /&gt;
* Build packages or include shell scripts in %post section of kickstart file that adds/modifies configuration fitting your device.&lt;br /&gt;
&lt;br /&gt;
A detailed description of a variation of this model can be found from [[ARM/Meego on Beagleboard from scratch|here]] (Better description needed).&lt;br /&gt;
&lt;br /&gt;
==== Getting new chipset support to the MeeGo kernel ====&lt;br /&gt;
&lt;br /&gt;
See [[How-to: getting new chipset support to the MeeGo kernel]] for more detailed information about how to work with the MeeGo kernel and make it support new HW.&lt;br /&gt;
&lt;br /&gt;
=== Upstream projects, MeeGo, products, and patches ===&lt;br /&gt;
&lt;br /&gt;
When building a product based on MeeGo, the product vendor will typically augment the MeeGo OS with their own SW components, as well as make fixes and adjustments to the MeeGo OS code (in the limits set by the compliance rules). While vendors can manage their own SW components as they wish, the strong preference is that any changes made to the MeeGo OS SW components are delivered as patches primarily to the respective upstream projects or secondarily to MeeGo.com. In this way, vendors can relieve themselves of the burden of managing a potentially big patch set on top of MeeGo OS, and also verify the quality and safety of their patches. Having the patches in upstream projects again lessens the patch set management load at MeeGo.com.&lt;br /&gt;
&lt;br /&gt;
For information about pushing patches to MeeGo, see [http://meego.com/about/contribution-guidelines Contribution Guidelines] and [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process] (especially section ''How Do Patches Get Integrated and Accepted?'') and [http://meego.gitorious.org/meego-os-base/kernel-source/blobs/master/README.workflow Kernel workflow].&lt;br /&gt;
&lt;br /&gt;
=== Adaptation subsystems and interfaces ===&lt;br /&gt;
&lt;br /&gt;
In the MeeGo architecture model (see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view MeeGo Architecture Domain View]), adaptation is represented as adaptation subsystems. SW components in the adaptation subsystem ''realizations'' do things that are expected by the OS and communicate with the OS through interfaces defined by the OS.&lt;br /&gt;
 &lt;br /&gt;
The key goal in the sections below is to identify the interface(s) that the adaptation SW needs to implement/use to communicate with the OS in the required manner. Behind these interfaces, the adaptation SW can basically handle the required functionality as it sees best. In some cases, however, there may also be some preferred way of implementing the adaptation.&lt;br /&gt;
&lt;br /&gt;
In some areas, the adaptation work may consist of just writing a suitable Linux device driver for the HW in question. In some other areas, the adaptation work may consist of writing one or more device drivers, as well as one or more user space components (such as plugins to some user space SW frameworks). Various configuration file changes may also be required as a part of the adaptation work.&lt;br /&gt;
&lt;br /&gt;
== Porting by adaptation subsystems ==&lt;br /&gt;
&lt;br /&gt;
=== System Core Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Boot ====&lt;br /&gt;
&lt;br /&gt;
MeeGo places no restrictions as to what SW components are used to handle the pre-OS boot phases in a MeeGo compliant device. Thus, vendors are free to choose, for example, the boot loader, as they see fit. Note, however, that full use of the MeeGo platform security requires that the pre-OS boot phases form a trusted boot chain that ultimately builds on chipset-level security support.&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, MeeGo does not define anything special with regard to what information the boot loader is expected to pass to the Linux kernel, such as via the kernel command line.&lt;br /&gt;
&lt;br /&gt;
The kernel-level boot phases can be tailored, as necessary, to the specific CPU, chipset, or device in a standard Linux manner.&lt;br /&gt;
&lt;br /&gt;
The post-kernel boot phases (startup scripts) can be tailored by device vendors as necessary for their devices in the limits set by MeeGo compliance requirements (certain SW components need to be present in the system).&lt;br /&gt;
&lt;br /&gt;
==== Kernel fundamentals ====&lt;br /&gt;
&lt;br /&gt;
Regarding the Linux kernel, each MeeGo release defines the kernel version to be used and a set of patches on top of that. In addition, the Linux kernel used in MeeGo compliant devices is assumed to have been built with a set of fixed build-time configuration values that are not allowed to be changed. In addition to the fixed values, device vendors can define other kernel configuration values, as required by their devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo does not place any special requirements concerning how the boot loader passes information to the kernel or how the HW configuration and initialization of the system is handled.&lt;br /&gt;
&lt;br /&gt;
CPU, chipset (SoC), and device vendors are assumed to implement the elementary CPU architecture/chipset/device support for the Linux kernel used in MeeGo in a standard Linux manner. This includes:&lt;br /&gt;
* HW (board) configuration&lt;br /&gt;
* Mapping the fundamental Linux kernel functionality (such as IRQ, DMA, GPIO, RTC and memory handling) to the HW in question&lt;br /&gt;
* Creation/modification of the necessary device drivers to support the core SoC interfaces (such as I2C, SPI, SDIO)&lt;br /&gt;
* Permanent memory support&lt;br /&gt;
* Debugging and tracing support&lt;br /&gt;
&lt;br /&gt;
==== Power and thermal management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, the understanding is that MeeGo in general relies on established Linux kernel frameworks and APIs for power management. Some of these frameworks and APIs may be applicable only in certain CPU architectures. In addition, the HW capabilities related to power management may vary between different HW platforms potentially meaning that the SW is assumed perform somewhat different tasks in different environments.&lt;br /&gt;
&lt;br /&gt;
The Linux power management frameworks and APIs include:&lt;br /&gt;
* CPU frequency control (support for the different voltage and frequency operating points) via the cpufreq infrastructure&lt;br /&gt;
* CPU idle state management (different levels of sleep) through the cpuidle infrastructure&lt;br /&gt;
* Clock management through the clock framework&lt;br /&gt;
* Suspend/resume&lt;br /&gt;
* Runtime power management&lt;br /&gt;
* HW voltage/current regulator control via the regulator framework&lt;br /&gt;
* PM_QOS (power management quality of service) framework for making and listening to PM QoS requests&lt;br /&gt;
&lt;br /&gt;
Whether MeeGo will have some user space SW components or framework related to power management is under discussion at the time of this writing.&lt;br /&gt;
&lt;br /&gt;
In the thermal management area, the Device State Management Entity (DSME) component in the Device Health subsystem is supposed to make thermal state management decisions in the system. The DSME has a thermal manager module that again uses other DSME modules (thermal objects) to access the actual thermal sensor information in the HW. To port this functionality to new HW, one or more DSME thermal object modules need to be implemented.&lt;br /&gt;
&lt;br /&gt;
The APIs that the thermal object modules use to access the thermal sensor information are not strictly defined by MeeGo. At device driver level, however, the preferred approach is to use standard Linux interfaces such as the generic thermal sysfs API or the hwmon sysfs API.&lt;br /&gt;
&lt;br /&gt;
==== Energy management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, basically the only thing that MeeGo requires from HW adaptation in the energy management area (battery charging and monitoring) is support for the Linux power supply sysfs class. Additional energy management related functionality can be handled in a vendor specific manner.&lt;br /&gt;
&lt;br /&gt;
==== Device state ====&lt;br /&gt;
&lt;br /&gt;
The DSME component participates in device state management, such as by managing device run level, reboot, and shutdown, by monitoring the device thermal state, and shutting down the device in fatal thermal conditions, and by handling HW watchdog kicking activity.&lt;br /&gt;
&lt;br /&gt;
In a new HW environment, the DSME needs to be adapted to handle the watchdog kicking through the right device driver interfaces and at the right intervals. In addition, to port the DSME thermal management functionality to new HW, one or more DSME thermal object modules need to be implemented as described above, in the [[#Power_and_thermal_management|''Power and thermal management'']] section.&lt;br /&gt;
&lt;br /&gt;
=== Security Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Work is ongoing in bringing platform security functionality to the MeeGo OS based on the Mandatory Access Control (MAC), Integrity Measurement Architecture (IMA) and Extended Verification Module (EVM) technologies in the Linux kernel. Maximum security can be reached if the MeeGo platform security functionality can rely on trusted platform support &amp;quot;below&amp;quot; the Linux kernel, effectively in the HW and the boot loader(s). MeeGo, however, places no strict requirements as to how the trusted platform support is implemented in MeeGo based devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo also includes the OpenSSL open source toolkit implementing general purpose cryptography functionality. Algorithms and operations supported by the OpenSSL toolkit can be accelerated in HW by using the OpenSSL engine architecture. OpenSSL also supports a cryptodev engine that uses crypto algorithms implemented in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Some devices may have a security watchdog in the HW that needs &amp;quot;kicking&amp;quot; at regular intervals to keep the device up and running. In MeeGo, watchdog kicking functionality is implemented in the Device State Management Entity (DSME) component. If security watchdog kicking is needed, the DSME needs to be adapted to handle that through the right device driver interface and at the right intervals.&lt;br /&gt;
&lt;br /&gt;
=== Device Mode Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Resource Policy ====&lt;br /&gt;
&lt;br /&gt;
The Resource (Policy) Manager component in the Device Health subsystem offers a generic framework for:&lt;br /&gt;
* Monitoring device and application events&lt;br /&gt;
* Managing policies that specify rules about what should happen in the device when certain events occur&lt;br /&gt;
* Making policy decisions when events occur (determining the needed changes in the device)&lt;br /&gt;
* Enforcing changes in the system through policy enforcement points&lt;br /&gt;
&lt;br /&gt;
The Resource Manager can be used, for example, to change the audio routing in the device, when the user attaches a wired headset to the device.&lt;br /&gt;
&lt;br /&gt;
Event listening and change enforcement in the Resource Manager happens through plugin modules. Using the MeeGo OS in some new device effectively involves creating suitable Resource Manager policies and writing the necessary plugins for listening device/application events and changing device behavior accordingly. Though not pure HW adaptation, this can be considered a form of MeeGo OS &amp;quot;device adaptation&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Mode Control Entity (MCE) ====&lt;br /&gt;
&lt;br /&gt;
The MCE component (starting from MeeGo 1.2) can be used to listen to events that have an impact to the device mode (such as touch screen locked vs. unlocked) and change the device mode accordingly. The MCE is used, for example, to: &lt;br /&gt;
* Listen to various keys and switches in the device (such as power key, volume key, camera button, slider switch)&lt;br /&gt;
* Control LEDs&lt;br /&gt;
* Enabling/disabling touch screen or HW keyboard, depending on device state&lt;br /&gt;
* Control keyboard backlight&lt;br /&gt;
* Control display state (on/off) and brightness&lt;br /&gt;
&lt;br /&gt;
The MCE has its own plugin architecture that can be used to adapt it to different HW environments.&lt;br /&gt;
&lt;br /&gt;
=== Display and Graphics Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo visual services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view]. &lt;br /&gt;
&lt;br /&gt;
The key ingredients of the display and graphics architecture in MeeGo are the X Window System (X Server with its extensions) and the Khronos graphics APIs (OpenGL ES, OpenVG, and EGL with their extensions).&lt;br /&gt;
&lt;br /&gt;
The display and graphics HW adaptation SW needs to enable the X Window System and the Khronos APIs to function on the device HW. In practice, the adaptation SW needs to have an X display/video driver (hosted inside the X Server) and libraries that implement the Khronos graphics APIs, both supporting the features and functionality required by MeeGo. Also, some configuration file changes may be needed. Any additional user space and kernel space components needed for the HW adaptation are implementation dependent.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering display content to external displays, the Resource Manager component may be used to coordinate the display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Audio Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The audio architecture in MeeGo is centered around the GStreamer and PulseAudio frameworks. In addition, the Resource Manager plays a role in coordinating the audio related behavior of the device (audio routings). The audio HW adaptation SW needs to provide GStreamer elements and PulseAudio plugins that enable the GStreamer and PulseAudio client interfaces used, for example, for audio playback, recording, and volume control to work on the device. Typical required components include, for example, codec elements for GStreamer and sink/source plugins for PulseAudio.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer and PulseAudio plugins, the audio HW adaptation SW can be implemented with different technologies and APIs, including ALSA and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework, as needed. Use of the ALSA framework and APIs is encouraged, however, as they allow significant reuse of components and functionality on the PulseAudio level and are already a part of the upstream Linux kernel. If ALSA is not used to implement the kernel side parts of the audio adaptation, the solution that is used instead should still be aligned with the upstream Linux kernel.&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo media services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view].&lt;br /&gt;
&lt;br /&gt;
=== Camera Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo still imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework and the CameraBin GStreamer element. The still imaging HW adaptation SW is required to contain a GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element. Thus, the required HW adaptation interfaces are the relevant GStreamer plugin interfaces and especially the interfaces expected by the CameraBin element, in particular the GstPhotography interface.&lt;br /&gt;
&lt;br /&gt;
If HW accelerated encoders are supported, they should be also offered to the system as GStreamer elements.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
=== Video and Imaging Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo video imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework, the CameraBin GStreamer element (video recording) and the Playbin2 GStreamer element (video playback). The video imaging HW adaptation SW is required to contain:&lt;br /&gt;
:* A GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element (this is common with still imaging) &lt;br /&gt;
:* If HW accelerated codecs are supported, GStreamer elements that wrap the codecs&lt;br /&gt;
:* If HW accelerated filters are supported (e.g. video scaler, rotation engines, color conversion engines), GStreamer elements that wrap the filters&lt;br /&gt;
:* A GStreamer video sink element that offers the GStreamer X Overlay Interface. Note that if the XVideo extension is supported on the X Server side, the xvimagesink element can be used as the video sink element and no new elements are needed.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the video imaging HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering video content to external displays, the Resource Manager component may be used to coordinate the video/display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Communications Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo communications services architecture, see [http://meego.com/developers/meego-architecture/comms-services Comms Services].&lt;br /&gt;
&lt;br /&gt;
==== Cellular ====&lt;br /&gt;
&lt;br /&gt;
The cellular telephony architecture in MeeGo is centered on the oFono, PulseAudio and Telepathy frameworks. In addition, the Resource Manager plays a role in coordinating the device behavior during voice calls.&lt;br /&gt;
&lt;br /&gt;
The cellular modem HW adaptation SW must implement the following interfaces towards the MeeGo OS:&lt;br /&gt;
:* oFono modem plugin/driver API&lt;br /&gt;
:* Linux network interface for the Linux TCP/IP stack (for data communications)&lt;br /&gt;
:* Relevant PulseAudio plugin interfaces for cellular voice call audio handling&lt;br /&gt;
&lt;br /&gt;
For more detailed information about the oFono APIs, see the documentation and source code available at [http://git.kernel.org/?p=network/ofono/ofono.git;a=summary oFono git].&lt;br /&gt;
&lt;br /&gt;
==== USB ====&lt;br /&gt;
&lt;br /&gt;
The foundation of the the MeeGo USB functionality is the standard Linux USB subsystem. The Linux USB subsystem defines the USB related HW adaptation interfaces that need to be supported in MeeGo. In practice, these are kernel side interfaces between the generic USB functionality and a HW dependent USB host controller driver.&lt;br /&gt;
&lt;br /&gt;
==== WLAN ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo WLAN architecture is centered on the [http://linuxwireless.org/ Linux wireless] (IEEE-802.11) subsystem. The Linux wireless SW stack defines the WLAN HW adaptation SW interfaces that need to be used in MeeGo. In practice, the required interfaces are defined by cfg80211 for FullMAC WLAN devices and by mac80211 for SoftMAC WLAN devices. In addition, a Linux network interface needs to be supported towards the Linux TCP/IP stack.&lt;br /&gt;
&lt;br /&gt;
==== Bluetooth ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Bluetooth architecture is centered on the [http://www.bluez.org/ BlueZ] SW stack. The BlueZ SW stack defines the Bluetooth HW adaptation SW interfaces that need to be used in MeeGo. In practice, these are Linux kernel side interfaces between the generic HCI (Host Controller Interface) core and a HW specific HCI driver.&lt;br /&gt;
&lt;br /&gt;
=== Location Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The MeeGo location architecture is based on [http://http://labs.trolltech.com/page/Projects/QtMobility| QtMobility Location API].  The QtMobility 1.0 Location API provides geographic coordinates only.  The QtMobility 1.1 Location API provides geocoding and reverse geocoding, POI search, navigation, and mapping.  The 1.0 Location API is available in MeeGo 1.1.  The 1.1 or later Location API will be available in MeeGo 1.2.  The Location API uses a plugin system for implementations of the underlying backend.  MeeGo compliance requirements require support for the QtMobility Location API and thus require one or more plugins to support these APIs.  MeeGo places no restrictions as to how the plugins are implemented, however. Adaptation to location related HW may be done by manufacturers or service providers and the way how it's done is not defined by the API.&lt;br /&gt;
&lt;br /&gt;
MeeGo will use [http://www.freedesktop.org/wiki/Software/GeoClue GeoClue] as the reference location framework and the reference implementation of the Qt Mobility location API backend will be written on top of GeoClue. GeoClue defines a set of (D-Bus) APIs for accessing location services provided by service providers implemented as D-Bus services. In addition, GeoClue includes a set of service provider implementations and (at the time of this writing) an experimental master service provider that can act as a proxy between clients and the actual service providers. If a device vendor wants to take advantage of this existing functionality, the vendor can implement their location services &amp;quot;behind&amp;quot; the GeoClue APIs as GeoClue service providers. In such a case, adaptation to the location related HW would happen inside the service providers as defined by the service provider designs.&lt;br /&gt;
&lt;br /&gt;
=== Sensor Adaptation === &lt;br /&gt;
&lt;br /&gt;
The key component in the MeeGo sensor handling architecture is the Sensor Framework. The Sensor Framework uses both HW independent logical sensor plugins and HW dependent sensor adaptor plugins in its operation. The required sensor HW adaptation interfaces in MeeGo are the interfaces that the Sensor Framework and the logical sensor plugins define for the sensor adaptor plugins to implement. The sensor adaptor plugins typically communicate directly with sensor HW drivers in the Linux kernel. The interfaces that the sensor HW drivers expose to the user space are not defined by MeeGo. Sensor HW adaptation in MeeGo thus consists of adaptor plugins in the Sensor Framework and sensor HW drivers in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Note that thermal sensors are handled in a different manner as described in the [[#Power and thermal management|''Power and thermal management'']] section above.&lt;br /&gt;
&lt;br /&gt;
=== Input Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Touch ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the touch input handling path in MeeGo are the touch HW device driver, Linux kernel input subsystem, X server, X input driver, Qt and finally the MeeGo Touch Framework. Enabling touch support for some new HW requires at least the implementation of the corresponding touch HW device driver in the Linux kernel. If this driver communicates touch events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, basically the existing functionality in X server (e.g. evdev input driver) and above can be used as such. In case the kernel-to-user-space interface is non-standard, it is also possible to implement a new X input driver as a part of the touch HW adaptation.&lt;br /&gt;
&lt;br /&gt;
Multi-touch support in X requires a new version, 2.1, of the [http://cgit.freedesktop.org/~whot/inputproto/tree/XI2proto.txt?h=multitouch X Input Extension] and this also requires support from the client side, in this case Qt's multi-touch support. Once this support has been implemented throughout the SW stack, including X evdev input driver, supporting multi-touch for some new HW should require only the implementation of a touch HW device driver that implements the standard Linux multi-touch interface. This should be the case in MeeGo 1.2. &lt;br /&gt;
&lt;br /&gt;
Before 1.2, multi-touch support in MeeGo uses a special X input driver (mtev), X server multi-pointer support (MPX) and Qt multi-touch support written on top of MPX. This solution requires the touch HW device driver to expose a user-space interface that is compatible with mtev.&lt;br /&gt;
&lt;br /&gt;
==== HW keyboard ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the HW keyboard input handling path in MeeGo are the keyboard HW device driver, Linux kernel input subsystem, X server, X input driver and Qt. Enabling keyboard support for some new HW requires typically only the implementation of the corresponding keyboard HW device driver in the Linux kernel. If this driver communicates key events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, the existing functionality in X server (e.g. evdev input driver) and above should work as such. In case the kernel-to-user space interface is non-standard, it is also possible to implement a new X input driver as a part of the keyboard HW adaptation.&lt;br /&gt;
&lt;br /&gt;
==== Buttons and switches ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo includes the MCE and System SW Qt API (QmSystem) components. The MCE can be used to control the device mode and it listens to power button events and e.g. device open/close switch events via the respective device driver interfaces. The System SW Qt API on the other hand provides a Qt API to various system information, including events from various physical buttons in the device (e.g. volume button, camera button). The System SW Qt API gets the button events either by listening to the relevant device driver interfaces or through the MCE component.&lt;br /&gt;
&lt;br /&gt;
Both the MCE and the System SW Qt API components can be adapted to new devices by device vendors.&lt;br /&gt;
&lt;br /&gt;
=== Haptics and Vibra Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Haptics ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Touch Framework present (at least) in the MeeGo handset device category contains a component called Feedback Framework (meegotouch-feedback) that handles the creation of auditory and/or haptic feedback to touch events. The haptic feedback can be created e.g. with vibra motors or piezo elements. In the Feedback Framework, the different types of feedback are created by backend libraries implemented as plugins. &lt;br /&gt;
&lt;br /&gt;
The haptics related HW adaptation interface from MeeGo OS perspective is the backend plugin interface defined by the Feedback Framework. The plugins can then communicate with the HW either through some device driver interface or some intermediate SW layers (MeeGo places no restrictions as to how the plugins are implemented).&lt;br /&gt;
&lt;br /&gt;
==== Vibra (notifications/alerts) ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo (at least the handset category) will include a component called Non-Graphical Feedback Framework (NGF). This component offers the capability of playing e.g. audio, vibra or led as an indication of events such as incoming call/message, clock and calendar alarms, missed calls, unread messages etc. The NGF also integrates with the Resource Policy to decide about the available playback resources based on policy rules and the current system state.&lt;br /&gt;
&lt;br /&gt;
The actual playback of the different types of notifications is handled by NGF plugins that can be created by device vendors. The plugins communicate with the relevant HW as they see best, e.g. directly through some device driver interface or via some intermediate user space SW components. The plugin interfaces defined by NGF thus form the notification/alert vibra adaptation interface in MeeGo.&lt;br /&gt;
&lt;br /&gt;
=== Production Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Production deals with areas such as flashing, testing, tuning and certification. The current understanding is that these areas are handled in a vendor specific manner, including the adaptation.&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Noel</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/MeeGo_Porting_Guide</id>
		<title>MeeGo Porting Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/MeeGo_Porting_Guide"/>
				<updated>2011-06-24T23:10:12Z</updated>
		
		<summary type="html">&lt;p&gt;Noel: /* Display and Graphics Adaptation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The goal of MeeGo Porting Guide (MPG) is to provide valuable information and instructions to people who want to run MeeGo OS on their (new) HW and eventually create products based on the MeeGo OS. The MPG starts with an overview of the porting process, tools, and other related background information and then moves on to describing what the porting actually means in individual technical/functional areas.&lt;br /&gt;
&lt;br /&gt;
The porting guide is not strictly tied to any particular MeeGo OS version or device category. Instead, it tries to be general enough to cover the different device categories, as well as follow changes introduced in new MeeGo OS versions.&lt;br /&gt;
&lt;br /&gt;
Detailed porting information in the different technical areas is dependent on the respective [http://meego.com/developers/meego-architecture MeeGo architecture]. In some cases, this architecture may still be open and this is noted in the applicable sections.&lt;br /&gt;
&lt;br /&gt;
=== Feedback ===&lt;br /&gt;
&lt;br /&gt;
Contribution to these pages is open. Any MeeGo community member is free to ''improve'' these pages at any time. You can also leave feedback in the [http://lists.meego.com/listinfo/meego-porting MeeGo porting mailing list].&lt;br /&gt;
&lt;br /&gt;
== General porting information/guidelines ==&lt;br /&gt;
&lt;br /&gt;
=== MeeGo compliance ===&lt;br /&gt;
&lt;br /&gt;
Perhaps the most important piece of background information related to the MPG are the [[Quality/Compliance|MeeGo compliance requirements]]. A device that is meant to be MeeGo compliant will need to fulfill the requirements listed in the MeeGo compliance specification for the applicable device category (the first version of the specification is supposed to be available in October 2010). In short, a MeeGo compliant device will need to:&lt;br /&gt;
* Meet the minimum HW performance and component requirements for the applicable device category&lt;br /&gt;
* Include all SW components that form the MeeGo core OS&lt;br /&gt;
* Include the additional SW components required to be present in devices in the applicable device category&lt;br /&gt;
* Not break the API/ABI of any of the components coming from MeeGo&lt;br /&gt;
* Follow the MeeGo SW packaging conventions&lt;br /&gt;
&lt;br /&gt;
The compliance rules will also specify CPU architecture specific requirements concerning how MeeGo OS itself and MeeGo applications are to be compiled to different environments (instruction set used, compiler version, compiler options, etc.).&lt;br /&gt;
&lt;br /&gt;
A device vendor may include additional functionality, HW components and SW components in their devices, as long as they don't break MeeGo compliance. The vendor can also patch MeeGo OS components, if the patches don't break MeeGo compliance. A device vendor's own SW components can be either open source or closed source components, as long as they adhere to the rules set by the applicable SW licenses.&lt;br /&gt;
&lt;br /&gt;
From the MeeGo Porting Guide perspective, by defining the SW components and HW components that need to be present, the compliance requirements effectively define the minimum set of porting tasks required from a device vendor and what SW components are involved from MeeGo OS side.&lt;br /&gt;
&lt;br /&gt;
=== Porting process and tools ===&lt;br /&gt;
&lt;br /&gt;
==== Overview ====&lt;br /&gt;
&lt;br /&gt;
As long as a vendor's device is MeeGo compliant, as defined above, it is basically up to the vendor to decide how they build the SW that ends up in the device. The vendor may use their own build machinery or set up an OBS build system that is also used in MeeGo. Regardless of what the vendor's build system is, it needs to integrate with the MeeGo build infrastructure, at least to fetch the MeeGo source packages for the builds, as well as build each MeeGo component in the same way as it would be built in the MeeGo build system (such as with the same compiler and compiler options). Whatever the case, the intention in MeeGo is to use and offer an open toolset that any HW or SW vendor can use for efficient SW creation. It is likely that using the same toolset as MeeGo, will offer the easiest way to integrate vendor's own build system with the the MeeGo build infrastructure.&lt;br /&gt;
&lt;br /&gt;
The key ingredients of the MeeGo build infrastructure and toolset are:&lt;br /&gt;
* [http://meego.gitorious.org MeeGo Gitorious]&lt;br /&gt;
** A version control system for the source files of various MeeGo specific SW components and tools&lt;br /&gt;
* [http://build.meego.com MeeGo OBS]&lt;br /&gt;
** The build system that is used to build MeeGo packages (RPMs) from their sources&lt;br /&gt;
* [http://repo.meego.com MeeGo Repository]&lt;br /&gt;
** The place where the built MeeGo releases, that is where MeeGo packages and images are stored&lt;br /&gt;
* [http://wiki.meego.com/Image_Creation MeeGo Image Creator]&lt;br /&gt;
** The tool used to build MeeGo images that can be installed/flashed on HW&lt;br /&gt;
* MeeGo release tools&lt;br /&gt;
** Tools such as BOSS and REVS that are used in the creation of the MeeGo releases under repo.meego.com&lt;br /&gt;
&lt;br /&gt;
For additional information, see [[Build Infrastructure]], [[Release Infrastructure]] and [[Release Engineering]].&lt;br /&gt;
&lt;br /&gt;
For another overview of the MeeGo porting process, see [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process].&lt;br /&gt;
&lt;br /&gt;
==== Vendor's own OBS ====&lt;br /&gt;
&lt;br /&gt;
So, ultimately, when creating actual products running the MeeGo OS, the vendor may end up setting up their own OBS build system. Setting up your own OBS system may also be beneficial in earlier HW/product development phases, as it offers a flexible way to modify and build MeeGo OS to test it on the new HW. The vendor's own OBS system can link to the MeeGo OBS for handling packages that come directly from MeeGo and it can link to other sources for handling, such as closed source packages that are specific to the vendor. See [[Release_Engineering/Process#Making a product out of MeeGo Release|an overview picture of this setup]].&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Sets up their own OBS system&lt;br /&gt;
** [[User:Stskeeps/10_easy_steps_to_a_local_OBS|Instructions related to setting up an OBS system]],  [[Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE112|OBS Applicances]] [http://en.opensuse.org/openSUSE:Build_Service_private_instance Open Suse OBS Wiki].&lt;br /&gt;
* Creates projects under the their own OBS for their own components&lt;br /&gt;
* Links their own OBS to the MeeGo OBS for MeeGo components&lt;br /&gt;
* May have trial patches to MeeGo components in their own OBS&lt;br /&gt;
** NOTE. Eventually all patches to MeeGo components required in a final MeeGo based product ''should'' be pushed to MeeGo.com. However, this is not an absolute must requirement, as long as the MeeGo compliance requirements and applicable SW license rules are fulfilled. &lt;br /&gt;
** See [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below&lt;br /&gt;
* Needs to set up the necessary machinery to create releases and images from the packages built with OBS&lt;br /&gt;
** This machinery can be based on the toolset used in MeeGo (see above)&lt;br /&gt;
&lt;br /&gt;
==== Working under MeeGo.com ====&lt;br /&gt;
&lt;br /&gt;
Another way of porting MeeGo to some new HW is to get the new HW accepted as one MeeGo reference HW and have the MeeGo build machinery create builds for the reference HW as a part of the normal MeeGo release building cycle (see [[Release Engineering/Release Timeline|Release Timeline]] and [[Release Engineering/Process|Release Process]]). This setup can also include QA support for the reference HW on the MeeGo side (see [[Quality]]). At the time of this writing, the actual process of getting new reference HW to MeeGo is still somewhat unclear. In any case, this model requires active participation from the vendor in MeeGo work in general and especially in supporting their reference HW in MeeGo.&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Creates a device/platform development project under the MeeGo OBS for their components. The open source components would then get submitted to MeeGo Trunk:Testing and get reviewed like any other MeeGo component for inclusion.&lt;br /&gt;
** Note that it is also possible to have closed source binary components in the MeeGo OBS to be included in the MeeGo builds for some reference HW. These are submitted to the Trunk:non-oss repository. Licensing is usually required to at least include redistributability, as the components cannot be mirrored from or hosted at repo.meego.com otherwise. It is not possible to have components within Trunk:Testing require closed source dependencies.&lt;br /&gt;
* Pushes patches to other MeeGo components at MeeGo.com as necessary (see [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below)&lt;br /&gt;
* Creates (or supports the creation of) a MIC kickstart file for building images for their reference HW&lt;br /&gt;
* As necessary, supports adding support for their reference HW and SW components in the MeeGo build and release infrastructure tools&lt;br /&gt;
&lt;br /&gt;
==== Trials ====&lt;br /&gt;
&lt;br /&gt;
A lightweight but also more limited &amp;quot;try it out&amp;quot; alternative to the above processes is discussed below.&lt;br /&gt;
&lt;br /&gt;
===== Initial bring-up attempt =====&lt;br /&gt;
&lt;br /&gt;
* Grab the already built root filesystem / image for a MeeGo reference device that's the closest to your target. For ARMv7, this is typically the Nokia N900 handset image. For Atom, this could be netbook image or handset image.&lt;br /&gt;
* Build a Linux kernel for your device and install the modules into /lib/modules.&lt;br /&gt;
* Boot the root filesystem and modify the configuration and drop in components to bring up the device to UX. Note down the things you had to modify or add, as this will be input for your porting work.&lt;br /&gt;
&lt;br /&gt;
===== Building your first image =====&lt;br /&gt;
&lt;br /&gt;
The second step to a proper hardware adaptation is making sure you can build your own image. Because we based our work before on a reference device image, it makes sense to try to build this image first. MeeGo images are constructed on the basis of so called 'kickstart files', which describe the intended contents of an image. &lt;br /&gt;
&lt;br /&gt;
* Install the MeeGo Image Creator tool (MIC)&lt;br /&gt;
* Download the kickstart file (.ks) from the same directory you found your reference device image. &lt;br /&gt;
* Create a image using mic-image-creator (should be elaborated).&lt;br /&gt;
* Test out your freshly baked image as in the previous step.&lt;br /&gt;
&lt;br /&gt;
===== Building your port's first reproduciable image =====&lt;br /&gt;
&lt;br /&gt;
* Download the MeeGo kernel, possibly modifying the kernel with additional patches (including new device drivers) and building the kernel (see [[#Getting_new_chipset_support_to_the_MeeGo_kernel|''Getting new chipset support to the MeeGo kernel'']] below). &lt;br /&gt;
* Add the repository containing your kernel package to the kickstart file (to be elaborated)&lt;br /&gt;
* Remove parts of the kickstart file specific to the reference device.&lt;br /&gt;
* Add a mention of your kernel package in the %packages section.&lt;br /&gt;
* Build packages or include shell scripts in %post section of kickstart file that adds/modifies configuration fitting your device.&lt;br /&gt;
&lt;br /&gt;
A detailed description of a variation of this model can be found from [[ARM/Meego on Beagleboard from scratch|here]] (Better description needed).&lt;br /&gt;
&lt;br /&gt;
==== Getting new chipset support to the MeeGo kernel ====&lt;br /&gt;
&lt;br /&gt;
See [[How-to: getting new chipset support to the MeeGo kernel]] for more detailed information about how to work with the MeeGo kernel and make it support new HW.&lt;br /&gt;
&lt;br /&gt;
=== Upstream projects, MeeGo, products, and patches ===&lt;br /&gt;
&lt;br /&gt;
When building a product based on MeeGo, the product vendor will typically augment the MeeGo OS with their own SW components, as well as make fixes and adjustments to the MeeGo OS code (in the limits set by the compliance rules). While vendors can manage their own SW components as they wish, the strong preference is that any changes made to the MeeGo OS SW components are delivered as patches primarily to the respective upstream projects or secondarily to MeeGo.com. In this way, vendors can relieve themselves of the burden of managing a potentially big patch set on top of MeeGo OS, and also verify the quality and safety of their patches. Having the patches in upstream projects again lessens the patch set management load at MeeGo.com.&lt;br /&gt;
&lt;br /&gt;
For information about pushing patches to MeeGo, see [http://meego.com/about/contribution-guidelines Contribution Guidelines] and [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process] (especially section ''How Do Patches Get Integrated and Accepted?'') and [http://meego.gitorious.org/meego-os-base/kernel-source/blobs/master/README.workflow Kernel workflow].&lt;br /&gt;
&lt;br /&gt;
=== Adaptation subsystems and interfaces ===&lt;br /&gt;
&lt;br /&gt;
In the MeeGo architecture model (see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view MeeGo Architecture Domain View]), adaptation is represented as adaptation subsystems. SW components in the adaptation subsystem ''realizations'' do things that are expected by the OS and communicate with the OS through interfaces defined by the OS.&lt;br /&gt;
 &lt;br /&gt;
The key goal in the sections below is to identify the interface(s) that the adaptation SW needs to implement/use to communicate with the OS in the required manner. Behind these interfaces, the adaptation SW can basically handle the required functionality as it sees best. In some cases, however, there may also be some preferred way of implementing the adaptation.&lt;br /&gt;
&lt;br /&gt;
In some areas, the adaptation work may consist of just writing a suitable Linux device driver for the HW in question. In some other areas, the adaptation work may consist of writing one or more device drivers, as well as one or more user space components (such as plugins to some user space SW frameworks). Various configuration file changes may also be required as a part of the adaptation work.&lt;br /&gt;
&lt;br /&gt;
== Porting by adaptation subsystems ==&lt;br /&gt;
&lt;br /&gt;
=== System Core Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Boot ====&lt;br /&gt;
&lt;br /&gt;
MeeGo places no restrictions as to what SW components are used to handle the pre-OS boot phases in a MeeGo compliant device. Thus, vendors are free to choose, for example, the boot loader, as they see fit. Note, however, that full use of the MeeGo platform security requires that the pre-OS boot phases form a trusted boot chain that ultimately builds on chipset-level security support.&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, MeeGo does not define anything special with regard to what information the boot loader is expected to pass to the Linux kernel, such as via the kernel command line.&lt;br /&gt;
&lt;br /&gt;
The kernel-level boot phases can be tailored, as necessary, to the specific CPU, chipset, or device in a standard Linux manner.&lt;br /&gt;
&lt;br /&gt;
The post-kernel boot phases (startup scripts) can be tailored by device vendors as necessary for their devices in the limits set by MeeGo compliance requirements (certain SW components need to be present in the system).&lt;br /&gt;
&lt;br /&gt;
==== Kernel fundamentals ====&lt;br /&gt;
&lt;br /&gt;
Regarding the Linux kernel, each MeeGo release defines the kernel version to be used and a set of patches on top of that. In addition, the Linux kernel used in MeeGo compliant devices is assumed to have been built with a set of fixed build-time configuration values that are not allowed to be changed. In addition to the fixed values, device vendors can define other kernel configuration values, as required by their devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo does not place any special requirements concerning how the boot loader passes information to the kernel or how the HW configuration and initialization of the system is handled.&lt;br /&gt;
&lt;br /&gt;
CPU, chipset (SoC), and device vendors are assumed to implement the elementary CPU architecture/chipset/device support for the Linux kernel used in MeeGo in a standard Linux manner. This includes:&lt;br /&gt;
* HW (board) configuration&lt;br /&gt;
* Mapping the fundamental Linux kernel functionality (such as IRQ, DMA, GPIO, RTC and memory handling) to the HW in question&lt;br /&gt;
* Creation/modification of the necessary device drivers to support the core SoC interfaces (such as I2C, SPI, SDIO)&lt;br /&gt;
* Permanent memory support&lt;br /&gt;
* Debugging and tracing support&lt;br /&gt;
&lt;br /&gt;
==== Power and thermal management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, the understanding is that MeeGo in general relies on established Linux kernel frameworks and APIs for power management. Some of these frameworks and APIs may be applicable only in certain CPU architectures. In addition, the HW capabilities related to power management may vary between different HW platforms potentially meaning that the SW is assumed perform somewhat different tasks in different environments.&lt;br /&gt;
&lt;br /&gt;
The Linux power management frameworks and APIs include:&lt;br /&gt;
* CPU frequency control (support for the different voltage and frequency operating points) via the cpufreq infrastructure&lt;br /&gt;
* CPU idle state management (different levels of sleep) through the cpuidle infrastructure&lt;br /&gt;
* Clock management through the clock framework&lt;br /&gt;
* Suspend/resume&lt;br /&gt;
* Runtime power management&lt;br /&gt;
* HW voltage/current regulator control via the regulator framework&lt;br /&gt;
* PM_QOS (power management quality of service) framework for making and listening to PM QoS requests&lt;br /&gt;
&lt;br /&gt;
Whether MeeGo will have some user space SW components or framework related to power management is under discussion at the time of this writing.&lt;br /&gt;
&lt;br /&gt;
In the thermal management area, the Device State Management Entity (DSME) component in the Device Health subsystem is supposed to make thermal state management decisions in the system. The DSME has a thermal manager module that again uses other DSME modules (thermal objects) to access the actual thermal sensor information in the HW. To port this functionality to new HW, one or more DSME thermal object modules need to be implemented.&lt;br /&gt;
&lt;br /&gt;
The APIs that the thermal object modules use to access the thermal sensor information are not strictly defined by MeeGo. At device driver level, however, the preferred approach is to use standard Linux interfaces such as the generic thermal sysfs API or the hwmon sysfs API.&lt;br /&gt;
&lt;br /&gt;
==== Energy management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, basically the only thing that MeeGo requires from HW adaptation in the energy management area (battery charging and monitoring) is support for the Linux power supply sysfs class. Additional energy management related functionality can be handled in a vendor specific manner.&lt;br /&gt;
&lt;br /&gt;
==== Device state ====&lt;br /&gt;
&lt;br /&gt;
The DSME component participates in device state management, such as by managing device run level, reboot, and shutdown, by monitoring the device thermal state, and shutting down the device in fatal thermal conditions, and by handling HW watchdog kicking activity.&lt;br /&gt;
&lt;br /&gt;
In a new HW environment, the DSME needs to be adapted to handle the watchdog kicking through the right device driver interfaces and at the right intervals. In addition, to port the DSME thermal management functionality to new HW, one or more DSME thermal object modules need to be implemented as described above, in the [[#Power_and_thermal_management|''Power and thermal management'']] section.&lt;br /&gt;
&lt;br /&gt;
=== Security Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Work is ongoing in bringing platform security functionality to the MeeGo OS based on the Mandatory Access Control (MAC), Integrity Measurement Architecture (IMA) and Extended Verification Module (EVM) technologies in the Linux kernel. Maximum security can be reached if the MeeGo platform security functionality can rely on trusted platform support &amp;quot;below&amp;quot; the Linux kernel, effectively in the HW and the boot loader(s). MeeGo, however, places no strict requirements as to how the trusted platform support is implemented in MeeGo based devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo also includes the OpenSSL open source toolkit implementing general purpose cryptography functionality. Algorithms and operations supported by the OpenSSL toolkit can be accelerated in HW by using the OpenSSL engine architecture. OpenSSL also supports a cryptodev engine that uses crypto algorithms implemented in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Some devices may have a security watchdog in the HW that needs &amp;quot;kicking&amp;quot; at regular intervals to keep the device up and running. In MeeGo, watchdog kicking functionality is implemented in the Device State Management Entity (DSME) component. If security watchdog kicking is needed, the DSME needs to be adapted to handle that through the right device driver interface and at the right intervals.&lt;br /&gt;
&lt;br /&gt;
=== Device Mode Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Resource Policy ====&lt;br /&gt;
&lt;br /&gt;
The Resource (Policy) Manager component in the Device Health subsystem offers a generic framework for:&lt;br /&gt;
* Monitoring device and application events&lt;br /&gt;
* Managing policies that specify rules about what should happen in the device when certain events occur&lt;br /&gt;
* Making policy decisions when events occur (determining the needed changes in the device)&lt;br /&gt;
* Enforcing changes in the system through policy enforcement points&lt;br /&gt;
&lt;br /&gt;
The Resource Manager can be used, for example, to change the audio routing in the device, when the user attaches a wired headset to the device.&lt;br /&gt;
&lt;br /&gt;
Event listening and change enforcement in the Resource Manager happens through plugin modules. Using the MeeGo OS in some new device effectively involves creating suitable Resource Manager policies and writing the necessary plugins for listening device/application events and changing device behavior accordingly. Though not pure HW adaptation, this can be considered a form of MeeGo OS &amp;quot;device adaptation&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Mode Control Entity (MCE) ====&lt;br /&gt;
&lt;br /&gt;
The MCE component (starting from MeeGo 1.2) can be used to listen to events that have an impact to the device mode (such as touch screen locked vs. unlocked) and change the device mode accordingly. The MCE is used, for example, to: &lt;br /&gt;
* Listen to various keys and switches in the device (such as power key, volume key, camera button, slider switch)&lt;br /&gt;
* Control LEDs&lt;br /&gt;
* Enabling/disabling touch screen or HW keyboard, depending on device state&lt;br /&gt;
* Control keyboard backlight&lt;br /&gt;
* Control display state (on/off) and brightness&lt;br /&gt;
&lt;br /&gt;
The MCE has its own plugin architecture that can be used to adapt it to different HW environments.&lt;br /&gt;
&lt;br /&gt;
=== Display and Graphics Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo visual services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view]. &lt;br /&gt;
&lt;br /&gt;
The key ingredients of the display and graphics architecture in MeeGo are the X Window System (X Server with its extensions) and the Khronos graphics APIs (OpenGL ES, OpenVG, and EGL with their extensions).&lt;br /&gt;
&lt;br /&gt;
The display and graphics HW adaptation SW needs to enable the X Window System and the Khronos APIs to function on the device HW. In practice, the adaptation SW needs to have an X display/video driver (hosted inside the X Server) and libraries that implement the Khronos graphics APIs, both supporting the features and functionality required by MeeGo. Also, some configuration file changes may be needed. Any additional user space and kernel space components needed for the HW adaptation are implementation dependent.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering display content to external displays, the Resource Manager component may be used to coordinate the display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Audio Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The audio architecture in MeeGo is centered around the GStreamer and PulseAudio frameworks. In addition, the Resource Manager plays a role in coordinating the audio related behavior of the device (audio routings). The audio HW adaptation SW needs to provide GStreamer elements and PulseAudio plugins that enable the GStreamer and PulseAudio client interfaces used for e.g. for audio playback, recording and volume control to work on the device. Typical required components include e.g. codec elements for GStreamer and sink/source plugins for PulseAudio.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer and PulseAudio plugins, the audio HW adaptation SW can be implemented with different technologies and APIs, including ALSA and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework as needed. Use of the ALSA framework and APIs is encouraged, however, as they allow significant reuse of components and functionality on the PulseAudio level and are already a part of the upstream Linux kernel. If ALSA is not used to implement the kernel side parts of the audio adaptation, the solution that is used instead should still be aligned with the upstream Linux kernel.&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo media services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view]. &lt;br /&gt;
&lt;br /&gt;
=== Camera Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo still imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework and the CameraBin GStreamer element. The still imaging HW adaptation SW is required to contain a GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element. Thus, the required HW adaptation interfaces are the relevant GStreamer plugin interfaces and especially the interfaces expected by the CameraBin element, in particular the GstPhotography interface.&lt;br /&gt;
&lt;br /&gt;
If HW accelerated encoders are supported, they should be also offered to the system as GStreamer elements.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
=== Video and Imaging Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo video imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework, the CameraBin GStreamer element (video recording) and the Playbin2 GStreamer element (video playback). The video imaging HW adaptation SW is required to contain:&lt;br /&gt;
:* A GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element (this is common with still imaging) &lt;br /&gt;
:* If HW accelerated codecs are supported, GStreamer elements that wrap the codecs&lt;br /&gt;
:* If HW accelerated filters are supported (e.g. video scaler, rotation engines, color conversion engines), GStreamer elements that wrap the filters&lt;br /&gt;
:* A GStreamer video sink element that offers the GStreamer X Overlay Interface. Note that if the XVideo extension is supported on the X Server side, the xvimagesink element can be used as the video sink element and no new elements are needed.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the video imaging HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering video content to external displays, the Resource Manager component may be used to coordinate the video/display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Communications Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo communications services architecture, see [http://meego.com/developers/meego-architecture/comms-services Comms Services].&lt;br /&gt;
&lt;br /&gt;
==== Cellular ====&lt;br /&gt;
&lt;br /&gt;
The cellular telephony architecture in MeeGo is centered on the oFono, PulseAudio and Telepathy frameworks. In addition, the Resource Manager plays a role in coordinating the device behavior during voice calls.&lt;br /&gt;
&lt;br /&gt;
The cellular modem HW adaptation SW must implement the following interfaces towards the MeeGo OS:&lt;br /&gt;
:* oFono modem plugin/driver API&lt;br /&gt;
:* Linux network interface for the Linux TCP/IP stack (for data communications)&lt;br /&gt;
:* Relevant PulseAudio plugin interfaces for cellular voice call audio handling&lt;br /&gt;
&lt;br /&gt;
For more detailed information about the oFono APIs, see the documentation and source code available at [http://git.kernel.org/?p=network/ofono/ofono.git;a=summary oFono git].&lt;br /&gt;
&lt;br /&gt;
==== USB ====&lt;br /&gt;
&lt;br /&gt;
The foundation of the the MeeGo USB functionality is the standard Linux USB subsystem. The Linux USB subsystem defines the USB related HW adaptation interfaces that need to be supported in MeeGo. In practice, these are kernel side interfaces between the generic USB functionality and a HW dependent USB host controller driver.&lt;br /&gt;
&lt;br /&gt;
==== WLAN ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo WLAN architecture is centered on the [http://linuxwireless.org/ Linux wireless] (IEEE-802.11) subsystem. The Linux wireless SW stack defines the WLAN HW adaptation SW interfaces that need to be used in MeeGo. In practice, the required interfaces are defined by cfg80211 for FullMAC WLAN devices and by mac80211 for SoftMAC WLAN devices. In addition, a Linux network interface needs to be supported towards the Linux TCP/IP stack.&lt;br /&gt;
&lt;br /&gt;
==== Bluetooth ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Bluetooth architecture is centered on the [http://www.bluez.org/ BlueZ] SW stack. The BlueZ SW stack defines the Bluetooth HW adaptation SW interfaces that need to be used in MeeGo. In practice, these are Linux kernel side interfaces between the generic HCI (Host Controller Interface) core and a HW specific HCI driver.&lt;br /&gt;
&lt;br /&gt;
=== Location Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The MeeGo location architecture is based on [http://http://labs.trolltech.com/page/Projects/QtMobility| QtMobility Location API].  The QtMobility 1.0 Location API provides geographic coordinates only.  The QtMobility 1.1 Location API provides geocoding and reverse geocoding, POI search, navigation, and mapping.  The 1.0 Location API is available in MeeGo 1.1.  The 1.1 or later Location API will be available in MeeGo 1.2.  The Location API uses a plugin system for implementations of the underlying backend.  MeeGo compliance requirements require support for the QtMobility Location API and thus require one or more plugins to support these APIs.  MeeGo places no restrictions as to how the plugins are implemented, however. Adaptation to location related HW may be done by manufacturers or service providers and the way how it's done is not defined by the API.&lt;br /&gt;
&lt;br /&gt;
MeeGo will use [http://www.freedesktop.org/wiki/Software/GeoClue GeoClue] as the reference location framework and the reference implementation of the Qt Mobility location API backend will be written on top of GeoClue. GeoClue defines a set of (D-Bus) APIs for accessing location services provided by service providers implemented as D-Bus services. In addition, GeoClue includes a set of service provider implementations and (at the time of this writing) an experimental master service provider that can act as a proxy between clients and the actual service providers. If a device vendor wants to take advantage of this existing functionality, the vendor can implement their location services &amp;quot;behind&amp;quot; the GeoClue APIs as GeoClue service providers. In such a case, adaptation to the location related HW would happen inside the service providers as defined by the service provider designs.&lt;br /&gt;
&lt;br /&gt;
=== Sensor Adaptation === &lt;br /&gt;
&lt;br /&gt;
The key component in the MeeGo sensor handling architecture is the Sensor Framework. The Sensor Framework uses both HW independent logical sensor plugins and HW dependent sensor adaptor plugins in its operation. The required sensor HW adaptation interfaces in MeeGo are the interfaces that the Sensor Framework and the logical sensor plugins define for the sensor adaptor plugins to implement. The sensor adaptor plugins typically communicate directly with sensor HW drivers in the Linux kernel. The interfaces that the sensor HW drivers expose to the user space are not defined by MeeGo. Sensor HW adaptation in MeeGo thus consists of adaptor plugins in the Sensor Framework and sensor HW drivers in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Note that thermal sensors are handled in a different manner as described in the [[#Power and thermal management|''Power and thermal management'']] section above.&lt;br /&gt;
&lt;br /&gt;
=== Input Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Touch ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the touch input handling path in MeeGo are the touch HW device driver, Linux kernel input subsystem, X server, X input driver, Qt and finally the MeeGo Touch Framework. Enabling touch support for some new HW requires at least the implementation of the corresponding touch HW device driver in the Linux kernel. If this driver communicates touch events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, basically the existing functionality in X server (e.g. evdev input driver) and above can be used as such. In case the kernel-to-user-space interface is non-standard, it is also possible to implement a new X input driver as a part of the touch HW adaptation.&lt;br /&gt;
&lt;br /&gt;
Multi-touch support in X requires a new version, 2.1, of the [http://cgit.freedesktop.org/~whot/inputproto/tree/XI2proto.txt?h=multitouch X Input Extension] and this also requires support from the client side, in this case Qt's multi-touch support. Once this support has been implemented throughout the SW stack, including X evdev input driver, supporting multi-touch for some new HW should require only the implementation of a touch HW device driver that implements the standard Linux multi-touch interface. This should be the case in MeeGo 1.2. &lt;br /&gt;
&lt;br /&gt;
Before 1.2, multi-touch support in MeeGo uses a special X input driver (mtev), X server multi-pointer support (MPX) and Qt multi-touch support written on top of MPX. This solution requires the touch HW device driver to expose a user-space interface that is compatible with mtev.&lt;br /&gt;
&lt;br /&gt;
==== HW keyboard ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the HW keyboard input handling path in MeeGo are the keyboard HW device driver, Linux kernel input subsystem, X server, X input driver and Qt. Enabling keyboard support for some new HW requires typically only the implementation of the corresponding keyboard HW device driver in the Linux kernel. If this driver communicates key events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, the existing functionality in X server (e.g. evdev input driver) and above should work as such. In case the kernel-to-user space interface is non-standard, it is also possible to implement a new X input driver as a part of the keyboard HW adaptation.&lt;br /&gt;
&lt;br /&gt;
==== Buttons and switches ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo includes the MCE and System SW Qt API (QmSystem) components. The MCE can be used to control the device mode and it listens to power button events and e.g. device open/close switch events via the respective device driver interfaces. The System SW Qt API on the other hand provides a Qt API to various system information, including events from various physical buttons in the device (e.g. volume button, camera button). The System SW Qt API gets the button events either by listening to the relevant device driver interfaces or through the MCE component.&lt;br /&gt;
&lt;br /&gt;
Both the MCE and the System SW Qt API components can be adapted to new devices by device vendors.&lt;br /&gt;
&lt;br /&gt;
=== Haptics and Vibra Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Haptics ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Touch Framework present (at least) in the MeeGo handset device category contains a component called Feedback Framework (meegotouch-feedback) that handles the creation of auditory and/or haptic feedback to touch events. The haptic feedback can be created e.g. with vibra motors or piezo elements. In the Feedback Framework, the different types of feedback are created by backend libraries implemented as plugins. &lt;br /&gt;
&lt;br /&gt;
The haptics related HW adaptation interface from MeeGo OS perspective is the backend plugin interface defined by the Feedback Framework. The plugins can then communicate with the HW either through some device driver interface or some intermediate SW layers (MeeGo places no restrictions as to how the plugins are implemented).&lt;br /&gt;
&lt;br /&gt;
==== Vibra (notifications/alerts) ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo (at least the handset category) will include a component called Non-Graphical Feedback Framework (NGF). This component offers the capability of playing e.g. audio, vibra or led as an indication of events such as incoming call/message, clock and calendar alarms, missed calls, unread messages etc. The NGF also integrates with the Resource Policy to decide about the available playback resources based on policy rules and the current system state.&lt;br /&gt;
&lt;br /&gt;
The actual playback of the different types of notifications is handled by NGF plugins that can be created by device vendors. The plugins communicate with the relevant HW as they see best, e.g. directly through some device driver interface or via some intermediate user space SW components. The plugin interfaces defined by NGF thus form the notification/alert vibra adaptation interface in MeeGo.&lt;br /&gt;
&lt;br /&gt;
=== Production Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Production deals with areas such as flashing, testing, tuning and certification. The current understanding is that these areas are handled in a vendor specific manner, including the adaptation.&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Noel</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/MeeGo_Porting_Guide</id>
		<title>MeeGo Porting Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/MeeGo_Porting_Guide"/>
				<updated>2011-06-24T23:09:04Z</updated>
		
		<summary type="html">&lt;p&gt;Noel: /* Mode Control Entity (MCE) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The goal of MeeGo Porting Guide (MPG) is to provide valuable information and instructions to people who want to run MeeGo OS on their (new) HW and eventually create products based on the MeeGo OS. The MPG starts with an overview of the porting process, tools, and other related background information and then moves on to describing what the porting actually means in individual technical/functional areas.&lt;br /&gt;
&lt;br /&gt;
The porting guide is not strictly tied to any particular MeeGo OS version or device category. Instead, it tries to be general enough to cover the different device categories, as well as follow changes introduced in new MeeGo OS versions.&lt;br /&gt;
&lt;br /&gt;
Detailed porting information in the different technical areas is dependent on the respective [http://meego.com/developers/meego-architecture MeeGo architecture]. In some cases, this architecture may still be open and this is noted in the applicable sections.&lt;br /&gt;
&lt;br /&gt;
=== Feedback ===&lt;br /&gt;
&lt;br /&gt;
Contribution to these pages is open. Any MeeGo community member is free to ''improve'' these pages at any time. You can also leave feedback in the [http://lists.meego.com/listinfo/meego-porting MeeGo porting mailing list].&lt;br /&gt;
&lt;br /&gt;
== General porting information/guidelines ==&lt;br /&gt;
&lt;br /&gt;
=== MeeGo compliance ===&lt;br /&gt;
&lt;br /&gt;
Perhaps the most important piece of background information related to the MPG are the [[Quality/Compliance|MeeGo compliance requirements]]. A device that is meant to be MeeGo compliant will need to fulfill the requirements listed in the MeeGo compliance specification for the applicable device category (the first version of the specification is supposed to be available in October 2010). In short, a MeeGo compliant device will need to:&lt;br /&gt;
* Meet the minimum HW performance and component requirements for the applicable device category&lt;br /&gt;
* Include all SW components that form the MeeGo core OS&lt;br /&gt;
* Include the additional SW components required to be present in devices in the applicable device category&lt;br /&gt;
* Not break the API/ABI of any of the components coming from MeeGo&lt;br /&gt;
* Follow the MeeGo SW packaging conventions&lt;br /&gt;
&lt;br /&gt;
The compliance rules will also specify CPU architecture specific requirements concerning how MeeGo OS itself and MeeGo applications are to be compiled to different environments (instruction set used, compiler version, compiler options, etc.).&lt;br /&gt;
&lt;br /&gt;
A device vendor may include additional functionality, HW components and SW components in their devices, as long as they don't break MeeGo compliance. The vendor can also patch MeeGo OS components, if the patches don't break MeeGo compliance. A device vendor's own SW components can be either open source or closed source components, as long as they adhere to the rules set by the applicable SW licenses.&lt;br /&gt;
&lt;br /&gt;
From the MeeGo Porting Guide perspective, by defining the SW components and HW components that need to be present, the compliance requirements effectively define the minimum set of porting tasks required from a device vendor and what SW components are involved from MeeGo OS side.&lt;br /&gt;
&lt;br /&gt;
=== Porting process and tools ===&lt;br /&gt;
&lt;br /&gt;
==== Overview ====&lt;br /&gt;
&lt;br /&gt;
As long as a vendor's device is MeeGo compliant, as defined above, it is basically up to the vendor to decide how they build the SW that ends up in the device. The vendor may use their own build machinery or set up an OBS build system that is also used in MeeGo. Regardless of what the vendor's build system is, it needs to integrate with the MeeGo build infrastructure, at least to fetch the MeeGo source packages for the builds, as well as build each MeeGo component in the same way as it would be built in the MeeGo build system (such as with the same compiler and compiler options). Whatever the case, the intention in MeeGo is to use and offer an open toolset that any HW or SW vendor can use for efficient SW creation. It is likely that using the same toolset as MeeGo, will offer the easiest way to integrate vendor's own build system with the the MeeGo build infrastructure.&lt;br /&gt;
&lt;br /&gt;
The key ingredients of the MeeGo build infrastructure and toolset are:&lt;br /&gt;
* [http://meego.gitorious.org MeeGo Gitorious]&lt;br /&gt;
** A version control system for the source files of various MeeGo specific SW components and tools&lt;br /&gt;
* [http://build.meego.com MeeGo OBS]&lt;br /&gt;
** The build system that is used to build MeeGo packages (RPMs) from their sources&lt;br /&gt;
* [http://repo.meego.com MeeGo Repository]&lt;br /&gt;
** The place where the built MeeGo releases, that is where MeeGo packages and images are stored&lt;br /&gt;
* [http://wiki.meego.com/Image_Creation MeeGo Image Creator]&lt;br /&gt;
** The tool used to build MeeGo images that can be installed/flashed on HW&lt;br /&gt;
* MeeGo release tools&lt;br /&gt;
** Tools such as BOSS and REVS that are used in the creation of the MeeGo releases under repo.meego.com&lt;br /&gt;
&lt;br /&gt;
For additional information, see [[Build Infrastructure]], [[Release Infrastructure]] and [[Release Engineering]].&lt;br /&gt;
&lt;br /&gt;
For another overview of the MeeGo porting process, see [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process].&lt;br /&gt;
&lt;br /&gt;
==== Vendor's own OBS ====&lt;br /&gt;
&lt;br /&gt;
So, ultimately, when creating actual products running the MeeGo OS, the vendor may end up setting up their own OBS build system. Setting up your own OBS system may also be beneficial in earlier HW/product development phases, as it offers a flexible way to modify and build MeeGo OS to test it on the new HW. The vendor's own OBS system can link to the MeeGo OBS for handling packages that come directly from MeeGo and it can link to other sources for handling, such as closed source packages that are specific to the vendor. See [[Release_Engineering/Process#Making a product out of MeeGo Release|an overview picture of this setup]].&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Sets up their own OBS system&lt;br /&gt;
** [[User:Stskeeps/10_easy_steps_to_a_local_OBS|Instructions related to setting up an OBS system]],  [[Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE112|OBS Applicances]] [http://en.opensuse.org/openSUSE:Build_Service_private_instance Open Suse OBS Wiki].&lt;br /&gt;
* Creates projects under the their own OBS for their own components&lt;br /&gt;
* Links their own OBS to the MeeGo OBS for MeeGo components&lt;br /&gt;
* May have trial patches to MeeGo components in their own OBS&lt;br /&gt;
** NOTE. Eventually all patches to MeeGo components required in a final MeeGo based product ''should'' be pushed to MeeGo.com. However, this is not an absolute must requirement, as long as the MeeGo compliance requirements and applicable SW license rules are fulfilled. &lt;br /&gt;
** See [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below&lt;br /&gt;
* Needs to set up the necessary machinery to create releases and images from the packages built with OBS&lt;br /&gt;
** This machinery can be based on the toolset used in MeeGo (see above)&lt;br /&gt;
&lt;br /&gt;
==== Working under MeeGo.com ====&lt;br /&gt;
&lt;br /&gt;
Another way of porting MeeGo to some new HW is to get the new HW accepted as one MeeGo reference HW and have the MeeGo build machinery create builds for the reference HW as a part of the normal MeeGo release building cycle (see [[Release Engineering/Release Timeline|Release Timeline]] and [[Release Engineering/Process|Release Process]]). This setup can also include QA support for the reference HW on the MeeGo side (see [[Quality]]). At the time of this writing, the actual process of getting new reference HW to MeeGo is still somewhat unclear. In any case, this model requires active participation from the vendor in MeeGo work in general and especially in supporting their reference HW in MeeGo.&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Creates a device/platform development project under the MeeGo OBS for their components. The open source components would then get submitted to MeeGo Trunk:Testing and get reviewed like any other MeeGo component for inclusion.&lt;br /&gt;
** Note that it is also possible to have closed source binary components in the MeeGo OBS to be included in the MeeGo builds for some reference HW. These are submitted to the Trunk:non-oss repository. Licensing is usually required to at least include redistributability, as the components cannot be mirrored from or hosted at repo.meego.com otherwise. It is not possible to have components within Trunk:Testing require closed source dependencies.&lt;br /&gt;
* Pushes patches to other MeeGo components at MeeGo.com as necessary (see [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below)&lt;br /&gt;
* Creates (or supports the creation of) a MIC kickstart file for building images for their reference HW&lt;br /&gt;
* As necessary, supports adding support for their reference HW and SW components in the MeeGo build and release infrastructure tools&lt;br /&gt;
&lt;br /&gt;
==== Trials ====&lt;br /&gt;
&lt;br /&gt;
A lightweight but also more limited &amp;quot;try it out&amp;quot; alternative to the above processes is discussed below.&lt;br /&gt;
&lt;br /&gt;
===== Initial bring-up attempt =====&lt;br /&gt;
&lt;br /&gt;
* Grab the already built root filesystem / image for a MeeGo reference device that's the closest to your target. For ARMv7, this is typically the Nokia N900 handset image. For Atom, this could be netbook image or handset image.&lt;br /&gt;
* Build a Linux kernel for your device and install the modules into /lib/modules.&lt;br /&gt;
* Boot the root filesystem and modify the configuration and drop in components to bring up the device to UX. Note down the things you had to modify or add, as this will be input for your porting work.&lt;br /&gt;
&lt;br /&gt;
===== Building your first image =====&lt;br /&gt;
&lt;br /&gt;
The second step to a proper hardware adaptation is making sure you can build your own image. Because we based our work before on a reference device image, it makes sense to try to build this image first. MeeGo images are constructed on the basis of so called 'kickstart files', which describe the intended contents of an image. &lt;br /&gt;
&lt;br /&gt;
* Install the MeeGo Image Creator tool (MIC)&lt;br /&gt;
* Download the kickstart file (.ks) from the same directory you found your reference device image. &lt;br /&gt;
* Create a image using mic-image-creator (should be elaborated).&lt;br /&gt;
* Test out your freshly baked image as in the previous step.&lt;br /&gt;
&lt;br /&gt;
===== Building your port's first reproduciable image =====&lt;br /&gt;
&lt;br /&gt;
* Download the MeeGo kernel, possibly modifying the kernel with additional patches (including new device drivers) and building the kernel (see [[#Getting_new_chipset_support_to_the_MeeGo_kernel|''Getting new chipset support to the MeeGo kernel'']] below). &lt;br /&gt;
* Add the repository containing your kernel package to the kickstart file (to be elaborated)&lt;br /&gt;
* Remove parts of the kickstart file specific to the reference device.&lt;br /&gt;
* Add a mention of your kernel package in the %packages section.&lt;br /&gt;
* Build packages or include shell scripts in %post section of kickstart file that adds/modifies configuration fitting your device.&lt;br /&gt;
&lt;br /&gt;
A detailed description of a variation of this model can be found from [[ARM/Meego on Beagleboard from scratch|here]] (Better description needed).&lt;br /&gt;
&lt;br /&gt;
==== Getting new chipset support to the MeeGo kernel ====&lt;br /&gt;
&lt;br /&gt;
See [[How-to: getting new chipset support to the MeeGo kernel]] for more detailed information about how to work with the MeeGo kernel and make it support new HW.&lt;br /&gt;
&lt;br /&gt;
=== Upstream projects, MeeGo, products, and patches ===&lt;br /&gt;
&lt;br /&gt;
When building a product based on MeeGo, the product vendor will typically augment the MeeGo OS with their own SW components, as well as make fixes and adjustments to the MeeGo OS code (in the limits set by the compliance rules). While vendors can manage their own SW components as they wish, the strong preference is that any changes made to the MeeGo OS SW components are delivered as patches primarily to the respective upstream projects or secondarily to MeeGo.com. In this way, vendors can relieve themselves of the burden of managing a potentially big patch set on top of MeeGo OS, and also verify the quality and safety of their patches. Having the patches in upstream projects again lessens the patch set management load at MeeGo.com.&lt;br /&gt;
&lt;br /&gt;
For information about pushing patches to MeeGo, see [http://meego.com/about/contribution-guidelines Contribution Guidelines] and [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process] (especially section ''How Do Patches Get Integrated and Accepted?'') and [http://meego.gitorious.org/meego-os-base/kernel-source/blobs/master/README.workflow Kernel workflow].&lt;br /&gt;
&lt;br /&gt;
=== Adaptation subsystems and interfaces ===&lt;br /&gt;
&lt;br /&gt;
In the MeeGo architecture model (see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view MeeGo Architecture Domain View]), adaptation is represented as adaptation subsystems. SW components in the adaptation subsystem ''realizations'' do things that are expected by the OS and communicate with the OS through interfaces defined by the OS.&lt;br /&gt;
 &lt;br /&gt;
The key goal in the sections below is to identify the interface(s) that the adaptation SW needs to implement/use to communicate with the OS in the required manner. Behind these interfaces, the adaptation SW can basically handle the required functionality as it sees best. In some cases, however, there may also be some preferred way of implementing the adaptation.&lt;br /&gt;
&lt;br /&gt;
In some areas, the adaptation work may consist of just writing a suitable Linux device driver for the HW in question. In some other areas, the adaptation work may consist of writing one or more device drivers, as well as one or more user space components (such as plugins to some user space SW frameworks). Various configuration file changes may also be required as a part of the adaptation work.&lt;br /&gt;
&lt;br /&gt;
== Porting by adaptation subsystems ==&lt;br /&gt;
&lt;br /&gt;
=== System Core Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Boot ====&lt;br /&gt;
&lt;br /&gt;
MeeGo places no restrictions as to what SW components are used to handle the pre-OS boot phases in a MeeGo compliant device. Thus, vendors are free to choose, for example, the boot loader, as they see fit. Note, however, that full use of the MeeGo platform security requires that the pre-OS boot phases form a trusted boot chain that ultimately builds on chipset-level security support.&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, MeeGo does not define anything special with regard to what information the boot loader is expected to pass to the Linux kernel, such as via the kernel command line.&lt;br /&gt;
&lt;br /&gt;
The kernel-level boot phases can be tailored, as necessary, to the specific CPU, chipset, or device in a standard Linux manner.&lt;br /&gt;
&lt;br /&gt;
The post-kernel boot phases (startup scripts) can be tailored by device vendors as necessary for their devices in the limits set by MeeGo compliance requirements (certain SW components need to be present in the system).&lt;br /&gt;
&lt;br /&gt;
==== Kernel fundamentals ====&lt;br /&gt;
&lt;br /&gt;
Regarding the Linux kernel, each MeeGo release defines the kernel version to be used and a set of patches on top of that. In addition, the Linux kernel used in MeeGo compliant devices is assumed to have been built with a set of fixed build-time configuration values that are not allowed to be changed. In addition to the fixed values, device vendors can define other kernel configuration values, as required by their devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo does not place any special requirements concerning how the boot loader passes information to the kernel or how the HW configuration and initialization of the system is handled.&lt;br /&gt;
&lt;br /&gt;
CPU, chipset (SoC), and device vendors are assumed to implement the elementary CPU architecture/chipset/device support for the Linux kernel used in MeeGo in a standard Linux manner. This includes:&lt;br /&gt;
* HW (board) configuration&lt;br /&gt;
* Mapping the fundamental Linux kernel functionality (such as IRQ, DMA, GPIO, RTC and memory handling) to the HW in question&lt;br /&gt;
* Creation/modification of the necessary device drivers to support the core SoC interfaces (such as I2C, SPI, SDIO)&lt;br /&gt;
* Permanent memory support&lt;br /&gt;
* Debugging and tracing support&lt;br /&gt;
&lt;br /&gt;
==== Power and thermal management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, the understanding is that MeeGo in general relies on established Linux kernel frameworks and APIs for power management. Some of these frameworks and APIs may be applicable only in certain CPU architectures. In addition, the HW capabilities related to power management may vary between different HW platforms potentially meaning that the SW is assumed perform somewhat different tasks in different environments.&lt;br /&gt;
&lt;br /&gt;
The Linux power management frameworks and APIs include:&lt;br /&gt;
* CPU frequency control (support for the different voltage and frequency operating points) via the cpufreq infrastructure&lt;br /&gt;
* CPU idle state management (different levels of sleep) through the cpuidle infrastructure&lt;br /&gt;
* Clock management through the clock framework&lt;br /&gt;
* Suspend/resume&lt;br /&gt;
* Runtime power management&lt;br /&gt;
* HW voltage/current regulator control via the regulator framework&lt;br /&gt;
* PM_QOS (power management quality of service) framework for making and listening to PM QoS requests&lt;br /&gt;
&lt;br /&gt;
Whether MeeGo will have some user space SW components or framework related to power management is under discussion at the time of this writing.&lt;br /&gt;
&lt;br /&gt;
In the thermal management area, the Device State Management Entity (DSME) component in the Device Health subsystem is supposed to make thermal state management decisions in the system. The DSME has a thermal manager module that again uses other DSME modules (thermal objects) to access the actual thermal sensor information in the HW. To port this functionality to new HW, one or more DSME thermal object modules need to be implemented.&lt;br /&gt;
&lt;br /&gt;
The APIs that the thermal object modules use to access the thermal sensor information are not strictly defined by MeeGo. At device driver level, however, the preferred approach is to use standard Linux interfaces such as the generic thermal sysfs API or the hwmon sysfs API.&lt;br /&gt;
&lt;br /&gt;
==== Energy management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, basically the only thing that MeeGo requires from HW adaptation in the energy management area (battery charging and monitoring) is support for the Linux power supply sysfs class. Additional energy management related functionality can be handled in a vendor specific manner.&lt;br /&gt;
&lt;br /&gt;
==== Device state ====&lt;br /&gt;
&lt;br /&gt;
The DSME component participates in device state management, such as by managing device run level, reboot, and shutdown, by monitoring the device thermal state, and shutting down the device in fatal thermal conditions, and by handling HW watchdog kicking activity.&lt;br /&gt;
&lt;br /&gt;
In a new HW environment, the DSME needs to be adapted to handle the watchdog kicking through the right device driver interfaces and at the right intervals. In addition, to port the DSME thermal management functionality to new HW, one or more DSME thermal object modules need to be implemented as described above, in the [[#Power_and_thermal_management|''Power and thermal management'']] section.&lt;br /&gt;
&lt;br /&gt;
=== Security Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Work is ongoing in bringing platform security functionality to the MeeGo OS based on the Mandatory Access Control (MAC), Integrity Measurement Architecture (IMA) and Extended Verification Module (EVM) technologies in the Linux kernel. Maximum security can be reached if the MeeGo platform security functionality can rely on trusted platform support &amp;quot;below&amp;quot; the Linux kernel, effectively in the HW and the boot loader(s). MeeGo, however, places no strict requirements as to how the trusted platform support is implemented in MeeGo based devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo also includes the OpenSSL open source toolkit implementing general purpose cryptography functionality. Algorithms and operations supported by the OpenSSL toolkit can be accelerated in HW by using the OpenSSL engine architecture. OpenSSL also supports a cryptodev engine that uses crypto algorithms implemented in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Some devices may have a security watchdog in the HW that needs &amp;quot;kicking&amp;quot; at regular intervals to keep the device up and running. In MeeGo, watchdog kicking functionality is implemented in the Device State Management Entity (DSME) component. If security watchdog kicking is needed, the DSME needs to be adapted to handle that through the right device driver interface and at the right intervals.&lt;br /&gt;
&lt;br /&gt;
=== Device Mode Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Resource Policy ====&lt;br /&gt;
&lt;br /&gt;
The Resource (Policy) Manager component in the Device Health subsystem offers a generic framework for:&lt;br /&gt;
* Monitoring device and application events&lt;br /&gt;
* Managing policies that specify rules about what should happen in the device when certain events occur&lt;br /&gt;
* Making policy decisions when events occur (determining the needed changes in the device)&lt;br /&gt;
* Enforcing changes in the system through policy enforcement points&lt;br /&gt;
&lt;br /&gt;
The Resource Manager can be used, for example, to change the audio routing in the device, when the user attaches a wired headset to the device.&lt;br /&gt;
&lt;br /&gt;
Event listening and change enforcement in the Resource Manager happens through plugin modules. Using the MeeGo OS in some new device effectively involves creating suitable Resource Manager policies and writing the necessary plugins for listening device/application events and changing device behavior accordingly. Though not pure HW adaptation, this can be considered a form of MeeGo OS &amp;quot;device adaptation&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Mode Control Entity (MCE) ====&lt;br /&gt;
&lt;br /&gt;
The MCE component (starting from MeeGo 1.2) can be used to listen to events that have an impact to the device mode (such as touch screen locked vs. unlocked) and change the device mode accordingly. The MCE is used, for example, to: &lt;br /&gt;
* Listen to various keys and switches in the device (such as power key, volume key, camera button, slider switch)&lt;br /&gt;
* Control LEDs&lt;br /&gt;
* Enabling/disabling touch screen or HW keyboard, depending on device state&lt;br /&gt;
* Control keyboard backlight&lt;br /&gt;
* Control display state (on/off) and brightness&lt;br /&gt;
&lt;br /&gt;
The MCE has its own plugin architecture that can be used to adapt it to different HW environments.&lt;br /&gt;
&lt;br /&gt;
=== Display and Graphics Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo visual services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view]. &lt;br /&gt;
&lt;br /&gt;
The key ingredients of the display and graphics architecture in MeeGo are the X Window System (X Server with its extensions) and the Khronos graphics APIs (OpenGL ES, OpenVG and EGL with their extensions).&lt;br /&gt;
&lt;br /&gt;
The display and graphics HW adaptation SW needs to enable the X Window System and the Khronos APIs to function on the device HW. In practice, the adaptation SW needs to have an X display/video driver (hosted inside the X Server) and libraries that implement the Khronos graphics APIs, both supporting the features and functionality required by MeeGo. Also some configuration file changes may be needed. Any additional user space and kernel space components needed for the HW adaptation are implementation dependent.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering display content to external displays, the Resource Manager component may be used to coordinate the display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Audio Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The audio architecture in MeeGo is centered around the GStreamer and PulseAudio frameworks. In addition, the Resource Manager plays a role in coordinating the audio related behavior of the device (audio routings). The audio HW adaptation SW needs to provide GStreamer elements and PulseAudio plugins that enable the GStreamer and PulseAudio client interfaces used for e.g. for audio playback, recording and volume control to work on the device. Typical required components include e.g. codec elements for GStreamer and sink/source plugins for PulseAudio.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer and PulseAudio plugins, the audio HW adaptation SW can be implemented with different technologies and APIs, including ALSA and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework as needed. Use of the ALSA framework and APIs is encouraged, however, as they allow significant reuse of components and functionality on the PulseAudio level and are already a part of the upstream Linux kernel. If ALSA is not used to implement the kernel side parts of the audio adaptation, the solution that is used instead should still be aligned with the upstream Linux kernel.&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo media services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view]. &lt;br /&gt;
&lt;br /&gt;
=== Camera Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo still imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework and the CameraBin GStreamer element. The still imaging HW adaptation SW is required to contain a GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element. Thus, the required HW adaptation interfaces are the relevant GStreamer plugin interfaces and especially the interfaces expected by the CameraBin element, in particular the GstPhotography interface.&lt;br /&gt;
&lt;br /&gt;
If HW accelerated encoders are supported, they should be also offered to the system as GStreamer elements.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
=== Video and Imaging Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo video imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework, the CameraBin GStreamer element (video recording) and the Playbin2 GStreamer element (video playback). The video imaging HW adaptation SW is required to contain:&lt;br /&gt;
:* A GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element (this is common with still imaging) &lt;br /&gt;
:* If HW accelerated codecs are supported, GStreamer elements that wrap the codecs&lt;br /&gt;
:* If HW accelerated filters are supported (e.g. video scaler, rotation engines, color conversion engines), GStreamer elements that wrap the filters&lt;br /&gt;
:* A GStreamer video sink element that offers the GStreamer X Overlay Interface. Note that if the XVideo extension is supported on the X Server side, the xvimagesink element can be used as the video sink element and no new elements are needed.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the video imaging HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering video content to external displays, the Resource Manager component may be used to coordinate the video/display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Communications Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo communications services architecture, see [http://meego.com/developers/meego-architecture/comms-services Comms Services].&lt;br /&gt;
&lt;br /&gt;
==== Cellular ====&lt;br /&gt;
&lt;br /&gt;
The cellular telephony architecture in MeeGo is centered on the oFono, PulseAudio and Telepathy frameworks. In addition, the Resource Manager plays a role in coordinating the device behavior during voice calls.&lt;br /&gt;
&lt;br /&gt;
The cellular modem HW adaptation SW must implement the following interfaces towards the MeeGo OS:&lt;br /&gt;
:* oFono modem plugin/driver API&lt;br /&gt;
:* Linux network interface for the Linux TCP/IP stack (for data communications)&lt;br /&gt;
:* Relevant PulseAudio plugin interfaces for cellular voice call audio handling&lt;br /&gt;
&lt;br /&gt;
For more detailed information about the oFono APIs, see the documentation and source code available at [http://git.kernel.org/?p=network/ofono/ofono.git;a=summary oFono git].&lt;br /&gt;
&lt;br /&gt;
==== USB ====&lt;br /&gt;
&lt;br /&gt;
The foundation of the the MeeGo USB functionality is the standard Linux USB subsystem. The Linux USB subsystem defines the USB related HW adaptation interfaces that need to be supported in MeeGo. In practice, these are kernel side interfaces between the generic USB functionality and a HW dependent USB host controller driver.&lt;br /&gt;
&lt;br /&gt;
==== WLAN ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo WLAN architecture is centered on the [http://linuxwireless.org/ Linux wireless] (IEEE-802.11) subsystem. The Linux wireless SW stack defines the WLAN HW adaptation SW interfaces that need to be used in MeeGo. In practice, the required interfaces are defined by cfg80211 for FullMAC WLAN devices and by mac80211 for SoftMAC WLAN devices. In addition, a Linux network interface needs to be supported towards the Linux TCP/IP stack.&lt;br /&gt;
&lt;br /&gt;
==== Bluetooth ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Bluetooth architecture is centered on the [http://www.bluez.org/ BlueZ] SW stack. The BlueZ SW stack defines the Bluetooth HW adaptation SW interfaces that need to be used in MeeGo. In practice, these are Linux kernel side interfaces between the generic HCI (Host Controller Interface) core and a HW specific HCI driver.&lt;br /&gt;
&lt;br /&gt;
=== Location Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The MeeGo location architecture is based on [http://http://labs.trolltech.com/page/Projects/QtMobility| QtMobility Location API].  The QtMobility 1.0 Location API provides geographic coordinates only.  The QtMobility 1.1 Location API provides geocoding and reverse geocoding, POI search, navigation, and mapping.  The 1.0 Location API is available in MeeGo 1.1.  The 1.1 or later Location API will be available in MeeGo 1.2.  The Location API uses a plugin system for implementations of the underlying backend.  MeeGo compliance requirements require support for the QtMobility Location API and thus require one or more plugins to support these APIs.  MeeGo places no restrictions as to how the plugins are implemented, however. Adaptation to location related HW may be done by manufacturers or service providers and the way how it's done is not defined by the API.&lt;br /&gt;
&lt;br /&gt;
MeeGo will use [http://www.freedesktop.org/wiki/Software/GeoClue GeoClue] as the reference location framework and the reference implementation of the Qt Mobility location API backend will be written on top of GeoClue. GeoClue defines a set of (D-Bus) APIs for accessing location services provided by service providers implemented as D-Bus services. In addition, GeoClue includes a set of service provider implementations and (at the time of this writing) an experimental master service provider that can act as a proxy between clients and the actual service providers. If a device vendor wants to take advantage of this existing functionality, the vendor can implement their location services &amp;quot;behind&amp;quot; the GeoClue APIs as GeoClue service providers. In such a case, adaptation to the location related HW would happen inside the service providers as defined by the service provider designs.&lt;br /&gt;
&lt;br /&gt;
=== Sensor Adaptation === &lt;br /&gt;
&lt;br /&gt;
The key component in the MeeGo sensor handling architecture is the Sensor Framework. The Sensor Framework uses both HW independent logical sensor plugins and HW dependent sensor adaptor plugins in its operation. The required sensor HW adaptation interfaces in MeeGo are the interfaces that the Sensor Framework and the logical sensor plugins define for the sensor adaptor plugins to implement. The sensor adaptor plugins typically communicate directly with sensor HW drivers in the Linux kernel. The interfaces that the sensor HW drivers expose to the user space are not defined by MeeGo. Sensor HW adaptation in MeeGo thus consists of adaptor plugins in the Sensor Framework and sensor HW drivers in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Note that thermal sensors are handled in a different manner as described in the [[#Power and thermal management|''Power and thermal management'']] section above.&lt;br /&gt;
&lt;br /&gt;
=== Input Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Touch ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the touch input handling path in MeeGo are the touch HW device driver, Linux kernel input subsystem, X server, X input driver, Qt and finally the MeeGo Touch Framework. Enabling touch support for some new HW requires at least the implementation of the corresponding touch HW device driver in the Linux kernel. If this driver communicates touch events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, basically the existing functionality in X server (e.g. evdev input driver) and above can be used as such. In case the kernel-to-user-space interface is non-standard, it is also possible to implement a new X input driver as a part of the touch HW adaptation.&lt;br /&gt;
&lt;br /&gt;
Multi-touch support in X requires a new version, 2.1, of the [http://cgit.freedesktop.org/~whot/inputproto/tree/XI2proto.txt?h=multitouch X Input Extension] and this also requires support from the client side, in this case Qt's multi-touch support. Once this support has been implemented throughout the SW stack, including X evdev input driver, supporting multi-touch for some new HW should require only the implementation of a touch HW device driver that implements the standard Linux multi-touch interface. This should be the case in MeeGo 1.2. &lt;br /&gt;
&lt;br /&gt;
Before 1.2, multi-touch support in MeeGo uses a special X input driver (mtev), X server multi-pointer support (MPX) and Qt multi-touch support written on top of MPX. This solution requires the touch HW device driver to expose a user-space interface that is compatible with mtev.&lt;br /&gt;
&lt;br /&gt;
==== HW keyboard ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the HW keyboard input handling path in MeeGo are the keyboard HW device driver, Linux kernel input subsystem, X server, X input driver and Qt. Enabling keyboard support for some new HW requires typically only the implementation of the corresponding keyboard HW device driver in the Linux kernel. If this driver communicates key events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, the existing functionality in X server (e.g. evdev input driver) and above should work as such. In case the kernel-to-user space interface is non-standard, it is also possible to implement a new X input driver as a part of the keyboard HW adaptation.&lt;br /&gt;
&lt;br /&gt;
==== Buttons and switches ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo includes the MCE and System SW Qt API (QmSystem) components. The MCE can be used to control the device mode and it listens to power button events and e.g. device open/close switch events via the respective device driver interfaces. The System SW Qt API on the other hand provides a Qt API to various system information, including events from various physical buttons in the device (e.g. volume button, camera button). The System SW Qt API gets the button events either by listening to the relevant device driver interfaces or through the MCE component.&lt;br /&gt;
&lt;br /&gt;
Both the MCE and the System SW Qt API components can be adapted to new devices by device vendors.&lt;br /&gt;
&lt;br /&gt;
=== Haptics and Vibra Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Haptics ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Touch Framework present (at least) in the MeeGo handset device category contains a component called Feedback Framework (meegotouch-feedback) that handles the creation of auditory and/or haptic feedback to touch events. The haptic feedback can be created e.g. with vibra motors or piezo elements. In the Feedback Framework, the different types of feedback are created by backend libraries implemented as plugins. &lt;br /&gt;
&lt;br /&gt;
The haptics related HW adaptation interface from MeeGo OS perspective is the backend plugin interface defined by the Feedback Framework. The plugins can then communicate with the HW either through some device driver interface or some intermediate SW layers (MeeGo places no restrictions as to how the plugins are implemented).&lt;br /&gt;
&lt;br /&gt;
==== Vibra (notifications/alerts) ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo (at least the handset category) will include a component called Non-Graphical Feedback Framework (NGF). This component offers the capability of playing e.g. audio, vibra or led as an indication of events such as incoming call/message, clock and calendar alarms, missed calls, unread messages etc. The NGF also integrates with the Resource Policy to decide about the available playback resources based on policy rules and the current system state.&lt;br /&gt;
&lt;br /&gt;
The actual playback of the different types of notifications is handled by NGF plugins that can be created by device vendors. The plugins communicate with the relevant HW as they see best, e.g. directly through some device driver interface or via some intermediate user space SW components. The plugin interfaces defined by NGF thus form the notification/alert vibra adaptation interface in MeeGo.&lt;br /&gt;
&lt;br /&gt;
=== Production Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Production deals with areas such as flashing, testing, tuning and certification. The current understanding is that these areas are handled in a vendor specific manner, including the adaptation.&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Noel</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/MeeGo_Porting_Guide</id>
		<title>MeeGo Porting Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/MeeGo_Porting_Guide"/>
				<updated>2011-06-24T23:06:32Z</updated>
		
		<summary type="html">&lt;p&gt;Noel: /* Resource Policy */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The goal of MeeGo Porting Guide (MPG) is to provide valuable information and instructions to people who want to run MeeGo OS on their (new) HW and eventually create products based on the MeeGo OS. The MPG starts with an overview of the porting process, tools, and other related background information and then moves on to describing what the porting actually means in individual technical/functional areas.&lt;br /&gt;
&lt;br /&gt;
The porting guide is not strictly tied to any particular MeeGo OS version or device category. Instead, it tries to be general enough to cover the different device categories, as well as follow changes introduced in new MeeGo OS versions.&lt;br /&gt;
&lt;br /&gt;
Detailed porting information in the different technical areas is dependent on the respective [http://meego.com/developers/meego-architecture MeeGo architecture]. In some cases, this architecture may still be open and this is noted in the applicable sections.&lt;br /&gt;
&lt;br /&gt;
=== Feedback ===&lt;br /&gt;
&lt;br /&gt;
Contribution to these pages is open. Any MeeGo community member is free to ''improve'' these pages at any time. You can also leave feedback in the [http://lists.meego.com/listinfo/meego-porting MeeGo porting mailing list].&lt;br /&gt;
&lt;br /&gt;
== General porting information/guidelines ==&lt;br /&gt;
&lt;br /&gt;
=== MeeGo compliance ===&lt;br /&gt;
&lt;br /&gt;
Perhaps the most important piece of background information related to the MPG are the [[Quality/Compliance|MeeGo compliance requirements]]. A device that is meant to be MeeGo compliant will need to fulfill the requirements listed in the MeeGo compliance specification for the applicable device category (the first version of the specification is supposed to be available in October 2010). In short, a MeeGo compliant device will need to:&lt;br /&gt;
* Meet the minimum HW performance and component requirements for the applicable device category&lt;br /&gt;
* Include all SW components that form the MeeGo core OS&lt;br /&gt;
* Include the additional SW components required to be present in devices in the applicable device category&lt;br /&gt;
* Not break the API/ABI of any of the components coming from MeeGo&lt;br /&gt;
* Follow the MeeGo SW packaging conventions&lt;br /&gt;
&lt;br /&gt;
The compliance rules will also specify CPU architecture specific requirements concerning how MeeGo OS itself and MeeGo applications are to be compiled to different environments (instruction set used, compiler version, compiler options, etc.).&lt;br /&gt;
&lt;br /&gt;
A device vendor may include additional functionality, HW components and SW components in their devices, as long as they don't break MeeGo compliance. The vendor can also patch MeeGo OS components, if the patches don't break MeeGo compliance. A device vendor's own SW components can be either open source or closed source components, as long as they adhere to the rules set by the applicable SW licenses.&lt;br /&gt;
&lt;br /&gt;
From the MeeGo Porting Guide perspective, by defining the SW components and HW components that need to be present, the compliance requirements effectively define the minimum set of porting tasks required from a device vendor and what SW components are involved from MeeGo OS side.&lt;br /&gt;
&lt;br /&gt;
=== Porting process and tools ===&lt;br /&gt;
&lt;br /&gt;
==== Overview ====&lt;br /&gt;
&lt;br /&gt;
As long as a vendor's device is MeeGo compliant, as defined above, it is basically up to the vendor to decide how they build the SW that ends up in the device. The vendor may use their own build machinery or set up an OBS build system that is also used in MeeGo. Regardless of what the vendor's build system is, it needs to integrate with the MeeGo build infrastructure, at least to fetch the MeeGo source packages for the builds, as well as build each MeeGo component in the same way as it would be built in the MeeGo build system (such as with the same compiler and compiler options). Whatever the case, the intention in MeeGo is to use and offer an open toolset that any HW or SW vendor can use for efficient SW creation. It is likely that using the same toolset as MeeGo, will offer the easiest way to integrate vendor's own build system with the the MeeGo build infrastructure.&lt;br /&gt;
&lt;br /&gt;
The key ingredients of the MeeGo build infrastructure and toolset are:&lt;br /&gt;
* [http://meego.gitorious.org MeeGo Gitorious]&lt;br /&gt;
** A version control system for the source files of various MeeGo specific SW components and tools&lt;br /&gt;
* [http://build.meego.com MeeGo OBS]&lt;br /&gt;
** The build system that is used to build MeeGo packages (RPMs) from their sources&lt;br /&gt;
* [http://repo.meego.com MeeGo Repository]&lt;br /&gt;
** The place where the built MeeGo releases, that is where MeeGo packages and images are stored&lt;br /&gt;
* [http://wiki.meego.com/Image_Creation MeeGo Image Creator]&lt;br /&gt;
** The tool used to build MeeGo images that can be installed/flashed on HW&lt;br /&gt;
* MeeGo release tools&lt;br /&gt;
** Tools such as BOSS and REVS that are used in the creation of the MeeGo releases under repo.meego.com&lt;br /&gt;
&lt;br /&gt;
For additional information, see [[Build Infrastructure]], [[Release Infrastructure]] and [[Release Engineering]].&lt;br /&gt;
&lt;br /&gt;
For another overview of the MeeGo porting process, see [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process].&lt;br /&gt;
&lt;br /&gt;
==== Vendor's own OBS ====&lt;br /&gt;
&lt;br /&gt;
So, ultimately, when creating actual products running the MeeGo OS, the vendor may end up setting up their own OBS build system. Setting up your own OBS system may also be beneficial in earlier HW/product development phases, as it offers a flexible way to modify and build MeeGo OS to test it on the new HW. The vendor's own OBS system can link to the MeeGo OBS for handling packages that come directly from MeeGo and it can link to other sources for handling, such as closed source packages that are specific to the vendor. See [[Release_Engineering/Process#Making a product out of MeeGo Release|an overview picture of this setup]].&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Sets up their own OBS system&lt;br /&gt;
** [[User:Stskeeps/10_easy_steps_to_a_local_OBS|Instructions related to setting up an OBS system]],  [[Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE112|OBS Applicances]] [http://en.opensuse.org/openSUSE:Build_Service_private_instance Open Suse OBS Wiki].&lt;br /&gt;
* Creates projects under the their own OBS for their own components&lt;br /&gt;
* Links their own OBS to the MeeGo OBS for MeeGo components&lt;br /&gt;
* May have trial patches to MeeGo components in their own OBS&lt;br /&gt;
** NOTE. Eventually all patches to MeeGo components required in a final MeeGo based product ''should'' be pushed to MeeGo.com. However, this is not an absolute must requirement, as long as the MeeGo compliance requirements and applicable SW license rules are fulfilled. &lt;br /&gt;
** See [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below&lt;br /&gt;
* Needs to set up the necessary machinery to create releases and images from the packages built with OBS&lt;br /&gt;
** This machinery can be based on the toolset used in MeeGo (see above)&lt;br /&gt;
&lt;br /&gt;
==== Working under MeeGo.com ====&lt;br /&gt;
&lt;br /&gt;
Another way of porting MeeGo to some new HW is to get the new HW accepted as one MeeGo reference HW and have the MeeGo build machinery create builds for the reference HW as a part of the normal MeeGo release building cycle (see [[Release Engineering/Release Timeline|Release Timeline]] and [[Release Engineering/Process|Release Process]]). This setup can also include QA support for the reference HW on the MeeGo side (see [[Quality]]). At the time of this writing, the actual process of getting new reference HW to MeeGo is still somewhat unclear. In any case, this model requires active participation from the vendor in MeeGo work in general and especially in supporting their reference HW in MeeGo.&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Creates a device/platform development project under the MeeGo OBS for their components. The open source components would then get submitted to MeeGo Trunk:Testing and get reviewed like any other MeeGo component for inclusion.&lt;br /&gt;
** Note that it is also possible to have closed source binary components in the MeeGo OBS to be included in the MeeGo builds for some reference HW. These are submitted to the Trunk:non-oss repository. Licensing is usually required to at least include redistributability, as the components cannot be mirrored from or hosted at repo.meego.com otherwise. It is not possible to have components within Trunk:Testing require closed source dependencies.&lt;br /&gt;
* Pushes patches to other MeeGo components at MeeGo.com as necessary (see [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below)&lt;br /&gt;
* Creates (or supports the creation of) a MIC kickstart file for building images for their reference HW&lt;br /&gt;
* As necessary, supports adding support for their reference HW and SW components in the MeeGo build and release infrastructure tools&lt;br /&gt;
&lt;br /&gt;
==== Trials ====&lt;br /&gt;
&lt;br /&gt;
A lightweight but also more limited &amp;quot;try it out&amp;quot; alternative to the above processes is discussed below.&lt;br /&gt;
&lt;br /&gt;
===== Initial bring-up attempt =====&lt;br /&gt;
&lt;br /&gt;
* Grab the already built root filesystem / image for a MeeGo reference device that's the closest to your target. For ARMv7, this is typically the Nokia N900 handset image. For Atom, this could be netbook image or handset image.&lt;br /&gt;
* Build a Linux kernel for your device and install the modules into /lib/modules.&lt;br /&gt;
* Boot the root filesystem and modify the configuration and drop in components to bring up the device to UX. Note down the things you had to modify or add, as this will be input for your porting work.&lt;br /&gt;
&lt;br /&gt;
===== Building your first image =====&lt;br /&gt;
&lt;br /&gt;
The second step to a proper hardware adaptation is making sure you can build your own image. Because we based our work before on a reference device image, it makes sense to try to build this image first. MeeGo images are constructed on the basis of so called 'kickstart files', which describe the intended contents of an image. &lt;br /&gt;
&lt;br /&gt;
* Install the MeeGo Image Creator tool (MIC)&lt;br /&gt;
* Download the kickstart file (.ks) from the same directory you found your reference device image. &lt;br /&gt;
* Create a image using mic-image-creator (should be elaborated).&lt;br /&gt;
* Test out your freshly baked image as in the previous step.&lt;br /&gt;
&lt;br /&gt;
===== Building your port's first reproduciable image =====&lt;br /&gt;
&lt;br /&gt;
* Download the MeeGo kernel, possibly modifying the kernel with additional patches (including new device drivers) and building the kernel (see [[#Getting_new_chipset_support_to_the_MeeGo_kernel|''Getting new chipset support to the MeeGo kernel'']] below). &lt;br /&gt;
* Add the repository containing your kernel package to the kickstart file (to be elaborated)&lt;br /&gt;
* Remove parts of the kickstart file specific to the reference device.&lt;br /&gt;
* Add a mention of your kernel package in the %packages section.&lt;br /&gt;
* Build packages or include shell scripts in %post section of kickstart file that adds/modifies configuration fitting your device.&lt;br /&gt;
&lt;br /&gt;
A detailed description of a variation of this model can be found from [[ARM/Meego on Beagleboard from scratch|here]] (Better description needed).&lt;br /&gt;
&lt;br /&gt;
==== Getting new chipset support to the MeeGo kernel ====&lt;br /&gt;
&lt;br /&gt;
See [[How-to: getting new chipset support to the MeeGo kernel]] for more detailed information about how to work with the MeeGo kernel and make it support new HW.&lt;br /&gt;
&lt;br /&gt;
=== Upstream projects, MeeGo, products, and patches ===&lt;br /&gt;
&lt;br /&gt;
When building a product based on MeeGo, the product vendor will typically augment the MeeGo OS with their own SW components, as well as make fixes and adjustments to the MeeGo OS code (in the limits set by the compliance rules). While vendors can manage their own SW components as they wish, the strong preference is that any changes made to the MeeGo OS SW components are delivered as patches primarily to the respective upstream projects or secondarily to MeeGo.com. In this way, vendors can relieve themselves of the burden of managing a potentially big patch set on top of MeeGo OS, and also verify the quality and safety of their patches. Having the patches in upstream projects again lessens the patch set management load at MeeGo.com.&lt;br /&gt;
&lt;br /&gt;
For information about pushing patches to MeeGo, see [http://meego.com/about/contribution-guidelines Contribution Guidelines] and [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process] (especially section ''How Do Patches Get Integrated and Accepted?'') and [http://meego.gitorious.org/meego-os-base/kernel-source/blobs/master/README.workflow Kernel workflow].&lt;br /&gt;
&lt;br /&gt;
=== Adaptation subsystems and interfaces ===&lt;br /&gt;
&lt;br /&gt;
In the MeeGo architecture model (see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view MeeGo Architecture Domain View]), adaptation is represented as adaptation subsystems. SW components in the adaptation subsystem ''realizations'' do things that are expected by the OS and communicate with the OS through interfaces defined by the OS.&lt;br /&gt;
 &lt;br /&gt;
The key goal in the sections below is to identify the interface(s) that the adaptation SW needs to implement/use to communicate with the OS in the required manner. Behind these interfaces, the adaptation SW can basically handle the required functionality as it sees best. In some cases, however, there may also be some preferred way of implementing the adaptation.&lt;br /&gt;
&lt;br /&gt;
In some areas, the adaptation work may consist of just writing a suitable Linux device driver for the HW in question. In some other areas, the adaptation work may consist of writing one or more device drivers, as well as one or more user space components (such as plugins to some user space SW frameworks). Various configuration file changes may also be required as a part of the adaptation work.&lt;br /&gt;
&lt;br /&gt;
== Porting by adaptation subsystems ==&lt;br /&gt;
&lt;br /&gt;
=== System Core Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Boot ====&lt;br /&gt;
&lt;br /&gt;
MeeGo places no restrictions as to what SW components are used to handle the pre-OS boot phases in a MeeGo compliant device. Thus, vendors are free to choose, for example, the boot loader, as they see fit. Note, however, that full use of the MeeGo platform security requires that the pre-OS boot phases form a trusted boot chain that ultimately builds on chipset-level security support.&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, MeeGo does not define anything special with regard to what information the boot loader is expected to pass to the Linux kernel, such as via the kernel command line.&lt;br /&gt;
&lt;br /&gt;
The kernel-level boot phases can be tailored, as necessary, to the specific CPU, chipset, or device in a standard Linux manner.&lt;br /&gt;
&lt;br /&gt;
The post-kernel boot phases (startup scripts) can be tailored by device vendors as necessary for their devices in the limits set by MeeGo compliance requirements (certain SW components need to be present in the system).&lt;br /&gt;
&lt;br /&gt;
==== Kernel fundamentals ====&lt;br /&gt;
&lt;br /&gt;
Regarding the Linux kernel, each MeeGo release defines the kernel version to be used and a set of patches on top of that. In addition, the Linux kernel used in MeeGo compliant devices is assumed to have been built with a set of fixed build-time configuration values that are not allowed to be changed. In addition to the fixed values, device vendors can define other kernel configuration values, as required by their devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo does not place any special requirements concerning how the boot loader passes information to the kernel or how the HW configuration and initialization of the system is handled.&lt;br /&gt;
&lt;br /&gt;
CPU, chipset (SoC), and device vendors are assumed to implement the elementary CPU architecture/chipset/device support for the Linux kernel used in MeeGo in a standard Linux manner. This includes:&lt;br /&gt;
* HW (board) configuration&lt;br /&gt;
* Mapping the fundamental Linux kernel functionality (such as IRQ, DMA, GPIO, RTC and memory handling) to the HW in question&lt;br /&gt;
* Creation/modification of the necessary device drivers to support the core SoC interfaces (such as I2C, SPI, SDIO)&lt;br /&gt;
* Permanent memory support&lt;br /&gt;
* Debugging and tracing support&lt;br /&gt;
&lt;br /&gt;
==== Power and thermal management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, the understanding is that MeeGo in general relies on established Linux kernel frameworks and APIs for power management. Some of these frameworks and APIs may be applicable only in certain CPU architectures. In addition, the HW capabilities related to power management may vary between different HW platforms potentially meaning that the SW is assumed perform somewhat different tasks in different environments.&lt;br /&gt;
&lt;br /&gt;
The Linux power management frameworks and APIs include:&lt;br /&gt;
* CPU frequency control (support for the different voltage and frequency operating points) via the cpufreq infrastructure&lt;br /&gt;
* CPU idle state management (different levels of sleep) through the cpuidle infrastructure&lt;br /&gt;
* Clock management through the clock framework&lt;br /&gt;
* Suspend/resume&lt;br /&gt;
* Runtime power management&lt;br /&gt;
* HW voltage/current regulator control via the regulator framework&lt;br /&gt;
* PM_QOS (power management quality of service) framework for making and listening to PM QoS requests&lt;br /&gt;
&lt;br /&gt;
Whether MeeGo will have some user space SW components or framework related to power management is under discussion at the time of this writing.&lt;br /&gt;
&lt;br /&gt;
In the thermal management area, the Device State Management Entity (DSME) component in the Device Health subsystem is supposed to make thermal state management decisions in the system. The DSME has a thermal manager module that again uses other DSME modules (thermal objects) to access the actual thermal sensor information in the HW. To port this functionality to new HW, one or more DSME thermal object modules need to be implemented.&lt;br /&gt;
&lt;br /&gt;
The APIs that the thermal object modules use to access the thermal sensor information are not strictly defined by MeeGo. At device driver level, however, the preferred approach is to use standard Linux interfaces such as the generic thermal sysfs API or the hwmon sysfs API.&lt;br /&gt;
&lt;br /&gt;
==== Energy management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, basically the only thing that MeeGo requires from HW adaptation in the energy management area (battery charging and monitoring) is support for the Linux power supply sysfs class. Additional energy management related functionality can be handled in a vendor specific manner.&lt;br /&gt;
&lt;br /&gt;
==== Device state ====&lt;br /&gt;
&lt;br /&gt;
The DSME component participates in device state management, such as by managing device run level, reboot, and shutdown, by monitoring the device thermal state, and shutting down the device in fatal thermal conditions, and by handling HW watchdog kicking activity.&lt;br /&gt;
&lt;br /&gt;
In a new HW environment, the DSME needs to be adapted to handle the watchdog kicking through the right device driver interfaces and at the right intervals. In addition, to port the DSME thermal management functionality to new HW, one or more DSME thermal object modules need to be implemented as described above, in the [[#Power_and_thermal_management|''Power and thermal management'']] section.&lt;br /&gt;
&lt;br /&gt;
=== Security Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Work is ongoing in bringing platform security functionality to the MeeGo OS based on the Mandatory Access Control (MAC), Integrity Measurement Architecture (IMA) and Extended Verification Module (EVM) technologies in the Linux kernel. Maximum security can be reached if the MeeGo platform security functionality can rely on trusted platform support &amp;quot;below&amp;quot; the Linux kernel, effectively in the HW and the boot loader(s). MeeGo, however, places no strict requirements as to how the trusted platform support is implemented in MeeGo based devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo also includes the OpenSSL open source toolkit implementing general purpose cryptography functionality. Algorithms and operations supported by the OpenSSL toolkit can be accelerated in HW by using the OpenSSL engine architecture. OpenSSL also supports a cryptodev engine that uses crypto algorithms implemented in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Some devices may have a security watchdog in the HW that needs &amp;quot;kicking&amp;quot; at regular intervals to keep the device up and running. In MeeGo, watchdog kicking functionality is implemented in the Device State Management Entity (DSME) component. If security watchdog kicking is needed, the DSME needs to be adapted to handle that through the right device driver interface and at the right intervals.&lt;br /&gt;
&lt;br /&gt;
=== Device Mode Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Resource Policy ====&lt;br /&gt;
&lt;br /&gt;
The Resource (Policy) Manager component in the Device Health subsystem offers a generic framework for:&lt;br /&gt;
* Monitoring device and application events&lt;br /&gt;
* Managing policies that specify rules about what should happen in the device when certain events occur&lt;br /&gt;
* Making policy decisions when events occur (determining the needed changes in the device)&lt;br /&gt;
* Enforcing changes in the system through policy enforcement points&lt;br /&gt;
&lt;br /&gt;
The Resource Manager can be used, for example, to change the audio routing in the device, when the user attaches a wired headset to the device.&lt;br /&gt;
&lt;br /&gt;
Event listening and change enforcement in the Resource Manager happens through plugin modules. Using the MeeGo OS in some new device effectively involves creating suitable Resource Manager policies and writing the necessary plugins for listening device/application events and changing device behavior accordingly. Though not pure HW adaptation, this can be considered a form of MeeGo OS &amp;quot;device adaptation&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Mode Control Entity (MCE) ====&lt;br /&gt;
&lt;br /&gt;
The MCE component (starting from MeeGo 1.2) can be used to listen to events that have an impact to the device mode (e.g. touch screen locked vs. unlocked) and change the device mode accordingly. The MCE is used e.g. for: &lt;br /&gt;
* Listening to various keys and switches in the device (e.g. power key, volume key, camera button, slider switch)&lt;br /&gt;
* Controlling LEDs&lt;br /&gt;
* Touch screen or HW keyboard enabling/disabling depending on device state&lt;br /&gt;
* Keyboard backlight control&lt;br /&gt;
* Display state (on/off) and brightness control&lt;br /&gt;
&lt;br /&gt;
The MCE has its own plugin architecture that can be used to adapt it to different HW environments.&lt;br /&gt;
&lt;br /&gt;
=== Display and Graphics Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo visual services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view]. &lt;br /&gt;
&lt;br /&gt;
The key ingredients of the display and graphics architecture in MeeGo are the X Window System (X Server with its extensions) and the Khronos graphics APIs (OpenGL ES, OpenVG and EGL with their extensions).&lt;br /&gt;
&lt;br /&gt;
The display and graphics HW adaptation SW needs to enable the X Window System and the Khronos APIs to function on the device HW. In practice, the adaptation SW needs to have an X display/video driver (hosted inside the X Server) and libraries that implement the Khronos graphics APIs, both supporting the features and functionality required by MeeGo. Also some configuration file changes may be needed. Any additional user space and kernel space components needed for the HW adaptation are implementation dependent.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering display content to external displays, the Resource Manager component may be used to coordinate the display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Audio Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The audio architecture in MeeGo is centered around the GStreamer and PulseAudio frameworks. In addition, the Resource Manager plays a role in coordinating the audio related behavior of the device (audio routings). The audio HW adaptation SW needs to provide GStreamer elements and PulseAudio plugins that enable the GStreamer and PulseAudio client interfaces used for e.g. for audio playback, recording and volume control to work on the device. Typical required components include e.g. codec elements for GStreamer and sink/source plugins for PulseAudio.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer and PulseAudio plugins, the audio HW adaptation SW can be implemented with different technologies and APIs, including ALSA and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework as needed. Use of the ALSA framework and APIs is encouraged, however, as they allow significant reuse of components and functionality on the PulseAudio level and are already a part of the upstream Linux kernel. If ALSA is not used to implement the kernel side parts of the audio adaptation, the solution that is used instead should still be aligned with the upstream Linux kernel.&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo media services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view]. &lt;br /&gt;
&lt;br /&gt;
=== Camera Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo still imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework and the CameraBin GStreamer element. The still imaging HW adaptation SW is required to contain a GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element. Thus, the required HW adaptation interfaces are the relevant GStreamer plugin interfaces and especially the interfaces expected by the CameraBin element, in particular the GstPhotography interface.&lt;br /&gt;
&lt;br /&gt;
If HW accelerated encoders are supported, they should be also offered to the system as GStreamer elements.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
=== Video and Imaging Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo video imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework, the CameraBin GStreamer element (video recording) and the Playbin2 GStreamer element (video playback). The video imaging HW adaptation SW is required to contain:&lt;br /&gt;
:* A GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element (this is common with still imaging) &lt;br /&gt;
:* If HW accelerated codecs are supported, GStreamer elements that wrap the codecs&lt;br /&gt;
:* If HW accelerated filters are supported (e.g. video scaler, rotation engines, color conversion engines), GStreamer elements that wrap the filters&lt;br /&gt;
:* A GStreamer video sink element that offers the GStreamer X Overlay Interface. Note that if the XVideo extension is supported on the X Server side, the xvimagesink element can be used as the video sink element and no new elements are needed.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the video imaging HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering video content to external displays, the Resource Manager component may be used to coordinate the video/display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Communications Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo communications services architecture, see [http://meego.com/developers/meego-architecture/comms-services Comms Services].&lt;br /&gt;
&lt;br /&gt;
==== Cellular ====&lt;br /&gt;
&lt;br /&gt;
The cellular telephony architecture in MeeGo is centered on the oFono, PulseAudio and Telepathy frameworks. In addition, the Resource Manager plays a role in coordinating the device behavior during voice calls.&lt;br /&gt;
&lt;br /&gt;
The cellular modem HW adaptation SW must implement the following interfaces towards the MeeGo OS:&lt;br /&gt;
:* oFono modem plugin/driver API&lt;br /&gt;
:* Linux network interface for the Linux TCP/IP stack (for data communications)&lt;br /&gt;
:* Relevant PulseAudio plugin interfaces for cellular voice call audio handling&lt;br /&gt;
&lt;br /&gt;
For more detailed information about the oFono APIs, see the documentation and source code available at [http://git.kernel.org/?p=network/ofono/ofono.git;a=summary oFono git].&lt;br /&gt;
&lt;br /&gt;
==== USB ====&lt;br /&gt;
&lt;br /&gt;
The foundation of the the MeeGo USB functionality is the standard Linux USB subsystem. The Linux USB subsystem defines the USB related HW adaptation interfaces that need to be supported in MeeGo. In practice, these are kernel side interfaces between the generic USB functionality and a HW dependent USB host controller driver.&lt;br /&gt;
&lt;br /&gt;
==== WLAN ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo WLAN architecture is centered on the [http://linuxwireless.org/ Linux wireless] (IEEE-802.11) subsystem. The Linux wireless SW stack defines the WLAN HW adaptation SW interfaces that need to be used in MeeGo. In practice, the required interfaces are defined by cfg80211 for FullMAC WLAN devices and by mac80211 for SoftMAC WLAN devices. In addition, a Linux network interface needs to be supported towards the Linux TCP/IP stack.&lt;br /&gt;
&lt;br /&gt;
==== Bluetooth ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Bluetooth architecture is centered on the [http://www.bluez.org/ BlueZ] SW stack. The BlueZ SW stack defines the Bluetooth HW adaptation SW interfaces that need to be used in MeeGo. In practice, these are Linux kernel side interfaces between the generic HCI (Host Controller Interface) core and a HW specific HCI driver.&lt;br /&gt;
&lt;br /&gt;
=== Location Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The MeeGo location architecture is based on [http://http://labs.trolltech.com/page/Projects/QtMobility| QtMobility Location API].  The QtMobility 1.0 Location API provides geographic coordinates only.  The QtMobility 1.1 Location API provides geocoding and reverse geocoding, POI search, navigation, and mapping.  The 1.0 Location API is available in MeeGo 1.1.  The 1.1 or later Location API will be available in MeeGo 1.2.  The Location API uses a plugin system for implementations of the underlying backend.  MeeGo compliance requirements require support for the QtMobility Location API and thus require one or more plugins to support these APIs.  MeeGo places no restrictions as to how the plugins are implemented, however. Adaptation to location related HW may be done by manufacturers or service providers and the way how it's done is not defined by the API.&lt;br /&gt;
&lt;br /&gt;
MeeGo will use [http://www.freedesktop.org/wiki/Software/GeoClue GeoClue] as the reference location framework and the reference implementation of the Qt Mobility location API backend will be written on top of GeoClue. GeoClue defines a set of (D-Bus) APIs for accessing location services provided by service providers implemented as D-Bus services. In addition, GeoClue includes a set of service provider implementations and (at the time of this writing) an experimental master service provider that can act as a proxy between clients and the actual service providers. If a device vendor wants to take advantage of this existing functionality, the vendor can implement their location services &amp;quot;behind&amp;quot; the GeoClue APIs as GeoClue service providers. In such a case, adaptation to the location related HW would happen inside the service providers as defined by the service provider designs.&lt;br /&gt;
&lt;br /&gt;
=== Sensor Adaptation === &lt;br /&gt;
&lt;br /&gt;
The key component in the MeeGo sensor handling architecture is the Sensor Framework. The Sensor Framework uses both HW independent logical sensor plugins and HW dependent sensor adaptor plugins in its operation. The required sensor HW adaptation interfaces in MeeGo are the interfaces that the Sensor Framework and the logical sensor plugins define for the sensor adaptor plugins to implement. The sensor adaptor plugins typically communicate directly with sensor HW drivers in the Linux kernel. The interfaces that the sensor HW drivers expose to the user space are not defined by MeeGo. Sensor HW adaptation in MeeGo thus consists of adaptor plugins in the Sensor Framework and sensor HW drivers in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Note that thermal sensors are handled in a different manner as described in the [[#Power and thermal management|''Power and thermal management'']] section above.&lt;br /&gt;
&lt;br /&gt;
=== Input Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Touch ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the touch input handling path in MeeGo are the touch HW device driver, Linux kernel input subsystem, X server, X input driver, Qt and finally the MeeGo Touch Framework. Enabling touch support for some new HW requires at least the implementation of the corresponding touch HW device driver in the Linux kernel. If this driver communicates touch events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, basically the existing functionality in X server (e.g. evdev input driver) and above can be used as such. In case the kernel-to-user-space interface is non-standard, it is also possible to implement a new X input driver as a part of the touch HW adaptation.&lt;br /&gt;
&lt;br /&gt;
Multi-touch support in X requires a new version, 2.1, of the [http://cgit.freedesktop.org/~whot/inputproto/tree/XI2proto.txt?h=multitouch X Input Extension] and this also requires support from the client side, in this case Qt's multi-touch support. Once this support has been implemented throughout the SW stack, including X evdev input driver, supporting multi-touch for some new HW should require only the implementation of a touch HW device driver that implements the standard Linux multi-touch interface. This should be the case in MeeGo 1.2. &lt;br /&gt;
&lt;br /&gt;
Before 1.2, multi-touch support in MeeGo uses a special X input driver (mtev), X server multi-pointer support (MPX) and Qt multi-touch support written on top of MPX. This solution requires the touch HW device driver to expose a user-space interface that is compatible with mtev.&lt;br /&gt;
&lt;br /&gt;
==== HW keyboard ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the HW keyboard input handling path in MeeGo are the keyboard HW device driver, Linux kernel input subsystem, X server, X input driver and Qt. Enabling keyboard support for some new HW requires typically only the implementation of the corresponding keyboard HW device driver in the Linux kernel. If this driver communicates key events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, the existing functionality in X server (e.g. evdev input driver) and above should work as such. In case the kernel-to-user space interface is non-standard, it is also possible to implement a new X input driver as a part of the keyboard HW adaptation.&lt;br /&gt;
&lt;br /&gt;
==== Buttons and switches ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo includes the MCE and System SW Qt API (QmSystem) components. The MCE can be used to control the device mode and it listens to power button events and e.g. device open/close switch events via the respective device driver interfaces. The System SW Qt API on the other hand provides a Qt API to various system information, including events from various physical buttons in the device (e.g. volume button, camera button). The System SW Qt API gets the button events either by listening to the relevant device driver interfaces or through the MCE component.&lt;br /&gt;
&lt;br /&gt;
Both the MCE and the System SW Qt API components can be adapted to new devices by device vendors.&lt;br /&gt;
&lt;br /&gt;
=== Haptics and Vibra Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Haptics ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Touch Framework present (at least) in the MeeGo handset device category contains a component called Feedback Framework (meegotouch-feedback) that handles the creation of auditory and/or haptic feedback to touch events. The haptic feedback can be created e.g. with vibra motors or piezo elements. In the Feedback Framework, the different types of feedback are created by backend libraries implemented as plugins. &lt;br /&gt;
&lt;br /&gt;
The haptics related HW adaptation interface from MeeGo OS perspective is the backend plugin interface defined by the Feedback Framework. The plugins can then communicate with the HW either through some device driver interface or some intermediate SW layers (MeeGo places no restrictions as to how the plugins are implemented).&lt;br /&gt;
&lt;br /&gt;
==== Vibra (notifications/alerts) ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo (at least the handset category) will include a component called Non-Graphical Feedback Framework (NGF). This component offers the capability of playing e.g. audio, vibra or led as an indication of events such as incoming call/message, clock and calendar alarms, missed calls, unread messages etc. The NGF also integrates with the Resource Policy to decide about the available playback resources based on policy rules and the current system state.&lt;br /&gt;
&lt;br /&gt;
The actual playback of the different types of notifications is handled by NGF plugins that can be created by device vendors. The plugins communicate with the relevant HW as they see best, e.g. directly through some device driver interface or via some intermediate user space SW components. The plugin interfaces defined by NGF thus form the notification/alert vibra adaptation interface in MeeGo.&lt;br /&gt;
&lt;br /&gt;
=== Production Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Production deals with areas such as flashing, testing, tuning and certification. The current understanding is that these areas are handled in a vendor specific manner, including the adaptation.&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Noel</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/MeeGo_Porting_Guide</id>
		<title>MeeGo Porting Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/MeeGo_Porting_Guide"/>
				<updated>2011-06-24T22:59:06Z</updated>
		
		<summary type="html">&lt;p&gt;Noel: /* Resource Policy */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The goal of MeeGo Porting Guide (MPG) is to provide valuable information and instructions to people who want to run MeeGo OS on their (new) HW and eventually create products based on the MeeGo OS. The MPG starts with an overview of the porting process, tools, and other related background information and then moves on to describing what the porting actually means in individual technical/functional areas.&lt;br /&gt;
&lt;br /&gt;
The porting guide is not strictly tied to any particular MeeGo OS version or device category. Instead, it tries to be general enough to cover the different device categories, as well as follow changes introduced in new MeeGo OS versions.&lt;br /&gt;
&lt;br /&gt;
Detailed porting information in the different technical areas is dependent on the respective [http://meego.com/developers/meego-architecture MeeGo architecture]. In some cases, this architecture may still be open and this is noted in the applicable sections.&lt;br /&gt;
&lt;br /&gt;
=== Feedback ===&lt;br /&gt;
&lt;br /&gt;
Contribution to these pages is open. Any MeeGo community member is free to ''improve'' these pages at any time. You can also leave feedback in the [http://lists.meego.com/listinfo/meego-porting MeeGo porting mailing list].&lt;br /&gt;
&lt;br /&gt;
== General porting information/guidelines ==&lt;br /&gt;
&lt;br /&gt;
=== MeeGo compliance ===&lt;br /&gt;
&lt;br /&gt;
Perhaps the most important piece of background information related to the MPG are the [[Quality/Compliance|MeeGo compliance requirements]]. A device that is meant to be MeeGo compliant will need to fulfill the requirements listed in the MeeGo compliance specification for the applicable device category (the first version of the specification is supposed to be available in October 2010). In short, a MeeGo compliant device will need to:&lt;br /&gt;
* Meet the minimum HW performance and component requirements for the applicable device category&lt;br /&gt;
* Include all SW components that form the MeeGo core OS&lt;br /&gt;
* Include the additional SW components required to be present in devices in the applicable device category&lt;br /&gt;
* Not break the API/ABI of any of the components coming from MeeGo&lt;br /&gt;
* Follow the MeeGo SW packaging conventions&lt;br /&gt;
&lt;br /&gt;
The compliance rules will also specify CPU architecture specific requirements concerning how MeeGo OS itself and MeeGo applications are to be compiled to different environments (instruction set used, compiler version, compiler options, etc.).&lt;br /&gt;
&lt;br /&gt;
A device vendor may include additional functionality, HW components and SW components in their devices, as long as they don't break MeeGo compliance. The vendor can also patch MeeGo OS components, if the patches don't break MeeGo compliance. A device vendor's own SW components can be either open source or closed source components, as long as they adhere to the rules set by the applicable SW licenses.&lt;br /&gt;
&lt;br /&gt;
From the MeeGo Porting Guide perspective, by defining the SW components and HW components that need to be present, the compliance requirements effectively define the minimum set of porting tasks required from a device vendor and what SW components are involved from MeeGo OS side.&lt;br /&gt;
&lt;br /&gt;
=== Porting process and tools ===&lt;br /&gt;
&lt;br /&gt;
==== Overview ====&lt;br /&gt;
&lt;br /&gt;
As long as a vendor's device is MeeGo compliant, as defined above, it is basically up to the vendor to decide how they build the SW that ends up in the device. The vendor may use their own build machinery or set up an OBS build system that is also used in MeeGo. Regardless of what the vendor's build system is, it needs to integrate with the MeeGo build infrastructure, at least to fetch the MeeGo source packages for the builds, as well as build each MeeGo component in the same way as it would be built in the MeeGo build system (such as with the same compiler and compiler options). Whatever the case, the intention in MeeGo is to use and offer an open toolset that any HW or SW vendor can use for efficient SW creation. It is likely that using the same toolset as MeeGo, will offer the easiest way to integrate vendor's own build system with the the MeeGo build infrastructure.&lt;br /&gt;
&lt;br /&gt;
The key ingredients of the MeeGo build infrastructure and toolset are:&lt;br /&gt;
* [http://meego.gitorious.org MeeGo Gitorious]&lt;br /&gt;
** A version control system for the source files of various MeeGo specific SW components and tools&lt;br /&gt;
* [http://build.meego.com MeeGo OBS]&lt;br /&gt;
** The build system that is used to build MeeGo packages (RPMs) from their sources&lt;br /&gt;
* [http://repo.meego.com MeeGo Repository]&lt;br /&gt;
** The place where the built MeeGo releases, that is where MeeGo packages and images are stored&lt;br /&gt;
* [http://wiki.meego.com/Image_Creation MeeGo Image Creator]&lt;br /&gt;
** The tool used to build MeeGo images that can be installed/flashed on HW&lt;br /&gt;
* MeeGo release tools&lt;br /&gt;
** Tools such as BOSS and REVS that are used in the creation of the MeeGo releases under repo.meego.com&lt;br /&gt;
&lt;br /&gt;
For additional information, see [[Build Infrastructure]], [[Release Infrastructure]] and [[Release Engineering]].&lt;br /&gt;
&lt;br /&gt;
For another overview of the MeeGo porting process, see [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process].&lt;br /&gt;
&lt;br /&gt;
==== Vendor's own OBS ====&lt;br /&gt;
&lt;br /&gt;
So, ultimately, when creating actual products running the MeeGo OS, the vendor may end up setting up their own OBS build system. Setting up your own OBS system may also be beneficial in earlier HW/product development phases, as it offers a flexible way to modify and build MeeGo OS to test it on the new HW. The vendor's own OBS system can link to the MeeGo OBS for handling packages that come directly from MeeGo and it can link to other sources for handling, such as closed source packages that are specific to the vendor. See [[Release_Engineering/Process#Making a product out of MeeGo Release|an overview picture of this setup]].&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Sets up their own OBS system&lt;br /&gt;
** [[User:Stskeeps/10_easy_steps_to_a_local_OBS|Instructions related to setting up an OBS system]],  [[Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE112|OBS Applicances]] [http://en.opensuse.org/openSUSE:Build_Service_private_instance Open Suse OBS Wiki].&lt;br /&gt;
* Creates projects under the their own OBS for their own components&lt;br /&gt;
* Links their own OBS to the MeeGo OBS for MeeGo components&lt;br /&gt;
* May have trial patches to MeeGo components in their own OBS&lt;br /&gt;
** NOTE. Eventually all patches to MeeGo components required in a final MeeGo based product ''should'' be pushed to MeeGo.com. However, this is not an absolute must requirement, as long as the MeeGo compliance requirements and applicable SW license rules are fulfilled. &lt;br /&gt;
** See [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below&lt;br /&gt;
* Needs to set up the necessary machinery to create releases and images from the packages built with OBS&lt;br /&gt;
** This machinery can be based on the toolset used in MeeGo (see above)&lt;br /&gt;
&lt;br /&gt;
==== Working under MeeGo.com ====&lt;br /&gt;
&lt;br /&gt;
Another way of porting MeeGo to some new HW is to get the new HW accepted as one MeeGo reference HW and have the MeeGo build machinery create builds for the reference HW as a part of the normal MeeGo release building cycle (see [[Release Engineering/Release Timeline|Release Timeline]] and [[Release Engineering/Process|Release Process]]). This setup can also include QA support for the reference HW on the MeeGo side (see [[Quality]]). At the time of this writing, the actual process of getting new reference HW to MeeGo is still somewhat unclear. In any case, this model requires active participation from the vendor in MeeGo work in general and especially in supporting their reference HW in MeeGo.&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Creates a device/platform development project under the MeeGo OBS for their components. The open source components would then get submitted to MeeGo Trunk:Testing and get reviewed like any other MeeGo component for inclusion.&lt;br /&gt;
** Note that it is also possible to have closed source binary components in the MeeGo OBS to be included in the MeeGo builds for some reference HW. These are submitted to the Trunk:non-oss repository. Licensing is usually required to at least include redistributability, as the components cannot be mirrored from or hosted at repo.meego.com otherwise. It is not possible to have components within Trunk:Testing require closed source dependencies.&lt;br /&gt;
* Pushes patches to other MeeGo components at MeeGo.com as necessary (see [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below)&lt;br /&gt;
* Creates (or supports the creation of) a MIC kickstart file for building images for their reference HW&lt;br /&gt;
* As necessary, supports adding support for their reference HW and SW components in the MeeGo build and release infrastructure tools&lt;br /&gt;
&lt;br /&gt;
==== Trials ====&lt;br /&gt;
&lt;br /&gt;
A lightweight but also more limited &amp;quot;try it out&amp;quot; alternative to the above processes is discussed below.&lt;br /&gt;
&lt;br /&gt;
===== Initial bring-up attempt =====&lt;br /&gt;
&lt;br /&gt;
* Grab the already built root filesystem / image for a MeeGo reference device that's the closest to your target. For ARMv7, this is typically the Nokia N900 handset image. For Atom, this could be netbook image or handset image.&lt;br /&gt;
* Build a Linux kernel for your device and install the modules into /lib/modules.&lt;br /&gt;
* Boot the root filesystem and modify the configuration and drop in components to bring up the device to UX. Note down the things you had to modify or add, as this will be input for your porting work.&lt;br /&gt;
&lt;br /&gt;
===== Building your first image =====&lt;br /&gt;
&lt;br /&gt;
The second step to a proper hardware adaptation is making sure you can build your own image. Because we based our work before on a reference device image, it makes sense to try to build this image first. MeeGo images are constructed on the basis of so called 'kickstart files', which describe the intended contents of an image. &lt;br /&gt;
&lt;br /&gt;
* Install the MeeGo Image Creator tool (MIC)&lt;br /&gt;
* Download the kickstart file (.ks) from the same directory you found your reference device image. &lt;br /&gt;
* Create a image using mic-image-creator (should be elaborated).&lt;br /&gt;
* Test out your freshly baked image as in the previous step.&lt;br /&gt;
&lt;br /&gt;
===== Building your port's first reproduciable image =====&lt;br /&gt;
&lt;br /&gt;
* Download the MeeGo kernel, possibly modifying the kernel with additional patches (including new device drivers) and building the kernel (see [[#Getting_new_chipset_support_to_the_MeeGo_kernel|''Getting new chipset support to the MeeGo kernel'']] below). &lt;br /&gt;
* Add the repository containing your kernel package to the kickstart file (to be elaborated)&lt;br /&gt;
* Remove parts of the kickstart file specific to the reference device.&lt;br /&gt;
* Add a mention of your kernel package in the %packages section.&lt;br /&gt;
* Build packages or include shell scripts in %post section of kickstart file that adds/modifies configuration fitting your device.&lt;br /&gt;
&lt;br /&gt;
A detailed description of a variation of this model can be found from [[ARM/Meego on Beagleboard from scratch|here]] (Better description needed).&lt;br /&gt;
&lt;br /&gt;
==== Getting new chipset support to the MeeGo kernel ====&lt;br /&gt;
&lt;br /&gt;
See [[How-to: getting new chipset support to the MeeGo kernel]] for more detailed information about how to work with the MeeGo kernel and make it support new HW.&lt;br /&gt;
&lt;br /&gt;
=== Upstream projects, MeeGo, products, and patches ===&lt;br /&gt;
&lt;br /&gt;
When building a product based on MeeGo, the product vendor will typically augment the MeeGo OS with their own SW components, as well as make fixes and adjustments to the MeeGo OS code (in the limits set by the compliance rules). While vendors can manage their own SW components as they wish, the strong preference is that any changes made to the MeeGo OS SW components are delivered as patches primarily to the respective upstream projects or secondarily to MeeGo.com. In this way, vendors can relieve themselves of the burden of managing a potentially big patch set on top of MeeGo OS, and also verify the quality and safety of their patches. Having the patches in upstream projects again lessens the patch set management load at MeeGo.com.&lt;br /&gt;
&lt;br /&gt;
For information about pushing patches to MeeGo, see [http://meego.com/about/contribution-guidelines Contribution Guidelines] and [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process] (especially section ''How Do Patches Get Integrated and Accepted?'') and [http://meego.gitorious.org/meego-os-base/kernel-source/blobs/master/README.workflow Kernel workflow].&lt;br /&gt;
&lt;br /&gt;
=== Adaptation subsystems and interfaces ===&lt;br /&gt;
&lt;br /&gt;
In the MeeGo architecture model (see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view MeeGo Architecture Domain View]), adaptation is represented as adaptation subsystems. SW components in the adaptation subsystem ''realizations'' do things that are expected by the OS and communicate with the OS through interfaces defined by the OS.&lt;br /&gt;
 &lt;br /&gt;
The key goal in the sections below is to identify the interface(s) that the adaptation SW needs to implement/use to communicate with the OS in the required manner. Behind these interfaces, the adaptation SW can basically handle the required functionality as it sees best. In some cases, however, there may also be some preferred way of implementing the adaptation.&lt;br /&gt;
&lt;br /&gt;
In some areas, the adaptation work may consist of just writing a suitable Linux device driver for the HW in question. In some other areas, the adaptation work may consist of writing one or more device drivers, as well as one or more user space components (such as plugins to some user space SW frameworks). Various configuration file changes may also be required as a part of the adaptation work.&lt;br /&gt;
&lt;br /&gt;
== Porting by adaptation subsystems ==&lt;br /&gt;
&lt;br /&gt;
=== System Core Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Boot ====&lt;br /&gt;
&lt;br /&gt;
MeeGo places no restrictions as to what SW components are used to handle the pre-OS boot phases in a MeeGo compliant device. Thus, vendors are free to choose, for example, the boot loader, as they see fit. Note, however, that full use of the MeeGo platform security requires that the pre-OS boot phases form a trusted boot chain that ultimately builds on chipset-level security support.&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, MeeGo does not define anything special with regard to what information the boot loader is expected to pass to the Linux kernel, such as via the kernel command line.&lt;br /&gt;
&lt;br /&gt;
The kernel-level boot phases can be tailored, as necessary, to the specific CPU, chipset, or device in a standard Linux manner.&lt;br /&gt;
&lt;br /&gt;
The post-kernel boot phases (startup scripts) can be tailored by device vendors as necessary for their devices in the limits set by MeeGo compliance requirements (certain SW components need to be present in the system).&lt;br /&gt;
&lt;br /&gt;
==== Kernel fundamentals ====&lt;br /&gt;
&lt;br /&gt;
Regarding the Linux kernel, each MeeGo release defines the kernel version to be used and a set of patches on top of that. In addition, the Linux kernel used in MeeGo compliant devices is assumed to have been built with a set of fixed build-time configuration values that are not allowed to be changed. In addition to the fixed values, device vendors can define other kernel configuration values, as required by their devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo does not place any special requirements concerning how the boot loader passes information to the kernel or how the HW configuration and initialization of the system is handled.&lt;br /&gt;
&lt;br /&gt;
CPU, chipset (SoC), and device vendors are assumed to implement the elementary CPU architecture/chipset/device support for the Linux kernel used in MeeGo in a standard Linux manner. This includes:&lt;br /&gt;
* HW (board) configuration&lt;br /&gt;
* Mapping the fundamental Linux kernel functionality (such as IRQ, DMA, GPIO, RTC and memory handling) to the HW in question&lt;br /&gt;
* Creation/modification of the necessary device drivers to support the core SoC interfaces (such as I2C, SPI, SDIO)&lt;br /&gt;
* Permanent memory support&lt;br /&gt;
* Debugging and tracing support&lt;br /&gt;
&lt;br /&gt;
==== Power and thermal management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, the understanding is that MeeGo in general relies on established Linux kernel frameworks and APIs for power management. Some of these frameworks and APIs may be applicable only in certain CPU architectures. In addition, the HW capabilities related to power management may vary between different HW platforms potentially meaning that the SW is assumed perform somewhat different tasks in different environments.&lt;br /&gt;
&lt;br /&gt;
The Linux power management frameworks and APIs include:&lt;br /&gt;
* CPU frequency control (support for the different voltage and frequency operating points) via the cpufreq infrastructure&lt;br /&gt;
* CPU idle state management (different levels of sleep) through the cpuidle infrastructure&lt;br /&gt;
* Clock management through the clock framework&lt;br /&gt;
* Suspend/resume&lt;br /&gt;
* Runtime power management&lt;br /&gt;
* HW voltage/current regulator control via the regulator framework&lt;br /&gt;
* PM_QOS (power management quality of service) framework for making and listening to PM QoS requests&lt;br /&gt;
&lt;br /&gt;
Whether MeeGo will have some user space SW components or framework related to power management is under discussion at the time of this writing.&lt;br /&gt;
&lt;br /&gt;
In the thermal management area, the Device State Management Entity (DSME) component in the Device Health subsystem is supposed to make thermal state management decisions in the system. The DSME has a thermal manager module that again uses other DSME modules (thermal objects) to access the actual thermal sensor information in the HW. To port this functionality to new HW, one or more DSME thermal object modules need to be implemented.&lt;br /&gt;
&lt;br /&gt;
The APIs that the thermal object modules use to access the thermal sensor information are not strictly defined by MeeGo. At device driver level, however, the preferred approach is to use standard Linux interfaces such as the generic thermal sysfs API or the hwmon sysfs API.&lt;br /&gt;
&lt;br /&gt;
==== Energy management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, basically the only thing that MeeGo requires from HW adaptation in the energy management area (battery charging and monitoring) is support for the Linux power supply sysfs class. Additional energy management related functionality can be handled in a vendor specific manner.&lt;br /&gt;
&lt;br /&gt;
==== Device state ====&lt;br /&gt;
&lt;br /&gt;
The DSME component participates in device state management, such as by managing device run level, reboot, and shutdown, by monitoring the device thermal state, and shutting down the device in fatal thermal conditions, and by handling HW watchdog kicking activity.&lt;br /&gt;
&lt;br /&gt;
In a new HW environment, the DSME needs to be adapted to handle the watchdog kicking through the right device driver interfaces and at the right intervals. In addition, to port the DSME thermal management functionality to new HW, one or more DSME thermal object modules need to be implemented as described above, in the [[#Power_and_thermal_management|''Power and thermal management'']] section.&lt;br /&gt;
&lt;br /&gt;
=== Security Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Work is ongoing in bringing platform security functionality to the MeeGo OS based on the Mandatory Access Control (MAC), Integrity Measurement Architecture (IMA) and Extended Verification Module (EVM) technologies in the Linux kernel. Maximum security can be reached if the MeeGo platform security functionality can rely on trusted platform support &amp;quot;below&amp;quot; the Linux kernel, effectively in the HW and the boot loader(s). MeeGo, however, places no strict requirements as to how the trusted platform support is implemented in MeeGo based devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo also includes the OpenSSL open source toolkit implementing general purpose cryptography functionality. Algorithms and operations supported by the OpenSSL toolkit can be accelerated in HW by using the OpenSSL engine architecture. OpenSSL also supports a cryptodev engine that uses crypto algorithms implemented in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Some devices may have a security watchdog in the HW that needs &amp;quot;kicking&amp;quot; at regular intervals to keep the device up and running. In MeeGo, watchdog kicking functionality is implemented in the Device State Management Entity (DSME) component. If security watchdog kicking is needed, the DSME needs to be adapted to handle that through the right device driver interface and at the right intervals.&lt;br /&gt;
&lt;br /&gt;
=== Device Mode Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Resource Policy ====&lt;br /&gt;
&lt;br /&gt;
The Resource (Policy) Manager component in the Device Health subsystem offers a generic framework for:&lt;br /&gt;
* Monitoring device and application events&lt;br /&gt;
* Managing policies that specify rules about what should happen in the device when certain events occur&lt;br /&gt;
* Making policy decisions when events occur (determining the needed changes in the device)&lt;br /&gt;
* Enforcing changes in the system through policy enforcement points&lt;br /&gt;
&lt;br /&gt;
The Resource Manager can be used, for example, to change the audio routing in the device, when the user attaches a wired headset to the device.&lt;br /&gt;
&lt;br /&gt;
Event listening and change enforcement in the Resource Manager happens through plugin modules. Using the MeeGo OS in some new device effectively involves creating suitable Resource Manager policies and writing the necessary plugins for listening device/application events and changing device behavior accordingly. Though not pure HW adaptation, this can be considered as a form of MeeGo OS &amp;quot;device adaptation&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Mode Control Entity (MCE) ====&lt;br /&gt;
&lt;br /&gt;
The MCE component (starting from MeeGo 1.2) can be used to listen to events that have an impact to the device mode (e.g. touch screen locked vs. unlocked) and change the device mode accordingly. The MCE is used e.g. for: &lt;br /&gt;
* Listening to various keys and switches in the device (e.g. power key, volume key, camera button, slider switch)&lt;br /&gt;
* Controlling LEDs&lt;br /&gt;
* Touch screen or HW keyboard enabling/disabling depending on device state&lt;br /&gt;
* Keyboard backlight control&lt;br /&gt;
* Display state (on/off) and brightness control&lt;br /&gt;
&lt;br /&gt;
The MCE has its own plugin architecture that can be used to adapt it to different HW environments.&lt;br /&gt;
&lt;br /&gt;
=== Display and Graphics Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo visual services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view]. &lt;br /&gt;
&lt;br /&gt;
The key ingredients of the display and graphics architecture in MeeGo are the X Window System (X Server with its extensions) and the Khronos graphics APIs (OpenGL ES, OpenVG and EGL with their extensions).&lt;br /&gt;
&lt;br /&gt;
The display and graphics HW adaptation SW needs to enable the X Window System and the Khronos APIs to function on the device HW. In practice, the adaptation SW needs to have an X display/video driver (hosted inside the X Server) and libraries that implement the Khronos graphics APIs, both supporting the features and functionality required by MeeGo. Also some configuration file changes may be needed. Any additional user space and kernel space components needed for the HW adaptation are implementation dependent.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering display content to external displays, the Resource Manager component may be used to coordinate the display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Audio Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The audio architecture in MeeGo is centered around the GStreamer and PulseAudio frameworks. In addition, the Resource Manager plays a role in coordinating the audio related behavior of the device (audio routings). The audio HW adaptation SW needs to provide GStreamer elements and PulseAudio plugins that enable the GStreamer and PulseAudio client interfaces used for e.g. for audio playback, recording and volume control to work on the device. Typical required components include e.g. codec elements for GStreamer and sink/source plugins for PulseAudio.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer and PulseAudio plugins, the audio HW adaptation SW can be implemented with different technologies and APIs, including ALSA and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework as needed. Use of the ALSA framework and APIs is encouraged, however, as they allow significant reuse of components and functionality on the PulseAudio level and are already a part of the upstream Linux kernel. If ALSA is not used to implement the kernel side parts of the audio adaptation, the solution that is used instead should still be aligned with the upstream Linux kernel.&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo media services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view]. &lt;br /&gt;
&lt;br /&gt;
=== Camera Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo still imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework and the CameraBin GStreamer element. The still imaging HW adaptation SW is required to contain a GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element. Thus, the required HW adaptation interfaces are the relevant GStreamer plugin interfaces and especially the interfaces expected by the CameraBin element, in particular the GstPhotography interface.&lt;br /&gt;
&lt;br /&gt;
If HW accelerated encoders are supported, they should be also offered to the system as GStreamer elements.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
=== Video and Imaging Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo video imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework, the CameraBin GStreamer element (video recording) and the Playbin2 GStreamer element (video playback). The video imaging HW adaptation SW is required to contain:&lt;br /&gt;
:* A GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element (this is common with still imaging) &lt;br /&gt;
:* If HW accelerated codecs are supported, GStreamer elements that wrap the codecs&lt;br /&gt;
:* If HW accelerated filters are supported (e.g. video scaler, rotation engines, color conversion engines), GStreamer elements that wrap the filters&lt;br /&gt;
:* A GStreamer video sink element that offers the GStreamer X Overlay Interface. Note that if the XVideo extension is supported on the X Server side, the xvimagesink element can be used as the video sink element and no new elements are needed.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the video imaging HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering video content to external displays, the Resource Manager component may be used to coordinate the video/display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Communications Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo communications services architecture, see [http://meego.com/developers/meego-architecture/comms-services Comms Services].&lt;br /&gt;
&lt;br /&gt;
==== Cellular ====&lt;br /&gt;
&lt;br /&gt;
The cellular telephony architecture in MeeGo is centered on the oFono, PulseAudio and Telepathy frameworks. In addition, the Resource Manager plays a role in coordinating the device behavior during voice calls.&lt;br /&gt;
&lt;br /&gt;
The cellular modem HW adaptation SW must implement the following interfaces towards the MeeGo OS:&lt;br /&gt;
:* oFono modem plugin/driver API&lt;br /&gt;
:* Linux network interface for the Linux TCP/IP stack (for data communications)&lt;br /&gt;
:* Relevant PulseAudio plugin interfaces for cellular voice call audio handling&lt;br /&gt;
&lt;br /&gt;
For more detailed information about the oFono APIs, see the documentation and source code available at [http://git.kernel.org/?p=network/ofono/ofono.git;a=summary oFono git].&lt;br /&gt;
&lt;br /&gt;
==== USB ====&lt;br /&gt;
&lt;br /&gt;
The foundation of the the MeeGo USB functionality is the standard Linux USB subsystem. The Linux USB subsystem defines the USB related HW adaptation interfaces that need to be supported in MeeGo. In practice, these are kernel side interfaces between the generic USB functionality and a HW dependent USB host controller driver.&lt;br /&gt;
&lt;br /&gt;
==== WLAN ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo WLAN architecture is centered on the [http://linuxwireless.org/ Linux wireless] (IEEE-802.11) subsystem. The Linux wireless SW stack defines the WLAN HW adaptation SW interfaces that need to be used in MeeGo. In practice, the required interfaces are defined by cfg80211 for FullMAC WLAN devices and by mac80211 for SoftMAC WLAN devices. In addition, a Linux network interface needs to be supported towards the Linux TCP/IP stack.&lt;br /&gt;
&lt;br /&gt;
==== Bluetooth ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Bluetooth architecture is centered on the [http://www.bluez.org/ BlueZ] SW stack. The BlueZ SW stack defines the Bluetooth HW adaptation SW interfaces that need to be used in MeeGo. In practice, these are Linux kernel side interfaces between the generic HCI (Host Controller Interface) core and a HW specific HCI driver.&lt;br /&gt;
&lt;br /&gt;
=== Location Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The MeeGo location architecture is based on [http://http://labs.trolltech.com/page/Projects/QtMobility| QtMobility Location API].  The QtMobility 1.0 Location API provides geographic coordinates only.  The QtMobility 1.1 Location API provides geocoding and reverse geocoding, POI search, navigation, and mapping.  The 1.0 Location API is available in MeeGo 1.1.  The 1.1 or later Location API will be available in MeeGo 1.2.  The Location API uses a plugin system for implementations of the underlying backend.  MeeGo compliance requirements require support for the QtMobility Location API and thus require one or more plugins to support these APIs.  MeeGo places no restrictions as to how the plugins are implemented, however. Adaptation to location related HW may be done by manufacturers or service providers and the way how it's done is not defined by the API.&lt;br /&gt;
&lt;br /&gt;
MeeGo will use [http://www.freedesktop.org/wiki/Software/GeoClue GeoClue] as the reference location framework and the reference implementation of the Qt Mobility location API backend will be written on top of GeoClue. GeoClue defines a set of (D-Bus) APIs for accessing location services provided by service providers implemented as D-Bus services. In addition, GeoClue includes a set of service provider implementations and (at the time of this writing) an experimental master service provider that can act as a proxy between clients and the actual service providers. If a device vendor wants to take advantage of this existing functionality, the vendor can implement their location services &amp;quot;behind&amp;quot; the GeoClue APIs as GeoClue service providers. In such a case, adaptation to the location related HW would happen inside the service providers as defined by the service provider designs.&lt;br /&gt;
&lt;br /&gt;
=== Sensor Adaptation === &lt;br /&gt;
&lt;br /&gt;
The key component in the MeeGo sensor handling architecture is the Sensor Framework. The Sensor Framework uses both HW independent logical sensor plugins and HW dependent sensor adaptor plugins in its operation. The required sensor HW adaptation interfaces in MeeGo are the interfaces that the Sensor Framework and the logical sensor plugins define for the sensor adaptor plugins to implement. The sensor adaptor plugins typically communicate directly with sensor HW drivers in the Linux kernel. The interfaces that the sensor HW drivers expose to the user space are not defined by MeeGo. Sensor HW adaptation in MeeGo thus consists of adaptor plugins in the Sensor Framework and sensor HW drivers in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Note that thermal sensors are handled in a different manner as described in the [[#Power and thermal management|''Power and thermal management'']] section above.&lt;br /&gt;
&lt;br /&gt;
=== Input Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Touch ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the touch input handling path in MeeGo are the touch HW device driver, Linux kernel input subsystem, X server, X input driver, Qt and finally the MeeGo Touch Framework. Enabling touch support for some new HW requires at least the implementation of the corresponding touch HW device driver in the Linux kernel. If this driver communicates touch events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, basically the existing functionality in X server (e.g. evdev input driver) and above can be used as such. In case the kernel-to-user-space interface is non-standard, it is also possible to implement a new X input driver as a part of the touch HW adaptation.&lt;br /&gt;
&lt;br /&gt;
Multi-touch support in X requires a new version, 2.1, of the [http://cgit.freedesktop.org/~whot/inputproto/tree/XI2proto.txt?h=multitouch X Input Extension] and this also requires support from the client side, in this case Qt's multi-touch support. Once this support has been implemented throughout the SW stack, including X evdev input driver, supporting multi-touch for some new HW should require only the implementation of a touch HW device driver that implements the standard Linux multi-touch interface. This should be the case in MeeGo 1.2. &lt;br /&gt;
&lt;br /&gt;
Before 1.2, multi-touch support in MeeGo uses a special X input driver (mtev), X server multi-pointer support (MPX) and Qt multi-touch support written on top of MPX. This solution requires the touch HW device driver to expose a user-space interface that is compatible with mtev.&lt;br /&gt;
&lt;br /&gt;
==== HW keyboard ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the HW keyboard input handling path in MeeGo are the keyboard HW device driver, Linux kernel input subsystem, X server, X input driver and Qt. Enabling keyboard support for some new HW requires typically only the implementation of the corresponding keyboard HW device driver in the Linux kernel. If this driver communicates key events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, the existing functionality in X server (e.g. evdev input driver) and above should work as such. In case the kernel-to-user space interface is non-standard, it is also possible to implement a new X input driver as a part of the keyboard HW adaptation.&lt;br /&gt;
&lt;br /&gt;
==== Buttons and switches ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo includes the MCE and System SW Qt API (QmSystem) components. The MCE can be used to control the device mode and it listens to power button events and e.g. device open/close switch events via the respective device driver interfaces. The System SW Qt API on the other hand provides a Qt API to various system information, including events from various physical buttons in the device (e.g. volume button, camera button). The System SW Qt API gets the button events either by listening to the relevant device driver interfaces or through the MCE component.&lt;br /&gt;
&lt;br /&gt;
Both the MCE and the System SW Qt API components can be adapted to new devices by device vendors.&lt;br /&gt;
&lt;br /&gt;
=== Haptics and Vibra Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Haptics ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Touch Framework present (at least) in the MeeGo handset device category contains a component called Feedback Framework (meegotouch-feedback) that handles the creation of auditory and/or haptic feedback to touch events. The haptic feedback can be created e.g. with vibra motors or piezo elements. In the Feedback Framework, the different types of feedback are created by backend libraries implemented as plugins. &lt;br /&gt;
&lt;br /&gt;
The haptics related HW adaptation interface from MeeGo OS perspective is the backend plugin interface defined by the Feedback Framework. The plugins can then communicate with the HW either through some device driver interface or some intermediate SW layers (MeeGo places no restrictions as to how the plugins are implemented).&lt;br /&gt;
&lt;br /&gt;
==== Vibra (notifications/alerts) ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo (at least the handset category) will include a component called Non-Graphical Feedback Framework (NGF). This component offers the capability of playing e.g. audio, vibra or led as an indication of events such as incoming call/message, clock and calendar alarms, missed calls, unread messages etc. The NGF also integrates with the Resource Policy to decide about the available playback resources based on policy rules and the current system state.&lt;br /&gt;
&lt;br /&gt;
The actual playback of the different types of notifications is handled by NGF plugins that can be created by device vendors. The plugins communicate with the relevant HW as they see best, e.g. directly through some device driver interface or via some intermediate user space SW components. The plugin interfaces defined by NGF thus form the notification/alert vibra adaptation interface in MeeGo.&lt;br /&gt;
&lt;br /&gt;
=== Production Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Production deals with areas such as flashing, testing, tuning and certification. The current understanding is that these areas are handled in a vendor specific manner, including the adaptation.&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Noel</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/MeeGo_Porting_Guide</id>
		<title>MeeGo Porting Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/MeeGo_Porting_Guide"/>
				<updated>2011-06-24T22:55:15Z</updated>
		
		<summary type="html">&lt;p&gt;Noel: /* Device state */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The goal of MeeGo Porting Guide (MPG) is to provide valuable information and instructions to people who want to run MeeGo OS on their (new) HW and eventually create products based on the MeeGo OS. The MPG starts with an overview of the porting process, tools, and other related background information and then moves on to describing what the porting actually means in individual technical/functional areas.&lt;br /&gt;
&lt;br /&gt;
The porting guide is not strictly tied to any particular MeeGo OS version or device category. Instead, it tries to be general enough to cover the different device categories, as well as follow changes introduced in new MeeGo OS versions.&lt;br /&gt;
&lt;br /&gt;
Detailed porting information in the different technical areas is dependent on the respective [http://meego.com/developers/meego-architecture MeeGo architecture]. In some cases, this architecture may still be open and this is noted in the applicable sections.&lt;br /&gt;
&lt;br /&gt;
=== Feedback ===&lt;br /&gt;
&lt;br /&gt;
Contribution to these pages is open. Any MeeGo community member is free to ''improve'' these pages at any time. You can also leave feedback in the [http://lists.meego.com/listinfo/meego-porting MeeGo porting mailing list].&lt;br /&gt;
&lt;br /&gt;
== General porting information/guidelines ==&lt;br /&gt;
&lt;br /&gt;
=== MeeGo compliance ===&lt;br /&gt;
&lt;br /&gt;
Perhaps the most important piece of background information related to the MPG are the [[Quality/Compliance|MeeGo compliance requirements]]. A device that is meant to be MeeGo compliant will need to fulfill the requirements listed in the MeeGo compliance specification for the applicable device category (the first version of the specification is supposed to be available in October 2010). In short, a MeeGo compliant device will need to:&lt;br /&gt;
* Meet the minimum HW performance and component requirements for the applicable device category&lt;br /&gt;
* Include all SW components that form the MeeGo core OS&lt;br /&gt;
* Include the additional SW components required to be present in devices in the applicable device category&lt;br /&gt;
* Not break the API/ABI of any of the components coming from MeeGo&lt;br /&gt;
* Follow the MeeGo SW packaging conventions&lt;br /&gt;
&lt;br /&gt;
The compliance rules will also specify CPU architecture specific requirements concerning how MeeGo OS itself and MeeGo applications are to be compiled to different environments (instruction set used, compiler version, compiler options, etc.).&lt;br /&gt;
&lt;br /&gt;
A device vendor may include additional functionality, HW components and SW components in their devices, as long as they don't break MeeGo compliance. The vendor can also patch MeeGo OS components, if the patches don't break MeeGo compliance. A device vendor's own SW components can be either open source or closed source components, as long as they adhere to the rules set by the applicable SW licenses.&lt;br /&gt;
&lt;br /&gt;
From the MeeGo Porting Guide perspective, by defining the SW components and HW components that need to be present, the compliance requirements effectively define the minimum set of porting tasks required from a device vendor and what SW components are involved from MeeGo OS side.&lt;br /&gt;
&lt;br /&gt;
=== Porting process and tools ===&lt;br /&gt;
&lt;br /&gt;
==== Overview ====&lt;br /&gt;
&lt;br /&gt;
As long as a vendor's device is MeeGo compliant, as defined above, it is basically up to the vendor to decide how they build the SW that ends up in the device. The vendor may use their own build machinery or set up an OBS build system that is also used in MeeGo. Regardless of what the vendor's build system is, it needs to integrate with the MeeGo build infrastructure, at least to fetch the MeeGo source packages for the builds, as well as build each MeeGo component in the same way as it would be built in the MeeGo build system (such as with the same compiler and compiler options). Whatever the case, the intention in MeeGo is to use and offer an open toolset that any HW or SW vendor can use for efficient SW creation. It is likely that using the same toolset as MeeGo, will offer the easiest way to integrate vendor's own build system with the the MeeGo build infrastructure.&lt;br /&gt;
&lt;br /&gt;
The key ingredients of the MeeGo build infrastructure and toolset are:&lt;br /&gt;
* [http://meego.gitorious.org MeeGo Gitorious]&lt;br /&gt;
** A version control system for the source files of various MeeGo specific SW components and tools&lt;br /&gt;
* [http://build.meego.com MeeGo OBS]&lt;br /&gt;
** The build system that is used to build MeeGo packages (RPMs) from their sources&lt;br /&gt;
* [http://repo.meego.com MeeGo Repository]&lt;br /&gt;
** The place where the built MeeGo releases, that is where MeeGo packages and images are stored&lt;br /&gt;
* [http://wiki.meego.com/Image_Creation MeeGo Image Creator]&lt;br /&gt;
** The tool used to build MeeGo images that can be installed/flashed on HW&lt;br /&gt;
* MeeGo release tools&lt;br /&gt;
** Tools such as BOSS and REVS that are used in the creation of the MeeGo releases under repo.meego.com&lt;br /&gt;
&lt;br /&gt;
For additional information, see [[Build Infrastructure]], [[Release Infrastructure]] and [[Release Engineering]].&lt;br /&gt;
&lt;br /&gt;
For another overview of the MeeGo porting process, see [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process].&lt;br /&gt;
&lt;br /&gt;
==== Vendor's own OBS ====&lt;br /&gt;
&lt;br /&gt;
So, ultimately, when creating actual products running the MeeGo OS, the vendor may end up setting up their own OBS build system. Setting up your own OBS system may also be beneficial in earlier HW/product development phases, as it offers a flexible way to modify and build MeeGo OS to test it on the new HW. The vendor's own OBS system can link to the MeeGo OBS for handling packages that come directly from MeeGo and it can link to other sources for handling, such as closed source packages that are specific to the vendor. See [[Release_Engineering/Process#Making a product out of MeeGo Release|an overview picture of this setup]].&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Sets up their own OBS system&lt;br /&gt;
** [[User:Stskeeps/10_easy_steps_to_a_local_OBS|Instructions related to setting up an OBS system]],  [[Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE112|OBS Applicances]] [http://en.opensuse.org/openSUSE:Build_Service_private_instance Open Suse OBS Wiki].&lt;br /&gt;
* Creates projects under the their own OBS for their own components&lt;br /&gt;
* Links their own OBS to the MeeGo OBS for MeeGo components&lt;br /&gt;
* May have trial patches to MeeGo components in their own OBS&lt;br /&gt;
** NOTE. Eventually all patches to MeeGo components required in a final MeeGo based product ''should'' be pushed to MeeGo.com. However, this is not an absolute must requirement, as long as the MeeGo compliance requirements and applicable SW license rules are fulfilled. &lt;br /&gt;
** See [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below&lt;br /&gt;
* Needs to set up the necessary machinery to create releases and images from the packages built with OBS&lt;br /&gt;
** This machinery can be based on the toolset used in MeeGo (see above)&lt;br /&gt;
&lt;br /&gt;
==== Working under MeeGo.com ====&lt;br /&gt;
&lt;br /&gt;
Another way of porting MeeGo to some new HW is to get the new HW accepted as one MeeGo reference HW and have the MeeGo build machinery create builds for the reference HW as a part of the normal MeeGo release building cycle (see [[Release Engineering/Release Timeline|Release Timeline]] and [[Release Engineering/Process|Release Process]]). This setup can also include QA support for the reference HW on the MeeGo side (see [[Quality]]). At the time of this writing, the actual process of getting new reference HW to MeeGo is still somewhat unclear. In any case, this model requires active participation from the vendor in MeeGo work in general and especially in supporting their reference HW in MeeGo.&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Creates a device/platform development project under the MeeGo OBS for their components. The open source components would then get submitted to MeeGo Trunk:Testing and get reviewed like any other MeeGo component for inclusion.&lt;br /&gt;
** Note that it is also possible to have closed source binary components in the MeeGo OBS to be included in the MeeGo builds for some reference HW. These are submitted to the Trunk:non-oss repository. Licensing is usually required to at least include redistributability, as the components cannot be mirrored from or hosted at repo.meego.com otherwise. It is not possible to have components within Trunk:Testing require closed source dependencies.&lt;br /&gt;
* Pushes patches to other MeeGo components at MeeGo.com as necessary (see [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below)&lt;br /&gt;
* Creates (or supports the creation of) a MIC kickstart file for building images for their reference HW&lt;br /&gt;
* As necessary, supports adding support for their reference HW and SW components in the MeeGo build and release infrastructure tools&lt;br /&gt;
&lt;br /&gt;
==== Trials ====&lt;br /&gt;
&lt;br /&gt;
A lightweight but also more limited &amp;quot;try it out&amp;quot; alternative to the above processes is discussed below.&lt;br /&gt;
&lt;br /&gt;
===== Initial bring-up attempt =====&lt;br /&gt;
&lt;br /&gt;
* Grab the already built root filesystem / image for a MeeGo reference device that's the closest to your target. For ARMv7, this is typically the Nokia N900 handset image. For Atom, this could be netbook image or handset image.&lt;br /&gt;
* Build a Linux kernel for your device and install the modules into /lib/modules.&lt;br /&gt;
* Boot the root filesystem and modify the configuration and drop in components to bring up the device to UX. Note down the things you had to modify or add, as this will be input for your porting work.&lt;br /&gt;
&lt;br /&gt;
===== Building your first image =====&lt;br /&gt;
&lt;br /&gt;
The second step to a proper hardware adaptation is making sure you can build your own image. Because we based our work before on a reference device image, it makes sense to try to build this image first. MeeGo images are constructed on the basis of so called 'kickstart files', which describe the intended contents of an image. &lt;br /&gt;
&lt;br /&gt;
* Install the MeeGo Image Creator tool (MIC)&lt;br /&gt;
* Download the kickstart file (.ks) from the same directory you found your reference device image. &lt;br /&gt;
* Create a image using mic-image-creator (should be elaborated).&lt;br /&gt;
* Test out your freshly baked image as in the previous step.&lt;br /&gt;
&lt;br /&gt;
===== Building your port's first reproduciable image =====&lt;br /&gt;
&lt;br /&gt;
* Download the MeeGo kernel, possibly modifying the kernel with additional patches (including new device drivers) and building the kernel (see [[#Getting_new_chipset_support_to_the_MeeGo_kernel|''Getting new chipset support to the MeeGo kernel'']] below). &lt;br /&gt;
* Add the repository containing your kernel package to the kickstart file (to be elaborated)&lt;br /&gt;
* Remove parts of the kickstart file specific to the reference device.&lt;br /&gt;
* Add a mention of your kernel package in the %packages section.&lt;br /&gt;
* Build packages or include shell scripts in %post section of kickstart file that adds/modifies configuration fitting your device.&lt;br /&gt;
&lt;br /&gt;
A detailed description of a variation of this model can be found from [[ARM/Meego on Beagleboard from scratch|here]] (Better description needed).&lt;br /&gt;
&lt;br /&gt;
==== Getting new chipset support to the MeeGo kernel ====&lt;br /&gt;
&lt;br /&gt;
See [[How-to: getting new chipset support to the MeeGo kernel]] for more detailed information about how to work with the MeeGo kernel and make it support new HW.&lt;br /&gt;
&lt;br /&gt;
=== Upstream projects, MeeGo, products, and patches ===&lt;br /&gt;
&lt;br /&gt;
When building a product based on MeeGo, the product vendor will typically augment the MeeGo OS with their own SW components, as well as make fixes and adjustments to the MeeGo OS code (in the limits set by the compliance rules). While vendors can manage their own SW components as they wish, the strong preference is that any changes made to the MeeGo OS SW components are delivered as patches primarily to the respective upstream projects or secondarily to MeeGo.com. In this way, vendors can relieve themselves of the burden of managing a potentially big patch set on top of MeeGo OS, and also verify the quality and safety of their patches. Having the patches in upstream projects again lessens the patch set management load at MeeGo.com.&lt;br /&gt;
&lt;br /&gt;
For information about pushing patches to MeeGo, see [http://meego.com/about/contribution-guidelines Contribution Guidelines] and [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process] (especially section ''How Do Patches Get Integrated and Accepted?'') and [http://meego.gitorious.org/meego-os-base/kernel-source/blobs/master/README.workflow Kernel workflow].&lt;br /&gt;
&lt;br /&gt;
=== Adaptation subsystems and interfaces ===&lt;br /&gt;
&lt;br /&gt;
In the MeeGo architecture model (see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view MeeGo Architecture Domain View]), adaptation is represented as adaptation subsystems. SW components in the adaptation subsystem ''realizations'' do things that are expected by the OS and communicate with the OS through interfaces defined by the OS.&lt;br /&gt;
 &lt;br /&gt;
The key goal in the sections below is to identify the interface(s) that the adaptation SW needs to implement/use to communicate with the OS in the required manner. Behind these interfaces, the adaptation SW can basically handle the required functionality as it sees best. In some cases, however, there may also be some preferred way of implementing the adaptation.&lt;br /&gt;
&lt;br /&gt;
In some areas, the adaptation work may consist of just writing a suitable Linux device driver for the HW in question. In some other areas, the adaptation work may consist of writing one or more device drivers, as well as one or more user space components (such as plugins to some user space SW frameworks). Various configuration file changes may also be required as a part of the adaptation work.&lt;br /&gt;
&lt;br /&gt;
== Porting by adaptation subsystems ==&lt;br /&gt;
&lt;br /&gt;
=== System Core Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Boot ====&lt;br /&gt;
&lt;br /&gt;
MeeGo places no restrictions as to what SW components are used to handle the pre-OS boot phases in a MeeGo compliant device. Thus, vendors are free to choose, for example, the boot loader, as they see fit. Note, however, that full use of the MeeGo platform security requires that the pre-OS boot phases form a trusted boot chain that ultimately builds on chipset-level security support.&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, MeeGo does not define anything special with regard to what information the boot loader is expected to pass to the Linux kernel, such as via the kernel command line.&lt;br /&gt;
&lt;br /&gt;
The kernel-level boot phases can be tailored, as necessary, to the specific CPU, chipset, or device in a standard Linux manner.&lt;br /&gt;
&lt;br /&gt;
The post-kernel boot phases (startup scripts) can be tailored by device vendors as necessary for their devices in the limits set by MeeGo compliance requirements (certain SW components need to be present in the system).&lt;br /&gt;
&lt;br /&gt;
==== Kernel fundamentals ====&lt;br /&gt;
&lt;br /&gt;
Regarding the Linux kernel, each MeeGo release defines the kernel version to be used and a set of patches on top of that. In addition, the Linux kernel used in MeeGo compliant devices is assumed to have been built with a set of fixed build-time configuration values that are not allowed to be changed. In addition to the fixed values, device vendors can define other kernel configuration values, as required by their devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo does not place any special requirements concerning how the boot loader passes information to the kernel or how the HW configuration and initialization of the system is handled.&lt;br /&gt;
&lt;br /&gt;
CPU, chipset (SoC), and device vendors are assumed to implement the elementary CPU architecture/chipset/device support for the Linux kernel used in MeeGo in a standard Linux manner. This includes:&lt;br /&gt;
* HW (board) configuration&lt;br /&gt;
* Mapping the fundamental Linux kernel functionality (such as IRQ, DMA, GPIO, RTC and memory handling) to the HW in question&lt;br /&gt;
* Creation/modification of the necessary device drivers to support the core SoC interfaces (such as I2C, SPI, SDIO)&lt;br /&gt;
* Permanent memory support&lt;br /&gt;
* Debugging and tracing support&lt;br /&gt;
&lt;br /&gt;
==== Power and thermal management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, the understanding is that MeeGo in general relies on established Linux kernel frameworks and APIs for power management. Some of these frameworks and APIs may be applicable only in certain CPU architectures. In addition, the HW capabilities related to power management may vary between different HW platforms potentially meaning that the SW is assumed perform somewhat different tasks in different environments.&lt;br /&gt;
&lt;br /&gt;
The Linux power management frameworks and APIs include:&lt;br /&gt;
* CPU frequency control (support for the different voltage and frequency operating points) via the cpufreq infrastructure&lt;br /&gt;
* CPU idle state management (different levels of sleep) through the cpuidle infrastructure&lt;br /&gt;
* Clock management through the clock framework&lt;br /&gt;
* Suspend/resume&lt;br /&gt;
* Runtime power management&lt;br /&gt;
* HW voltage/current regulator control via the regulator framework&lt;br /&gt;
* PM_QOS (power management quality of service) framework for making and listening to PM QoS requests&lt;br /&gt;
&lt;br /&gt;
Whether MeeGo will have some user space SW components or framework related to power management is under discussion at the time of this writing.&lt;br /&gt;
&lt;br /&gt;
In the thermal management area, the Device State Management Entity (DSME) component in the Device Health subsystem is supposed to make thermal state management decisions in the system. The DSME has a thermal manager module that again uses other DSME modules (thermal objects) to access the actual thermal sensor information in the HW. To port this functionality to new HW, one or more DSME thermal object modules need to be implemented.&lt;br /&gt;
&lt;br /&gt;
The APIs that the thermal object modules use to access the thermal sensor information are not strictly defined by MeeGo. At device driver level, however, the preferred approach is to use standard Linux interfaces such as the generic thermal sysfs API or the hwmon sysfs API.&lt;br /&gt;
&lt;br /&gt;
==== Energy management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, basically the only thing that MeeGo requires from HW adaptation in the energy management area (battery charging and monitoring) is support for the Linux power supply sysfs class. Additional energy management related functionality can be handled in a vendor specific manner.&lt;br /&gt;
&lt;br /&gt;
==== Device state ====&lt;br /&gt;
&lt;br /&gt;
The DSME component participates in device state management, such as by managing device run level, reboot, and shutdown, by monitoring the device thermal state, and shutting down the device in fatal thermal conditions, and by handling HW watchdog kicking activity.&lt;br /&gt;
&lt;br /&gt;
In a new HW environment, the DSME needs to be adapted to handle the watchdog kicking through the right device driver interfaces and at the right intervals. In addition, to port the DSME thermal management functionality to new HW, one or more DSME thermal object modules need to be implemented as described above, in the [[#Power_and_thermal_management|''Power and thermal management'']] section.&lt;br /&gt;
&lt;br /&gt;
=== Security Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Work is ongoing in bringing platform security functionality to the MeeGo OS based on the Mandatory Access Control (MAC), Integrity Measurement Architecture (IMA) and Extended Verification Module (EVM) technologies in the Linux kernel. Maximum security can be reached if the MeeGo platform security functionality can rely on trusted platform support &amp;quot;below&amp;quot; the Linux kernel, effectively in the HW and the boot loader(s). MeeGo, however, places no strict requirements as to how the trusted platform support is implemented in MeeGo based devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo also includes the OpenSSL open source toolkit implementing general purpose cryptography functionality. Algorithms and operations supported by the OpenSSL toolkit can be accelerated in HW by using the OpenSSL engine architecture. OpenSSL also supports a cryptodev engine that uses crypto algorithms implemented in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Some devices may have a security watchdog in the HW that needs &amp;quot;kicking&amp;quot; at regular intervals to keep the device up and running. In MeeGo, watchdog kicking functionality is implemented in the Device State Management Entity (DSME) component. If security watchdog kicking is needed, the DSME needs to be adapted to handle that through the right device driver interface and at the right intervals.&lt;br /&gt;
&lt;br /&gt;
=== Device Mode Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Resource Policy ====&lt;br /&gt;
&lt;br /&gt;
The Resource (Policy) Manager component in the Device Health subsystem offers a generic framework for:&lt;br /&gt;
* Monitoring device and application events&lt;br /&gt;
* Managing policies that specify rules about what should happen in the device when certain events occur&lt;br /&gt;
* Making policy decisions when events occur (determining the needed changes in the device)&lt;br /&gt;
* Enforcing changes in the system through policy enforcement points&lt;br /&gt;
&lt;br /&gt;
The Resource Manager can be used e.g. to change the audio routing in the device when the user attaches a wired headset to the device.&lt;br /&gt;
&lt;br /&gt;
Event listening and change enforcement in the Resource Manager happens through plugin modules. Using the MeeGo OS in some new device effectively involves creating suitable Resource Manager policies and writing the necessary plugins for listening device/application events and changing device behavior accordingly. Though not pure HW adaptation, this can be considered as a form of MeeGo OS &amp;quot;device adaptation&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Mode Control Entity (MCE) ====&lt;br /&gt;
&lt;br /&gt;
The MCE component (starting from MeeGo 1.2) can be used to listen to events that have an impact to the device mode (e.g. touch screen locked vs. unlocked) and change the device mode accordingly. The MCE is used e.g. for: &lt;br /&gt;
* Listening to various keys and switches in the device (e.g. power key, volume key, camera button, slider switch)&lt;br /&gt;
* Controlling LEDs&lt;br /&gt;
* Touch screen or HW keyboard enabling/disabling depending on device state&lt;br /&gt;
* Keyboard backlight control&lt;br /&gt;
* Display state (on/off) and brightness control&lt;br /&gt;
&lt;br /&gt;
The MCE has its own plugin architecture that can be used to adapt it to different HW environments.&lt;br /&gt;
&lt;br /&gt;
=== Display and Graphics Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo visual services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view]. &lt;br /&gt;
&lt;br /&gt;
The key ingredients of the display and graphics architecture in MeeGo are the X Window System (X Server with its extensions) and the Khronos graphics APIs (OpenGL ES, OpenVG and EGL with their extensions).&lt;br /&gt;
&lt;br /&gt;
The display and graphics HW adaptation SW needs to enable the X Window System and the Khronos APIs to function on the device HW. In practice, the adaptation SW needs to have an X display/video driver (hosted inside the X Server) and libraries that implement the Khronos graphics APIs, both supporting the features and functionality required by MeeGo. Also some configuration file changes may be needed. Any additional user space and kernel space components needed for the HW adaptation are implementation dependent.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering display content to external displays, the Resource Manager component may be used to coordinate the display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Audio Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The audio architecture in MeeGo is centered around the GStreamer and PulseAudio frameworks. In addition, the Resource Manager plays a role in coordinating the audio related behavior of the device (audio routings). The audio HW adaptation SW needs to provide GStreamer elements and PulseAudio plugins that enable the GStreamer and PulseAudio client interfaces used for e.g. for audio playback, recording and volume control to work on the device. Typical required components include e.g. codec elements for GStreamer and sink/source plugins for PulseAudio.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer and PulseAudio plugins, the audio HW adaptation SW can be implemented with different technologies and APIs, including ALSA and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework as needed. Use of the ALSA framework and APIs is encouraged, however, as they allow significant reuse of components and functionality on the PulseAudio level and are already a part of the upstream Linux kernel. If ALSA is not used to implement the kernel side parts of the audio adaptation, the solution that is used instead should still be aligned with the upstream Linux kernel.&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo media services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view]. &lt;br /&gt;
&lt;br /&gt;
=== Camera Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo still imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework and the CameraBin GStreamer element. The still imaging HW adaptation SW is required to contain a GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element. Thus, the required HW adaptation interfaces are the relevant GStreamer plugin interfaces and especially the interfaces expected by the CameraBin element, in particular the GstPhotography interface.&lt;br /&gt;
&lt;br /&gt;
If HW accelerated encoders are supported, they should be also offered to the system as GStreamer elements.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
=== Video and Imaging Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo video imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework, the CameraBin GStreamer element (video recording) and the Playbin2 GStreamer element (video playback). The video imaging HW adaptation SW is required to contain:&lt;br /&gt;
:* A GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element (this is common with still imaging) &lt;br /&gt;
:* If HW accelerated codecs are supported, GStreamer elements that wrap the codecs&lt;br /&gt;
:* If HW accelerated filters are supported (e.g. video scaler, rotation engines, color conversion engines), GStreamer elements that wrap the filters&lt;br /&gt;
:* A GStreamer video sink element that offers the GStreamer X Overlay Interface. Note that if the XVideo extension is supported on the X Server side, the xvimagesink element can be used as the video sink element and no new elements are needed.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the video imaging HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering video content to external displays, the Resource Manager component may be used to coordinate the video/display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Communications Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo communications services architecture, see [http://meego.com/developers/meego-architecture/comms-services Comms Services].&lt;br /&gt;
&lt;br /&gt;
==== Cellular ====&lt;br /&gt;
&lt;br /&gt;
The cellular telephony architecture in MeeGo is centered on the oFono, PulseAudio and Telepathy frameworks. In addition, the Resource Manager plays a role in coordinating the device behavior during voice calls.&lt;br /&gt;
&lt;br /&gt;
The cellular modem HW adaptation SW must implement the following interfaces towards the MeeGo OS:&lt;br /&gt;
:* oFono modem plugin/driver API&lt;br /&gt;
:* Linux network interface for the Linux TCP/IP stack (for data communications)&lt;br /&gt;
:* Relevant PulseAudio plugin interfaces for cellular voice call audio handling&lt;br /&gt;
&lt;br /&gt;
For more detailed information about the oFono APIs, see the documentation and source code available at [http://git.kernel.org/?p=network/ofono/ofono.git;a=summary oFono git].&lt;br /&gt;
&lt;br /&gt;
==== USB ====&lt;br /&gt;
&lt;br /&gt;
The foundation of the the MeeGo USB functionality is the standard Linux USB subsystem. The Linux USB subsystem defines the USB related HW adaptation interfaces that need to be supported in MeeGo. In practice, these are kernel side interfaces between the generic USB functionality and a HW dependent USB host controller driver.&lt;br /&gt;
&lt;br /&gt;
==== WLAN ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo WLAN architecture is centered on the [http://linuxwireless.org/ Linux wireless] (IEEE-802.11) subsystem. The Linux wireless SW stack defines the WLAN HW adaptation SW interfaces that need to be used in MeeGo. In practice, the required interfaces are defined by cfg80211 for FullMAC WLAN devices and by mac80211 for SoftMAC WLAN devices. In addition, a Linux network interface needs to be supported towards the Linux TCP/IP stack.&lt;br /&gt;
&lt;br /&gt;
==== Bluetooth ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Bluetooth architecture is centered on the [http://www.bluez.org/ BlueZ] SW stack. The BlueZ SW stack defines the Bluetooth HW adaptation SW interfaces that need to be used in MeeGo. In practice, these are Linux kernel side interfaces between the generic HCI (Host Controller Interface) core and a HW specific HCI driver.&lt;br /&gt;
&lt;br /&gt;
=== Location Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The MeeGo location architecture is based on [http://http://labs.trolltech.com/page/Projects/QtMobility| QtMobility Location API].  The QtMobility 1.0 Location API provides geographic coordinates only.  The QtMobility 1.1 Location API provides geocoding and reverse geocoding, POI search, navigation, and mapping.  The 1.0 Location API is available in MeeGo 1.1.  The 1.1 or later Location API will be available in MeeGo 1.2.  The Location API uses a plugin system for implementations of the underlying backend.  MeeGo compliance requirements require support for the QtMobility Location API and thus require one or more plugins to support these APIs.  MeeGo places no restrictions as to how the plugins are implemented, however. Adaptation to location related HW may be done by manufacturers or service providers and the way how it's done is not defined by the API.&lt;br /&gt;
&lt;br /&gt;
MeeGo will use [http://www.freedesktop.org/wiki/Software/GeoClue GeoClue] as the reference location framework and the reference implementation of the Qt Mobility location API backend will be written on top of GeoClue. GeoClue defines a set of (D-Bus) APIs for accessing location services provided by service providers implemented as D-Bus services. In addition, GeoClue includes a set of service provider implementations and (at the time of this writing) an experimental master service provider that can act as a proxy between clients and the actual service providers. If a device vendor wants to take advantage of this existing functionality, the vendor can implement their location services &amp;quot;behind&amp;quot; the GeoClue APIs as GeoClue service providers. In such a case, adaptation to the location related HW would happen inside the service providers as defined by the service provider designs.&lt;br /&gt;
&lt;br /&gt;
=== Sensor Adaptation === &lt;br /&gt;
&lt;br /&gt;
The key component in the MeeGo sensor handling architecture is the Sensor Framework. The Sensor Framework uses both HW independent logical sensor plugins and HW dependent sensor adaptor plugins in its operation. The required sensor HW adaptation interfaces in MeeGo are the interfaces that the Sensor Framework and the logical sensor plugins define for the sensor adaptor plugins to implement. The sensor adaptor plugins typically communicate directly with sensor HW drivers in the Linux kernel. The interfaces that the sensor HW drivers expose to the user space are not defined by MeeGo. Sensor HW adaptation in MeeGo thus consists of adaptor plugins in the Sensor Framework and sensor HW drivers in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Note that thermal sensors are handled in a different manner as described in the [[#Power and thermal management|''Power and thermal management'']] section above.&lt;br /&gt;
&lt;br /&gt;
=== Input Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Touch ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the touch input handling path in MeeGo are the touch HW device driver, Linux kernel input subsystem, X server, X input driver, Qt and finally the MeeGo Touch Framework. Enabling touch support for some new HW requires at least the implementation of the corresponding touch HW device driver in the Linux kernel. If this driver communicates touch events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, basically the existing functionality in X server (e.g. evdev input driver) and above can be used as such. In case the kernel-to-user-space interface is non-standard, it is also possible to implement a new X input driver as a part of the touch HW adaptation.&lt;br /&gt;
&lt;br /&gt;
Multi-touch support in X requires a new version, 2.1, of the [http://cgit.freedesktop.org/~whot/inputproto/tree/XI2proto.txt?h=multitouch X Input Extension] and this also requires support from the client side, in this case Qt's multi-touch support. Once this support has been implemented throughout the SW stack, including X evdev input driver, supporting multi-touch for some new HW should require only the implementation of a touch HW device driver that implements the standard Linux multi-touch interface. This should be the case in MeeGo 1.2. &lt;br /&gt;
&lt;br /&gt;
Before 1.2, multi-touch support in MeeGo uses a special X input driver (mtev), X server multi-pointer support (MPX) and Qt multi-touch support written on top of MPX. This solution requires the touch HW device driver to expose a user-space interface that is compatible with mtev.&lt;br /&gt;
&lt;br /&gt;
==== HW keyboard ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the HW keyboard input handling path in MeeGo are the keyboard HW device driver, Linux kernel input subsystem, X server, X input driver and Qt. Enabling keyboard support for some new HW requires typically only the implementation of the corresponding keyboard HW device driver in the Linux kernel. If this driver communicates key events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, the existing functionality in X server (e.g. evdev input driver) and above should work as such. In case the kernel-to-user space interface is non-standard, it is also possible to implement a new X input driver as a part of the keyboard HW adaptation.&lt;br /&gt;
&lt;br /&gt;
==== Buttons and switches ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo includes the MCE and System SW Qt API (QmSystem) components. The MCE can be used to control the device mode and it listens to power button events and e.g. device open/close switch events via the respective device driver interfaces. The System SW Qt API on the other hand provides a Qt API to various system information, including events from various physical buttons in the device (e.g. volume button, camera button). The System SW Qt API gets the button events either by listening to the relevant device driver interfaces or through the MCE component.&lt;br /&gt;
&lt;br /&gt;
Both the MCE and the System SW Qt API components can be adapted to new devices by device vendors.&lt;br /&gt;
&lt;br /&gt;
=== Haptics and Vibra Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Haptics ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Touch Framework present (at least) in the MeeGo handset device category contains a component called Feedback Framework (meegotouch-feedback) that handles the creation of auditory and/or haptic feedback to touch events. The haptic feedback can be created e.g. with vibra motors or piezo elements. In the Feedback Framework, the different types of feedback are created by backend libraries implemented as plugins. &lt;br /&gt;
&lt;br /&gt;
The haptics related HW adaptation interface from MeeGo OS perspective is the backend plugin interface defined by the Feedback Framework. The plugins can then communicate with the HW either through some device driver interface or some intermediate SW layers (MeeGo places no restrictions as to how the plugins are implemented).&lt;br /&gt;
&lt;br /&gt;
==== Vibra (notifications/alerts) ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo (at least the handset category) will include a component called Non-Graphical Feedback Framework (NGF). This component offers the capability of playing e.g. audio, vibra or led as an indication of events such as incoming call/message, clock and calendar alarms, missed calls, unread messages etc. The NGF also integrates with the Resource Policy to decide about the available playback resources based on policy rules and the current system state.&lt;br /&gt;
&lt;br /&gt;
The actual playback of the different types of notifications is handled by NGF plugins that can be created by device vendors. The plugins communicate with the relevant HW as they see best, e.g. directly through some device driver interface or via some intermediate user space SW components. The plugin interfaces defined by NGF thus form the notification/alert vibra adaptation interface in MeeGo.&lt;br /&gt;
&lt;br /&gt;
=== Production Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Production deals with areas such as flashing, testing, tuning and certification. The current understanding is that these areas are handled in a vendor specific manner, including the adaptation.&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Noel</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/MeeGo_Porting_Guide</id>
		<title>MeeGo Porting Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/MeeGo_Porting_Guide"/>
				<updated>2011-06-24T22:53:50Z</updated>
		
		<summary type="html">&lt;p&gt;Noel: /* Power and thermal management */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The goal of MeeGo Porting Guide (MPG) is to provide valuable information and instructions to people who want to run MeeGo OS on their (new) HW and eventually create products based on the MeeGo OS. The MPG starts with an overview of the porting process, tools, and other related background information and then moves on to describing what the porting actually means in individual technical/functional areas.&lt;br /&gt;
&lt;br /&gt;
The porting guide is not strictly tied to any particular MeeGo OS version or device category. Instead, it tries to be general enough to cover the different device categories, as well as follow changes introduced in new MeeGo OS versions.&lt;br /&gt;
&lt;br /&gt;
Detailed porting information in the different technical areas is dependent on the respective [http://meego.com/developers/meego-architecture MeeGo architecture]. In some cases, this architecture may still be open and this is noted in the applicable sections.&lt;br /&gt;
&lt;br /&gt;
=== Feedback ===&lt;br /&gt;
&lt;br /&gt;
Contribution to these pages is open. Any MeeGo community member is free to ''improve'' these pages at any time. You can also leave feedback in the [http://lists.meego.com/listinfo/meego-porting MeeGo porting mailing list].&lt;br /&gt;
&lt;br /&gt;
== General porting information/guidelines ==&lt;br /&gt;
&lt;br /&gt;
=== MeeGo compliance ===&lt;br /&gt;
&lt;br /&gt;
Perhaps the most important piece of background information related to the MPG are the [[Quality/Compliance|MeeGo compliance requirements]]. A device that is meant to be MeeGo compliant will need to fulfill the requirements listed in the MeeGo compliance specification for the applicable device category (the first version of the specification is supposed to be available in October 2010). In short, a MeeGo compliant device will need to:&lt;br /&gt;
* Meet the minimum HW performance and component requirements for the applicable device category&lt;br /&gt;
* Include all SW components that form the MeeGo core OS&lt;br /&gt;
* Include the additional SW components required to be present in devices in the applicable device category&lt;br /&gt;
* Not break the API/ABI of any of the components coming from MeeGo&lt;br /&gt;
* Follow the MeeGo SW packaging conventions&lt;br /&gt;
&lt;br /&gt;
The compliance rules will also specify CPU architecture specific requirements concerning how MeeGo OS itself and MeeGo applications are to be compiled to different environments (instruction set used, compiler version, compiler options, etc.).&lt;br /&gt;
&lt;br /&gt;
A device vendor may include additional functionality, HW components and SW components in their devices, as long as they don't break MeeGo compliance. The vendor can also patch MeeGo OS components, if the patches don't break MeeGo compliance. A device vendor's own SW components can be either open source or closed source components, as long as they adhere to the rules set by the applicable SW licenses.&lt;br /&gt;
&lt;br /&gt;
From the MeeGo Porting Guide perspective, by defining the SW components and HW components that need to be present, the compliance requirements effectively define the minimum set of porting tasks required from a device vendor and what SW components are involved from MeeGo OS side.&lt;br /&gt;
&lt;br /&gt;
=== Porting process and tools ===&lt;br /&gt;
&lt;br /&gt;
==== Overview ====&lt;br /&gt;
&lt;br /&gt;
As long as a vendor's device is MeeGo compliant, as defined above, it is basically up to the vendor to decide how they build the SW that ends up in the device. The vendor may use their own build machinery or set up an OBS build system that is also used in MeeGo. Regardless of what the vendor's build system is, it needs to integrate with the MeeGo build infrastructure, at least to fetch the MeeGo source packages for the builds, as well as build each MeeGo component in the same way as it would be built in the MeeGo build system (such as with the same compiler and compiler options). Whatever the case, the intention in MeeGo is to use and offer an open toolset that any HW or SW vendor can use for efficient SW creation. It is likely that using the same toolset as MeeGo, will offer the easiest way to integrate vendor's own build system with the the MeeGo build infrastructure.&lt;br /&gt;
&lt;br /&gt;
The key ingredients of the MeeGo build infrastructure and toolset are:&lt;br /&gt;
* [http://meego.gitorious.org MeeGo Gitorious]&lt;br /&gt;
** A version control system for the source files of various MeeGo specific SW components and tools&lt;br /&gt;
* [http://build.meego.com MeeGo OBS]&lt;br /&gt;
** The build system that is used to build MeeGo packages (RPMs) from their sources&lt;br /&gt;
* [http://repo.meego.com MeeGo Repository]&lt;br /&gt;
** The place where the built MeeGo releases, that is where MeeGo packages and images are stored&lt;br /&gt;
* [http://wiki.meego.com/Image_Creation MeeGo Image Creator]&lt;br /&gt;
** The tool used to build MeeGo images that can be installed/flashed on HW&lt;br /&gt;
* MeeGo release tools&lt;br /&gt;
** Tools such as BOSS and REVS that are used in the creation of the MeeGo releases under repo.meego.com&lt;br /&gt;
&lt;br /&gt;
For additional information, see [[Build Infrastructure]], [[Release Infrastructure]] and [[Release Engineering]].&lt;br /&gt;
&lt;br /&gt;
For another overview of the MeeGo porting process, see [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process].&lt;br /&gt;
&lt;br /&gt;
==== Vendor's own OBS ====&lt;br /&gt;
&lt;br /&gt;
So, ultimately, when creating actual products running the MeeGo OS, the vendor may end up setting up their own OBS build system. Setting up your own OBS system may also be beneficial in earlier HW/product development phases, as it offers a flexible way to modify and build MeeGo OS to test it on the new HW. The vendor's own OBS system can link to the MeeGo OBS for handling packages that come directly from MeeGo and it can link to other sources for handling, such as closed source packages that are specific to the vendor. See [[Release_Engineering/Process#Making a product out of MeeGo Release|an overview picture of this setup]].&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Sets up their own OBS system&lt;br /&gt;
** [[User:Stskeeps/10_easy_steps_to_a_local_OBS|Instructions related to setting up an OBS system]],  [[Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE112|OBS Applicances]] [http://en.opensuse.org/openSUSE:Build_Service_private_instance Open Suse OBS Wiki].&lt;br /&gt;
* Creates projects under the their own OBS for their own components&lt;br /&gt;
* Links their own OBS to the MeeGo OBS for MeeGo components&lt;br /&gt;
* May have trial patches to MeeGo components in their own OBS&lt;br /&gt;
** NOTE. Eventually all patches to MeeGo components required in a final MeeGo based product ''should'' be pushed to MeeGo.com. However, this is not an absolute must requirement, as long as the MeeGo compliance requirements and applicable SW license rules are fulfilled. &lt;br /&gt;
** See [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below&lt;br /&gt;
* Needs to set up the necessary machinery to create releases and images from the packages built with OBS&lt;br /&gt;
** This machinery can be based on the toolset used in MeeGo (see above)&lt;br /&gt;
&lt;br /&gt;
==== Working under MeeGo.com ====&lt;br /&gt;
&lt;br /&gt;
Another way of porting MeeGo to some new HW is to get the new HW accepted as one MeeGo reference HW and have the MeeGo build machinery create builds for the reference HW as a part of the normal MeeGo release building cycle (see [[Release Engineering/Release Timeline|Release Timeline]] and [[Release Engineering/Process|Release Process]]). This setup can also include QA support for the reference HW on the MeeGo side (see [[Quality]]). At the time of this writing, the actual process of getting new reference HW to MeeGo is still somewhat unclear. In any case, this model requires active participation from the vendor in MeeGo work in general and especially in supporting their reference HW in MeeGo.&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Creates a device/platform development project under the MeeGo OBS for their components. The open source components would then get submitted to MeeGo Trunk:Testing and get reviewed like any other MeeGo component for inclusion.&lt;br /&gt;
** Note that it is also possible to have closed source binary components in the MeeGo OBS to be included in the MeeGo builds for some reference HW. These are submitted to the Trunk:non-oss repository. Licensing is usually required to at least include redistributability, as the components cannot be mirrored from or hosted at repo.meego.com otherwise. It is not possible to have components within Trunk:Testing require closed source dependencies.&lt;br /&gt;
* Pushes patches to other MeeGo components at MeeGo.com as necessary (see [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below)&lt;br /&gt;
* Creates (or supports the creation of) a MIC kickstart file for building images for their reference HW&lt;br /&gt;
* As necessary, supports adding support for their reference HW and SW components in the MeeGo build and release infrastructure tools&lt;br /&gt;
&lt;br /&gt;
==== Trials ====&lt;br /&gt;
&lt;br /&gt;
A lightweight but also more limited &amp;quot;try it out&amp;quot; alternative to the above processes is discussed below.&lt;br /&gt;
&lt;br /&gt;
===== Initial bring-up attempt =====&lt;br /&gt;
&lt;br /&gt;
* Grab the already built root filesystem / image for a MeeGo reference device that's the closest to your target. For ARMv7, this is typically the Nokia N900 handset image. For Atom, this could be netbook image or handset image.&lt;br /&gt;
* Build a Linux kernel for your device and install the modules into /lib/modules.&lt;br /&gt;
* Boot the root filesystem and modify the configuration and drop in components to bring up the device to UX. Note down the things you had to modify or add, as this will be input for your porting work.&lt;br /&gt;
&lt;br /&gt;
===== Building your first image =====&lt;br /&gt;
&lt;br /&gt;
The second step to a proper hardware adaptation is making sure you can build your own image. Because we based our work before on a reference device image, it makes sense to try to build this image first. MeeGo images are constructed on the basis of so called 'kickstart files', which describe the intended contents of an image. &lt;br /&gt;
&lt;br /&gt;
* Install the MeeGo Image Creator tool (MIC)&lt;br /&gt;
* Download the kickstart file (.ks) from the same directory you found your reference device image. &lt;br /&gt;
* Create a image using mic-image-creator (should be elaborated).&lt;br /&gt;
* Test out your freshly baked image as in the previous step.&lt;br /&gt;
&lt;br /&gt;
===== Building your port's first reproduciable image =====&lt;br /&gt;
&lt;br /&gt;
* Download the MeeGo kernel, possibly modifying the kernel with additional patches (including new device drivers) and building the kernel (see [[#Getting_new_chipset_support_to_the_MeeGo_kernel|''Getting new chipset support to the MeeGo kernel'']] below). &lt;br /&gt;
* Add the repository containing your kernel package to the kickstart file (to be elaborated)&lt;br /&gt;
* Remove parts of the kickstart file specific to the reference device.&lt;br /&gt;
* Add a mention of your kernel package in the %packages section.&lt;br /&gt;
* Build packages or include shell scripts in %post section of kickstart file that adds/modifies configuration fitting your device.&lt;br /&gt;
&lt;br /&gt;
A detailed description of a variation of this model can be found from [[ARM/Meego on Beagleboard from scratch|here]] (Better description needed).&lt;br /&gt;
&lt;br /&gt;
==== Getting new chipset support to the MeeGo kernel ====&lt;br /&gt;
&lt;br /&gt;
See [[How-to: getting new chipset support to the MeeGo kernel]] for more detailed information about how to work with the MeeGo kernel and make it support new HW.&lt;br /&gt;
&lt;br /&gt;
=== Upstream projects, MeeGo, products, and patches ===&lt;br /&gt;
&lt;br /&gt;
When building a product based on MeeGo, the product vendor will typically augment the MeeGo OS with their own SW components, as well as make fixes and adjustments to the MeeGo OS code (in the limits set by the compliance rules). While vendors can manage their own SW components as they wish, the strong preference is that any changes made to the MeeGo OS SW components are delivered as patches primarily to the respective upstream projects or secondarily to MeeGo.com. In this way, vendors can relieve themselves of the burden of managing a potentially big patch set on top of MeeGo OS, and also verify the quality and safety of their patches. Having the patches in upstream projects again lessens the patch set management load at MeeGo.com.&lt;br /&gt;
&lt;br /&gt;
For information about pushing patches to MeeGo, see [http://meego.com/about/contribution-guidelines Contribution Guidelines] and [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process] (especially section ''How Do Patches Get Integrated and Accepted?'') and [http://meego.gitorious.org/meego-os-base/kernel-source/blobs/master/README.workflow Kernel workflow].&lt;br /&gt;
&lt;br /&gt;
=== Adaptation subsystems and interfaces ===&lt;br /&gt;
&lt;br /&gt;
In the MeeGo architecture model (see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view MeeGo Architecture Domain View]), adaptation is represented as adaptation subsystems. SW components in the adaptation subsystem ''realizations'' do things that are expected by the OS and communicate with the OS through interfaces defined by the OS.&lt;br /&gt;
 &lt;br /&gt;
The key goal in the sections below is to identify the interface(s) that the adaptation SW needs to implement/use to communicate with the OS in the required manner. Behind these interfaces, the adaptation SW can basically handle the required functionality as it sees best. In some cases, however, there may also be some preferred way of implementing the adaptation.&lt;br /&gt;
&lt;br /&gt;
In some areas, the adaptation work may consist of just writing a suitable Linux device driver for the HW in question. In some other areas, the adaptation work may consist of writing one or more device drivers, as well as one or more user space components (such as plugins to some user space SW frameworks). Various configuration file changes may also be required as a part of the adaptation work.&lt;br /&gt;
&lt;br /&gt;
== Porting by adaptation subsystems ==&lt;br /&gt;
&lt;br /&gt;
=== System Core Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Boot ====&lt;br /&gt;
&lt;br /&gt;
MeeGo places no restrictions as to what SW components are used to handle the pre-OS boot phases in a MeeGo compliant device. Thus, vendors are free to choose, for example, the boot loader, as they see fit. Note, however, that full use of the MeeGo platform security requires that the pre-OS boot phases form a trusted boot chain that ultimately builds on chipset-level security support.&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, MeeGo does not define anything special with regard to what information the boot loader is expected to pass to the Linux kernel, such as via the kernel command line.&lt;br /&gt;
&lt;br /&gt;
The kernel-level boot phases can be tailored, as necessary, to the specific CPU, chipset, or device in a standard Linux manner.&lt;br /&gt;
&lt;br /&gt;
The post-kernel boot phases (startup scripts) can be tailored by device vendors as necessary for their devices in the limits set by MeeGo compliance requirements (certain SW components need to be present in the system).&lt;br /&gt;
&lt;br /&gt;
==== Kernel fundamentals ====&lt;br /&gt;
&lt;br /&gt;
Regarding the Linux kernel, each MeeGo release defines the kernel version to be used and a set of patches on top of that. In addition, the Linux kernel used in MeeGo compliant devices is assumed to have been built with a set of fixed build-time configuration values that are not allowed to be changed. In addition to the fixed values, device vendors can define other kernel configuration values, as required by their devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo does not place any special requirements concerning how the boot loader passes information to the kernel or how the HW configuration and initialization of the system is handled.&lt;br /&gt;
&lt;br /&gt;
CPU, chipset (SoC), and device vendors are assumed to implement the elementary CPU architecture/chipset/device support for the Linux kernel used in MeeGo in a standard Linux manner. This includes:&lt;br /&gt;
* HW (board) configuration&lt;br /&gt;
* Mapping the fundamental Linux kernel functionality (such as IRQ, DMA, GPIO, RTC and memory handling) to the HW in question&lt;br /&gt;
* Creation/modification of the necessary device drivers to support the core SoC interfaces (such as I2C, SPI, SDIO)&lt;br /&gt;
* Permanent memory support&lt;br /&gt;
* Debugging and tracing support&lt;br /&gt;
&lt;br /&gt;
==== Power and thermal management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, the understanding is that MeeGo in general relies on established Linux kernel frameworks and APIs for power management. Some of these frameworks and APIs may be applicable only in certain CPU architectures. In addition, the HW capabilities related to power management may vary between different HW platforms potentially meaning that the SW is assumed perform somewhat different tasks in different environments.&lt;br /&gt;
&lt;br /&gt;
The Linux power management frameworks and APIs include:&lt;br /&gt;
* CPU frequency control (support for the different voltage and frequency operating points) via the cpufreq infrastructure&lt;br /&gt;
* CPU idle state management (different levels of sleep) through the cpuidle infrastructure&lt;br /&gt;
* Clock management through the clock framework&lt;br /&gt;
* Suspend/resume&lt;br /&gt;
* Runtime power management&lt;br /&gt;
* HW voltage/current regulator control via the regulator framework&lt;br /&gt;
* PM_QOS (power management quality of service) framework for making and listening to PM QoS requests&lt;br /&gt;
&lt;br /&gt;
Whether MeeGo will have some user space SW components or framework related to power management is under discussion at the time of this writing.&lt;br /&gt;
&lt;br /&gt;
In the thermal management area, the Device State Management Entity (DSME) component in the Device Health subsystem is supposed to make thermal state management decisions in the system. The DSME has a thermal manager module that again uses other DSME modules (thermal objects) to access the actual thermal sensor information in the HW. To port this functionality to new HW, one or more DSME thermal object modules need to be implemented.&lt;br /&gt;
&lt;br /&gt;
The APIs that the thermal object modules use to access the thermal sensor information are not strictly defined by MeeGo. At device driver level, however, the preferred approach is to use standard Linux interfaces such as the generic thermal sysfs API or the hwmon sysfs API.&lt;br /&gt;
&lt;br /&gt;
==== Energy management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, basically the only thing that MeeGo requires from HW adaptation in the energy management area (battery charging and monitoring) is support for the Linux power supply sysfs class. Additional energy management related functionality can be handled in a vendor specific manner.&lt;br /&gt;
&lt;br /&gt;
==== Device state ====&lt;br /&gt;
&lt;br /&gt;
The DSME component participates in device state management e.g. by managing device run level, reboot and shutdown, by monitoring the device thermal state and shutting down the device in fatal thermal conditions, and by handling HW watchdog kicking activity.&lt;br /&gt;
&lt;br /&gt;
In a new HW environment, the DSME needs to be adapted to handle the watchdog kicking through the right device driver interfaces and at the right intervals. In addition, to port the DSME thermal management functionality to new HW, one or more DSME thermal object modules need to be implemented as described above in the [[#Power_and_thermal_management|''Power and thermal management'']] section.&lt;br /&gt;
&lt;br /&gt;
=== Security Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Work is ongoing in bringing platform security functionality to the MeeGo OS based on the Mandatory Access Control (MAC), Integrity Measurement Architecture (IMA) and Extended Verification Module (EVM) technologies in the Linux kernel. Maximum security can be reached if the MeeGo platform security functionality can rely on trusted platform support &amp;quot;below&amp;quot; the Linux kernel, effectively in the HW and the boot loader(s). MeeGo, however, places no strict requirements as to how the trusted platform support is implemented in MeeGo based devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo also includes the OpenSSL open source toolkit implementing general purpose cryptography functionality. Algorithms and operations supported by the OpenSSL toolkit can be accelerated in HW by using the OpenSSL engine architecture. OpenSSL also supports a cryptodev engine that uses crypto algorithms implemented in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Some devices may have a security watchdog in the HW that needs &amp;quot;kicking&amp;quot; at regular intervals to keep the device up and running. In MeeGo, watchdog kicking functionality is implemented in the Device State Management Entity (DSME) component. If security watchdog kicking is needed, the DSME needs to be adapted to handle that through the right device driver interface and at the right intervals.&lt;br /&gt;
&lt;br /&gt;
=== Device Mode Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Resource Policy ====&lt;br /&gt;
&lt;br /&gt;
The Resource (Policy) Manager component in the Device Health subsystem offers a generic framework for:&lt;br /&gt;
* Monitoring device and application events&lt;br /&gt;
* Managing policies that specify rules about what should happen in the device when certain events occur&lt;br /&gt;
* Making policy decisions when events occur (determining the needed changes in the device)&lt;br /&gt;
* Enforcing changes in the system through policy enforcement points&lt;br /&gt;
&lt;br /&gt;
The Resource Manager can be used e.g. to change the audio routing in the device when the user attaches a wired headset to the device.&lt;br /&gt;
&lt;br /&gt;
Event listening and change enforcement in the Resource Manager happens through plugin modules. Using the MeeGo OS in some new device effectively involves creating suitable Resource Manager policies and writing the necessary plugins for listening device/application events and changing device behavior accordingly. Though not pure HW adaptation, this can be considered as a form of MeeGo OS &amp;quot;device adaptation&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Mode Control Entity (MCE) ====&lt;br /&gt;
&lt;br /&gt;
The MCE component (starting from MeeGo 1.2) can be used to listen to events that have an impact to the device mode (e.g. touch screen locked vs. unlocked) and change the device mode accordingly. The MCE is used e.g. for: &lt;br /&gt;
* Listening to various keys and switches in the device (e.g. power key, volume key, camera button, slider switch)&lt;br /&gt;
* Controlling LEDs&lt;br /&gt;
* Touch screen or HW keyboard enabling/disabling depending on device state&lt;br /&gt;
* Keyboard backlight control&lt;br /&gt;
* Display state (on/off) and brightness control&lt;br /&gt;
&lt;br /&gt;
The MCE has its own plugin architecture that can be used to adapt it to different HW environments.&lt;br /&gt;
&lt;br /&gt;
=== Display and Graphics Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo visual services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view]. &lt;br /&gt;
&lt;br /&gt;
The key ingredients of the display and graphics architecture in MeeGo are the X Window System (X Server with its extensions) and the Khronos graphics APIs (OpenGL ES, OpenVG and EGL with their extensions).&lt;br /&gt;
&lt;br /&gt;
The display and graphics HW adaptation SW needs to enable the X Window System and the Khronos APIs to function on the device HW. In practice, the adaptation SW needs to have an X display/video driver (hosted inside the X Server) and libraries that implement the Khronos graphics APIs, both supporting the features and functionality required by MeeGo. Also some configuration file changes may be needed. Any additional user space and kernel space components needed for the HW adaptation are implementation dependent.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering display content to external displays, the Resource Manager component may be used to coordinate the display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Audio Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The audio architecture in MeeGo is centered around the GStreamer and PulseAudio frameworks. In addition, the Resource Manager plays a role in coordinating the audio related behavior of the device (audio routings). The audio HW adaptation SW needs to provide GStreamer elements and PulseAudio plugins that enable the GStreamer and PulseAudio client interfaces used for e.g. for audio playback, recording and volume control to work on the device. Typical required components include e.g. codec elements for GStreamer and sink/source plugins for PulseAudio.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer and PulseAudio plugins, the audio HW adaptation SW can be implemented with different technologies and APIs, including ALSA and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework as needed. Use of the ALSA framework and APIs is encouraged, however, as they allow significant reuse of components and functionality on the PulseAudio level and are already a part of the upstream Linux kernel. If ALSA is not used to implement the kernel side parts of the audio adaptation, the solution that is used instead should still be aligned with the upstream Linux kernel.&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo media services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view]. &lt;br /&gt;
&lt;br /&gt;
=== Camera Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo still imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework and the CameraBin GStreamer element. The still imaging HW adaptation SW is required to contain a GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element. Thus, the required HW adaptation interfaces are the relevant GStreamer plugin interfaces and especially the interfaces expected by the CameraBin element, in particular the GstPhotography interface.&lt;br /&gt;
&lt;br /&gt;
If HW accelerated encoders are supported, they should be also offered to the system as GStreamer elements.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
=== Video and Imaging Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo video imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework, the CameraBin GStreamer element (video recording) and the Playbin2 GStreamer element (video playback). The video imaging HW adaptation SW is required to contain:&lt;br /&gt;
:* A GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element (this is common with still imaging) &lt;br /&gt;
:* If HW accelerated codecs are supported, GStreamer elements that wrap the codecs&lt;br /&gt;
:* If HW accelerated filters are supported (e.g. video scaler, rotation engines, color conversion engines), GStreamer elements that wrap the filters&lt;br /&gt;
:* A GStreamer video sink element that offers the GStreamer X Overlay Interface. Note that if the XVideo extension is supported on the X Server side, the xvimagesink element can be used as the video sink element and no new elements are needed.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the video imaging HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering video content to external displays, the Resource Manager component may be used to coordinate the video/display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Communications Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo communications services architecture, see [http://meego.com/developers/meego-architecture/comms-services Comms Services].&lt;br /&gt;
&lt;br /&gt;
==== Cellular ====&lt;br /&gt;
&lt;br /&gt;
The cellular telephony architecture in MeeGo is centered on the oFono, PulseAudio and Telepathy frameworks. In addition, the Resource Manager plays a role in coordinating the device behavior during voice calls.&lt;br /&gt;
&lt;br /&gt;
The cellular modem HW adaptation SW must implement the following interfaces towards the MeeGo OS:&lt;br /&gt;
:* oFono modem plugin/driver API&lt;br /&gt;
:* Linux network interface for the Linux TCP/IP stack (for data communications)&lt;br /&gt;
:* Relevant PulseAudio plugin interfaces for cellular voice call audio handling&lt;br /&gt;
&lt;br /&gt;
For more detailed information about the oFono APIs, see the documentation and source code available at [http://git.kernel.org/?p=network/ofono/ofono.git;a=summary oFono git].&lt;br /&gt;
&lt;br /&gt;
==== USB ====&lt;br /&gt;
&lt;br /&gt;
The foundation of the the MeeGo USB functionality is the standard Linux USB subsystem. The Linux USB subsystem defines the USB related HW adaptation interfaces that need to be supported in MeeGo. In practice, these are kernel side interfaces between the generic USB functionality and a HW dependent USB host controller driver.&lt;br /&gt;
&lt;br /&gt;
==== WLAN ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo WLAN architecture is centered on the [http://linuxwireless.org/ Linux wireless] (IEEE-802.11) subsystem. The Linux wireless SW stack defines the WLAN HW adaptation SW interfaces that need to be used in MeeGo. In practice, the required interfaces are defined by cfg80211 for FullMAC WLAN devices and by mac80211 for SoftMAC WLAN devices. In addition, a Linux network interface needs to be supported towards the Linux TCP/IP stack.&lt;br /&gt;
&lt;br /&gt;
==== Bluetooth ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Bluetooth architecture is centered on the [http://www.bluez.org/ BlueZ] SW stack. The BlueZ SW stack defines the Bluetooth HW adaptation SW interfaces that need to be used in MeeGo. In practice, these are Linux kernel side interfaces between the generic HCI (Host Controller Interface) core and a HW specific HCI driver.&lt;br /&gt;
&lt;br /&gt;
=== Location Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The MeeGo location architecture is based on [http://http://labs.trolltech.com/page/Projects/QtMobility| QtMobility Location API].  The QtMobility 1.0 Location API provides geographic coordinates only.  The QtMobility 1.1 Location API provides geocoding and reverse geocoding, POI search, navigation, and mapping.  The 1.0 Location API is available in MeeGo 1.1.  The 1.1 or later Location API will be available in MeeGo 1.2.  The Location API uses a plugin system for implementations of the underlying backend.  MeeGo compliance requirements require support for the QtMobility Location API and thus require one or more plugins to support these APIs.  MeeGo places no restrictions as to how the plugins are implemented, however. Adaptation to location related HW may be done by manufacturers or service providers and the way how it's done is not defined by the API.&lt;br /&gt;
&lt;br /&gt;
MeeGo will use [http://www.freedesktop.org/wiki/Software/GeoClue GeoClue] as the reference location framework and the reference implementation of the Qt Mobility location API backend will be written on top of GeoClue. GeoClue defines a set of (D-Bus) APIs for accessing location services provided by service providers implemented as D-Bus services. In addition, GeoClue includes a set of service provider implementations and (at the time of this writing) an experimental master service provider that can act as a proxy between clients and the actual service providers. If a device vendor wants to take advantage of this existing functionality, the vendor can implement their location services &amp;quot;behind&amp;quot; the GeoClue APIs as GeoClue service providers. In such a case, adaptation to the location related HW would happen inside the service providers as defined by the service provider designs.&lt;br /&gt;
&lt;br /&gt;
=== Sensor Adaptation === &lt;br /&gt;
&lt;br /&gt;
The key component in the MeeGo sensor handling architecture is the Sensor Framework. The Sensor Framework uses both HW independent logical sensor plugins and HW dependent sensor adaptor plugins in its operation. The required sensor HW adaptation interfaces in MeeGo are the interfaces that the Sensor Framework and the logical sensor plugins define for the sensor adaptor plugins to implement. The sensor adaptor plugins typically communicate directly with sensor HW drivers in the Linux kernel. The interfaces that the sensor HW drivers expose to the user space are not defined by MeeGo. Sensor HW adaptation in MeeGo thus consists of adaptor plugins in the Sensor Framework and sensor HW drivers in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Note that thermal sensors are handled in a different manner as described in the [[#Power and thermal management|''Power and thermal management'']] section above.&lt;br /&gt;
&lt;br /&gt;
=== Input Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Touch ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the touch input handling path in MeeGo are the touch HW device driver, Linux kernel input subsystem, X server, X input driver, Qt and finally the MeeGo Touch Framework. Enabling touch support for some new HW requires at least the implementation of the corresponding touch HW device driver in the Linux kernel. If this driver communicates touch events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, basically the existing functionality in X server (e.g. evdev input driver) and above can be used as such. In case the kernel-to-user-space interface is non-standard, it is also possible to implement a new X input driver as a part of the touch HW adaptation.&lt;br /&gt;
&lt;br /&gt;
Multi-touch support in X requires a new version, 2.1, of the [http://cgit.freedesktop.org/~whot/inputproto/tree/XI2proto.txt?h=multitouch X Input Extension] and this also requires support from the client side, in this case Qt's multi-touch support. Once this support has been implemented throughout the SW stack, including X evdev input driver, supporting multi-touch for some new HW should require only the implementation of a touch HW device driver that implements the standard Linux multi-touch interface. This should be the case in MeeGo 1.2. &lt;br /&gt;
&lt;br /&gt;
Before 1.2, multi-touch support in MeeGo uses a special X input driver (mtev), X server multi-pointer support (MPX) and Qt multi-touch support written on top of MPX. This solution requires the touch HW device driver to expose a user-space interface that is compatible with mtev.&lt;br /&gt;
&lt;br /&gt;
==== HW keyboard ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the HW keyboard input handling path in MeeGo are the keyboard HW device driver, Linux kernel input subsystem, X server, X input driver and Qt. Enabling keyboard support for some new HW requires typically only the implementation of the corresponding keyboard HW device driver in the Linux kernel. If this driver communicates key events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, the existing functionality in X server (e.g. evdev input driver) and above should work as such. In case the kernel-to-user space interface is non-standard, it is also possible to implement a new X input driver as a part of the keyboard HW adaptation.&lt;br /&gt;
&lt;br /&gt;
==== Buttons and switches ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo includes the MCE and System SW Qt API (QmSystem) components. The MCE can be used to control the device mode and it listens to power button events and e.g. device open/close switch events via the respective device driver interfaces. The System SW Qt API on the other hand provides a Qt API to various system information, including events from various physical buttons in the device (e.g. volume button, camera button). The System SW Qt API gets the button events either by listening to the relevant device driver interfaces or through the MCE component.&lt;br /&gt;
&lt;br /&gt;
Both the MCE and the System SW Qt API components can be adapted to new devices by device vendors.&lt;br /&gt;
&lt;br /&gt;
=== Haptics and Vibra Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Haptics ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Touch Framework present (at least) in the MeeGo handset device category contains a component called Feedback Framework (meegotouch-feedback) that handles the creation of auditory and/or haptic feedback to touch events. The haptic feedback can be created e.g. with vibra motors or piezo elements. In the Feedback Framework, the different types of feedback are created by backend libraries implemented as plugins. &lt;br /&gt;
&lt;br /&gt;
The haptics related HW adaptation interface from MeeGo OS perspective is the backend plugin interface defined by the Feedback Framework. The plugins can then communicate with the HW either through some device driver interface or some intermediate SW layers (MeeGo places no restrictions as to how the plugins are implemented).&lt;br /&gt;
&lt;br /&gt;
==== Vibra (notifications/alerts) ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo (at least the handset category) will include a component called Non-Graphical Feedback Framework (NGF). This component offers the capability of playing e.g. audio, vibra or led as an indication of events such as incoming call/message, clock and calendar alarms, missed calls, unread messages etc. The NGF also integrates with the Resource Policy to decide about the available playback resources based on policy rules and the current system state.&lt;br /&gt;
&lt;br /&gt;
The actual playback of the different types of notifications is handled by NGF plugins that can be created by device vendors. The plugins communicate with the relevant HW as they see best, e.g. directly through some device driver interface or via some intermediate user space SW components. The plugin interfaces defined by NGF thus form the notification/alert vibra adaptation interface in MeeGo.&lt;br /&gt;
&lt;br /&gt;
=== Production Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Production deals with areas such as flashing, testing, tuning and certification. The current understanding is that these areas are handled in a vendor specific manner, including the adaptation.&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Noel</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/MeeGo_Porting_Guide</id>
		<title>MeeGo Porting Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/MeeGo_Porting_Guide"/>
				<updated>2011-06-24T22:48:27Z</updated>
		
		<summary type="html">&lt;p&gt;Noel: /* Kernel fundamentals */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The goal of MeeGo Porting Guide (MPG) is to provide valuable information and instructions to people who want to run MeeGo OS on their (new) HW and eventually create products based on the MeeGo OS. The MPG starts with an overview of the porting process, tools, and other related background information and then moves on to describing what the porting actually means in individual technical/functional areas.&lt;br /&gt;
&lt;br /&gt;
The porting guide is not strictly tied to any particular MeeGo OS version or device category. Instead, it tries to be general enough to cover the different device categories, as well as follow changes introduced in new MeeGo OS versions.&lt;br /&gt;
&lt;br /&gt;
Detailed porting information in the different technical areas is dependent on the respective [http://meego.com/developers/meego-architecture MeeGo architecture]. In some cases, this architecture may still be open and this is noted in the applicable sections.&lt;br /&gt;
&lt;br /&gt;
=== Feedback ===&lt;br /&gt;
&lt;br /&gt;
Contribution to these pages is open. Any MeeGo community member is free to ''improve'' these pages at any time. You can also leave feedback in the [http://lists.meego.com/listinfo/meego-porting MeeGo porting mailing list].&lt;br /&gt;
&lt;br /&gt;
== General porting information/guidelines ==&lt;br /&gt;
&lt;br /&gt;
=== MeeGo compliance ===&lt;br /&gt;
&lt;br /&gt;
Perhaps the most important piece of background information related to the MPG are the [[Quality/Compliance|MeeGo compliance requirements]]. A device that is meant to be MeeGo compliant will need to fulfill the requirements listed in the MeeGo compliance specification for the applicable device category (the first version of the specification is supposed to be available in October 2010). In short, a MeeGo compliant device will need to:&lt;br /&gt;
* Meet the minimum HW performance and component requirements for the applicable device category&lt;br /&gt;
* Include all SW components that form the MeeGo core OS&lt;br /&gt;
* Include the additional SW components required to be present in devices in the applicable device category&lt;br /&gt;
* Not break the API/ABI of any of the components coming from MeeGo&lt;br /&gt;
* Follow the MeeGo SW packaging conventions&lt;br /&gt;
&lt;br /&gt;
The compliance rules will also specify CPU architecture specific requirements concerning how MeeGo OS itself and MeeGo applications are to be compiled to different environments (instruction set used, compiler version, compiler options, etc.).&lt;br /&gt;
&lt;br /&gt;
A device vendor may include additional functionality, HW components and SW components in their devices, as long as they don't break MeeGo compliance. The vendor can also patch MeeGo OS components, if the patches don't break MeeGo compliance. A device vendor's own SW components can be either open source or closed source components, as long as they adhere to the rules set by the applicable SW licenses.&lt;br /&gt;
&lt;br /&gt;
From the MeeGo Porting Guide perspective, by defining the SW components and HW components that need to be present, the compliance requirements effectively define the minimum set of porting tasks required from a device vendor and what SW components are involved from MeeGo OS side.&lt;br /&gt;
&lt;br /&gt;
=== Porting process and tools ===&lt;br /&gt;
&lt;br /&gt;
==== Overview ====&lt;br /&gt;
&lt;br /&gt;
As long as a vendor's device is MeeGo compliant, as defined above, it is basically up to the vendor to decide how they build the SW that ends up in the device. The vendor may use their own build machinery or set up an OBS build system that is also used in MeeGo. Regardless of what the vendor's build system is, it needs to integrate with the MeeGo build infrastructure, at least to fetch the MeeGo source packages for the builds, as well as build each MeeGo component in the same way as it would be built in the MeeGo build system (such as with the same compiler and compiler options). Whatever the case, the intention in MeeGo is to use and offer an open toolset that any HW or SW vendor can use for efficient SW creation. It is likely that using the same toolset as MeeGo, will offer the easiest way to integrate vendor's own build system with the the MeeGo build infrastructure.&lt;br /&gt;
&lt;br /&gt;
The key ingredients of the MeeGo build infrastructure and toolset are:&lt;br /&gt;
* [http://meego.gitorious.org MeeGo Gitorious]&lt;br /&gt;
** A version control system for the source files of various MeeGo specific SW components and tools&lt;br /&gt;
* [http://build.meego.com MeeGo OBS]&lt;br /&gt;
** The build system that is used to build MeeGo packages (RPMs) from their sources&lt;br /&gt;
* [http://repo.meego.com MeeGo Repository]&lt;br /&gt;
** The place where the built MeeGo releases, that is where MeeGo packages and images are stored&lt;br /&gt;
* [http://wiki.meego.com/Image_Creation MeeGo Image Creator]&lt;br /&gt;
** The tool used to build MeeGo images that can be installed/flashed on HW&lt;br /&gt;
* MeeGo release tools&lt;br /&gt;
** Tools such as BOSS and REVS that are used in the creation of the MeeGo releases under repo.meego.com&lt;br /&gt;
&lt;br /&gt;
For additional information, see [[Build Infrastructure]], [[Release Infrastructure]] and [[Release Engineering]].&lt;br /&gt;
&lt;br /&gt;
For another overview of the MeeGo porting process, see [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process].&lt;br /&gt;
&lt;br /&gt;
==== Vendor's own OBS ====&lt;br /&gt;
&lt;br /&gt;
So, ultimately, when creating actual products running the MeeGo OS, the vendor may end up setting up their own OBS build system. Setting up your own OBS system may also be beneficial in earlier HW/product development phases, as it offers a flexible way to modify and build MeeGo OS to test it on the new HW. The vendor's own OBS system can link to the MeeGo OBS for handling packages that come directly from MeeGo and it can link to other sources for handling, such as closed source packages that are specific to the vendor. See [[Release_Engineering/Process#Making a product out of MeeGo Release|an overview picture of this setup]].&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Sets up their own OBS system&lt;br /&gt;
** [[User:Stskeeps/10_easy_steps_to_a_local_OBS|Instructions related to setting up an OBS system]],  [[Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE112|OBS Applicances]] [http://en.opensuse.org/openSUSE:Build_Service_private_instance Open Suse OBS Wiki].&lt;br /&gt;
* Creates projects under the their own OBS for their own components&lt;br /&gt;
* Links their own OBS to the MeeGo OBS for MeeGo components&lt;br /&gt;
* May have trial patches to MeeGo components in their own OBS&lt;br /&gt;
** NOTE. Eventually all patches to MeeGo components required in a final MeeGo based product ''should'' be pushed to MeeGo.com. However, this is not an absolute must requirement, as long as the MeeGo compliance requirements and applicable SW license rules are fulfilled. &lt;br /&gt;
** See [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below&lt;br /&gt;
* Needs to set up the necessary machinery to create releases and images from the packages built with OBS&lt;br /&gt;
** This machinery can be based on the toolset used in MeeGo (see above)&lt;br /&gt;
&lt;br /&gt;
==== Working under MeeGo.com ====&lt;br /&gt;
&lt;br /&gt;
Another way of porting MeeGo to some new HW is to get the new HW accepted as one MeeGo reference HW and have the MeeGo build machinery create builds for the reference HW as a part of the normal MeeGo release building cycle (see [[Release Engineering/Release Timeline|Release Timeline]] and [[Release Engineering/Process|Release Process]]). This setup can also include QA support for the reference HW on the MeeGo side (see [[Quality]]). At the time of this writing, the actual process of getting new reference HW to MeeGo is still somewhat unclear. In any case, this model requires active participation from the vendor in MeeGo work in general and especially in supporting their reference HW in MeeGo.&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Creates a device/platform development project under the MeeGo OBS for their components. The open source components would then get submitted to MeeGo Trunk:Testing and get reviewed like any other MeeGo component for inclusion.&lt;br /&gt;
** Note that it is also possible to have closed source binary components in the MeeGo OBS to be included in the MeeGo builds for some reference HW. These are submitted to the Trunk:non-oss repository. Licensing is usually required to at least include redistributability, as the components cannot be mirrored from or hosted at repo.meego.com otherwise. It is not possible to have components within Trunk:Testing require closed source dependencies.&lt;br /&gt;
* Pushes patches to other MeeGo components at MeeGo.com as necessary (see [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below)&lt;br /&gt;
* Creates (or supports the creation of) a MIC kickstart file for building images for their reference HW&lt;br /&gt;
* As necessary, supports adding support for their reference HW and SW components in the MeeGo build and release infrastructure tools&lt;br /&gt;
&lt;br /&gt;
==== Trials ====&lt;br /&gt;
&lt;br /&gt;
A lightweight but also more limited &amp;quot;try it out&amp;quot; alternative to the above processes is discussed below.&lt;br /&gt;
&lt;br /&gt;
===== Initial bring-up attempt =====&lt;br /&gt;
&lt;br /&gt;
* Grab the already built root filesystem / image for a MeeGo reference device that's the closest to your target. For ARMv7, this is typically the Nokia N900 handset image. For Atom, this could be netbook image or handset image.&lt;br /&gt;
* Build a Linux kernel for your device and install the modules into /lib/modules.&lt;br /&gt;
* Boot the root filesystem and modify the configuration and drop in components to bring up the device to UX. Note down the things you had to modify or add, as this will be input for your porting work.&lt;br /&gt;
&lt;br /&gt;
===== Building your first image =====&lt;br /&gt;
&lt;br /&gt;
The second step to a proper hardware adaptation is making sure you can build your own image. Because we based our work before on a reference device image, it makes sense to try to build this image first. MeeGo images are constructed on the basis of so called 'kickstart files', which describe the intended contents of an image. &lt;br /&gt;
&lt;br /&gt;
* Install the MeeGo Image Creator tool (MIC)&lt;br /&gt;
* Download the kickstart file (.ks) from the same directory you found your reference device image. &lt;br /&gt;
* Create a image using mic-image-creator (should be elaborated).&lt;br /&gt;
* Test out your freshly baked image as in the previous step.&lt;br /&gt;
&lt;br /&gt;
===== Building your port's first reproduciable image =====&lt;br /&gt;
&lt;br /&gt;
* Download the MeeGo kernel, possibly modifying the kernel with additional patches (including new device drivers) and building the kernel (see [[#Getting_new_chipset_support_to_the_MeeGo_kernel|''Getting new chipset support to the MeeGo kernel'']] below). &lt;br /&gt;
* Add the repository containing your kernel package to the kickstart file (to be elaborated)&lt;br /&gt;
* Remove parts of the kickstart file specific to the reference device.&lt;br /&gt;
* Add a mention of your kernel package in the %packages section.&lt;br /&gt;
* Build packages or include shell scripts in %post section of kickstart file that adds/modifies configuration fitting your device.&lt;br /&gt;
&lt;br /&gt;
A detailed description of a variation of this model can be found from [[ARM/Meego on Beagleboard from scratch|here]] (Better description needed).&lt;br /&gt;
&lt;br /&gt;
==== Getting new chipset support to the MeeGo kernel ====&lt;br /&gt;
&lt;br /&gt;
See [[How-to: getting new chipset support to the MeeGo kernel]] for more detailed information about how to work with the MeeGo kernel and make it support new HW.&lt;br /&gt;
&lt;br /&gt;
=== Upstream projects, MeeGo, products, and patches ===&lt;br /&gt;
&lt;br /&gt;
When building a product based on MeeGo, the product vendor will typically augment the MeeGo OS with their own SW components, as well as make fixes and adjustments to the MeeGo OS code (in the limits set by the compliance rules). While vendors can manage their own SW components as they wish, the strong preference is that any changes made to the MeeGo OS SW components are delivered as patches primarily to the respective upstream projects or secondarily to MeeGo.com. In this way, vendors can relieve themselves of the burden of managing a potentially big patch set on top of MeeGo OS, and also verify the quality and safety of their patches. Having the patches in upstream projects again lessens the patch set management load at MeeGo.com.&lt;br /&gt;
&lt;br /&gt;
For information about pushing patches to MeeGo, see [http://meego.com/about/contribution-guidelines Contribution Guidelines] and [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process] (especially section ''How Do Patches Get Integrated and Accepted?'') and [http://meego.gitorious.org/meego-os-base/kernel-source/blobs/master/README.workflow Kernel workflow].&lt;br /&gt;
&lt;br /&gt;
=== Adaptation subsystems and interfaces ===&lt;br /&gt;
&lt;br /&gt;
In the MeeGo architecture model (see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view MeeGo Architecture Domain View]), adaptation is represented as adaptation subsystems. SW components in the adaptation subsystem ''realizations'' do things that are expected by the OS and communicate with the OS through interfaces defined by the OS.&lt;br /&gt;
 &lt;br /&gt;
The key goal in the sections below is to identify the interface(s) that the adaptation SW needs to implement/use to communicate with the OS in the required manner. Behind these interfaces, the adaptation SW can basically handle the required functionality as it sees best. In some cases, however, there may also be some preferred way of implementing the adaptation.&lt;br /&gt;
&lt;br /&gt;
In some areas, the adaptation work may consist of just writing a suitable Linux device driver for the HW in question. In some other areas, the adaptation work may consist of writing one or more device drivers, as well as one or more user space components (such as plugins to some user space SW frameworks). Various configuration file changes may also be required as a part of the adaptation work.&lt;br /&gt;
&lt;br /&gt;
== Porting by adaptation subsystems ==&lt;br /&gt;
&lt;br /&gt;
=== System Core Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Boot ====&lt;br /&gt;
&lt;br /&gt;
MeeGo places no restrictions as to what SW components are used to handle the pre-OS boot phases in a MeeGo compliant device. Thus, vendors are free to choose, for example, the boot loader, as they see fit. Note, however, that full use of the MeeGo platform security requires that the pre-OS boot phases form a trusted boot chain that ultimately builds on chipset-level security support.&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, MeeGo does not define anything special with regard to what information the boot loader is expected to pass to the Linux kernel, such as via the kernel command line.&lt;br /&gt;
&lt;br /&gt;
The kernel-level boot phases can be tailored, as necessary, to the specific CPU, chipset, or device in a standard Linux manner.&lt;br /&gt;
&lt;br /&gt;
The post-kernel boot phases (startup scripts) can be tailored by device vendors as necessary for their devices in the limits set by MeeGo compliance requirements (certain SW components need to be present in the system).&lt;br /&gt;
&lt;br /&gt;
==== Kernel fundamentals ====&lt;br /&gt;
&lt;br /&gt;
Regarding the Linux kernel, each MeeGo release defines the kernel version to be used and a set of patches on top of that. In addition, the Linux kernel used in MeeGo compliant devices is assumed to have been built with a set of fixed build-time configuration values that are not allowed to be changed. In addition to the fixed values, device vendors can define other kernel configuration values, as required by their devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo does not place any special requirements concerning how the boot loader passes information to the kernel or how the HW configuration and initialization of the system is handled.&lt;br /&gt;
&lt;br /&gt;
CPU, chipset (SoC), and device vendors are assumed to implement the elementary CPU architecture/chipset/device support for the Linux kernel used in MeeGo in a standard Linux manner. This includes:&lt;br /&gt;
* HW (board) configuration&lt;br /&gt;
* Mapping the fundamental Linux kernel functionality (such as IRQ, DMA, GPIO, RTC and memory handling) to the HW in question&lt;br /&gt;
* Creation/modification of the necessary device drivers to support the core SoC interfaces (such as I2C, SPI, SDIO)&lt;br /&gt;
* Permanent memory support&lt;br /&gt;
* Debugging and tracing support&lt;br /&gt;
&lt;br /&gt;
==== Power and thermal management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, the understanding is that MeeGo in general relies on established Linux kernel frameworks and APIs for power management. Some of these frameworks and APIs may be applicable only in certain CPU architectures. In addition, the HW capabilities related to power management may vary between different HW platforms potentially meaning that the SW is assumed perform somewhat different tasks in different environments.&lt;br /&gt;
&lt;br /&gt;
The Linux power management frameworks and APIs include:&lt;br /&gt;
* CPU frequency control (support for the different voltage and frequency operating points) via the cpufreq infrastructure&lt;br /&gt;
* CPU idle state management (different levels of sleep) through the cpuidle infrastructure&lt;br /&gt;
* Clock management through the clock framework&lt;br /&gt;
* Suspend/resume&lt;br /&gt;
* Runtime power management&lt;br /&gt;
* HW voltage/current regulator control via the regulator framework&lt;br /&gt;
* PM_QOS (power management quality of service) framework for making and listening to PM QoS requests&lt;br /&gt;
&lt;br /&gt;
Whether MeeGo will have some user space SW components or framework related to power management is under discussion at the time of this writing.&lt;br /&gt;
&lt;br /&gt;
In the thermal management area, the Device State Management Entity (DSME) component in the Device Health subsystem is supposed to make thermal state management decisions in the system. The DSME has a thermal manager module that again uses other DSME modules (thermal objects) to access the actual thermal sensor information in the HW. To port this functionality to new HW, one or more DSME thermal object modules need to be implemented.&lt;br /&gt;
&lt;br /&gt;
The APIs that the thermal object modules use to access the thermal sensor information are not strictly defined by MeeGo. At device driver level, however, the preferred approach is to utilize standard Linux interfaces such as the generic thermal sysfs API or the hwmon sysfs API.&lt;br /&gt;
&lt;br /&gt;
==== Energy management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, basically the only thing that MeeGo requires from HW adaptation in the energy management area (battery charging and monitoring) is support for the Linux power supply sysfs class. Additional energy management related functionality can be handled in a vendor specific manner.&lt;br /&gt;
&lt;br /&gt;
==== Device state ====&lt;br /&gt;
&lt;br /&gt;
The DSME component participates in device state management e.g. by managing device run level, reboot and shutdown, by monitoring the device thermal state and shutting down the device in fatal thermal conditions, and by handling HW watchdog kicking activity.&lt;br /&gt;
&lt;br /&gt;
In a new HW environment, the DSME needs to be adapted to handle the watchdog kicking through the right device driver interfaces and at the right intervals. In addition, to port the DSME thermal management functionality to new HW, one or more DSME thermal object modules need to be implemented as described above in the [[#Power_and_thermal_management|''Power and thermal management'']] section.&lt;br /&gt;
&lt;br /&gt;
=== Security Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Work is ongoing in bringing platform security functionality to the MeeGo OS based on the Mandatory Access Control (MAC), Integrity Measurement Architecture (IMA) and Extended Verification Module (EVM) technologies in the Linux kernel. Maximum security can be reached if the MeeGo platform security functionality can rely on trusted platform support &amp;quot;below&amp;quot; the Linux kernel, effectively in the HW and the boot loader(s). MeeGo, however, places no strict requirements as to how the trusted platform support is implemented in MeeGo based devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo also includes the OpenSSL open source toolkit implementing general purpose cryptography functionality. Algorithms and operations supported by the OpenSSL toolkit can be accelerated in HW by using the OpenSSL engine architecture. OpenSSL also supports a cryptodev engine that uses crypto algorithms implemented in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Some devices may have a security watchdog in the HW that needs &amp;quot;kicking&amp;quot; at regular intervals to keep the device up and running. In MeeGo, watchdog kicking functionality is implemented in the Device State Management Entity (DSME) component. If security watchdog kicking is needed, the DSME needs to be adapted to handle that through the right device driver interface and at the right intervals.&lt;br /&gt;
&lt;br /&gt;
=== Device Mode Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Resource Policy ====&lt;br /&gt;
&lt;br /&gt;
The Resource (Policy) Manager component in the Device Health subsystem offers a generic framework for:&lt;br /&gt;
* Monitoring device and application events&lt;br /&gt;
* Managing policies that specify rules about what should happen in the device when certain events occur&lt;br /&gt;
* Making policy decisions when events occur (determining the needed changes in the device)&lt;br /&gt;
* Enforcing changes in the system through policy enforcement points&lt;br /&gt;
&lt;br /&gt;
The Resource Manager can be used e.g. to change the audio routing in the device when the user attaches a wired headset to the device.&lt;br /&gt;
&lt;br /&gt;
Event listening and change enforcement in the Resource Manager happens through plugin modules. Using the MeeGo OS in some new device effectively involves creating suitable Resource Manager policies and writing the necessary plugins for listening device/application events and changing device behavior accordingly. Though not pure HW adaptation, this can be considered as a form of MeeGo OS &amp;quot;device adaptation&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Mode Control Entity (MCE) ====&lt;br /&gt;
&lt;br /&gt;
The MCE component (starting from MeeGo 1.2) can be used to listen to events that have an impact to the device mode (e.g. touch screen locked vs. unlocked) and change the device mode accordingly. The MCE is used e.g. for: &lt;br /&gt;
* Listening to various keys and switches in the device (e.g. power key, volume key, camera button, slider switch)&lt;br /&gt;
* Controlling LEDs&lt;br /&gt;
* Touch screen or HW keyboard enabling/disabling depending on device state&lt;br /&gt;
* Keyboard backlight control&lt;br /&gt;
* Display state (on/off) and brightness control&lt;br /&gt;
&lt;br /&gt;
The MCE has its own plugin architecture that can be used to adapt it to different HW environments.&lt;br /&gt;
&lt;br /&gt;
=== Display and Graphics Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo visual services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view]. &lt;br /&gt;
&lt;br /&gt;
The key ingredients of the display and graphics architecture in MeeGo are the X Window System (X Server with its extensions) and the Khronos graphics APIs (OpenGL ES, OpenVG and EGL with their extensions).&lt;br /&gt;
&lt;br /&gt;
The display and graphics HW adaptation SW needs to enable the X Window System and the Khronos APIs to function on the device HW. In practice, the adaptation SW needs to have an X display/video driver (hosted inside the X Server) and libraries that implement the Khronos graphics APIs, both supporting the features and functionality required by MeeGo. Also some configuration file changes may be needed. Any additional user space and kernel space components needed for the HW adaptation are implementation dependent.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering display content to external displays, the Resource Manager component may be used to coordinate the display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Audio Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The audio architecture in MeeGo is centered around the GStreamer and PulseAudio frameworks. In addition, the Resource Manager plays a role in coordinating the audio related behavior of the device (audio routings). The audio HW adaptation SW needs to provide GStreamer elements and PulseAudio plugins that enable the GStreamer and PulseAudio client interfaces used for e.g. for audio playback, recording and volume control to work on the device. Typical required components include e.g. codec elements for GStreamer and sink/source plugins for PulseAudio.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer and PulseAudio plugins, the audio HW adaptation SW can be implemented with different technologies and APIs, including ALSA and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework as needed. Use of the ALSA framework and APIs is encouraged, however, as they allow significant reuse of components and functionality on the PulseAudio level and are already a part of the upstream Linux kernel. If ALSA is not used to implement the kernel side parts of the audio adaptation, the solution that is used instead should still be aligned with the upstream Linux kernel.&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo media services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view]. &lt;br /&gt;
&lt;br /&gt;
=== Camera Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo still imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework and the CameraBin GStreamer element. The still imaging HW adaptation SW is required to contain a GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element. Thus, the required HW adaptation interfaces are the relevant GStreamer plugin interfaces and especially the interfaces expected by the CameraBin element, in particular the GstPhotography interface.&lt;br /&gt;
&lt;br /&gt;
If HW accelerated encoders are supported, they should be also offered to the system as GStreamer elements.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
=== Video and Imaging Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo video imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework, the CameraBin GStreamer element (video recording) and the Playbin2 GStreamer element (video playback). The video imaging HW adaptation SW is required to contain:&lt;br /&gt;
:* A GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element (this is common with still imaging) &lt;br /&gt;
:* If HW accelerated codecs are supported, GStreamer elements that wrap the codecs&lt;br /&gt;
:* If HW accelerated filters are supported (e.g. video scaler, rotation engines, color conversion engines), GStreamer elements that wrap the filters&lt;br /&gt;
:* A GStreamer video sink element that offers the GStreamer X Overlay Interface. Note that if the XVideo extension is supported on the X Server side, the xvimagesink element can be used as the video sink element and no new elements are needed.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the video imaging HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering video content to external displays, the Resource Manager component may be used to coordinate the video/display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Communications Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo communications services architecture, see [http://meego.com/developers/meego-architecture/comms-services Comms Services].&lt;br /&gt;
&lt;br /&gt;
==== Cellular ====&lt;br /&gt;
&lt;br /&gt;
The cellular telephony architecture in MeeGo is centered on the oFono, PulseAudio and Telepathy frameworks. In addition, the Resource Manager plays a role in coordinating the device behavior during voice calls.&lt;br /&gt;
&lt;br /&gt;
The cellular modem HW adaptation SW must implement the following interfaces towards the MeeGo OS:&lt;br /&gt;
:* oFono modem plugin/driver API&lt;br /&gt;
:* Linux network interface for the Linux TCP/IP stack (for data communications)&lt;br /&gt;
:* Relevant PulseAudio plugin interfaces for cellular voice call audio handling&lt;br /&gt;
&lt;br /&gt;
For more detailed information about the oFono APIs, see the documentation and source code available at [http://git.kernel.org/?p=network/ofono/ofono.git;a=summary oFono git].&lt;br /&gt;
&lt;br /&gt;
==== USB ====&lt;br /&gt;
&lt;br /&gt;
The foundation of the the MeeGo USB functionality is the standard Linux USB subsystem. The Linux USB subsystem defines the USB related HW adaptation interfaces that need to be supported in MeeGo. In practice, these are kernel side interfaces between the generic USB functionality and a HW dependent USB host controller driver.&lt;br /&gt;
&lt;br /&gt;
==== WLAN ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo WLAN architecture is centered on the [http://linuxwireless.org/ Linux wireless] (IEEE-802.11) subsystem. The Linux wireless SW stack defines the WLAN HW adaptation SW interfaces that need to be used in MeeGo. In practice, the required interfaces are defined by cfg80211 for FullMAC WLAN devices and by mac80211 for SoftMAC WLAN devices. In addition, a Linux network interface needs to be supported towards the Linux TCP/IP stack.&lt;br /&gt;
&lt;br /&gt;
==== Bluetooth ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Bluetooth architecture is centered on the [http://www.bluez.org/ BlueZ] SW stack. The BlueZ SW stack defines the Bluetooth HW adaptation SW interfaces that need to be used in MeeGo. In practice, these are Linux kernel side interfaces between the generic HCI (Host Controller Interface) core and a HW specific HCI driver.&lt;br /&gt;
&lt;br /&gt;
=== Location Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The MeeGo location architecture is based on [http://http://labs.trolltech.com/page/Projects/QtMobility| QtMobility Location API].  The QtMobility 1.0 Location API provides geographic coordinates only.  The QtMobility 1.1 Location API provides geocoding and reverse geocoding, POI search, navigation, and mapping.  The 1.0 Location API is available in MeeGo 1.1.  The 1.1 or later Location API will be available in MeeGo 1.2.  The Location API uses a plugin system for implementations of the underlying backend.  MeeGo compliance requirements require support for the QtMobility Location API and thus require one or more plugins to support these APIs.  MeeGo places no restrictions as to how the plugins are implemented, however. Adaptation to location related HW may be done by manufacturers or service providers and the way how it's done is not defined by the API.&lt;br /&gt;
&lt;br /&gt;
MeeGo will use [http://www.freedesktop.org/wiki/Software/GeoClue GeoClue] as the reference location framework and the reference implementation of the Qt Mobility location API backend will be written on top of GeoClue. GeoClue defines a set of (D-Bus) APIs for accessing location services provided by service providers implemented as D-Bus services. In addition, GeoClue includes a set of service provider implementations and (at the time of this writing) an experimental master service provider that can act as a proxy between clients and the actual service providers. If a device vendor wants to take advantage of this existing functionality, the vendor can implement their location services &amp;quot;behind&amp;quot; the GeoClue APIs as GeoClue service providers. In such a case, adaptation to the location related HW would happen inside the service providers as defined by the service provider designs.&lt;br /&gt;
&lt;br /&gt;
=== Sensor Adaptation === &lt;br /&gt;
&lt;br /&gt;
The key component in the MeeGo sensor handling architecture is the Sensor Framework. The Sensor Framework uses both HW independent logical sensor plugins and HW dependent sensor adaptor plugins in its operation. The required sensor HW adaptation interfaces in MeeGo are the interfaces that the Sensor Framework and the logical sensor plugins define for the sensor adaptor plugins to implement. The sensor adaptor plugins typically communicate directly with sensor HW drivers in the Linux kernel. The interfaces that the sensor HW drivers expose to the user space are not defined by MeeGo. Sensor HW adaptation in MeeGo thus consists of adaptor plugins in the Sensor Framework and sensor HW drivers in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Note that thermal sensors are handled in a different manner as described in the [[#Power and thermal management|''Power and thermal management'']] section above.&lt;br /&gt;
&lt;br /&gt;
=== Input Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Touch ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the touch input handling path in MeeGo are the touch HW device driver, Linux kernel input subsystem, X server, X input driver, Qt and finally the MeeGo Touch Framework. Enabling touch support for some new HW requires at least the implementation of the corresponding touch HW device driver in the Linux kernel. If this driver communicates touch events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, basically the existing functionality in X server (e.g. evdev input driver) and above can be used as such. In case the kernel-to-user-space interface is non-standard, it is also possible to implement a new X input driver as a part of the touch HW adaptation.&lt;br /&gt;
&lt;br /&gt;
Multi-touch support in X requires a new version, 2.1, of the [http://cgit.freedesktop.org/~whot/inputproto/tree/XI2proto.txt?h=multitouch X Input Extension] and this also requires support from the client side, in this case Qt's multi-touch support. Once this support has been implemented throughout the SW stack, including X evdev input driver, supporting multi-touch for some new HW should require only the implementation of a touch HW device driver that implements the standard Linux multi-touch interface. This should be the case in MeeGo 1.2. &lt;br /&gt;
&lt;br /&gt;
Before 1.2, multi-touch support in MeeGo uses a special X input driver (mtev), X server multi-pointer support (MPX) and Qt multi-touch support written on top of MPX. This solution requires the touch HW device driver to expose a user-space interface that is compatible with mtev.&lt;br /&gt;
&lt;br /&gt;
==== HW keyboard ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the HW keyboard input handling path in MeeGo are the keyboard HW device driver, Linux kernel input subsystem, X server, X input driver and Qt. Enabling keyboard support for some new HW requires typically only the implementation of the corresponding keyboard HW device driver in the Linux kernel. If this driver communicates key events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, the existing functionality in X server (e.g. evdev input driver) and above should work as such. In case the kernel-to-user space interface is non-standard, it is also possible to implement a new X input driver as a part of the keyboard HW adaptation.&lt;br /&gt;
&lt;br /&gt;
==== Buttons and switches ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo includes the MCE and System SW Qt API (QmSystem) components. The MCE can be used to control the device mode and it listens to power button events and e.g. device open/close switch events via the respective device driver interfaces. The System SW Qt API on the other hand provides a Qt API to various system information, including events from various physical buttons in the device (e.g. volume button, camera button). The System SW Qt API gets the button events either by listening to the relevant device driver interfaces or through the MCE component.&lt;br /&gt;
&lt;br /&gt;
Both the MCE and the System SW Qt API components can be adapted to new devices by device vendors.&lt;br /&gt;
&lt;br /&gt;
=== Haptics and Vibra Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Haptics ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Touch Framework present (at least) in the MeeGo handset device category contains a component called Feedback Framework (meegotouch-feedback) that handles the creation of auditory and/or haptic feedback to touch events. The haptic feedback can be created e.g. with vibra motors or piezo elements. In the Feedback Framework, the different types of feedback are created by backend libraries implemented as plugins. &lt;br /&gt;
&lt;br /&gt;
The haptics related HW adaptation interface from MeeGo OS perspective is the backend plugin interface defined by the Feedback Framework. The plugins can then communicate with the HW either through some device driver interface or some intermediate SW layers (MeeGo places no restrictions as to how the plugins are implemented).&lt;br /&gt;
&lt;br /&gt;
==== Vibra (notifications/alerts) ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo (at least the handset category) will include a component called Non-Graphical Feedback Framework (NGF). This component offers the capability of playing e.g. audio, vibra or led as an indication of events such as incoming call/message, clock and calendar alarms, missed calls, unread messages etc. The NGF also integrates with the Resource Policy to decide about the available playback resources based on policy rules and the current system state.&lt;br /&gt;
&lt;br /&gt;
The actual playback of the different types of notifications is handled by NGF plugins that can be created by device vendors. The plugins communicate with the relevant HW as they see best, e.g. directly through some device driver interface or via some intermediate user space SW components. The plugin interfaces defined by NGF thus form the notification/alert vibra adaptation interface in MeeGo.&lt;br /&gt;
&lt;br /&gt;
=== Production Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Production deals with areas such as flashing, testing, tuning and certification. The current understanding is that these areas are handled in a vendor specific manner, including the adaptation.&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Noel</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/MeeGo_Porting_Guide</id>
		<title>MeeGo Porting Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/MeeGo_Porting_Guide"/>
				<updated>2011-06-24T22:46:42Z</updated>
		
		<summary type="html">&lt;p&gt;Noel: /* Boot */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The goal of MeeGo Porting Guide (MPG) is to provide valuable information and instructions to people who want to run MeeGo OS on their (new) HW and eventually create products based on the MeeGo OS. The MPG starts with an overview of the porting process, tools, and other related background information and then moves on to describing what the porting actually means in individual technical/functional areas.&lt;br /&gt;
&lt;br /&gt;
The porting guide is not strictly tied to any particular MeeGo OS version or device category. Instead, it tries to be general enough to cover the different device categories, as well as follow changes introduced in new MeeGo OS versions.&lt;br /&gt;
&lt;br /&gt;
Detailed porting information in the different technical areas is dependent on the respective [http://meego.com/developers/meego-architecture MeeGo architecture]. In some cases, this architecture may still be open and this is noted in the applicable sections.&lt;br /&gt;
&lt;br /&gt;
=== Feedback ===&lt;br /&gt;
&lt;br /&gt;
Contribution to these pages is open. Any MeeGo community member is free to ''improve'' these pages at any time. You can also leave feedback in the [http://lists.meego.com/listinfo/meego-porting MeeGo porting mailing list].&lt;br /&gt;
&lt;br /&gt;
== General porting information/guidelines ==&lt;br /&gt;
&lt;br /&gt;
=== MeeGo compliance ===&lt;br /&gt;
&lt;br /&gt;
Perhaps the most important piece of background information related to the MPG are the [[Quality/Compliance|MeeGo compliance requirements]]. A device that is meant to be MeeGo compliant will need to fulfill the requirements listed in the MeeGo compliance specification for the applicable device category (the first version of the specification is supposed to be available in October 2010). In short, a MeeGo compliant device will need to:&lt;br /&gt;
* Meet the minimum HW performance and component requirements for the applicable device category&lt;br /&gt;
* Include all SW components that form the MeeGo core OS&lt;br /&gt;
* Include the additional SW components required to be present in devices in the applicable device category&lt;br /&gt;
* Not break the API/ABI of any of the components coming from MeeGo&lt;br /&gt;
* Follow the MeeGo SW packaging conventions&lt;br /&gt;
&lt;br /&gt;
The compliance rules will also specify CPU architecture specific requirements concerning how MeeGo OS itself and MeeGo applications are to be compiled to different environments (instruction set used, compiler version, compiler options, etc.).&lt;br /&gt;
&lt;br /&gt;
A device vendor may include additional functionality, HW components and SW components in their devices, as long as they don't break MeeGo compliance. The vendor can also patch MeeGo OS components, if the patches don't break MeeGo compliance. A device vendor's own SW components can be either open source or closed source components, as long as they adhere to the rules set by the applicable SW licenses.&lt;br /&gt;
&lt;br /&gt;
From the MeeGo Porting Guide perspective, by defining the SW components and HW components that need to be present, the compliance requirements effectively define the minimum set of porting tasks required from a device vendor and what SW components are involved from MeeGo OS side.&lt;br /&gt;
&lt;br /&gt;
=== Porting process and tools ===&lt;br /&gt;
&lt;br /&gt;
==== Overview ====&lt;br /&gt;
&lt;br /&gt;
As long as a vendor's device is MeeGo compliant, as defined above, it is basically up to the vendor to decide how they build the SW that ends up in the device. The vendor may use their own build machinery or set up an OBS build system that is also used in MeeGo. Regardless of what the vendor's build system is, it needs to integrate with the MeeGo build infrastructure, at least to fetch the MeeGo source packages for the builds, as well as build each MeeGo component in the same way as it would be built in the MeeGo build system (such as with the same compiler and compiler options). Whatever the case, the intention in MeeGo is to use and offer an open toolset that any HW or SW vendor can use for efficient SW creation. It is likely that using the same toolset as MeeGo, will offer the easiest way to integrate vendor's own build system with the the MeeGo build infrastructure.&lt;br /&gt;
&lt;br /&gt;
The key ingredients of the MeeGo build infrastructure and toolset are:&lt;br /&gt;
* [http://meego.gitorious.org MeeGo Gitorious]&lt;br /&gt;
** A version control system for the source files of various MeeGo specific SW components and tools&lt;br /&gt;
* [http://build.meego.com MeeGo OBS]&lt;br /&gt;
** The build system that is used to build MeeGo packages (RPMs) from their sources&lt;br /&gt;
* [http://repo.meego.com MeeGo Repository]&lt;br /&gt;
** The place where the built MeeGo releases, that is where MeeGo packages and images are stored&lt;br /&gt;
* [http://wiki.meego.com/Image_Creation MeeGo Image Creator]&lt;br /&gt;
** The tool used to build MeeGo images that can be installed/flashed on HW&lt;br /&gt;
* MeeGo release tools&lt;br /&gt;
** Tools such as BOSS and REVS that are used in the creation of the MeeGo releases under repo.meego.com&lt;br /&gt;
&lt;br /&gt;
For additional information, see [[Build Infrastructure]], [[Release Infrastructure]] and [[Release Engineering]].&lt;br /&gt;
&lt;br /&gt;
For another overview of the MeeGo porting process, see [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process].&lt;br /&gt;
&lt;br /&gt;
==== Vendor's own OBS ====&lt;br /&gt;
&lt;br /&gt;
So, ultimately, when creating actual products running the MeeGo OS, the vendor may end up setting up their own OBS build system. Setting up your own OBS system may also be beneficial in earlier HW/product development phases, as it offers a flexible way to modify and build MeeGo OS to test it on the new HW. The vendor's own OBS system can link to the MeeGo OBS for handling packages that come directly from MeeGo and it can link to other sources for handling, such as closed source packages that are specific to the vendor. See [[Release_Engineering/Process#Making a product out of MeeGo Release|an overview picture of this setup]].&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Sets up their own OBS system&lt;br /&gt;
** [[User:Stskeeps/10_easy_steps_to_a_local_OBS|Instructions related to setting up an OBS system]],  [[Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE112|OBS Applicances]] [http://en.opensuse.org/openSUSE:Build_Service_private_instance Open Suse OBS Wiki].&lt;br /&gt;
* Creates projects under the their own OBS for their own components&lt;br /&gt;
* Links their own OBS to the MeeGo OBS for MeeGo components&lt;br /&gt;
* May have trial patches to MeeGo components in their own OBS&lt;br /&gt;
** NOTE. Eventually all patches to MeeGo components required in a final MeeGo based product ''should'' be pushed to MeeGo.com. However, this is not an absolute must requirement, as long as the MeeGo compliance requirements and applicable SW license rules are fulfilled. &lt;br /&gt;
** See [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below&lt;br /&gt;
* Needs to set up the necessary machinery to create releases and images from the packages built with OBS&lt;br /&gt;
** This machinery can be based on the toolset used in MeeGo (see above)&lt;br /&gt;
&lt;br /&gt;
==== Working under MeeGo.com ====&lt;br /&gt;
&lt;br /&gt;
Another way of porting MeeGo to some new HW is to get the new HW accepted as one MeeGo reference HW and have the MeeGo build machinery create builds for the reference HW as a part of the normal MeeGo release building cycle (see [[Release Engineering/Release Timeline|Release Timeline]] and [[Release Engineering/Process|Release Process]]). This setup can also include QA support for the reference HW on the MeeGo side (see [[Quality]]). At the time of this writing, the actual process of getting new reference HW to MeeGo is still somewhat unclear. In any case, this model requires active participation from the vendor in MeeGo work in general and especially in supporting their reference HW in MeeGo.&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Creates a device/platform development project under the MeeGo OBS for their components. The open source components would then get submitted to MeeGo Trunk:Testing and get reviewed like any other MeeGo component for inclusion.&lt;br /&gt;
** Note that it is also possible to have closed source binary components in the MeeGo OBS to be included in the MeeGo builds for some reference HW. These are submitted to the Trunk:non-oss repository. Licensing is usually required to at least include redistributability, as the components cannot be mirrored from or hosted at repo.meego.com otherwise. It is not possible to have components within Trunk:Testing require closed source dependencies.&lt;br /&gt;
* Pushes patches to other MeeGo components at MeeGo.com as necessary (see [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below)&lt;br /&gt;
* Creates (or supports the creation of) a MIC kickstart file for building images for their reference HW&lt;br /&gt;
* As necessary, supports adding support for their reference HW and SW components in the MeeGo build and release infrastructure tools&lt;br /&gt;
&lt;br /&gt;
==== Trials ====&lt;br /&gt;
&lt;br /&gt;
A lightweight but also more limited &amp;quot;try it out&amp;quot; alternative to the above processes is discussed below.&lt;br /&gt;
&lt;br /&gt;
===== Initial bring-up attempt =====&lt;br /&gt;
&lt;br /&gt;
* Grab the already built root filesystem / image for a MeeGo reference device that's the closest to your target. For ARMv7, this is typically the Nokia N900 handset image. For Atom, this could be netbook image or handset image.&lt;br /&gt;
* Build a Linux kernel for your device and install the modules into /lib/modules.&lt;br /&gt;
* Boot the root filesystem and modify the configuration and drop in components to bring up the device to UX. Note down the things you had to modify or add, as this will be input for your porting work.&lt;br /&gt;
&lt;br /&gt;
===== Building your first image =====&lt;br /&gt;
&lt;br /&gt;
The second step to a proper hardware adaptation is making sure you can build your own image. Because we based our work before on a reference device image, it makes sense to try to build this image first. MeeGo images are constructed on the basis of so called 'kickstart files', which describe the intended contents of an image. &lt;br /&gt;
&lt;br /&gt;
* Install the MeeGo Image Creator tool (MIC)&lt;br /&gt;
* Download the kickstart file (.ks) from the same directory you found your reference device image. &lt;br /&gt;
* Create a image using mic-image-creator (should be elaborated).&lt;br /&gt;
* Test out your freshly baked image as in the previous step.&lt;br /&gt;
&lt;br /&gt;
===== Building your port's first reproduciable image =====&lt;br /&gt;
&lt;br /&gt;
* Download the MeeGo kernel, possibly modifying the kernel with additional patches (including new device drivers) and building the kernel (see [[#Getting_new_chipset_support_to_the_MeeGo_kernel|''Getting new chipset support to the MeeGo kernel'']] below). &lt;br /&gt;
* Add the repository containing your kernel package to the kickstart file (to be elaborated)&lt;br /&gt;
* Remove parts of the kickstart file specific to the reference device.&lt;br /&gt;
* Add a mention of your kernel package in the %packages section.&lt;br /&gt;
* Build packages or include shell scripts in %post section of kickstart file that adds/modifies configuration fitting your device.&lt;br /&gt;
&lt;br /&gt;
A detailed description of a variation of this model can be found from [[ARM/Meego on Beagleboard from scratch|here]] (Better description needed).&lt;br /&gt;
&lt;br /&gt;
==== Getting new chipset support to the MeeGo kernel ====&lt;br /&gt;
&lt;br /&gt;
See [[How-to: getting new chipset support to the MeeGo kernel]] for more detailed information about how to work with the MeeGo kernel and make it support new HW.&lt;br /&gt;
&lt;br /&gt;
=== Upstream projects, MeeGo, products, and patches ===&lt;br /&gt;
&lt;br /&gt;
When building a product based on MeeGo, the product vendor will typically augment the MeeGo OS with their own SW components, as well as make fixes and adjustments to the MeeGo OS code (in the limits set by the compliance rules). While vendors can manage their own SW components as they wish, the strong preference is that any changes made to the MeeGo OS SW components are delivered as patches primarily to the respective upstream projects or secondarily to MeeGo.com. In this way, vendors can relieve themselves of the burden of managing a potentially big patch set on top of MeeGo OS, and also verify the quality and safety of their patches. Having the patches in upstream projects again lessens the patch set management load at MeeGo.com.&lt;br /&gt;
&lt;br /&gt;
For information about pushing patches to MeeGo, see [http://meego.com/about/contribution-guidelines Contribution Guidelines] and [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process] (especially section ''How Do Patches Get Integrated and Accepted?'') and [http://meego.gitorious.org/meego-os-base/kernel-source/blobs/master/README.workflow Kernel workflow].&lt;br /&gt;
&lt;br /&gt;
=== Adaptation subsystems and interfaces ===&lt;br /&gt;
&lt;br /&gt;
In the MeeGo architecture model (see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view MeeGo Architecture Domain View]), adaptation is represented as adaptation subsystems. SW components in the adaptation subsystem ''realizations'' do things that are expected by the OS and communicate with the OS through interfaces defined by the OS.&lt;br /&gt;
 &lt;br /&gt;
The key goal in the sections below is to identify the interface(s) that the adaptation SW needs to implement/use to communicate with the OS in the required manner. Behind these interfaces, the adaptation SW can basically handle the required functionality as it sees best. In some cases, however, there may also be some preferred way of implementing the adaptation.&lt;br /&gt;
&lt;br /&gt;
In some areas, the adaptation work may consist of just writing a suitable Linux device driver for the HW in question. In some other areas, the adaptation work may consist of writing one or more device drivers, as well as one or more user space components (such as plugins to some user space SW frameworks). Various configuration file changes may also be required as a part of the adaptation work.&lt;br /&gt;
&lt;br /&gt;
== Porting by adaptation subsystems ==&lt;br /&gt;
&lt;br /&gt;
=== System Core Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Boot ====&lt;br /&gt;
&lt;br /&gt;
MeeGo places no restrictions as to what SW components are used to handle the pre-OS boot phases in a MeeGo compliant device. Thus, vendors are free to choose, for example, the boot loader, as they see fit. Note, however, that full use of the MeeGo platform security requires that the pre-OS boot phases form a trusted boot chain that ultimately builds on chipset-level security support.&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, MeeGo does not define anything special with regard to what information the boot loader is expected to pass to the Linux kernel, such as via the kernel command line.&lt;br /&gt;
&lt;br /&gt;
The kernel-level boot phases can be tailored, as necessary, to the specific CPU, chipset, or device in a standard Linux manner.&lt;br /&gt;
&lt;br /&gt;
The post-kernel boot phases (startup scripts) can be tailored by device vendors as necessary for their devices in the limits set by MeeGo compliance requirements (certain SW components need to be present in the system).&lt;br /&gt;
&lt;br /&gt;
==== Kernel fundamentals ====&lt;br /&gt;
&lt;br /&gt;
Regarding the Linux kernel, each MeeGo release defines the kernel version to be used and a set of patches on top of that. In addition, the Linux kernel used in MeeGo compliant devices is assumed to have been built with a set of fixed build-time configuration values that are not allowed to be changed. In addition to the fixed values, device vendors can define other kernel configuration values as required by their devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo does not place any special requirements concerning how the boot loader passes information to the kernel or how the HW configuration and initialization of the system is handled.&lt;br /&gt;
&lt;br /&gt;
CPU, chipset (SoC) and device vendors are assumed to implement the elementary CPU architecture/chipset/device support for the Linux kernel used in MeeGo in a standard Linux manner. This includes:&lt;br /&gt;
* HW (board) configuration&lt;br /&gt;
* Mapping the fundamental Linux kernel functionality (e.g. IRQ, DMA, GPIO, RTC and memory handling) to the HW in question&lt;br /&gt;
* Creation/modification of the necessary device drivers to support the core SoC interfaces (e.g. I2C, SPI, SDIO)&lt;br /&gt;
* Permanent memory support&lt;br /&gt;
* Debugging and tracing support&lt;br /&gt;
&lt;br /&gt;
==== Power and thermal management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, the understanding is that MeeGo in general relies on established Linux kernel frameworks and APIs for power management. Some of these frameworks and APIs may be applicable only in certain CPU architectures. In addition, the HW capabilities related to power management may vary between different HW platforms potentially meaning that the SW is assumed perform somewhat different tasks in different environments.&lt;br /&gt;
&lt;br /&gt;
The Linux power management frameworks and APIs include:&lt;br /&gt;
* CPU frequency control (support for the different voltage and frequency operating points) via the cpufreq infrastructure&lt;br /&gt;
* CPU idle state management (different levels of sleep) through the cpuidle infrastructure&lt;br /&gt;
* Clock management through the clock framework&lt;br /&gt;
* Suspend/resume&lt;br /&gt;
* Runtime power management&lt;br /&gt;
* HW voltage/current regulator control via the regulator framework&lt;br /&gt;
* PM_QOS (power management quality of service) framework for making and listening to PM QoS requests&lt;br /&gt;
&lt;br /&gt;
Whether MeeGo will have some user space SW components or framework related to power management is under discussion at the time of this writing.&lt;br /&gt;
&lt;br /&gt;
In the thermal management area, the Device State Management Entity (DSME) component in the Device Health subsystem is supposed to make thermal state management decisions in the system. The DSME has a thermal manager module that again uses other DSME modules (thermal objects) to access the actual thermal sensor information in the HW. To port this functionality to new HW, one or more DSME thermal object modules need to be implemented.&lt;br /&gt;
&lt;br /&gt;
The APIs that the thermal object modules use to access the thermal sensor information are not strictly defined by MeeGo. At device driver level, however, the preferred approach is to utilize standard Linux interfaces such as the generic thermal sysfs API or the hwmon sysfs API.&lt;br /&gt;
&lt;br /&gt;
==== Energy management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, basically the only thing that MeeGo requires from HW adaptation in the energy management area (battery charging and monitoring) is support for the Linux power supply sysfs class. Additional energy management related functionality can be handled in a vendor specific manner.&lt;br /&gt;
&lt;br /&gt;
==== Device state ====&lt;br /&gt;
&lt;br /&gt;
The DSME component participates in device state management e.g. by managing device run level, reboot and shutdown, by monitoring the device thermal state and shutting down the device in fatal thermal conditions, and by handling HW watchdog kicking activity.&lt;br /&gt;
&lt;br /&gt;
In a new HW environment, the DSME needs to be adapted to handle the watchdog kicking through the right device driver interfaces and at the right intervals. In addition, to port the DSME thermal management functionality to new HW, one or more DSME thermal object modules need to be implemented as described above in the [[#Power_and_thermal_management|''Power and thermal management'']] section.&lt;br /&gt;
&lt;br /&gt;
=== Security Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Work is ongoing in bringing platform security functionality to the MeeGo OS based on the Mandatory Access Control (MAC), Integrity Measurement Architecture (IMA) and Extended Verification Module (EVM) technologies in the Linux kernel. Maximum security can be reached if the MeeGo platform security functionality can rely on trusted platform support &amp;quot;below&amp;quot; the Linux kernel, effectively in the HW and the boot loader(s). MeeGo, however, places no strict requirements as to how the trusted platform support is implemented in MeeGo based devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo also includes the OpenSSL open source toolkit implementing general purpose cryptography functionality. Algorithms and operations supported by the OpenSSL toolkit can be accelerated in HW by using the OpenSSL engine architecture. OpenSSL also supports a cryptodev engine that uses crypto algorithms implemented in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Some devices may have a security watchdog in the HW that needs &amp;quot;kicking&amp;quot; at regular intervals to keep the device up and running. In MeeGo, watchdog kicking functionality is implemented in the Device State Management Entity (DSME) component. If security watchdog kicking is needed, the DSME needs to be adapted to handle that through the right device driver interface and at the right intervals.&lt;br /&gt;
&lt;br /&gt;
=== Device Mode Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Resource Policy ====&lt;br /&gt;
&lt;br /&gt;
The Resource (Policy) Manager component in the Device Health subsystem offers a generic framework for:&lt;br /&gt;
* Monitoring device and application events&lt;br /&gt;
* Managing policies that specify rules about what should happen in the device when certain events occur&lt;br /&gt;
* Making policy decisions when events occur (determining the needed changes in the device)&lt;br /&gt;
* Enforcing changes in the system through policy enforcement points&lt;br /&gt;
&lt;br /&gt;
The Resource Manager can be used e.g. to change the audio routing in the device when the user attaches a wired headset to the device.&lt;br /&gt;
&lt;br /&gt;
Event listening and change enforcement in the Resource Manager happens through plugin modules. Using the MeeGo OS in some new device effectively involves creating suitable Resource Manager policies and writing the necessary plugins for listening device/application events and changing device behavior accordingly. Though not pure HW adaptation, this can be considered as a form of MeeGo OS &amp;quot;device adaptation&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Mode Control Entity (MCE) ====&lt;br /&gt;
&lt;br /&gt;
The MCE component (starting from MeeGo 1.2) can be used to listen to events that have an impact to the device mode (e.g. touch screen locked vs. unlocked) and change the device mode accordingly. The MCE is used e.g. for: &lt;br /&gt;
* Listening to various keys and switches in the device (e.g. power key, volume key, camera button, slider switch)&lt;br /&gt;
* Controlling LEDs&lt;br /&gt;
* Touch screen or HW keyboard enabling/disabling depending on device state&lt;br /&gt;
* Keyboard backlight control&lt;br /&gt;
* Display state (on/off) and brightness control&lt;br /&gt;
&lt;br /&gt;
The MCE has its own plugin architecture that can be used to adapt it to different HW environments.&lt;br /&gt;
&lt;br /&gt;
=== Display and Graphics Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo visual services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view]. &lt;br /&gt;
&lt;br /&gt;
The key ingredients of the display and graphics architecture in MeeGo are the X Window System (X Server with its extensions) and the Khronos graphics APIs (OpenGL ES, OpenVG and EGL with their extensions).&lt;br /&gt;
&lt;br /&gt;
The display and graphics HW adaptation SW needs to enable the X Window System and the Khronos APIs to function on the device HW. In practice, the adaptation SW needs to have an X display/video driver (hosted inside the X Server) and libraries that implement the Khronos graphics APIs, both supporting the features and functionality required by MeeGo. Also some configuration file changes may be needed. Any additional user space and kernel space components needed for the HW adaptation are implementation dependent.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering display content to external displays, the Resource Manager component may be used to coordinate the display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Audio Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The audio architecture in MeeGo is centered around the GStreamer and PulseAudio frameworks. In addition, the Resource Manager plays a role in coordinating the audio related behavior of the device (audio routings). The audio HW adaptation SW needs to provide GStreamer elements and PulseAudio plugins that enable the GStreamer and PulseAudio client interfaces used for e.g. for audio playback, recording and volume control to work on the device. Typical required components include e.g. codec elements for GStreamer and sink/source plugins for PulseAudio.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer and PulseAudio plugins, the audio HW adaptation SW can be implemented with different technologies and APIs, including ALSA and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework as needed. Use of the ALSA framework and APIs is encouraged, however, as they allow significant reuse of components and functionality on the PulseAudio level and are already a part of the upstream Linux kernel. If ALSA is not used to implement the kernel side parts of the audio adaptation, the solution that is used instead should still be aligned with the upstream Linux kernel.&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo media services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view]. &lt;br /&gt;
&lt;br /&gt;
=== Camera Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo still imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework and the CameraBin GStreamer element. The still imaging HW adaptation SW is required to contain a GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element. Thus, the required HW adaptation interfaces are the relevant GStreamer plugin interfaces and especially the interfaces expected by the CameraBin element, in particular the GstPhotography interface.&lt;br /&gt;
&lt;br /&gt;
If HW accelerated encoders are supported, they should be also offered to the system as GStreamer elements.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
=== Video and Imaging Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo video imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework, the CameraBin GStreamer element (video recording) and the Playbin2 GStreamer element (video playback). The video imaging HW adaptation SW is required to contain:&lt;br /&gt;
:* A GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element (this is common with still imaging) &lt;br /&gt;
:* If HW accelerated codecs are supported, GStreamer elements that wrap the codecs&lt;br /&gt;
:* If HW accelerated filters are supported (e.g. video scaler, rotation engines, color conversion engines), GStreamer elements that wrap the filters&lt;br /&gt;
:* A GStreamer video sink element that offers the GStreamer X Overlay Interface. Note that if the XVideo extension is supported on the X Server side, the xvimagesink element can be used as the video sink element and no new elements are needed.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the video imaging HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering video content to external displays, the Resource Manager component may be used to coordinate the video/display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Communications Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo communications services architecture, see [http://meego.com/developers/meego-architecture/comms-services Comms Services].&lt;br /&gt;
&lt;br /&gt;
==== Cellular ====&lt;br /&gt;
&lt;br /&gt;
The cellular telephony architecture in MeeGo is centered on the oFono, PulseAudio and Telepathy frameworks. In addition, the Resource Manager plays a role in coordinating the device behavior during voice calls.&lt;br /&gt;
&lt;br /&gt;
The cellular modem HW adaptation SW must implement the following interfaces towards the MeeGo OS:&lt;br /&gt;
:* oFono modem plugin/driver API&lt;br /&gt;
:* Linux network interface for the Linux TCP/IP stack (for data communications)&lt;br /&gt;
:* Relevant PulseAudio plugin interfaces for cellular voice call audio handling&lt;br /&gt;
&lt;br /&gt;
For more detailed information about the oFono APIs, see the documentation and source code available at [http://git.kernel.org/?p=network/ofono/ofono.git;a=summary oFono git].&lt;br /&gt;
&lt;br /&gt;
==== USB ====&lt;br /&gt;
&lt;br /&gt;
The foundation of the the MeeGo USB functionality is the standard Linux USB subsystem. The Linux USB subsystem defines the USB related HW adaptation interfaces that need to be supported in MeeGo. In practice, these are kernel side interfaces between the generic USB functionality and a HW dependent USB host controller driver.&lt;br /&gt;
&lt;br /&gt;
==== WLAN ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo WLAN architecture is centered on the [http://linuxwireless.org/ Linux wireless] (IEEE-802.11) subsystem. The Linux wireless SW stack defines the WLAN HW adaptation SW interfaces that need to be used in MeeGo. In practice, the required interfaces are defined by cfg80211 for FullMAC WLAN devices and by mac80211 for SoftMAC WLAN devices. In addition, a Linux network interface needs to be supported towards the Linux TCP/IP stack.&lt;br /&gt;
&lt;br /&gt;
==== Bluetooth ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Bluetooth architecture is centered on the [http://www.bluez.org/ BlueZ] SW stack. The BlueZ SW stack defines the Bluetooth HW adaptation SW interfaces that need to be used in MeeGo. In practice, these are Linux kernel side interfaces between the generic HCI (Host Controller Interface) core and a HW specific HCI driver.&lt;br /&gt;
&lt;br /&gt;
=== Location Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The MeeGo location architecture is based on [http://http://labs.trolltech.com/page/Projects/QtMobility| QtMobility Location API].  The QtMobility 1.0 Location API provides geographic coordinates only.  The QtMobility 1.1 Location API provides geocoding and reverse geocoding, POI search, navigation, and mapping.  The 1.0 Location API is available in MeeGo 1.1.  The 1.1 or later Location API will be available in MeeGo 1.2.  The Location API uses a plugin system for implementations of the underlying backend.  MeeGo compliance requirements require support for the QtMobility Location API and thus require one or more plugins to support these APIs.  MeeGo places no restrictions as to how the plugins are implemented, however. Adaptation to location related HW may be done by manufacturers or service providers and the way how it's done is not defined by the API.&lt;br /&gt;
&lt;br /&gt;
MeeGo will use [http://www.freedesktop.org/wiki/Software/GeoClue GeoClue] as the reference location framework and the reference implementation of the Qt Mobility location API backend will be written on top of GeoClue. GeoClue defines a set of (D-Bus) APIs for accessing location services provided by service providers implemented as D-Bus services. In addition, GeoClue includes a set of service provider implementations and (at the time of this writing) an experimental master service provider that can act as a proxy between clients and the actual service providers. If a device vendor wants to take advantage of this existing functionality, the vendor can implement their location services &amp;quot;behind&amp;quot; the GeoClue APIs as GeoClue service providers. In such a case, adaptation to the location related HW would happen inside the service providers as defined by the service provider designs.&lt;br /&gt;
&lt;br /&gt;
=== Sensor Adaptation === &lt;br /&gt;
&lt;br /&gt;
The key component in the MeeGo sensor handling architecture is the Sensor Framework. The Sensor Framework uses both HW independent logical sensor plugins and HW dependent sensor adaptor plugins in its operation. The required sensor HW adaptation interfaces in MeeGo are the interfaces that the Sensor Framework and the logical sensor plugins define for the sensor adaptor plugins to implement. The sensor adaptor plugins typically communicate directly with sensor HW drivers in the Linux kernel. The interfaces that the sensor HW drivers expose to the user space are not defined by MeeGo. Sensor HW adaptation in MeeGo thus consists of adaptor plugins in the Sensor Framework and sensor HW drivers in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Note that thermal sensors are handled in a different manner as described in the [[#Power and thermal management|''Power and thermal management'']] section above.&lt;br /&gt;
&lt;br /&gt;
=== Input Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Touch ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the touch input handling path in MeeGo are the touch HW device driver, Linux kernel input subsystem, X server, X input driver, Qt and finally the MeeGo Touch Framework. Enabling touch support for some new HW requires at least the implementation of the corresponding touch HW device driver in the Linux kernel. If this driver communicates touch events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, basically the existing functionality in X server (e.g. evdev input driver) and above can be used as such. In case the kernel-to-user-space interface is non-standard, it is also possible to implement a new X input driver as a part of the touch HW adaptation.&lt;br /&gt;
&lt;br /&gt;
Multi-touch support in X requires a new version, 2.1, of the [http://cgit.freedesktop.org/~whot/inputproto/tree/XI2proto.txt?h=multitouch X Input Extension] and this also requires support from the client side, in this case Qt's multi-touch support. Once this support has been implemented throughout the SW stack, including X evdev input driver, supporting multi-touch for some new HW should require only the implementation of a touch HW device driver that implements the standard Linux multi-touch interface. This should be the case in MeeGo 1.2. &lt;br /&gt;
&lt;br /&gt;
Before 1.2, multi-touch support in MeeGo uses a special X input driver (mtev), X server multi-pointer support (MPX) and Qt multi-touch support written on top of MPX. This solution requires the touch HW device driver to expose a user-space interface that is compatible with mtev.&lt;br /&gt;
&lt;br /&gt;
==== HW keyboard ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the HW keyboard input handling path in MeeGo are the keyboard HW device driver, Linux kernel input subsystem, X server, X input driver and Qt. Enabling keyboard support for some new HW requires typically only the implementation of the corresponding keyboard HW device driver in the Linux kernel. If this driver communicates key events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, the existing functionality in X server (e.g. evdev input driver) and above should work as such. In case the kernel-to-user space interface is non-standard, it is also possible to implement a new X input driver as a part of the keyboard HW adaptation.&lt;br /&gt;
&lt;br /&gt;
==== Buttons and switches ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo includes the MCE and System SW Qt API (QmSystem) components. The MCE can be used to control the device mode and it listens to power button events and e.g. device open/close switch events via the respective device driver interfaces. The System SW Qt API on the other hand provides a Qt API to various system information, including events from various physical buttons in the device (e.g. volume button, camera button). The System SW Qt API gets the button events either by listening to the relevant device driver interfaces or through the MCE component.&lt;br /&gt;
&lt;br /&gt;
Both the MCE and the System SW Qt API components can be adapted to new devices by device vendors.&lt;br /&gt;
&lt;br /&gt;
=== Haptics and Vibra Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Haptics ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Touch Framework present (at least) in the MeeGo handset device category contains a component called Feedback Framework (meegotouch-feedback) that handles the creation of auditory and/or haptic feedback to touch events. The haptic feedback can be created e.g. with vibra motors or piezo elements. In the Feedback Framework, the different types of feedback are created by backend libraries implemented as plugins. &lt;br /&gt;
&lt;br /&gt;
The haptics related HW adaptation interface from MeeGo OS perspective is the backend plugin interface defined by the Feedback Framework. The plugins can then communicate with the HW either through some device driver interface or some intermediate SW layers (MeeGo places no restrictions as to how the plugins are implemented).&lt;br /&gt;
&lt;br /&gt;
==== Vibra (notifications/alerts) ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo (at least the handset category) will include a component called Non-Graphical Feedback Framework (NGF). This component offers the capability of playing e.g. audio, vibra or led as an indication of events such as incoming call/message, clock and calendar alarms, missed calls, unread messages etc. The NGF also integrates with the Resource Policy to decide about the available playback resources based on policy rules and the current system state.&lt;br /&gt;
&lt;br /&gt;
The actual playback of the different types of notifications is handled by NGF plugins that can be created by device vendors. The plugins communicate with the relevant HW as they see best, e.g. directly through some device driver interface or via some intermediate user space SW components. The plugin interfaces defined by NGF thus form the notification/alert vibra adaptation interface in MeeGo.&lt;br /&gt;
&lt;br /&gt;
=== Production Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Production deals with areas such as flashing, testing, tuning and certification. The current understanding is that these areas are handled in a vendor specific manner, including the adaptation.&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Noel</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/MeeGo_Porting_Guide</id>
		<title>MeeGo Porting Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/MeeGo_Porting_Guide"/>
				<updated>2011-06-24T22:44:58Z</updated>
		
		<summary type="html">&lt;p&gt;Noel: /* Adaptation subsystems and interfaces */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The goal of MeeGo Porting Guide (MPG) is to provide valuable information and instructions to people who want to run MeeGo OS on their (new) HW and eventually create products based on the MeeGo OS. The MPG starts with an overview of the porting process, tools, and other related background information and then moves on to describing what the porting actually means in individual technical/functional areas.&lt;br /&gt;
&lt;br /&gt;
The porting guide is not strictly tied to any particular MeeGo OS version or device category. Instead, it tries to be general enough to cover the different device categories, as well as follow changes introduced in new MeeGo OS versions.&lt;br /&gt;
&lt;br /&gt;
Detailed porting information in the different technical areas is dependent on the respective [http://meego.com/developers/meego-architecture MeeGo architecture]. In some cases, this architecture may still be open and this is noted in the applicable sections.&lt;br /&gt;
&lt;br /&gt;
=== Feedback ===&lt;br /&gt;
&lt;br /&gt;
Contribution to these pages is open. Any MeeGo community member is free to ''improve'' these pages at any time. You can also leave feedback in the [http://lists.meego.com/listinfo/meego-porting MeeGo porting mailing list].&lt;br /&gt;
&lt;br /&gt;
== General porting information/guidelines ==&lt;br /&gt;
&lt;br /&gt;
=== MeeGo compliance ===&lt;br /&gt;
&lt;br /&gt;
Perhaps the most important piece of background information related to the MPG are the [[Quality/Compliance|MeeGo compliance requirements]]. A device that is meant to be MeeGo compliant will need to fulfill the requirements listed in the MeeGo compliance specification for the applicable device category (the first version of the specification is supposed to be available in October 2010). In short, a MeeGo compliant device will need to:&lt;br /&gt;
* Meet the minimum HW performance and component requirements for the applicable device category&lt;br /&gt;
* Include all SW components that form the MeeGo core OS&lt;br /&gt;
* Include the additional SW components required to be present in devices in the applicable device category&lt;br /&gt;
* Not break the API/ABI of any of the components coming from MeeGo&lt;br /&gt;
* Follow the MeeGo SW packaging conventions&lt;br /&gt;
&lt;br /&gt;
The compliance rules will also specify CPU architecture specific requirements concerning how MeeGo OS itself and MeeGo applications are to be compiled to different environments (instruction set used, compiler version, compiler options, etc.).&lt;br /&gt;
&lt;br /&gt;
A device vendor may include additional functionality, HW components and SW components in their devices, as long as they don't break MeeGo compliance. The vendor can also patch MeeGo OS components, if the patches don't break MeeGo compliance. A device vendor's own SW components can be either open source or closed source components, as long as they adhere to the rules set by the applicable SW licenses.&lt;br /&gt;
&lt;br /&gt;
From the MeeGo Porting Guide perspective, by defining the SW components and HW components that need to be present, the compliance requirements effectively define the minimum set of porting tasks required from a device vendor and what SW components are involved from MeeGo OS side.&lt;br /&gt;
&lt;br /&gt;
=== Porting process and tools ===&lt;br /&gt;
&lt;br /&gt;
==== Overview ====&lt;br /&gt;
&lt;br /&gt;
As long as a vendor's device is MeeGo compliant, as defined above, it is basically up to the vendor to decide how they build the SW that ends up in the device. The vendor may use their own build machinery or set up an OBS build system that is also used in MeeGo. Regardless of what the vendor's build system is, it needs to integrate with the MeeGo build infrastructure, at least to fetch the MeeGo source packages for the builds, as well as build each MeeGo component in the same way as it would be built in the MeeGo build system (such as with the same compiler and compiler options). Whatever the case, the intention in MeeGo is to use and offer an open toolset that any HW or SW vendor can use for efficient SW creation. It is likely that using the same toolset as MeeGo, will offer the easiest way to integrate vendor's own build system with the the MeeGo build infrastructure.&lt;br /&gt;
&lt;br /&gt;
The key ingredients of the MeeGo build infrastructure and toolset are:&lt;br /&gt;
* [http://meego.gitorious.org MeeGo Gitorious]&lt;br /&gt;
** A version control system for the source files of various MeeGo specific SW components and tools&lt;br /&gt;
* [http://build.meego.com MeeGo OBS]&lt;br /&gt;
** The build system that is used to build MeeGo packages (RPMs) from their sources&lt;br /&gt;
* [http://repo.meego.com MeeGo Repository]&lt;br /&gt;
** The place where the built MeeGo releases, that is where MeeGo packages and images are stored&lt;br /&gt;
* [http://wiki.meego.com/Image_Creation MeeGo Image Creator]&lt;br /&gt;
** The tool used to build MeeGo images that can be installed/flashed on HW&lt;br /&gt;
* MeeGo release tools&lt;br /&gt;
** Tools such as BOSS and REVS that are used in the creation of the MeeGo releases under repo.meego.com&lt;br /&gt;
&lt;br /&gt;
For additional information, see [[Build Infrastructure]], [[Release Infrastructure]] and [[Release Engineering]].&lt;br /&gt;
&lt;br /&gt;
For another overview of the MeeGo porting process, see [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process].&lt;br /&gt;
&lt;br /&gt;
==== Vendor's own OBS ====&lt;br /&gt;
&lt;br /&gt;
So, ultimately, when creating actual products running the MeeGo OS, the vendor may end up setting up their own OBS build system. Setting up your own OBS system may also be beneficial in earlier HW/product development phases, as it offers a flexible way to modify and build MeeGo OS to test it on the new HW. The vendor's own OBS system can link to the MeeGo OBS for handling packages that come directly from MeeGo and it can link to other sources for handling, such as closed source packages that are specific to the vendor. See [[Release_Engineering/Process#Making a product out of MeeGo Release|an overview picture of this setup]].&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Sets up their own OBS system&lt;br /&gt;
** [[User:Stskeeps/10_easy_steps_to_a_local_OBS|Instructions related to setting up an OBS system]],  [[Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE112|OBS Applicances]] [http://en.opensuse.org/openSUSE:Build_Service_private_instance Open Suse OBS Wiki].&lt;br /&gt;
* Creates projects under the their own OBS for their own components&lt;br /&gt;
* Links their own OBS to the MeeGo OBS for MeeGo components&lt;br /&gt;
* May have trial patches to MeeGo components in their own OBS&lt;br /&gt;
** NOTE. Eventually all patches to MeeGo components required in a final MeeGo based product ''should'' be pushed to MeeGo.com. However, this is not an absolute must requirement, as long as the MeeGo compliance requirements and applicable SW license rules are fulfilled. &lt;br /&gt;
** See [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below&lt;br /&gt;
* Needs to set up the necessary machinery to create releases and images from the packages built with OBS&lt;br /&gt;
** This machinery can be based on the toolset used in MeeGo (see above)&lt;br /&gt;
&lt;br /&gt;
==== Working under MeeGo.com ====&lt;br /&gt;
&lt;br /&gt;
Another way of porting MeeGo to some new HW is to get the new HW accepted as one MeeGo reference HW and have the MeeGo build machinery create builds for the reference HW as a part of the normal MeeGo release building cycle (see [[Release Engineering/Release Timeline|Release Timeline]] and [[Release Engineering/Process|Release Process]]). This setup can also include QA support for the reference HW on the MeeGo side (see [[Quality]]). At the time of this writing, the actual process of getting new reference HW to MeeGo is still somewhat unclear. In any case, this model requires active participation from the vendor in MeeGo work in general and especially in supporting their reference HW in MeeGo.&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Creates a device/platform development project under the MeeGo OBS for their components. The open source components would then get submitted to MeeGo Trunk:Testing and get reviewed like any other MeeGo component for inclusion.&lt;br /&gt;
** Note that it is also possible to have closed source binary components in the MeeGo OBS to be included in the MeeGo builds for some reference HW. These are submitted to the Trunk:non-oss repository. Licensing is usually required to at least include redistributability, as the components cannot be mirrored from or hosted at repo.meego.com otherwise. It is not possible to have components within Trunk:Testing require closed source dependencies.&lt;br /&gt;
* Pushes patches to other MeeGo components at MeeGo.com as necessary (see [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below)&lt;br /&gt;
* Creates (or supports the creation of) a MIC kickstart file for building images for their reference HW&lt;br /&gt;
* As necessary, supports adding support for their reference HW and SW components in the MeeGo build and release infrastructure tools&lt;br /&gt;
&lt;br /&gt;
==== Trials ====&lt;br /&gt;
&lt;br /&gt;
A lightweight but also more limited &amp;quot;try it out&amp;quot; alternative to the above processes is discussed below.&lt;br /&gt;
&lt;br /&gt;
===== Initial bring-up attempt =====&lt;br /&gt;
&lt;br /&gt;
* Grab the already built root filesystem / image for a MeeGo reference device that's the closest to your target. For ARMv7, this is typically the Nokia N900 handset image. For Atom, this could be netbook image or handset image.&lt;br /&gt;
* Build a Linux kernel for your device and install the modules into /lib/modules.&lt;br /&gt;
* Boot the root filesystem and modify the configuration and drop in components to bring up the device to UX. Note down the things you had to modify or add, as this will be input for your porting work.&lt;br /&gt;
&lt;br /&gt;
===== Building your first image =====&lt;br /&gt;
&lt;br /&gt;
The second step to a proper hardware adaptation is making sure you can build your own image. Because we based our work before on a reference device image, it makes sense to try to build this image first. MeeGo images are constructed on the basis of so called 'kickstart files', which describe the intended contents of an image. &lt;br /&gt;
&lt;br /&gt;
* Install the MeeGo Image Creator tool (MIC)&lt;br /&gt;
* Download the kickstart file (.ks) from the same directory you found your reference device image. &lt;br /&gt;
* Create a image using mic-image-creator (should be elaborated).&lt;br /&gt;
* Test out your freshly baked image as in the previous step.&lt;br /&gt;
&lt;br /&gt;
===== Building your port's first reproduciable image =====&lt;br /&gt;
&lt;br /&gt;
* Download the MeeGo kernel, possibly modifying the kernel with additional patches (including new device drivers) and building the kernel (see [[#Getting_new_chipset_support_to_the_MeeGo_kernel|''Getting new chipset support to the MeeGo kernel'']] below). &lt;br /&gt;
* Add the repository containing your kernel package to the kickstart file (to be elaborated)&lt;br /&gt;
* Remove parts of the kickstart file specific to the reference device.&lt;br /&gt;
* Add a mention of your kernel package in the %packages section.&lt;br /&gt;
* Build packages or include shell scripts in %post section of kickstart file that adds/modifies configuration fitting your device.&lt;br /&gt;
&lt;br /&gt;
A detailed description of a variation of this model can be found from [[ARM/Meego on Beagleboard from scratch|here]] (Better description needed).&lt;br /&gt;
&lt;br /&gt;
==== Getting new chipset support to the MeeGo kernel ====&lt;br /&gt;
&lt;br /&gt;
See [[How-to: getting new chipset support to the MeeGo kernel]] for more detailed information about how to work with the MeeGo kernel and make it support new HW.&lt;br /&gt;
&lt;br /&gt;
=== Upstream projects, MeeGo, products, and patches ===&lt;br /&gt;
&lt;br /&gt;
When building a product based on MeeGo, the product vendor will typically augment the MeeGo OS with their own SW components, as well as make fixes and adjustments to the MeeGo OS code (in the limits set by the compliance rules). While vendors can manage their own SW components as they wish, the strong preference is that any changes made to the MeeGo OS SW components are delivered as patches primarily to the respective upstream projects or secondarily to MeeGo.com. In this way, vendors can relieve themselves of the burden of managing a potentially big patch set on top of MeeGo OS, and also verify the quality and safety of their patches. Having the patches in upstream projects again lessens the patch set management load at MeeGo.com.&lt;br /&gt;
&lt;br /&gt;
For information about pushing patches to MeeGo, see [http://meego.com/about/contribution-guidelines Contribution Guidelines] and [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process] (especially section ''How Do Patches Get Integrated and Accepted?'') and [http://meego.gitorious.org/meego-os-base/kernel-source/blobs/master/README.workflow Kernel workflow].&lt;br /&gt;
&lt;br /&gt;
=== Adaptation subsystems and interfaces ===&lt;br /&gt;
&lt;br /&gt;
In the MeeGo architecture model (see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view MeeGo Architecture Domain View]), adaptation is represented as adaptation subsystems. SW components in the adaptation subsystem ''realizations'' do things that are expected by the OS and communicate with the OS through interfaces defined by the OS.&lt;br /&gt;
 &lt;br /&gt;
The key goal in the sections below is to identify the interface(s) that the adaptation SW needs to implement/use to communicate with the OS in the required manner. Behind these interfaces, the adaptation SW can basically handle the required functionality as it sees best. In some cases, however, there may also be some preferred way of implementing the adaptation.&lt;br /&gt;
&lt;br /&gt;
In some areas, the adaptation work may consist of just writing a suitable Linux device driver for the HW in question. In some other areas, the adaptation work may consist of writing one or more device drivers, as well as one or more user space components (such as plugins to some user space SW frameworks). Various configuration file changes may also be required as a part of the adaptation work.&lt;br /&gt;
&lt;br /&gt;
== Porting by adaptation subsystems ==&lt;br /&gt;
&lt;br /&gt;
=== System Core Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Boot ====&lt;br /&gt;
&lt;br /&gt;
MeeGo places no restrictions as to what SW components are used to handle the pre-OS boot phases in a MeeGo compliant device. Thus, vendors are free to choose e.g. the boot loader as they see fit. Note however that full utilization of the MeeGo platform security requires that the pre-OS boot phases form a trusted boot chain that ultimately builds on chipset-level security support.&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, MeeGo does not define anything special with regard to what information the boot loader is expected to pass to the Linux kernel e.g. via the kernel command line.&lt;br /&gt;
&lt;br /&gt;
The kernel-level boot phases can be tailored as necessary to the specific CPU, chipset or device in a standard Linux manner.&lt;br /&gt;
&lt;br /&gt;
The post-kernel boot phases (startup scripts) can be tailored by device vendors as necessary for their devices in the limits set by MeeGo compliance requirements (certain SW components need to be present in the system).&lt;br /&gt;
&lt;br /&gt;
==== Kernel fundamentals ====&lt;br /&gt;
&lt;br /&gt;
Regarding the Linux kernel, each MeeGo release defines the kernel version to be used and a set of patches on top of that. In addition, the Linux kernel used in MeeGo compliant devices is assumed to have been built with a set of fixed build-time configuration values that are not allowed to be changed. In addition to the fixed values, device vendors can define other kernel configuration values as required by their devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo does not place any special requirements concerning how the boot loader passes information to the kernel or how the HW configuration and initialization of the system is handled.&lt;br /&gt;
&lt;br /&gt;
CPU, chipset (SoC) and device vendors are assumed to implement the elementary CPU architecture/chipset/device support for the Linux kernel used in MeeGo in a standard Linux manner. This includes:&lt;br /&gt;
* HW (board) configuration&lt;br /&gt;
* Mapping the fundamental Linux kernel functionality (e.g. IRQ, DMA, GPIO, RTC and memory handling) to the HW in question&lt;br /&gt;
* Creation/modification of the necessary device drivers to support the core SoC interfaces (e.g. I2C, SPI, SDIO)&lt;br /&gt;
* Permanent memory support&lt;br /&gt;
* Debugging and tracing support&lt;br /&gt;
&lt;br /&gt;
==== Power and thermal management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, the understanding is that MeeGo in general relies on established Linux kernel frameworks and APIs for power management. Some of these frameworks and APIs may be applicable only in certain CPU architectures. In addition, the HW capabilities related to power management may vary between different HW platforms potentially meaning that the SW is assumed perform somewhat different tasks in different environments.&lt;br /&gt;
&lt;br /&gt;
The Linux power management frameworks and APIs include:&lt;br /&gt;
* CPU frequency control (support for the different voltage and frequency operating points) via the cpufreq infrastructure&lt;br /&gt;
* CPU idle state management (different levels of sleep) through the cpuidle infrastructure&lt;br /&gt;
* Clock management through the clock framework&lt;br /&gt;
* Suspend/resume&lt;br /&gt;
* Runtime power management&lt;br /&gt;
* HW voltage/current regulator control via the regulator framework&lt;br /&gt;
* PM_QOS (power management quality of service) framework for making and listening to PM QoS requests&lt;br /&gt;
&lt;br /&gt;
Whether MeeGo will have some user space SW components or framework related to power management is under discussion at the time of this writing.&lt;br /&gt;
&lt;br /&gt;
In the thermal management area, the Device State Management Entity (DSME) component in the Device Health subsystem is supposed to make thermal state management decisions in the system. The DSME has a thermal manager module that again uses other DSME modules (thermal objects) to access the actual thermal sensor information in the HW. To port this functionality to new HW, one or more DSME thermal object modules need to be implemented.&lt;br /&gt;
&lt;br /&gt;
The APIs that the thermal object modules use to access the thermal sensor information are not strictly defined by MeeGo. At device driver level, however, the preferred approach is to utilize standard Linux interfaces such as the generic thermal sysfs API or the hwmon sysfs API.&lt;br /&gt;
&lt;br /&gt;
==== Energy management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, basically the only thing that MeeGo requires from HW adaptation in the energy management area (battery charging and monitoring) is support for the Linux power supply sysfs class. Additional energy management related functionality can be handled in a vendor specific manner.&lt;br /&gt;
&lt;br /&gt;
==== Device state ====&lt;br /&gt;
&lt;br /&gt;
The DSME component participates in device state management e.g. by managing device run level, reboot and shutdown, by monitoring the device thermal state and shutting down the device in fatal thermal conditions, and by handling HW watchdog kicking activity.&lt;br /&gt;
&lt;br /&gt;
In a new HW environment, the DSME needs to be adapted to handle the watchdog kicking through the right device driver interfaces and at the right intervals. In addition, to port the DSME thermal management functionality to new HW, one or more DSME thermal object modules need to be implemented as described above in the [[#Power_and_thermal_management|''Power and thermal management'']] section.&lt;br /&gt;
&lt;br /&gt;
=== Security Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Work is ongoing in bringing platform security functionality to the MeeGo OS based on the Mandatory Access Control (MAC), Integrity Measurement Architecture (IMA) and Extended Verification Module (EVM) technologies in the Linux kernel. Maximum security can be reached if the MeeGo platform security functionality can rely on trusted platform support &amp;quot;below&amp;quot; the Linux kernel, effectively in the HW and the boot loader(s). MeeGo, however, places no strict requirements as to how the trusted platform support is implemented in MeeGo based devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo also includes the OpenSSL open source toolkit implementing general purpose cryptography functionality. Algorithms and operations supported by the OpenSSL toolkit can be accelerated in HW by using the OpenSSL engine architecture. OpenSSL also supports a cryptodev engine that uses crypto algorithms implemented in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Some devices may have a security watchdog in the HW that needs &amp;quot;kicking&amp;quot; at regular intervals to keep the device up and running. In MeeGo, watchdog kicking functionality is implemented in the Device State Management Entity (DSME) component. If security watchdog kicking is needed, the DSME needs to be adapted to handle that through the right device driver interface and at the right intervals.&lt;br /&gt;
&lt;br /&gt;
=== Device Mode Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Resource Policy ====&lt;br /&gt;
&lt;br /&gt;
The Resource (Policy) Manager component in the Device Health subsystem offers a generic framework for:&lt;br /&gt;
* Monitoring device and application events&lt;br /&gt;
* Managing policies that specify rules about what should happen in the device when certain events occur&lt;br /&gt;
* Making policy decisions when events occur (determining the needed changes in the device)&lt;br /&gt;
* Enforcing changes in the system through policy enforcement points&lt;br /&gt;
&lt;br /&gt;
The Resource Manager can be used e.g. to change the audio routing in the device when the user attaches a wired headset to the device.&lt;br /&gt;
&lt;br /&gt;
Event listening and change enforcement in the Resource Manager happens through plugin modules. Using the MeeGo OS in some new device effectively involves creating suitable Resource Manager policies and writing the necessary plugins for listening device/application events and changing device behavior accordingly. Though not pure HW adaptation, this can be considered as a form of MeeGo OS &amp;quot;device adaptation&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Mode Control Entity (MCE) ====&lt;br /&gt;
&lt;br /&gt;
The MCE component (starting from MeeGo 1.2) can be used to listen to events that have an impact to the device mode (e.g. touch screen locked vs. unlocked) and change the device mode accordingly. The MCE is used e.g. for: &lt;br /&gt;
* Listening to various keys and switches in the device (e.g. power key, volume key, camera button, slider switch)&lt;br /&gt;
* Controlling LEDs&lt;br /&gt;
* Touch screen or HW keyboard enabling/disabling depending on device state&lt;br /&gt;
* Keyboard backlight control&lt;br /&gt;
* Display state (on/off) and brightness control&lt;br /&gt;
&lt;br /&gt;
The MCE has its own plugin architecture that can be used to adapt it to different HW environments.&lt;br /&gt;
&lt;br /&gt;
=== Display and Graphics Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo visual services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view]. &lt;br /&gt;
&lt;br /&gt;
The key ingredients of the display and graphics architecture in MeeGo are the X Window System (X Server with its extensions) and the Khronos graphics APIs (OpenGL ES, OpenVG and EGL with their extensions).&lt;br /&gt;
&lt;br /&gt;
The display and graphics HW adaptation SW needs to enable the X Window System and the Khronos APIs to function on the device HW. In practice, the adaptation SW needs to have an X display/video driver (hosted inside the X Server) and libraries that implement the Khronos graphics APIs, both supporting the features and functionality required by MeeGo. Also some configuration file changes may be needed. Any additional user space and kernel space components needed for the HW adaptation are implementation dependent.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering display content to external displays, the Resource Manager component may be used to coordinate the display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Audio Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The audio architecture in MeeGo is centered around the GStreamer and PulseAudio frameworks. In addition, the Resource Manager plays a role in coordinating the audio related behavior of the device (audio routings). The audio HW adaptation SW needs to provide GStreamer elements and PulseAudio plugins that enable the GStreamer and PulseAudio client interfaces used for e.g. for audio playback, recording and volume control to work on the device. Typical required components include e.g. codec elements for GStreamer and sink/source plugins for PulseAudio.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer and PulseAudio plugins, the audio HW adaptation SW can be implemented with different technologies and APIs, including ALSA and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework as needed. Use of the ALSA framework and APIs is encouraged, however, as they allow significant reuse of components and functionality on the PulseAudio level and are already a part of the upstream Linux kernel. If ALSA is not used to implement the kernel side parts of the audio adaptation, the solution that is used instead should still be aligned with the upstream Linux kernel.&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo media services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view]. &lt;br /&gt;
&lt;br /&gt;
=== Camera Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo still imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework and the CameraBin GStreamer element. The still imaging HW adaptation SW is required to contain a GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element. Thus, the required HW adaptation interfaces are the relevant GStreamer plugin interfaces and especially the interfaces expected by the CameraBin element, in particular the GstPhotography interface.&lt;br /&gt;
&lt;br /&gt;
If HW accelerated encoders are supported, they should be also offered to the system as GStreamer elements.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
=== Video and Imaging Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo video imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework, the CameraBin GStreamer element (video recording) and the Playbin2 GStreamer element (video playback). The video imaging HW adaptation SW is required to contain:&lt;br /&gt;
:* A GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element (this is common with still imaging) &lt;br /&gt;
:* If HW accelerated codecs are supported, GStreamer elements that wrap the codecs&lt;br /&gt;
:* If HW accelerated filters are supported (e.g. video scaler, rotation engines, color conversion engines), GStreamer elements that wrap the filters&lt;br /&gt;
:* A GStreamer video sink element that offers the GStreamer X Overlay Interface. Note that if the XVideo extension is supported on the X Server side, the xvimagesink element can be used as the video sink element and no new elements are needed.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the video imaging HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering video content to external displays, the Resource Manager component may be used to coordinate the video/display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Communications Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo communications services architecture, see [http://meego.com/developers/meego-architecture/comms-services Comms Services].&lt;br /&gt;
&lt;br /&gt;
==== Cellular ====&lt;br /&gt;
&lt;br /&gt;
The cellular telephony architecture in MeeGo is centered on the oFono, PulseAudio and Telepathy frameworks. In addition, the Resource Manager plays a role in coordinating the device behavior during voice calls.&lt;br /&gt;
&lt;br /&gt;
The cellular modem HW adaptation SW must implement the following interfaces towards the MeeGo OS:&lt;br /&gt;
:* oFono modem plugin/driver API&lt;br /&gt;
:* Linux network interface for the Linux TCP/IP stack (for data communications)&lt;br /&gt;
:* Relevant PulseAudio plugin interfaces for cellular voice call audio handling&lt;br /&gt;
&lt;br /&gt;
For more detailed information about the oFono APIs, see the documentation and source code available at [http://git.kernel.org/?p=network/ofono/ofono.git;a=summary oFono git].&lt;br /&gt;
&lt;br /&gt;
==== USB ====&lt;br /&gt;
&lt;br /&gt;
The foundation of the the MeeGo USB functionality is the standard Linux USB subsystem. The Linux USB subsystem defines the USB related HW adaptation interfaces that need to be supported in MeeGo. In practice, these are kernel side interfaces between the generic USB functionality and a HW dependent USB host controller driver.&lt;br /&gt;
&lt;br /&gt;
==== WLAN ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo WLAN architecture is centered on the [http://linuxwireless.org/ Linux wireless] (IEEE-802.11) subsystem. The Linux wireless SW stack defines the WLAN HW adaptation SW interfaces that need to be used in MeeGo. In practice, the required interfaces are defined by cfg80211 for FullMAC WLAN devices and by mac80211 for SoftMAC WLAN devices. In addition, a Linux network interface needs to be supported towards the Linux TCP/IP stack.&lt;br /&gt;
&lt;br /&gt;
==== Bluetooth ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Bluetooth architecture is centered on the [http://www.bluez.org/ BlueZ] SW stack. The BlueZ SW stack defines the Bluetooth HW adaptation SW interfaces that need to be used in MeeGo. In practice, these are Linux kernel side interfaces between the generic HCI (Host Controller Interface) core and a HW specific HCI driver.&lt;br /&gt;
&lt;br /&gt;
=== Location Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The MeeGo location architecture is based on [http://http://labs.trolltech.com/page/Projects/QtMobility| QtMobility Location API].  The QtMobility 1.0 Location API provides geographic coordinates only.  The QtMobility 1.1 Location API provides geocoding and reverse geocoding, POI search, navigation, and mapping.  The 1.0 Location API is available in MeeGo 1.1.  The 1.1 or later Location API will be available in MeeGo 1.2.  The Location API uses a plugin system for implementations of the underlying backend.  MeeGo compliance requirements require support for the QtMobility Location API and thus require one or more plugins to support these APIs.  MeeGo places no restrictions as to how the plugins are implemented, however. Adaptation to location related HW may be done by manufacturers or service providers and the way how it's done is not defined by the API.&lt;br /&gt;
&lt;br /&gt;
MeeGo will use [http://www.freedesktop.org/wiki/Software/GeoClue GeoClue] as the reference location framework and the reference implementation of the Qt Mobility location API backend will be written on top of GeoClue. GeoClue defines a set of (D-Bus) APIs for accessing location services provided by service providers implemented as D-Bus services. In addition, GeoClue includes a set of service provider implementations and (at the time of this writing) an experimental master service provider that can act as a proxy between clients and the actual service providers. If a device vendor wants to take advantage of this existing functionality, the vendor can implement their location services &amp;quot;behind&amp;quot; the GeoClue APIs as GeoClue service providers. In such a case, adaptation to the location related HW would happen inside the service providers as defined by the service provider designs.&lt;br /&gt;
&lt;br /&gt;
=== Sensor Adaptation === &lt;br /&gt;
&lt;br /&gt;
The key component in the MeeGo sensor handling architecture is the Sensor Framework. The Sensor Framework uses both HW independent logical sensor plugins and HW dependent sensor adaptor plugins in its operation. The required sensor HW adaptation interfaces in MeeGo are the interfaces that the Sensor Framework and the logical sensor plugins define for the sensor adaptor plugins to implement. The sensor adaptor plugins typically communicate directly with sensor HW drivers in the Linux kernel. The interfaces that the sensor HW drivers expose to the user space are not defined by MeeGo. Sensor HW adaptation in MeeGo thus consists of adaptor plugins in the Sensor Framework and sensor HW drivers in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Note that thermal sensors are handled in a different manner as described in the [[#Power and thermal management|''Power and thermal management'']] section above.&lt;br /&gt;
&lt;br /&gt;
=== Input Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Touch ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the touch input handling path in MeeGo are the touch HW device driver, Linux kernel input subsystem, X server, X input driver, Qt and finally the MeeGo Touch Framework. Enabling touch support for some new HW requires at least the implementation of the corresponding touch HW device driver in the Linux kernel. If this driver communicates touch events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, basically the existing functionality in X server (e.g. evdev input driver) and above can be used as such. In case the kernel-to-user-space interface is non-standard, it is also possible to implement a new X input driver as a part of the touch HW adaptation.&lt;br /&gt;
&lt;br /&gt;
Multi-touch support in X requires a new version, 2.1, of the [http://cgit.freedesktop.org/~whot/inputproto/tree/XI2proto.txt?h=multitouch X Input Extension] and this also requires support from the client side, in this case Qt's multi-touch support. Once this support has been implemented throughout the SW stack, including X evdev input driver, supporting multi-touch for some new HW should require only the implementation of a touch HW device driver that implements the standard Linux multi-touch interface. This should be the case in MeeGo 1.2. &lt;br /&gt;
&lt;br /&gt;
Before 1.2, multi-touch support in MeeGo uses a special X input driver (mtev), X server multi-pointer support (MPX) and Qt multi-touch support written on top of MPX. This solution requires the touch HW device driver to expose a user-space interface that is compatible with mtev.&lt;br /&gt;
&lt;br /&gt;
==== HW keyboard ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the HW keyboard input handling path in MeeGo are the keyboard HW device driver, Linux kernel input subsystem, X server, X input driver and Qt. Enabling keyboard support for some new HW requires typically only the implementation of the corresponding keyboard HW device driver in the Linux kernel. If this driver communicates key events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, the existing functionality in X server (e.g. evdev input driver) and above should work as such. In case the kernel-to-user space interface is non-standard, it is also possible to implement a new X input driver as a part of the keyboard HW adaptation.&lt;br /&gt;
&lt;br /&gt;
==== Buttons and switches ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo includes the MCE and System SW Qt API (QmSystem) components. The MCE can be used to control the device mode and it listens to power button events and e.g. device open/close switch events via the respective device driver interfaces. The System SW Qt API on the other hand provides a Qt API to various system information, including events from various physical buttons in the device (e.g. volume button, camera button). The System SW Qt API gets the button events either by listening to the relevant device driver interfaces or through the MCE component.&lt;br /&gt;
&lt;br /&gt;
Both the MCE and the System SW Qt API components can be adapted to new devices by device vendors.&lt;br /&gt;
&lt;br /&gt;
=== Haptics and Vibra Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Haptics ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Touch Framework present (at least) in the MeeGo handset device category contains a component called Feedback Framework (meegotouch-feedback) that handles the creation of auditory and/or haptic feedback to touch events. The haptic feedback can be created e.g. with vibra motors or piezo elements. In the Feedback Framework, the different types of feedback are created by backend libraries implemented as plugins. &lt;br /&gt;
&lt;br /&gt;
The haptics related HW adaptation interface from MeeGo OS perspective is the backend plugin interface defined by the Feedback Framework. The plugins can then communicate with the HW either through some device driver interface or some intermediate SW layers (MeeGo places no restrictions as to how the plugins are implemented).&lt;br /&gt;
&lt;br /&gt;
==== Vibra (notifications/alerts) ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo (at least the handset category) will include a component called Non-Graphical Feedback Framework (NGF). This component offers the capability of playing e.g. audio, vibra or led as an indication of events such as incoming call/message, clock and calendar alarms, missed calls, unread messages etc. The NGF also integrates with the Resource Policy to decide about the available playback resources based on policy rules and the current system state.&lt;br /&gt;
&lt;br /&gt;
The actual playback of the different types of notifications is handled by NGF plugins that can be created by device vendors. The plugins communicate with the relevant HW as they see best, e.g. directly through some device driver interface or via some intermediate user space SW components. The plugin interfaces defined by NGF thus form the notification/alert vibra adaptation interface in MeeGo.&lt;br /&gt;
&lt;br /&gt;
=== Production Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Production deals with areas such as flashing, testing, tuning and certification. The current understanding is that these areas are handled in a vendor specific manner, including the adaptation.&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Noel</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/MeeGo_Porting_Guide</id>
		<title>MeeGo Porting Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/MeeGo_Porting_Guide"/>
				<updated>2011-06-24T22:42:54Z</updated>
		
		<summary type="html">&lt;p&gt;Noel: /* Upstream projects, MeeGo, products and patches */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The goal of MeeGo Porting Guide (MPG) is to provide valuable information and instructions to people who want to run MeeGo OS on their (new) HW and eventually create products based on the MeeGo OS. The MPG starts with an overview of the porting process, tools, and other related background information and then moves on to describing what the porting actually means in individual technical/functional areas.&lt;br /&gt;
&lt;br /&gt;
The porting guide is not strictly tied to any particular MeeGo OS version or device category. Instead, it tries to be general enough to cover the different device categories, as well as follow changes introduced in new MeeGo OS versions.&lt;br /&gt;
&lt;br /&gt;
Detailed porting information in the different technical areas is dependent on the respective [http://meego.com/developers/meego-architecture MeeGo architecture]. In some cases, this architecture may still be open and this is noted in the applicable sections.&lt;br /&gt;
&lt;br /&gt;
=== Feedback ===&lt;br /&gt;
&lt;br /&gt;
Contribution to these pages is open. Any MeeGo community member is free to ''improve'' these pages at any time. You can also leave feedback in the [http://lists.meego.com/listinfo/meego-porting MeeGo porting mailing list].&lt;br /&gt;
&lt;br /&gt;
== General porting information/guidelines ==&lt;br /&gt;
&lt;br /&gt;
=== MeeGo compliance ===&lt;br /&gt;
&lt;br /&gt;
Perhaps the most important piece of background information related to the MPG are the [[Quality/Compliance|MeeGo compliance requirements]]. A device that is meant to be MeeGo compliant will need to fulfill the requirements listed in the MeeGo compliance specification for the applicable device category (the first version of the specification is supposed to be available in October 2010). In short, a MeeGo compliant device will need to:&lt;br /&gt;
* Meet the minimum HW performance and component requirements for the applicable device category&lt;br /&gt;
* Include all SW components that form the MeeGo core OS&lt;br /&gt;
* Include the additional SW components required to be present in devices in the applicable device category&lt;br /&gt;
* Not break the API/ABI of any of the components coming from MeeGo&lt;br /&gt;
* Follow the MeeGo SW packaging conventions&lt;br /&gt;
&lt;br /&gt;
The compliance rules will also specify CPU architecture specific requirements concerning how MeeGo OS itself and MeeGo applications are to be compiled to different environments (instruction set used, compiler version, compiler options, etc.).&lt;br /&gt;
&lt;br /&gt;
A device vendor may include additional functionality, HW components and SW components in their devices, as long as they don't break MeeGo compliance. The vendor can also patch MeeGo OS components, if the patches don't break MeeGo compliance. A device vendor's own SW components can be either open source or closed source components, as long as they adhere to the rules set by the applicable SW licenses.&lt;br /&gt;
&lt;br /&gt;
From the MeeGo Porting Guide perspective, by defining the SW components and HW components that need to be present, the compliance requirements effectively define the minimum set of porting tasks required from a device vendor and what SW components are involved from MeeGo OS side.&lt;br /&gt;
&lt;br /&gt;
=== Porting process and tools ===&lt;br /&gt;
&lt;br /&gt;
==== Overview ====&lt;br /&gt;
&lt;br /&gt;
As long as a vendor's device is MeeGo compliant, as defined above, it is basically up to the vendor to decide how they build the SW that ends up in the device. The vendor may use their own build machinery or set up an OBS build system that is also used in MeeGo. Regardless of what the vendor's build system is, it needs to integrate with the MeeGo build infrastructure, at least to fetch the MeeGo source packages for the builds, as well as build each MeeGo component in the same way as it would be built in the MeeGo build system (such as with the same compiler and compiler options). Whatever the case, the intention in MeeGo is to use and offer an open toolset that any HW or SW vendor can use for efficient SW creation. It is likely that using the same toolset as MeeGo, will offer the easiest way to integrate vendor's own build system with the the MeeGo build infrastructure.&lt;br /&gt;
&lt;br /&gt;
The key ingredients of the MeeGo build infrastructure and toolset are:&lt;br /&gt;
* [http://meego.gitorious.org MeeGo Gitorious]&lt;br /&gt;
** A version control system for the source files of various MeeGo specific SW components and tools&lt;br /&gt;
* [http://build.meego.com MeeGo OBS]&lt;br /&gt;
** The build system that is used to build MeeGo packages (RPMs) from their sources&lt;br /&gt;
* [http://repo.meego.com MeeGo Repository]&lt;br /&gt;
** The place where the built MeeGo releases, that is where MeeGo packages and images are stored&lt;br /&gt;
* [http://wiki.meego.com/Image_Creation MeeGo Image Creator]&lt;br /&gt;
** The tool used to build MeeGo images that can be installed/flashed on HW&lt;br /&gt;
* MeeGo release tools&lt;br /&gt;
** Tools such as BOSS and REVS that are used in the creation of the MeeGo releases under repo.meego.com&lt;br /&gt;
&lt;br /&gt;
For additional information, see [[Build Infrastructure]], [[Release Infrastructure]] and [[Release Engineering]].&lt;br /&gt;
&lt;br /&gt;
For another overview of the MeeGo porting process, see [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process].&lt;br /&gt;
&lt;br /&gt;
==== Vendor's own OBS ====&lt;br /&gt;
&lt;br /&gt;
So, ultimately, when creating actual products running the MeeGo OS, the vendor may end up setting up their own OBS build system. Setting up your own OBS system may also be beneficial in earlier HW/product development phases, as it offers a flexible way to modify and build MeeGo OS to test it on the new HW. The vendor's own OBS system can link to the MeeGo OBS for handling packages that come directly from MeeGo and it can link to other sources for handling, such as closed source packages that are specific to the vendor. See [[Release_Engineering/Process#Making a product out of MeeGo Release|an overview picture of this setup]].&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Sets up their own OBS system&lt;br /&gt;
** [[User:Stskeeps/10_easy_steps_to_a_local_OBS|Instructions related to setting up an OBS system]],  [[Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE112|OBS Applicances]] [http://en.opensuse.org/openSUSE:Build_Service_private_instance Open Suse OBS Wiki].&lt;br /&gt;
* Creates projects under the their own OBS for their own components&lt;br /&gt;
* Links their own OBS to the MeeGo OBS for MeeGo components&lt;br /&gt;
* May have trial patches to MeeGo components in their own OBS&lt;br /&gt;
** NOTE. Eventually all patches to MeeGo components required in a final MeeGo based product ''should'' be pushed to MeeGo.com. However, this is not an absolute must requirement, as long as the MeeGo compliance requirements and applicable SW license rules are fulfilled. &lt;br /&gt;
** See [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below&lt;br /&gt;
* Needs to set up the necessary machinery to create releases and images from the packages built with OBS&lt;br /&gt;
** This machinery can be based on the toolset used in MeeGo (see above)&lt;br /&gt;
&lt;br /&gt;
==== Working under MeeGo.com ====&lt;br /&gt;
&lt;br /&gt;
Another way of porting MeeGo to some new HW is to get the new HW accepted as one MeeGo reference HW and have the MeeGo build machinery create builds for the reference HW as a part of the normal MeeGo release building cycle (see [[Release Engineering/Release Timeline|Release Timeline]] and [[Release Engineering/Process|Release Process]]). This setup can also include QA support for the reference HW on the MeeGo side (see [[Quality]]). At the time of this writing, the actual process of getting new reference HW to MeeGo is still somewhat unclear. In any case, this model requires active participation from the vendor in MeeGo work in general and especially in supporting their reference HW in MeeGo.&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Creates a device/platform development project under the MeeGo OBS for their components. The open source components would then get submitted to MeeGo Trunk:Testing and get reviewed like any other MeeGo component for inclusion.&lt;br /&gt;
** Note that it is also possible to have closed source binary components in the MeeGo OBS to be included in the MeeGo builds for some reference HW. These are submitted to the Trunk:non-oss repository. Licensing is usually required to at least include redistributability, as the components cannot be mirrored from or hosted at repo.meego.com otherwise. It is not possible to have components within Trunk:Testing require closed source dependencies.&lt;br /&gt;
* Pushes patches to other MeeGo components at MeeGo.com as necessary (see [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below)&lt;br /&gt;
* Creates (or supports the creation of) a MIC kickstart file for building images for their reference HW&lt;br /&gt;
* As necessary, supports adding support for their reference HW and SW components in the MeeGo build and release infrastructure tools&lt;br /&gt;
&lt;br /&gt;
==== Trials ====&lt;br /&gt;
&lt;br /&gt;
A lightweight but also more limited &amp;quot;try it out&amp;quot; alternative to the above processes is discussed below.&lt;br /&gt;
&lt;br /&gt;
===== Initial bring-up attempt =====&lt;br /&gt;
&lt;br /&gt;
* Grab the already built root filesystem / image for a MeeGo reference device that's the closest to your target. For ARMv7, this is typically the Nokia N900 handset image. For Atom, this could be netbook image or handset image.&lt;br /&gt;
* Build a Linux kernel for your device and install the modules into /lib/modules.&lt;br /&gt;
* Boot the root filesystem and modify the configuration and drop in components to bring up the device to UX. Note down the things you had to modify or add, as this will be input for your porting work.&lt;br /&gt;
&lt;br /&gt;
===== Building your first image =====&lt;br /&gt;
&lt;br /&gt;
The second step to a proper hardware adaptation is making sure you can build your own image. Because we based our work before on a reference device image, it makes sense to try to build this image first. MeeGo images are constructed on the basis of so called 'kickstart files', which describe the intended contents of an image. &lt;br /&gt;
&lt;br /&gt;
* Install the MeeGo Image Creator tool (MIC)&lt;br /&gt;
* Download the kickstart file (.ks) from the same directory you found your reference device image. &lt;br /&gt;
* Create a image using mic-image-creator (should be elaborated).&lt;br /&gt;
* Test out your freshly baked image as in the previous step.&lt;br /&gt;
&lt;br /&gt;
===== Building your port's first reproduciable image =====&lt;br /&gt;
&lt;br /&gt;
* Download the MeeGo kernel, possibly modifying the kernel with additional patches (including new device drivers) and building the kernel (see [[#Getting_new_chipset_support_to_the_MeeGo_kernel|''Getting new chipset support to the MeeGo kernel'']] below). &lt;br /&gt;
* Add the repository containing your kernel package to the kickstart file (to be elaborated)&lt;br /&gt;
* Remove parts of the kickstart file specific to the reference device.&lt;br /&gt;
* Add a mention of your kernel package in the %packages section.&lt;br /&gt;
* Build packages or include shell scripts in %post section of kickstart file that adds/modifies configuration fitting your device.&lt;br /&gt;
&lt;br /&gt;
A detailed description of a variation of this model can be found from [[ARM/Meego on Beagleboard from scratch|here]] (Better description needed).&lt;br /&gt;
&lt;br /&gt;
==== Getting new chipset support to the MeeGo kernel ====&lt;br /&gt;
&lt;br /&gt;
See [[How-to: getting new chipset support to the MeeGo kernel]] for more detailed information about how to work with the MeeGo kernel and make it support new HW.&lt;br /&gt;
&lt;br /&gt;
=== Upstream projects, MeeGo, products, and patches ===&lt;br /&gt;
&lt;br /&gt;
When building a product based on MeeGo, the product vendor will typically augment the MeeGo OS with their own SW components, as well as make fixes and adjustments to the MeeGo OS code (in the limits set by the compliance rules). While vendors can manage their own SW components as they wish, the strong preference is that any changes made to the MeeGo OS SW components are delivered as patches primarily to the respective upstream projects or secondarily to MeeGo.com. In this way, vendors can relieve themselves of the burden of managing a potentially big patch set on top of MeeGo OS, and also verify the quality and safety of their patches. Having the patches in upstream projects again lessens the patch set management load at MeeGo.com.&lt;br /&gt;
&lt;br /&gt;
For information about pushing patches to MeeGo, see [http://meego.com/about/contribution-guidelines Contribution Guidelines] and [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process] (especially section ''How Do Patches Get Integrated and Accepted?'') and [http://meego.gitorious.org/meego-os-base/kernel-source/blobs/master/README.workflow Kernel workflow].&lt;br /&gt;
&lt;br /&gt;
=== Adaptation subsystems and interfaces ===&lt;br /&gt;
&lt;br /&gt;
In the MeeGo architecture model (see e.g. [http://meego.com/developers/meego-architecture/meego-architecture-domain-view MeeGo Architecture Domain View]), adaptation is represented as adaptation subsystems. SW components in the adaptation subsystem ''realizations'' do things that are expected by the OS and communicate with the OS through interfaces defined by the OS.&lt;br /&gt;
 &lt;br /&gt;
The key goal in the sections below is to identify the interface(s) that the adaptation SW needs to implement/use in order to communicate with the OS in the required manner. Behind these interfaces the adaptation SW can basically handle the required functionality as it sees best. In some cases, however, there may also be some preferred way of implementing the adaptation.&lt;br /&gt;
&lt;br /&gt;
In some areas, the adaptation work may consist of just writing a suitable Linux device driver for the HW in question. In some other areas, the adaptation work may consist of writing one or more device drivers as well as one or more user space components (e.g. plugins to some user space SW frameworks). Various configuration file changes may also be required as a part of the adaptation work.&lt;br /&gt;
&lt;br /&gt;
== Porting by adaptation subsystems ==&lt;br /&gt;
&lt;br /&gt;
=== System Core Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Boot ====&lt;br /&gt;
&lt;br /&gt;
MeeGo places no restrictions as to what SW components are used to handle the pre-OS boot phases in a MeeGo compliant device. Thus, vendors are free to choose e.g. the boot loader as they see fit. Note however that full utilization of the MeeGo platform security requires that the pre-OS boot phases form a trusted boot chain that ultimately builds on chipset-level security support.&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, MeeGo does not define anything special with regard to what information the boot loader is expected to pass to the Linux kernel e.g. via the kernel command line.&lt;br /&gt;
&lt;br /&gt;
The kernel-level boot phases can be tailored as necessary to the specific CPU, chipset or device in a standard Linux manner.&lt;br /&gt;
&lt;br /&gt;
The post-kernel boot phases (startup scripts) can be tailored by device vendors as necessary for their devices in the limits set by MeeGo compliance requirements (certain SW components need to be present in the system).&lt;br /&gt;
&lt;br /&gt;
==== Kernel fundamentals ====&lt;br /&gt;
&lt;br /&gt;
Regarding the Linux kernel, each MeeGo release defines the kernel version to be used and a set of patches on top of that. In addition, the Linux kernel used in MeeGo compliant devices is assumed to have been built with a set of fixed build-time configuration values that are not allowed to be changed. In addition to the fixed values, device vendors can define other kernel configuration values as required by their devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo does not place any special requirements concerning how the boot loader passes information to the kernel or how the HW configuration and initialization of the system is handled.&lt;br /&gt;
&lt;br /&gt;
CPU, chipset (SoC) and device vendors are assumed to implement the elementary CPU architecture/chipset/device support for the Linux kernel used in MeeGo in a standard Linux manner. This includes:&lt;br /&gt;
* HW (board) configuration&lt;br /&gt;
* Mapping the fundamental Linux kernel functionality (e.g. IRQ, DMA, GPIO, RTC and memory handling) to the HW in question&lt;br /&gt;
* Creation/modification of the necessary device drivers to support the core SoC interfaces (e.g. I2C, SPI, SDIO)&lt;br /&gt;
* Permanent memory support&lt;br /&gt;
* Debugging and tracing support&lt;br /&gt;
&lt;br /&gt;
==== Power and thermal management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, the understanding is that MeeGo in general relies on established Linux kernel frameworks and APIs for power management. Some of these frameworks and APIs may be applicable only in certain CPU architectures. In addition, the HW capabilities related to power management may vary between different HW platforms potentially meaning that the SW is assumed perform somewhat different tasks in different environments.&lt;br /&gt;
&lt;br /&gt;
The Linux power management frameworks and APIs include:&lt;br /&gt;
* CPU frequency control (support for the different voltage and frequency operating points) via the cpufreq infrastructure&lt;br /&gt;
* CPU idle state management (different levels of sleep) through the cpuidle infrastructure&lt;br /&gt;
* Clock management through the clock framework&lt;br /&gt;
* Suspend/resume&lt;br /&gt;
* Runtime power management&lt;br /&gt;
* HW voltage/current regulator control via the regulator framework&lt;br /&gt;
* PM_QOS (power management quality of service) framework for making and listening to PM QoS requests&lt;br /&gt;
&lt;br /&gt;
Whether MeeGo will have some user space SW components or framework related to power management is under discussion at the time of this writing.&lt;br /&gt;
&lt;br /&gt;
In the thermal management area, the Device State Management Entity (DSME) component in the Device Health subsystem is supposed to make thermal state management decisions in the system. The DSME has a thermal manager module that again uses other DSME modules (thermal objects) to access the actual thermal sensor information in the HW. To port this functionality to new HW, one or more DSME thermal object modules need to be implemented.&lt;br /&gt;
&lt;br /&gt;
The APIs that the thermal object modules use to access the thermal sensor information are not strictly defined by MeeGo. At device driver level, however, the preferred approach is to utilize standard Linux interfaces such as the generic thermal sysfs API or the hwmon sysfs API.&lt;br /&gt;
&lt;br /&gt;
==== Energy management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, basically the only thing that MeeGo requires from HW adaptation in the energy management area (battery charging and monitoring) is support for the Linux power supply sysfs class. Additional energy management related functionality can be handled in a vendor specific manner.&lt;br /&gt;
&lt;br /&gt;
==== Device state ====&lt;br /&gt;
&lt;br /&gt;
The DSME component participates in device state management e.g. by managing device run level, reboot and shutdown, by monitoring the device thermal state and shutting down the device in fatal thermal conditions, and by handling HW watchdog kicking activity.&lt;br /&gt;
&lt;br /&gt;
In a new HW environment, the DSME needs to be adapted to handle the watchdog kicking through the right device driver interfaces and at the right intervals. In addition, to port the DSME thermal management functionality to new HW, one or more DSME thermal object modules need to be implemented as described above in the [[#Power_and_thermal_management|''Power and thermal management'']] section.&lt;br /&gt;
&lt;br /&gt;
=== Security Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Work is ongoing in bringing platform security functionality to the MeeGo OS based on the Mandatory Access Control (MAC), Integrity Measurement Architecture (IMA) and Extended Verification Module (EVM) technologies in the Linux kernel. Maximum security can be reached if the MeeGo platform security functionality can rely on trusted platform support &amp;quot;below&amp;quot; the Linux kernel, effectively in the HW and the boot loader(s). MeeGo, however, places no strict requirements as to how the trusted platform support is implemented in MeeGo based devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo also includes the OpenSSL open source toolkit implementing general purpose cryptography functionality. Algorithms and operations supported by the OpenSSL toolkit can be accelerated in HW by using the OpenSSL engine architecture. OpenSSL also supports a cryptodev engine that uses crypto algorithms implemented in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Some devices may have a security watchdog in the HW that needs &amp;quot;kicking&amp;quot; at regular intervals to keep the device up and running. In MeeGo, watchdog kicking functionality is implemented in the Device State Management Entity (DSME) component. If security watchdog kicking is needed, the DSME needs to be adapted to handle that through the right device driver interface and at the right intervals.&lt;br /&gt;
&lt;br /&gt;
=== Device Mode Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Resource Policy ====&lt;br /&gt;
&lt;br /&gt;
The Resource (Policy) Manager component in the Device Health subsystem offers a generic framework for:&lt;br /&gt;
* Monitoring device and application events&lt;br /&gt;
* Managing policies that specify rules about what should happen in the device when certain events occur&lt;br /&gt;
* Making policy decisions when events occur (determining the needed changes in the device)&lt;br /&gt;
* Enforcing changes in the system through policy enforcement points&lt;br /&gt;
&lt;br /&gt;
The Resource Manager can be used e.g. to change the audio routing in the device when the user attaches a wired headset to the device.&lt;br /&gt;
&lt;br /&gt;
Event listening and change enforcement in the Resource Manager happens through plugin modules. Using the MeeGo OS in some new device effectively involves creating suitable Resource Manager policies and writing the necessary plugins for listening device/application events and changing device behavior accordingly. Though not pure HW adaptation, this can be considered as a form of MeeGo OS &amp;quot;device adaptation&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Mode Control Entity (MCE) ====&lt;br /&gt;
&lt;br /&gt;
The MCE component (starting from MeeGo 1.2) can be used to listen to events that have an impact to the device mode (e.g. touch screen locked vs. unlocked) and change the device mode accordingly. The MCE is used e.g. for: &lt;br /&gt;
* Listening to various keys and switches in the device (e.g. power key, volume key, camera button, slider switch)&lt;br /&gt;
* Controlling LEDs&lt;br /&gt;
* Touch screen or HW keyboard enabling/disabling depending on device state&lt;br /&gt;
* Keyboard backlight control&lt;br /&gt;
* Display state (on/off) and brightness control&lt;br /&gt;
&lt;br /&gt;
The MCE has its own plugin architecture that can be used to adapt it to different HW environments.&lt;br /&gt;
&lt;br /&gt;
=== Display and Graphics Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo visual services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view]. &lt;br /&gt;
&lt;br /&gt;
The key ingredients of the display and graphics architecture in MeeGo are the X Window System (X Server with its extensions) and the Khronos graphics APIs (OpenGL ES, OpenVG and EGL with their extensions).&lt;br /&gt;
&lt;br /&gt;
The display and graphics HW adaptation SW needs to enable the X Window System and the Khronos APIs to function on the device HW. In practice, the adaptation SW needs to have an X display/video driver (hosted inside the X Server) and libraries that implement the Khronos graphics APIs, both supporting the features and functionality required by MeeGo. Also some configuration file changes may be needed. Any additional user space and kernel space components needed for the HW adaptation are implementation dependent.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering display content to external displays, the Resource Manager component may be used to coordinate the display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Audio Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The audio architecture in MeeGo is centered around the GStreamer and PulseAudio frameworks. In addition, the Resource Manager plays a role in coordinating the audio related behavior of the device (audio routings). The audio HW adaptation SW needs to provide GStreamer elements and PulseAudio plugins that enable the GStreamer and PulseAudio client interfaces used for e.g. for audio playback, recording and volume control to work on the device. Typical required components include e.g. codec elements for GStreamer and sink/source plugins for PulseAudio.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer and PulseAudio plugins, the audio HW adaptation SW can be implemented with different technologies and APIs, including ALSA and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework as needed. Use of the ALSA framework and APIs is encouraged, however, as they allow significant reuse of components and functionality on the PulseAudio level and are already a part of the upstream Linux kernel. If ALSA is not used to implement the kernel side parts of the audio adaptation, the solution that is used instead should still be aligned with the upstream Linux kernel.&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo media services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view]. &lt;br /&gt;
&lt;br /&gt;
=== Camera Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo still imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework and the CameraBin GStreamer element. The still imaging HW adaptation SW is required to contain a GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element. Thus, the required HW adaptation interfaces are the relevant GStreamer plugin interfaces and especially the interfaces expected by the CameraBin element, in particular the GstPhotography interface.&lt;br /&gt;
&lt;br /&gt;
If HW accelerated encoders are supported, they should be also offered to the system as GStreamer elements.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
=== Video and Imaging Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo video imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework, the CameraBin GStreamer element (video recording) and the Playbin2 GStreamer element (video playback). The video imaging HW adaptation SW is required to contain:&lt;br /&gt;
:* A GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element (this is common with still imaging) &lt;br /&gt;
:* If HW accelerated codecs are supported, GStreamer elements that wrap the codecs&lt;br /&gt;
:* If HW accelerated filters are supported (e.g. video scaler, rotation engines, color conversion engines), GStreamer elements that wrap the filters&lt;br /&gt;
:* A GStreamer video sink element that offers the GStreamer X Overlay Interface. Note that if the XVideo extension is supported on the X Server side, the xvimagesink element can be used as the video sink element and no new elements are needed.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the video imaging HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering video content to external displays, the Resource Manager component may be used to coordinate the video/display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Communications Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo communications services architecture, see [http://meego.com/developers/meego-architecture/comms-services Comms Services].&lt;br /&gt;
&lt;br /&gt;
==== Cellular ====&lt;br /&gt;
&lt;br /&gt;
The cellular telephony architecture in MeeGo is centered on the oFono, PulseAudio and Telepathy frameworks. In addition, the Resource Manager plays a role in coordinating the device behavior during voice calls.&lt;br /&gt;
&lt;br /&gt;
The cellular modem HW adaptation SW must implement the following interfaces towards the MeeGo OS:&lt;br /&gt;
:* oFono modem plugin/driver API&lt;br /&gt;
:* Linux network interface for the Linux TCP/IP stack (for data communications)&lt;br /&gt;
:* Relevant PulseAudio plugin interfaces for cellular voice call audio handling&lt;br /&gt;
&lt;br /&gt;
For more detailed information about the oFono APIs, see the documentation and source code available at [http://git.kernel.org/?p=network/ofono/ofono.git;a=summary oFono git].&lt;br /&gt;
&lt;br /&gt;
==== USB ====&lt;br /&gt;
&lt;br /&gt;
The foundation of the the MeeGo USB functionality is the standard Linux USB subsystem. The Linux USB subsystem defines the USB related HW adaptation interfaces that need to be supported in MeeGo. In practice, these are kernel side interfaces between the generic USB functionality and a HW dependent USB host controller driver.&lt;br /&gt;
&lt;br /&gt;
==== WLAN ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo WLAN architecture is centered on the [http://linuxwireless.org/ Linux wireless] (IEEE-802.11) subsystem. The Linux wireless SW stack defines the WLAN HW adaptation SW interfaces that need to be used in MeeGo. In practice, the required interfaces are defined by cfg80211 for FullMAC WLAN devices and by mac80211 for SoftMAC WLAN devices. In addition, a Linux network interface needs to be supported towards the Linux TCP/IP stack.&lt;br /&gt;
&lt;br /&gt;
==== Bluetooth ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Bluetooth architecture is centered on the [http://www.bluez.org/ BlueZ] SW stack. The BlueZ SW stack defines the Bluetooth HW adaptation SW interfaces that need to be used in MeeGo. In practice, these are Linux kernel side interfaces between the generic HCI (Host Controller Interface) core and a HW specific HCI driver.&lt;br /&gt;
&lt;br /&gt;
=== Location Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The MeeGo location architecture is based on [http://http://labs.trolltech.com/page/Projects/QtMobility| QtMobility Location API].  The QtMobility 1.0 Location API provides geographic coordinates only.  The QtMobility 1.1 Location API provides geocoding and reverse geocoding, POI search, navigation, and mapping.  The 1.0 Location API is available in MeeGo 1.1.  The 1.1 or later Location API will be available in MeeGo 1.2.  The Location API uses a plugin system for implementations of the underlying backend.  MeeGo compliance requirements require support for the QtMobility Location API and thus require one or more plugins to support these APIs.  MeeGo places no restrictions as to how the plugins are implemented, however. Adaptation to location related HW may be done by manufacturers or service providers and the way how it's done is not defined by the API.&lt;br /&gt;
&lt;br /&gt;
MeeGo will use [http://www.freedesktop.org/wiki/Software/GeoClue GeoClue] as the reference location framework and the reference implementation of the Qt Mobility location API backend will be written on top of GeoClue. GeoClue defines a set of (D-Bus) APIs for accessing location services provided by service providers implemented as D-Bus services. In addition, GeoClue includes a set of service provider implementations and (at the time of this writing) an experimental master service provider that can act as a proxy between clients and the actual service providers. If a device vendor wants to take advantage of this existing functionality, the vendor can implement their location services &amp;quot;behind&amp;quot; the GeoClue APIs as GeoClue service providers. In such a case, adaptation to the location related HW would happen inside the service providers as defined by the service provider designs.&lt;br /&gt;
&lt;br /&gt;
=== Sensor Adaptation === &lt;br /&gt;
&lt;br /&gt;
The key component in the MeeGo sensor handling architecture is the Sensor Framework. The Sensor Framework uses both HW independent logical sensor plugins and HW dependent sensor adaptor plugins in its operation. The required sensor HW adaptation interfaces in MeeGo are the interfaces that the Sensor Framework and the logical sensor plugins define for the sensor adaptor plugins to implement. The sensor adaptor plugins typically communicate directly with sensor HW drivers in the Linux kernel. The interfaces that the sensor HW drivers expose to the user space are not defined by MeeGo. Sensor HW adaptation in MeeGo thus consists of adaptor plugins in the Sensor Framework and sensor HW drivers in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Note that thermal sensors are handled in a different manner as described in the [[#Power and thermal management|''Power and thermal management'']] section above.&lt;br /&gt;
&lt;br /&gt;
=== Input Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Touch ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the touch input handling path in MeeGo are the touch HW device driver, Linux kernel input subsystem, X server, X input driver, Qt and finally the MeeGo Touch Framework. Enabling touch support for some new HW requires at least the implementation of the corresponding touch HW device driver in the Linux kernel. If this driver communicates touch events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, basically the existing functionality in X server (e.g. evdev input driver) and above can be used as such. In case the kernel-to-user-space interface is non-standard, it is also possible to implement a new X input driver as a part of the touch HW adaptation.&lt;br /&gt;
&lt;br /&gt;
Multi-touch support in X requires a new version, 2.1, of the [http://cgit.freedesktop.org/~whot/inputproto/tree/XI2proto.txt?h=multitouch X Input Extension] and this also requires support from the client side, in this case Qt's multi-touch support. Once this support has been implemented throughout the SW stack, including X evdev input driver, supporting multi-touch for some new HW should require only the implementation of a touch HW device driver that implements the standard Linux multi-touch interface. This should be the case in MeeGo 1.2. &lt;br /&gt;
&lt;br /&gt;
Before 1.2, multi-touch support in MeeGo uses a special X input driver (mtev), X server multi-pointer support (MPX) and Qt multi-touch support written on top of MPX. This solution requires the touch HW device driver to expose a user-space interface that is compatible with mtev.&lt;br /&gt;
&lt;br /&gt;
==== HW keyboard ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the HW keyboard input handling path in MeeGo are the keyboard HW device driver, Linux kernel input subsystem, X server, X input driver and Qt. Enabling keyboard support for some new HW requires typically only the implementation of the corresponding keyboard HW device driver in the Linux kernel. If this driver communicates key events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, the existing functionality in X server (e.g. evdev input driver) and above should work as such. In case the kernel-to-user space interface is non-standard, it is also possible to implement a new X input driver as a part of the keyboard HW adaptation.&lt;br /&gt;
&lt;br /&gt;
==== Buttons and switches ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo includes the MCE and System SW Qt API (QmSystem) components. The MCE can be used to control the device mode and it listens to power button events and e.g. device open/close switch events via the respective device driver interfaces. The System SW Qt API on the other hand provides a Qt API to various system information, including events from various physical buttons in the device (e.g. volume button, camera button). The System SW Qt API gets the button events either by listening to the relevant device driver interfaces or through the MCE component.&lt;br /&gt;
&lt;br /&gt;
Both the MCE and the System SW Qt API components can be adapted to new devices by device vendors.&lt;br /&gt;
&lt;br /&gt;
=== Haptics and Vibra Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Haptics ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Touch Framework present (at least) in the MeeGo handset device category contains a component called Feedback Framework (meegotouch-feedback) that handles the creation of auditory and/or haptic feedback to touch events. The haptic feedback can be created e.g. with vibra motors or piezo elements. In the Feedback Framework, the different types of feedback are created by backend libraries implemented as plugins. &lt;br /&gt;
&lt;br /&gt;
The haptics related HW adaptation interface from MeeGo OS perspective is the backend plugin interface defined by the Feedback Framework. The plugins can then communicate with the HW either through some device driver interface or some intermediate SW layers (MeeGo places no restrictions as to how the plugins are implemented).&lt;br /&gt;
&lt;br /&gt;
==== Vibra (notifications/alerts) ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo (at least the handset category) will include a component called Non-Graphical Feedback Framework (NGF). This component offers the capability of playing e.g. audio, vibra or led as an indication of events such as incoming call/message, clock and calendar alarms, missed calls, unread messages etc. The NGF also integrates with the Resource Policy to decide about the available playback resources based on policy rules and the current system state.&lt;br /&gt;
&lt;br /&gt;
The actual playback of the different types of notifications is handled by NGF plugins that can be created by device vendors. The plugins communicate with the relevant HW as they see best, e.g. directly through some device driver interface or via some intermediate user space SW components. The plugin interfaces defined by NGF thus form the notification/alert vibra adaptation interface in MeeGo.&lt;br /&gt;
&lt;br /&gt;
=== Production Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Production deals with areas such as flashing, testing, tuning and certification. The current understanding is that these areas are handled in a vendor specific manner, including the adaptation.&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Noel</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/MeeGo_Porting_Guide</id>
		<title>MeeGo Porting Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/MeeGo_Porting_Guide"/>
				<updated>2011-06-24T22:41:03Z</updated>
		
		<summary type="html">&lt;p&gt;Noel: /* Building your first image */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The goal of MeeGo Porting Guide (MPG) is to provide valuable information and instructions to people who want to run MeeGo OS on their (new) HW and eventually create products based on the MeeGo OS. The MPG starts with an overview of the porting process, tools, and other related background information and then moves on to describing what the porting actually means in individual technical/functional areas.&lt;br /&gt;
&lt;br /&gt;
The porting guide is not strictly tied to any particular MeeGo OS version or device category. Instead, it tries to be general enough to cover the different device categories, as well as follow changes introduced in new MeeGo OS versions.&lt;br /&gt;
&lt;br /&gt;
Detailed porting information in the different technical areas is dependent on the respective [http://meego.com/developers/meego-architecture MeeGo architecture]. In some cases, this architecture may still be open and this is noted in the applicable sections.&lt;br /&gt;
&lt;br /&gt;
=== Feedback ===&lt;br /&gt;
&lt;br /&gt;
Contribution to these pages is open. Any MeeGo community member is free to ''improve'' these pages at any time. You can also leave feedback in the [http://lists.meego.com/listinfo/meego-porting MeeGo porting mailing list].&lt;br /&gt;
&lt;br /&gt;
== General porting information/guidelines ==&lt;br /&gt;
&lt;br /&gt;
=== MeeGo compliance ===&lt;br /&gt;
&lt;br /&gt;
Perhaps the most important piece of background information related to the MPG are the [[Quality/Compliance|MeeGo compliance requirements]]. A device that is meant to be MeeGo compliant will need to fulfill the requirements listed in the MeeGo compliance specification for the applicable device category (the first version of the specification is supposed to be available in October 2010). In short, a MeeGo compliant device will need to:&lt;br /&gt;
* Meet the minimum HW performance and component requirements for the applicable device category&lt;br /&gt;
* Include all SW components that form the MeeGo core OS&lt;br /&gt;
* Include the additional SW components required to be present in devices in the applicable device category&lt;br /&gt;
* Not break the API/ABI of any of the components coming from MeeGo&lt;br /&gt;
* Follow the MeeGo SW packaging conventions&lt;br /&gt;
&lt;br /&gt;
The compliance rules will also specify CPU architecture specific requirements concerning how MeeGo OS itself and MeeGo applications are to be compiled to different environments (instruction set used, compiler version, compiler options, etc.).&lt;br /&gt;
&lt;br /&gt;
A device vendor may include additional functionality, HW components and SW components in their devices, as long as they don't break MeeGo compliance. The vendor can also patch MeeGo OS components, if the patches don't break MeeGo compliance. A device vendor's own SW components can be either open source or closed source components, as long as they adhere to the rules set by the applicable SW licenses.&lt;br /&gt;
&lt;br /&gt;
From the MeeGo Porting Guide perspective, by defining the SW components and HW components that need to be present, the compliance requirements effectively define the minimum set of porting tasks required from a device vendor and what SW components are involved from MeeGo OS side.&lt;br /&gt;
&lt;br /&gt;
=== Porting process and tools ===&lt;br /&gt;
&lt;br /&gt;
==== Overview ====&lt;br /&gt;
&lt;br /&gt;
As long as a vendor's device is MeeGo compliant, as defined above, it is basically up to the vendor to decide how they build the SW that ends up in the device. The vendor may use their own build machinery or set up an OBS build system that is also used in MeeGo. Regardless of what the vendor's build system is, it needs to integrate with the MeeGo build infrastructure, at least to fetch the MeeGo source packages for the builds, as well as build each MeeGo component in the same way as it would be built in the MeeGo build system (such as with the same compiler and compiler options). Whatever the case, the intention in MeeGo is to use and offer an open toolset that any HW or SW vendor can use for efficient SW creation. It is likely that using the same toolset as MeeGo, will offer the easiest way to integrate vendor's own build system with the the MeeGo build infrastructure.&lt;br /&gt;
&lt;br /&gt;
The key ingredients of the MeeGo build infrastructure and toolset are:&lt;br /&gt;
* [http://meego.gitorious.org MeeGo Gitorious]&lt;br /&gt;
** A version control system for the source files of various MeeGo specific SW components and tools&lt;br /&gt;
* [http://build.meego.com MeeGo OBS]&lt;br /&gt;
** The build system that is used to build MeeGo packages (RPMs) from their sources&lt;br /&gt;
* [http://repo.meego.com MeeGo Repository]&lt;br /&gt;
** The place where the built MeeGo releases, that is where MeeGo packages and images are stored&lt;br /&gt;
* [http://wiki.meego.com/Image_Creation MeeGo Image Creator]&lt;br /&gt;
** The tool used to build MeeGo images that can be installed/flashed on HW&lt;br /&gt;
* MeeGo release tools&lt;br /&gt;
** Tools such as BOSS and REVS that are used in the creation of the MeeGo releases under repo.meego.com&lt;br /&gt;
&lt;br /&gt;
For additional information, see [[Build Infrastructure]], [[Release Infrastructure]] and [[Release Engineering]].&lt;br /&gt;
&lt;br /&gt;
For another overview of the MeeGo porting process, see [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process].&lt;br /&gt;
&lt;br /&gt;
==== Vendor's own OBS ====&lt;br /&gt;
&lt;br /&gt;
So, ultimately, when creating actual products running the MeeGo OS, the vendor may end up setting up their own OBS build system. Setting up your own OBS system may also be beneficial in earlier HW/product development phases, as it offers a flexible way to modify and build MeeGo OS to test it on the new HW. The vendor's own OBS system can link to the MeeGo OBS for handling packages that come directly from MeeGo and it can link to other sources for handling, such as closed source packages that are specific to the vendor. See [[Release_Engineering/Process#Making a product out of MeeGo Release|an overview picture of this setup]].&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Sets up their own OBS system&lt;br /&gt;
** [[User:Stskeeps/10_easy_steps_to_a_local_OBS|Instructions related to setting up an OBS system]],  [[Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE112|OBS Applicances]] [http://en.opensuse.org/openSUSE:Build_Service_private_instance Open Suse OBS Wiki].&lt;br /&gt;
* Creates projects under the their own OBS for their own components&lt;br /&gt;
* Links their own OBS to the MeeGo OBS for MeeGo components&lt;br /&gt;
* May have trial patches to MeeGo components in their own OBS&lt;br /&gt;
** NOTE. Eventually all patches to MeeGo components required in a final MeeGo based product ''should'' be pushed to MeeGo.com. However, this is not an absolute must requirement, as long as the MeeGo compliance requirements and applicable SW license rules are fulfilled. &lt;br /&gt;
** See [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below&lt;br /&gt;
* Needs to set up the necessary machinery to create releases and images from the packages built with OBS&lt;br /&gt;
** This machinery can be based on the toolset used in MeeGo (see above)&lt;br /&gt;
&lt;br /&gt;
==== Working under MeeGo.com ====&lt;br /&gt;
&lt;br /&gt;
Another way of porting MeeGo to some new HW is to get the new HW accepted as one MeeGo reference HW and have the MeeGo build machinery create builds for the reference HW as a part of the normal MeeGo release building cycle (see [[Release Engineering/Release Timeline|Release Timeline]] and [[Release Engineering/Process|Release Process]]). This setup can also include QA support for the reference HW on the MeeGo side (see [[Quality]]). At the time of this writing, the actual process of getting new reference HW to MeeGo is still somewhat unclear. In any case, this model requires active participation from the vendor in MeeGo work in general and especially in supporting their reference HW in MeeGo.&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Creates a device/platform development project under the MeeGo OBS for their components. The open source components would then get submitted to MeeGo Trunk:Testing and get reviewed like any other MeeGo component for inclusion.&lt;br /&gt;
** Note that it is also possible to have closed source binary components in the MeeGo OBS to be included in the MeeGo builds for some reference HW. These are submitted to the Trunk:non-oss repository. Licensing is usually required to at least include redistributability, as the components cannot be mirrored from or hosted at repo.meego.com otherwise. It is not possible to have components within Trunk:Testing require closed source dependencies.&lt;br /&gt;
* Pushes patches to other MeeGo components at MeeGo.com as necessary (see [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below)&lt;br /&gt;
* Creates (or supports the creation of) a MIC kickstart file for building images for their reference HW&lt;br /&gt;
* As necessary, supports adding support for their reference HW and SW components in the MeeGo build and release infrastructure tools&lt;br /&gt;
&lt;br /&gt;
==== Trials ====&lt;br /&gt;
&lt;br /&gt;
A lightweight but also more limited &amp;quot;try it out&amp;quot; alternative to the above processes is discussed below.&lt;br /&gt;
&lt;br /&gt;
===== Initial bring-up attempt =====&lt;br /&gt;
&lt;br /&gt;
* Grab the already built root filesystem / image for a MeeGo reference device that's the closest to your target. For ARMv7, this is typically the Nokia N900 handset image. For Atom, this could be netbook image or handset image.&lt;br /&gt;
* Build a Linux kernel for your device and install the modules into /lib/modules.&lt;br /&gt;
* Boot the root filesystem and modify the configuration and drop in components to bring up the device to UX. Note down the things you had to modify or add, as this will be input for your porting work.&lt;br /&gt;
&lt;br /&gt;
===== Building your first image =====&lt;br /&gt;
&lt;br /&gt;
The second step to a proper hardware adaptation is making sure you can build your own image. Because we based our work before on a reference device image, it makes sense to try to build this image first. MeeGo images are constructed on the basis of so called 'kickstart files', which describe the intended contents of an image. &lt;br /&gt;
&lt;br /&gt;
* Install the MeeGo Image Creator tool (MIC)&lt;br /&gt;
* Download the kickstart file (.ks) from the same directory you found your reference device image. &lt;br /&gt;
* Create a image using mic-image-creator (should be elaborated).&lt;br /&gt;
* Test out your freshly baked image as in the previous step.&lt;br /&gt;
&lt;br /&gt;
===== Building your port's first reproduciable image =====&lt;br /&gt;
&lt;br /&gt;
* Download the MeeGo kernel, possibly modifying the kernel with additional patches (including new device drivers) and building the kernel (see [[#Getting_new_chipset_support_to_the_MeeGo_kernel|''Getting new chipset support to the MeeGo kernel'']] below). &lt;br /&gt;
* Add the repository containing your kernel package to the kickstart file (to be elaborated)&lt;br /&gt;
* Remove parts of the kickstart file specific to the reference device.&lt;br /&gt;
* Add a mention of your kernel package in the %packages section.&lt;br /&gt;
* Build packages or include shell scripts in %post section of kickstart file that adds/modifies configuration fitting your device.&lt;br /&gt;
&lt;br /&gt;
A detailed description of a variation of this model can be found from [[ARM/Meego on Beagleboard from scratch|here]] (Better description needed).&lt;br /&gt;
&lt;br /&gt;
==== Getting new chipset support to the MeeGo kernel ====&lt;br /&gt;
&lt;br /&gt;
See [[How-to: getting new chipset support to the MeeGo kernel]] for more detailed information about how to work with the MeeGo kernel and make it support new HW.&lt;br /&gt;
&lt;br /&gt;
=== Upstream projects, MeeGo, products and patches ===&lt;br /&gt;
&lt;br /&gt;
When building a product based on MeeGo, the product vendor will typically augment the MeeGo OS with their own SW components as well as make fixes and adjustments to the MeeGo OS code (in the limits set by the compliance rules). While vendors can manage their own SW components as they wish, the strong preference is that any changes made to the MeeGo OS SW components are delivered as patches primarily to the respective upstream projects or secondarily to MeeGo.com. In this way vendors can relieve themselves from the burden of managing a potentially big patch set on top of MeeGo OS and also verify the quality and safety of their patches. Having the patches in upstream projects again lessens the patch set management load at MeeGo.com.&lt;br /&gt;
&lt;br /&gt;
For information about pushing patches to MeeGo, see [http://meego.com/about/contribution-guidelines Contribution Guidelines] and [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process] (especially section ''How Do Patches Get Integrated and Accepted?'') and [http://meego.gitorious.org/meego-os-base/kernel-source/blobs/master/README.workflow Kernel workflow].&lt;br /&gt;
&lt;br /&gt;
=== Adaptation subsystems and interfaces ===&lt;br /&gt;
&lt;br /&gt;
In the MeeGo architecture model (see e.g. [http://meego.com/developers/meego-architecture/meego-architecture-domain-view MeeGo Architecture Domain View]), adaptation is represented as adaptation subsystems. SW components in the adaptation subsystem ''realizations'' do things that are expected by the OS and communicate with the OS through interfaces defined by the OS.&lt;br /&gt;
 &lt;br /&gt;
The key goal in the sections below is to identify the interface(s) that the adaptation SW needs to implement/use in order to communicate with the OS in the required manner. Behind these interfaces the adaptation SW can basically handle the required functionality as it sees best. In some cases, however, there may also be some preferred way of implementing the adaptation.&lt;br /&gt;
&lt;br /&gt;
In some areas, the adaptation work may consist of just writing a suitable Linux device driver for the HW in question. In some other areas, the adaptation work may consist of writing one or more device drivers as well as one or more user space components (e.g. plugins to some user space SW frameworks). Various configuration file changes may also be required as a part of the adaptation work.&lt;br /&gt;
&lt;br /&gt;
== Porting by adaptation subsystems ==&lt;br /&gt;
&lt;br /&gt;
=== System Core Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Boot ====&lt;br /&gt;
&lt;br /&gt;
MeeGo places no restrictions as to what SW components are used to handle the pre-OS boot phases in a MeeGo compliant device. Thus, vendors are free to choose e.g. the boot loader as they see fit. Note however that full utilization of the MeeGo platform security requires that the pre-OS boot phases form a trusted boot chain that ultimately builds on chipset-level security support.&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, MeeGo does not define anything special with regard to what information the boot loader is expected to pass to the Linux kernel e.g. via the kernel command line.&lt;br /&gt;
&lt;br /&gt;
The kernel-level boot phases can be tailored as necessary to the specific CPU, chipset or device in a standard Linux manner.&lt;br /&gt;
&lt;br /&gt;
The post-kernel boot phases (startup scripts) can be tailored by device vendors as necessary for their devices in the limits set by MeeGo compliance requirements (certain SW components need to be present in the system).&lt;br /&gt;
&lt;br /&gt;
==== Kernel fundamentals ====&lt;br /&gt;
&lt;br /&gt;
Regarding the Linux kernel, each MeeGo release defines the kernel version to be used and a set of patches on top of that. In addition, the Linux kernel used in MeeGo compliant devices is assumed to have been built with a set of fixed build-time configuration values that are not allowed to be changed. In addition to the fixed values, device vendors can define other kernel configuration values as required by their devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo does not place any special requirements concerning how the boot loader passes information to the kernel or how the HW configuration and initialization of the system is handled.&lt;br /&gt;
&lt;br /&gt;
CPU, chipset (SoC) and device vendors are assumed to implement the elementary CPU architecture/chipset/device support for the Linux kernel used in MeeGo in a standard Linux manner. This includes:&lt;br /&gt;
* HW (board) configuration&lt;br /&gt;
* Mapping the fundamental Linux kernel functionality (e.g. IRQ, DMA, GPIO, RTC and memory handling) to the HW in question&lt;br /&gt;
* Creation/modification of the necessary device drivers to support the core SoC interfaces (e.g. I2C, SPI, SDIO)&lt;br /&gt;
* Permanent memory support&lt;br /&gt;
* Debugging and tracing support&lt;br /&gt;
&lt;br /&gt;
==== Power and thermal management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, the understanding is that MeeGo in general relies on established Linux kernel frameworks and APIs for power management. Some of these frameworks and APIs may be applicable only in certain CPU architectures. In addition, the HW capabilities related to power management may vary between different HW platforms potentially meaning that the SW is assumed perform somewhat different tasks in different environments.&lt;br /&gt;
&lt;br /&gt;
The Linux power management frameworks and APIs include:&lt;br /&gt;
* CPU frequency control (support for the different voltage and frequency operating points) via the cpufreq infrastructure&lt;br /&gt;
* CPU idle state management (different levels of sleep) through the cpuidle infrastructure&lt;br /&gt;
* Clock management through the clock framework&lt;br /&gt;
* Suspend/resume&lt;br /&gt;
* Runtime power management&lt;br /&gt;
* HW voltage/current regulator control via the regulator framework&lt;br /&gt;
* PM_QOS (power management quality of service) framework for making and listening to PM QoS requests&lt;br /&gt;
&lt;br /&gt;
Whether MeeGo will have some user space SW components or framework related to power management is under discussion at the time of this writing.&lt;br /&gt;
&lt;br /&gt;
In the thermal management area, the Device State Management Entity (DSME) component in the Device Health subsystem is supposed to make thermal state management decisions in the system. The DSME has a thermal manager module that again uses other DSME modules (thermal objects) to access the actual thermal sensor information in the HW. To port this functionality to new HW, one or more DSME thermal object modules need to be implemented.&lt;br /&gt;
&lt;br /&gt;
The APIs that the thermal object modules use to access the thermal sensor information are not strictly defined by MeeGo. At device driver level, however, the preferred approach is to utilize standard Linux interfaces such as the generic thermal sysfs API or the hwmon sysfs API.&lt;br /&gt;
&lt;br /&gt;
==== Energy management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, basically the only thing that MeeGo requires from HW adaptation in the energy management area (battery charging and monitoring) is support for the Linux power supply sysfs class. Additional energy management related functionality can be handled in a vendor specific manner.&lt;br /&gt;
&lt;br /&gt;
==== Device state ====&lt;br /&gt;
&lt;br /&gt;
The DSME component participates in device state management e.g. by managing device run level, reboot and shutdown, by monitoring the device thermal state and shutting down the device in fatal thermal conditions, and by handling HW watchdog kicking activity.&lt;br /&gt;
&lt;br /&gt;
In a new HW environment, the DSME needs to be adapted to handle the watchdog kicking through the right device driver interfaces and at the right intervals. In addition, to port the DSME thermal management functionality to new HW, one or more DSME thermal object modules need to be implemented as described above in the [[#Power_and_thermal_management|''Power and thermal management'']] section.&lt;br /&gt;
&lt;br /&gt;
=== Security Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Work is ongoing in bringing platform security functionality to the MeeGo OS based on the Mandatory Access Control (MAC), Integrity Measurement Architecture (IMA) and Extended Verification Module (EVM) technologies in the Linux kernel. Maximum security can be reached if the MeeGo platform security functionality can rely on trusted platform support &amp;quot;below&amp;quot; the Linux kernel, effectively in the HW and the boot loader(s). MeeGo, however, places no strict requirements as to how the trusted platform support is implemented in MeeGo based devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo also includes the OpenSSL open source toolkit implementing general purpose cryptography functionality. Algorithms and operations supported by the OpenSSL toolkit can be accelerated in HW by using the OpenSSL engine architecture. OpenSSL also supports a cryptodev engine that uses crypto algorithms implemented in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Some devices may have a security watchdog in the HW that needs &amp;quot;kicking&amp;quot; at regular intervals to keep the device up and running. In MeeGo, watchdog kicking functionality is implemented in the Device State Management Entity (DSME) component. If security watchdog kicking is needed, the DSME needs to be adapted to handle that through the right device driver interface and at the right intervals.&lt;br /&gt;
&lt;br /&gt;
=== Device Mode Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Resource Policy ====&lt;br /&gt;
&lt;br /&gt;
The Resource (Policy) Manager component in the Device Health subsystem offers a generic framework for:&lt;br /&gt;
* Monitoring device and application events&lt;br /&gt;
* Managing policies that specify rules about what should happen in the device when certain events occur&lt;br /&gt;
* Making policy decisions when events occur (determining the needed changes in the device)&lt;br /&gt;
* Enforcing changes in the system through policy enforcement points&lt;br /&gt;
&lt;br /&gt;
The Resource Manager can be used e.g. to change the audio routing in the device when the user attaches a wired headset to the device.&lt;br /&gt;
&lt;br /&gt;
Event listening and change enforcement in the Resource Manager happens through plugin modules. Using the MeeGo OS in some new device effectively involves creating suitable Resource Manager policies and writing the necessary plugins for listening device/application events and changing device behavior accordingly. Though not pure HW adaptation, this can be considered as a form of MeeGo OS &amp;quot;device adaptation&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Mode Control Entity (MCE) ====&lt;br /&gt;
&lt;br /&gt;
The MCE component (starting from MeeGo 1.2) can be used to listen to events that have an impact to the device mode (e.g. touch screen locked vs. unlocked) and change the device mode accordingly. The MCE is used e.g. for: &lt;br /&gt;
* Listening to various keys and switches in the device (e.g. power key, volume key, camera button, slider switch)&lt;br /&gt;
* Controlling LEDs&lt;br /&gt;
* Touch screen or HW keyboard enabling/disabling depending on device state&lt;br /&gt;
* Keyboard backlight control&lt;br /&gt;
* Display state (on/off) and brightness control&lt;br /&gt;
&lt;br /&gt;
The MCE has its own plugin architecture that can be used to adapt it to different HW environments.&lt;br /&gt;
&lt;br /&gt;
=== Display and Graphics Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo visual services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view]. &lt;br /&gt;
&lt;br /&gt;
The key ingredients of the display and graphics architecture in MeeGo are the X Window System (X Server with its extensions) and the Khronos graphics APIs (OpenGL ES, OpenVG and EGL with their extensions).&lt;br /&gt;
&lt;br /&gt;
The display and graphics HW adaptation SW needs to enable the X Window System and the Khronos APIs to function on the device HW. In practice, the adaptation SW needs to have an X display/video driver (hosted inside the X Server) and libraries that implement the Khronos graphics APIs, both supporting the features and functionality required by MeeGo. Also some configuration file changes may be needed. Any additional user space and kernel space components needed for the HW adaptation are implementation dependent.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering display content to external displays, the Resource Manager component may be used to coordinate the display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Audio Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The audio architecture in MeeGo is centered around the GStreamer and PulseAudio frameworks. In addition, the Resource Manager plays a role in coordinating the audio related behavior of the device (audio routings). The audio HW adaptation SW needs to provide GStreamer elements and PulseAudio plugins that enable the GStreamer and PulseAudio client interfaces used for e.g. for audio playback, recording and volume control to work on the device. Typical required components include e.g. codec elements for GStreamer and sink/source plugins for PulseAudio.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer and PulseAudio plugins, the audio HW adaptation SW can be implemented with different technologies and APIs, including ALSA and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework as needed. Use of the ALSA framework and APIs is encouraged, however, as they allow significant reuse of components and functionality on the PulseAudio level and are already a part of the upstream Linux kernel. If ALSA is not used to implement the kernel side parts of the audio adaptation, the solution that is used instead should still be aligned with the upstream Linux kernel.&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo media services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view]. &lt;br /&gt;
&lt;br /&gt;
=== Camera Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo still imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework and the CameraBin GStreamer element. The still imaging HW adaptation SW is required to contain a GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element. Thus, the required HW adaptation interfaces are the relevant GStreamer plugin interfaces and especially the interfaces expected by the CameraBin element, in particular the GstPhotography interface.&lt;br /&gt;
&lt;br /&gt;
If HW accelerated encoders are supported, they should be also offered to the system as GStreamer elements.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
=== Video and Imaging Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo video imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework, the CameraBin GStreamer element (video recording) and the Playbin2 GStreamer element (video playback). The video imaging HW adaptation SW is required to contain:&lt;br /&gt;
:* A GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element (this is common with still imaging) &lt;br /&gt;
:* If HW accelerated codecs are supported, GStreamer elements that wrap the codecs&lt;br /&gt;
:* If HW accelerated filters are supported (e.g. video scaler, rotation engines, color conversion engines), GStreamer elements that wrap the filters&lt;br /&gt;
:* A GStreamer video sink element that offers the GStreamer X Overlay Interface. Note that if the XVideo extension is supported on the X Server side, the xvimagesink element can be used as the video sink element and no new elements are needed.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the video imaging HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering video content to external displays, the Resource Manager component may be used to coordinate the video/display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Communications Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo communications services architecture, see [http://meego.com/developers/meego-architecture/comms-services Comms Services].&lt;br /&gt;
&lt;br /&gt;
==== Cellular ====&lt;br /&gt;
&lt;br /&gt;
The cellular telephony architecture in MeeGo is centered on the oFono, PulseAudio and Telepathy frameworks. In addition, the Resource Manager plays a role in coordinating the device behavior during voice calls.&lt;br /&gt;
&lt;br /&gt;
The cellular modem HW adaptation SW must implement the following interfaces towards the MeeGo OS:&lt;br /&gt;
:* oFono modem plugin/driver API&lt;br /&gt;
:* Linux network interface for the Linux TCP/IP stack (for data communications)&lt;br /&gt;
:* Relevant PulseAudio plugin interfaces for cellular voice call audio handling&lt;br /&gt;
&lt;br /&gt;
For more detailed information about the oFono APIs, see the documentation and source code available at [http://git.kernel.org/?p=network/ofono/ofono.git;a=summary oFono git].&lt;br /&gt;
&lt;br /&gt;
==== USB ====&lt;br /&gt;
&lt;br /&gt;
The foundation of the the MeeGo USB functionality is the standard Linux USB subsystem. The Linux USB subsystem defines the USB related HW adaptation interfaces that need to be supported in MeeGo. In practice, these are kernel side interfaces between the generic USB functionality and a HW dependent USB host controller driver.&lt;br /&gt;
&lt;br /&gt;
==== WLAN ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo WLAN architecture is centered on the [http://linuxwireless.org/ Linux wireless] (IEEE-802.11) subsystem. The Linux wireless SW stack defines the WLAN HW adaptation SW interfaces that need to be used in MeeGo. In practice, the required interfaces are defined by cfg80211 for FullMAC WLAN devices and by mac80211 for SoftMAC WLAN devices. In addition, a Linux network interface needs to be supported towards the Linux TCP/IP stack.&lt;br /&gt;
&lt;br /&gt;
==== Bluetooth ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Bluetooth architecture is centered on the [http://www.bluez.org/ BlueZ] SW stack. The BlueZ SW stack defines the Bluetooth HW adaptation SW interfaces that need to be used in MeeGo. In practice, these are Linux kernel side interfaces between the generic HCI (Host Controller Interface) core and a HW specific HCI driver.&lt;br /&gt;
&lt;br /&gt;
=== Location Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The MeeGo location architecture is based on [http://http://labs.trolltech.com/page/Projects/QtMobility| QtMobility Location API].  The QtMobility 1.0 Location API provides geographic coordinates only.  The QtMobility 1.1 Location API provides geocoding and reverse geocoding, POI search, navigation, and mapping.  The 1.0 Location API is available in MeeGo 1.1.  The 1.1 or later Location API will be available in MeeGo 1.2.  The Location API uses a plugin system for implementations of the underlying backend.  MeeGo compliance requirements require support for the QtMobility Location API and thus require one or more plugins to support these APIs.  MeeGo places no restrictions as to how the plugins are implemented, however. Adaptation to location related HW may be done by manufacturers or service providers and the way how it's done is not defined by the API.&lt;br /&gt;
&lt;br /&gt;
MeeGo will use [http://www.freedesktop.org/wiki/Software/GeoClue GeoClue] as the reference location framework and the reference implementation of the Qt Mobility location API backend will be written on top of GeoClue. GeoClue defines a set of (D-Bus) APIs for accessing location services provided by service providers implemented as D-Bus services. In addition, GeoClue includes a set of service provider implementations and (at the time of this writing) an experimental master service provider that can act as a proxy between clients and the actual service providers. If a device vendor wants to take advantage of this existing functionality, the vendor can implement their location services &amp;quot;behind&amp;quot; the GeoClue APIs as GeoClue service providers. In such a case, adaptation to the location related HW would happen inside the service providers as defined by the service provider designs.&lt;br /&gt;
&lt;br /&gt;
=== Sensor Adaptation === &lt;br /&gt;
&lt;br /&gt;
The key component in the MeeGo sensor handling architecture is the Sensor Framework. The Sensor Framework uses both HW independent logical sensor plugins and HW dependent sensor adaptor plugins in its operation. The required sensor HW adaptation interfaces in MeeGo are the interfaces that the Sensor Framework and the logical sensor plugins define for the sensor adaptor plugins to implement. The sensor adaptor plugins typically communicate directly with sensor HW drivers in the Linux kernel. The interfaces that the sensor HW drivers expose to the user space are not defined by MeeGo. Sensor HW adaptation in MeeGo thus consists of adaptor plugins in the Sensor Framework and sensor HW drivers in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Note that thermal sensors are handled in a different manner as described in the [[#Power and thermal management|''Power and thermal management'']] section above.&lt;br /&gt;
&lt;br /&gt;
=== Input Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Touch ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the touch input handling path in MeeGo are the touch HW device driver, Linux kernel input subsystem, X server, X input driver, Qt and finally the MeeGo Touch Framework. Enabling touch support for some new HW requires at least the implementation of the corresponding touch HW device driver in the Linux kernel. If this driver communicates touch events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, basically the existing functionality in X server (e.g. evdev input driver) and above can be used as such. In case the kernel-to-user-space interface is non-standard, it is also possible to implement a new X input driver as a part of the touch HW adaptation.&lt;br /&gt;
&lt;br /&gt;
Multi-touch support in X requires a new version, 2.1, of the [http://cgit.freedesktop.org/~whot/inputproto/tree/XI2proto.txt?h=multitouch X Input Extension] and this also requires support from the client side, in this case Qt's multi-touch support. Once this support has been implemented throughout the SW stack, including X evdev input driver, supporting multi-touch for some new HW should require only the implementation of a touch HW device driver that implements the standard Linux multi-touch interface. This should be the case in MeeGo 1.2. &lt;br /&gt;
&lt;br /&gt;
Before 1.2, multi-touch support in MeeGo uses a special X input driver (mtev), X server multi-pointer support (MPX) and Qt multi-touch support written on top of MPX. This solution requires the touch HW device driver to expose a user-space interface that is compatible with mtev.&lt;br /&gt;
&lt;br /&gt;
==== HW keyboard ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the HW keyboard input handling path in MeeGo are the keyboard HW device driver, Linux kernel input subsystem, X server, X input driver and Qt. Enabling keyboard support for some new HW requires typically only the implementation of the corresponding keyboard HW device driver in the Linux kernel. If this driver communicates key events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, the existing functionality in X server (e.g. evdev input driver) and above should work as such. In case the kernel-to-user space interface is non-standard, it is also possible to implement a new X input driver as a part of the keyboard HW adaptation.&lt;br /&gt;
&lt;br /&gt;
==== Buttons and switches ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo includes the MCE and System SW Qt API (QmSystem) components. The MCE can be used to control the device mode and it listens to power button events and e.g. device open/close switch events via the respective device driver interfaces. The System SW Qt API on the other hand provides a Qt API to various system information, including events from various physical buttons in the device (e.g. volume button, camera button). The System SW Qt API gets the button events either by listening to the relevant device driver interfaces or through the MCE component.&lt;br /&gt;
&lt;br /&gt;
Both the MCE and the System SW Qt API components can be adapted to new devices by device vendors.&lt;br /&gt;
&lt;br /&gt;
=== Haptics and Vibra Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Haptics ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Touch Framework present (at least) in the MeeGo handset device category contains a component called Feedback Framework (meegotouch-feedback) that handles the creation of auditory and/or haptic feedback to touch events. The haptic feedback can be created e.g. with vibra motors or piezo elements. In the Feedback Framework, the different types of feedback are created by backend libraries implemented as plugins. &lt;br /&gt;
&lt;br /&gt;
The haptics related HW adaptation interface from MeeGo OS perspective is the backend plugin interface defined by the Feedback Framework. The plugins can then communicate with the HW either through some device driver interface or some intermediate SW layers (MeeGo places no restrictions as to how the plugins are implemented).&lt;br /&gt;
&lt;br /&gt;
==== Vibra (notifications/alerts) ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo (at least the handset category) will include a component called Non-Graphical Feedback Framework (NGF). This component offers the capability of playing e.g. audio, vibra or led as an indication of events such as incoming call/message, clock and calendar alarms, missed calls, unread messages etc. The NGF also integrates with the Resource Policy to decide about the available playback resources based on policy rules and the current system state.&lt;br /&gt;
&lt;br /&gt;
The actual playback of the different types of notifications is handled by NGF plugins that can be created by device vendors. The plugins communicate with the relevant HW as they see best, e.g. directly through some device driver interface or via some intermediate user space SW components. The plugin interfaces defined by NGF thus form the notification/alert vibra adaptation interface in MeeGo.&lt;br /&gt;
&lt;br /&gt;
=== Production Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Production deals with areas such as flashing, testing, tuning and certification. The current understanding is that these areas are handled in a vendor specific manner, including the adaptation.&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Noel</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/MeeGo_Porting_Guide</id>
		<title>MeeGo Porting Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/MeeGo_Porting_Guide"/>
				<updated>2011-06-24T22:39:16Z</updated>
		
		<summary type="html">&lt;p&gt;Noel: /* Initial bring-up attempt */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The goal of MeeGo Porting Guide (MPG) is to provide valuable information and instructions to people who want to run MeeGo OS on their (new) HW and eventually create products based on the MeeGo OS. The MPG starts with an overview of the porting process, tools, and other related background information and then moves on to describing what the porting actually means in individual technical/functional areas.&lt;br /&gt;
&lt;br /&gt;
The porting guide is not strictly tied to any particular MeeGo OS version or device category. Instead, it tries to be general enough to cover the different device categories, as well as follow changes introduced in new MeeGo OS versions.&lt;br /&gt;
&lt;br /&gt;
Detailed porting information in the different technical areas is dependent on the respective [http://meego.com/developers/meego-architecture MeeGo architecture]. In some cases, this architecture may still be open and this is noted in the applicable sections.&lt;br /&gt;
&lt;br /&gt;
=== Feedback ===&lt;br /&gt;
&lt;br /&gt;
Contribution to these pages is open. Any MeeGo community member is free to ''improve'' these pages at any time. You can also leave feedback in the [http://lists.meego.com/listinfo/meego-porting MeeGo porting mailing list].&lt;br /&gt;
&lt;br /&gt;
== General porting information/guidelines ==&lt;br /&gt;
&lt;br /&gt;
=== MeeGo compliance ===&lt;br /&gt;
&lt;br /&gt;
Perhaps the most important piece of background information related to the MPG are the [[Quality/Compliance|MeeGo compliance requirements]]. A device that is meant to be MeeGo compliant will need to fulfill the requirements listed in the MeeGo compliance specification for the applicable device category (the first version of the specification is supposed to be available in October 2010). In short, a MeeGo compliant device will need to:&lt;br /&gt;
* Meet the minimum HW performance and component requirements for the applicable device category&lt;br /&gt;
* Include all SW components that form the MeeGo core OS&lt;br /&gt;
* Include the additional SW components required to be present in devices in the applicable device category&lt;br /&gt;
* Not break the API/ABI of any of the components coming from MeeGo&lt;br /&gt;
* Follow the MeeGo SW packaging conventions&lt;br /&gt;
&lt;br /&gt;
The compliance rules will also specify CPU architecture specific requirements concerning how MeeGo OS itself and MeeGo applications are to be compiled to different environments (instruction set used, compiler version, compiler options, etc.).&lt;br /&gt;
&lt;br /&gt;
A device vendor may include additional functionality, HW components and SW components in their devices, as long as they don't break MeeGo compliance. The vendor can also patch MeeGo OS components, if the patches don't break MeeGo compliance. A device vendor's own SW components can be either open source or closed source components, as long as they adhere to the rules set by the applicable SW licenses.&lt;br /&gt;
&lt;br /&gt;
From the MeeGo Porting Guide perspective, by defining the SW components and HW components that need to be present, the compliance requirements effectively define the minimum set of porting tasks required from a device vendor and what SW components are involved from MeeGo OS side.&lt;br /&gt;
&lt;br /&gt;
=== Porting process and tools ===&lt;br /&gt;
&lt;br /&gt;
==== Overview ====&lt;br /&gt;
&lt;br /&gt;
As long as a vendor's device is MeeGo compliant, as defined above, it is basically up to the vendor to decide how they build the SW that ends up in the device. The vendor may use their own build machinery or set up an OBS build system that is also used in MeeGo. Regardless of what the vendor's build system is, it needs to integrate with the MeeGo build infrastructure, at least to fetch the MeeGo source packages for the builds, as well as build each MeeGo component in the same way as it would be built in the MeeGo build system (such as with the same compiler and compiler options). Whatever the case, the intention in MeeGo is to use and offer an open toolset that any HW or SW vendor can use for efficient SW creation. It is likely that using the same toolset as MeeGo, will offer the easiest way to integrate vendor's own build system with the the MeeGo build infrastructure.&lt;br /&gt;
&lt;br /&gt;
The key ingredients of the MeeGo build infrastructure and toolset are:&lt;br /&gt;
* [http://meego.gitorious.org MeeGo Gitorious]&lt;br /&gt;
** A version control system for the source files of various MeeGo specific SW components and tools&lt;br /&gt;
* [http://build.meego.com MeeGo OBS]&lt;br /&gt;
** The build system that is used to build MeeGo packages (RPMs) from their sources&lt;br /&gt;
* [http://repo.meego.com MeeGo Repository]&lt;br /&gt;
** The place where the built MeeGo releases, that is where MeeGo packages and images are stored&lt;br /&gt;
* [http://wiki.meego.com/Image_Creation MeeGo Image Creator]&lt;br /&gt;
** The tool used to build MeeGo images that can be installed/flashed on HW&lt;br /&gt;
* MeeGo release tools&lt;br /&gt;
** Tools such as BOSS and REVS that are used in the creation of the MeeGo releases under repo.meego.com&lt;br /&gt;
&lt;br /&gt;
For additional information, see [[Build Infrastructure]], [[Release Infrastructure]] and [[Release Engineering]].&lt;br /&gt;
&lt;br /&gt;
For another overview of the MeeGo porting process, see [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process].&lt;br /&gt;
&lt;br /&gt;
==== Vendor's own OBS ====&lt;br /&gt;
&lt;br /&gt;
So, ultimately, when creating actual products running the MeeGo OS, the vendor may end up setting up their own OBS build system. Setting up your own OBS system may also be beneficial in earlier HW/product development phases, as it offers a flexible way to modify and build MeeGo OS to test it on the new HW. The vendor's own OBS system can link to the MeeGo OBS for handling packages that come directly from MeeGo and it can link to other sources for handling, such as closed source packages that are specific to the vendor. See [[Release_Engineering/Process#Making a product out of MeeGo Release|an overview picture of this setup]].&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Sets up their own OBS system&lt;br /&gt;
** [[User:Stskeeps/10_easy_steps_to_a_local_OBS|Instructions related to setting up an OBS system]],  [[Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE112|OBS Applicances]] [http://en.opensuse.org/openSUSE:Build_Service_private_instance Open Suse OBS Wiki].&lt;br /&gt;
* Creates projects under the their own OBS for their own components&lt;br /&gt;
* Links their own OBS to the MeeGo OBS for MeeGo components&lt;br /&gt;
* May have trial patches to MeeGo components in their own OBS&lt;br /&gt;
** NOTE. Eventually all patches to MeeGo components required in a final MeeGo based product ''should'' be pushed to MeeGo.com. However, this is not an absolute must requirement, as long as the MeeGo compliance requirements and applicable SW license rules are fulfilled. &lt;br /&gt;
** See [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below&lt;br /&gt;
* Needs to set up the necessary machinery to create releases and images from the packages built with OBS&lt;br /&gt;
** This machinery can be based on the toolset used in MeeGo (see above)&lt;br /&gt;
&lt;br /&gt;
==== Working under MeeGo.com ====&lt;br /&gt;
&lt;br /&gt;
Another way of porting MeeGo to some new HW is to get the new HW accepted as one MeeGo reference HW and have the MeeGo build machinery create builds for the reference HW as a part of the normal MeeGo release building cycle (see [[Release Engineering/Release Timeline|Release Timeline]] and [[Release Engineering/Process|Release Process]]). This setup can also include QA support for the reference HW on the MeeGo side (see [[Quality]]). At the time of this writing, the actual process of getting new reference HW to MeeGo is still somewhat unclear. In any case, this model requires active participation from the vendor in MeeGo work in general and especially in supporting their reference HW in MeeGo.&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Creates a device/platform development project under the MeeGo OBS for their components. The open source components would then get submitted to MeeGo Trunk:Testing and get reviewed like any other MeeGo component for inclusion.&lt;br /&gt;
** Note that it is also possible to have closed source binary components in the MeeGo OBS to be included in the MeeGo builds for some reference HW. These are submitted to the Trunk:non-oss repository. Licensing is usually required to at least include redistributability, as the components cannot be mirrored from or hosted at repo.meego.com otherwise. It is not possible to have components within Trunk:Testing require closed source dependencies.&lt;br /&gt;
* Pushes patches to other MeeGo components at MeeGo.com as necessary (see [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below)&lt;br /&gt;
* Creates (or supports the creation of) a MIC kickstart file for building images for their reference HW&lt;br /&gt;
* As necessary, supports adding support for their reference HW and SW components in the MeeGo build and release infrastructure tools&lt;br /&gt;
&lt;br /&gt;
==== Trials ====&lt;br /&gt;
&lt;br /&gt;
A lightweight but also more limited &amp;quot;try it out&amp;quot; alternative to the above processes is discussed below.&lt;br /&gt;
&lt;br /&gt;
===== Initial bring-up attempt =====&lt;br /&gt;
&lt;br /&gt;
* Grab the already built root filesystem / image for a MeeGo reference device that's the closest to your target. For ARMv7, this is typically the Nokia N900 handset image. For Atom, this could be netbook image or handset image.&lt;br /&gt;
* Build a Linux kernel for your device and install the modules into /lib/modules.&lt;br /&gt;
* Boot the root filesystem and modify the configuration and drop in components to bring up the device to UX. Note down the things you had to modify or add, as this will be input for your porting work.&lt;br /&gt;
&lt;br /&gt;
===== Building your first image =====&lt;br /&gt;
&lt;br /&gt;
The second step to a proper hardware adaptation is making sure you can build your own image. Since we based our work before on a reference device image, it makes sense to try to build this image first. MeeGo images are constructed on the basis of so called 'kickstart files' which describe the intended contents of a image. &lt;br /&gt;
&lt;br /&gt;
* Install the MeeGo Image Creator tool (MIC)&lt;br /&gt;
* Download the kickstart file (.ks) from the same directory you found your reference device image. &lt;br /&gt;
* Create a image using mic-image-creator (should be elaborated).&lt;br /&gt;
* Test out your freshly baked image as in previous step.&lt;br /&gt;
&lt;br /&gt;
===== Building your port's first reproduciable image =====&lt;br /&gt;
&lt;br /&gt;
* Download the MeeGo kernel, possibly modifying the kernel with additional patches (including new device drivers) and building the kernel (see [[#Getting_new_chipset_support_to_the_MeeGo_kernel|''Getting new chipset support to the MeeGo kernel'']] below). &lt;br /&gt;
* Add the repository containing your kernel package to the kickstart file (to be elaborated)&lt;br /&gt;
* Remove parts of the kickstart file specific to the reference device.&lt;br /&gt;
* Add a mention of your kernel package in the %packages section.&lt;br /&gt;
* Build packages or include shell scripts in %post section of kickstart file that adds/modifies configuration fitting your device.&lt;br /&gt;
&lt;br /&gt;
A detailed description of a variation of this model can be found from [[ARM/Meego on Beagleboard from scratch|here]] (Better description needed).&lt;br /&gt;
&lt;br /&gt;
==== Getting new chipset support to the MeeGo kernel ====&lt;br /&gt;
&lt;br /&gt;
See [[How-to: getting new chipset support to the MeeGo kernel]] for more detailed information about how to work with the MeeGo kernel and make it support new HW.&lt;br /&gt;
&lt;br /&gt;
=== Upstream projects, MeeGo, products and patches ===&lt;br /&gt;
&lt;br /&gt;
When building a product based on MeeGo, the product vendor will typically augment the MeeGo OS with their own SW components as well as make fixes and adjustments to the MeeGo OS code (in the limits set by the compliance rules). While vendors can manage their own SW components as they wish, the strong preference is that any changes made to the MeeGo OS SW components are delivered as patches primarily to the respective upstream projects or secondarily to MeeGo.com. In this way vendors can relieve themselves from the burden of managing a potentially big patch set on top of MeeGo OS and also verify the quality and safety of their patches. Having the patches in upstream projects again lessens the patch set management load at MeeGo.com.&lt;br /&gt;
&lt;br /&gt;
For information about pushing patches to MeeGo, see [http://meego.com/about/contribution-guidelines Contribution Guidelines] and [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process] (especially section ''How Do Patches Get Integrated and Accepted?'') and [http://meego.gitorious.org/meego-os-base/kernel-source/blobs/master/README.workflow Kernel workflow].&lt;br /&gt;
&lt;br /&gt;
=== Adaptation subsystems and interfaces ===&lt;br /&gt;
&lt;br /&gt;
In the MeeGo architecture model (see e.g. [http://meego.com/developers/meego-architecture/meego-architecture-domain-view MeeGo Architecture Domain View]), adaptation is represented as adaptation subsystems. SW components in the adaptation subsystem ''realizations'' do things that are expected by the OS and communicate with the OS through interfaces defined by the OS.&lt;br /&gt;
 &lt;br /&gt;
The key goal in the sections below is to identify the interface(s) that the adaptation SW needs to implement/use in order to communicate with the OS in the required manner. Behind these interfaces the adaptation SW can basically handle the required functionality as it sees best. In some cases, however, there may also be some preferred way of implementing the adaptation.&lt;br /&gt;
&lt;br /&gt;
In some areas, the adaptation work may consist of just writing a suitable Linux device driver for the HW in question. In some other areas, the adaptation work may consist of writing one or more device drivers as well as one or more user space components (e.g. plugins to some user space SW frameworks). Various configuration file changes may also be required as a part of the adaptation work.&lt;br /&gt;
&lt;br /&gt;
== Porting by adaptation subsystems ==&lt;br /&gt;
&lt;br /&gt;
=== System Core Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Boot ====&lt;br /&gt;
&lt;br /&gt;
MeeGo places no restrictions as to what SW components are used to handle the pre-OS boot phases in a MeeGo compliant device. Thus, vendors are free to choose e.g. the boot loader as they see fit. Note however that full utilization of the MeeGo platform security requires that the pre-OS boot phases form a trusted boot chain that ultimately builds on chipset-level security support.&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, MeeGo does not define anything special with regard to what information the boot loader is expected to pass to the Linux kernel e.g. via the kernel command line.&lt;br /&gt;
&lt;br /&gt;
The kernel-level boot phases can be tailored as necessary to the specific CPU, chipset or device in a standard Linux manner.&lt;br /&gt;
&lt;br /&gt;
The post-kernel boot phases (startup scripts) can be tailored by device vendors as necessary for their devices in the limits set by MeeGo compliance requirements (certain SW components need to be present in the system).&lt;br /&gt;
&lt;br /&gt;
==== Kernel fundamentals ====&lt;br /&gt;
&lt;br /&gt;
Regarding the Linux kernel, each MeeGo release defines the kernel version to be used and a set of patches on top of that. In addition, the Linux kernel used in MeeGo compliant devices is assumed to have been built with a set of fixed build-time configuration values that are not allowed to be changed. In addition to the fixed values, device vendors can define other kernel configuration values as required by their devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo does not place any special requirements concerning how the boot loader passes information to the kernel or how the HW configuration and initialization of the system is handled.&lt;br /&gt;
&lt;br /&gt;
CPU, chipset (SoC) and device vendors are assumed to implement the elementary CPU architecture/chipset/device support for the Linux kernel used in MeeGo in a standard Linux manner. This includes:&lt;br /&gt;
* HW (board) configuration&lt;br /&gt;
* Mapping the fundamental Linux kernel functionality (e.g. IRQ, DMA, GPIO, RTC and memory handling) to the HW in question&lt;br /&gt;
* Creation/modification of the necessary device drivers to support the core SoC interfaces (e.g. I2C, SPI, SDIO)&lt;br /&gt;
* Permanent memory support&lt;br /&gt;
* Debugging and tracing support&lt;br /&gt;
&lt;br /&gt;
==== Power and thermal management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, the understanding is that MeeGo in general relies on established Linux kernel frameworks and APIs for power management. Some of these frameworks and APIs may be applicable only in certain CPU architectures. In addition, the HW capabilities related to power management may vary between different HW platforms potentially meaning that the SW is assumed perform somewhat different tasks in different environments.&lt;br /&gt;
&lt;br /&gt;
The Linux power management frameworks and APIs include:&lt;br /&gt;
* CPU frequency control (support for the different voltage and frequency operating points) via the cpufreq infrastructure&lt;br /&gt;
* CPU idle state management (different levels of sleep) through the cpuidle infrastructure&lt;br /&gt;
* Clock management through the clock framework&lt;br /&gt;
* Suspend/resume&lt;br /&gt;
* Runtime power management&lt;br /&gt;
* HW voltage/current regulator control via the regulator framework&lt;br /&gt;
* PM_QOS (power management quality of service) framework for making and listening to PM QoS requests&lt;br /&gt;
&lt;br /&gt;
Whether MeeGo will have some user space SW components or framework related to power management is under discussion at the time of this writing.&lt;br /&gt;
&lt;br /&gt;
In the thermal management area, the Device State Management Entity (DSME) component in the Device Health subsystem is supposed to make thermal state management decisions in the system. The DSME has a thermal manager module that again uses other DSME modules (thermal objects) to access the actual thermal sensor information in the HW. To port this functionality to new HW, one or more DSME thermal object modules need to be implemented.&lt;br /&gt;
&lt;br /&gt;
The APIs that the thermal object modules use to access the thermal sensor information are not strictly defined by MeeGo. At device driver level, however, the preferred approach is to utilize standard Linux interfaces such as the generic thermal sysfs API or the hwmon sysfs API.&lt;br /&gt;
&lt;br /&gt;
==== Energy management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, basically the only thing that MeeGo requires from HW adaptation in the energy management area (battery charging and monitoring) is support for the Linux power supply sysfs class. Additional energy management related functionality can be handled in a vendor specific manner.&lt;br /&gt;
&lt;br /&gt;
==== Device state ====&lt;br /&gt;
&lt;br /&gt;
The DSME component participates in device state management e.g. by managing device run level, reboot and shutdown, by monitoring the device thermal state and shutting down the device in fatal thermal conditions, and by handling HW watchdog kicking activity.&lt;br /&gt;
&lt;br /&gt;
In a new HW environment, the DSME needs to be adapted to handle the watchdog kicking through the right device driver interfaces and at the right intervals. In addition, to port the DSME thermal management functionality to new HW, one or more DSME thermal object modules need to be implemented as described above in the [[#Power_and_thermal_management|''Power and thermal management'']] section.&lt;br /&gt;
&lt;br /&gt;
=== Security Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Work is ongoing in bringing platform security functionality to the MeeGo OS based on the Mandatory Access Control (MAC), Integrity Measurement Architecture (IMA) and Extended Verification Module (EVM) technologies in the Linux kernel. Maximum security can be reached if the MeeGo platform security functionality can rely on trusted platform support &amp;quot;below&amp;quot; the Linux kernel, effectively in the HW and the boot loader(s). MeeGo, however, places no strict requirements as to how the trusted platform support is implemented in MeeGo based devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo also includes the OpenSSL open source toolkit implementing general purpose cryptography functionality. Algorithms and operations supported by the OpenSSL toolkit can be accelerated in HW by using the OpenSSL engine architecture. OpenSSL also supports a cryptodev engine that uses crypto algorithms implemented in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Some devices may have a security watchdog in the HW that needs &amp;quot;kicking&amp;quot; at regular intervals to keep the device up and running. In MeeGo, watchdog kicking functionality is implemented in the Device State Management Entity (DSME) component. If security watchdog kicking is needed, the DSME needs to be adapted to handle that through the right device driver interface and at the right intervals.&lt;br /&gt;
&lt;br /&gt;
=== Device Mode Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Resource Policy ====&lt;br /&gt;
&lt;br /&gt;
The Resource (Policy) Manager component in the Device Health subsystem offers a generic framework for:&lt;br /&gt;
* Monitoring device and application events&lt;br /&gt;
* Managing policies that specify rules about what should happen in the device when certain events occur&lt;br /&gt;
* Making policy decisions when events occur (determining the needed changes in the device)&lt;br /&gt;
* Enforcing changes in the system through policy enforcement points&lt;br /&gt;
&lt;br /&gt;
The Resource Manager can be used e.g. to change the audio routing in the device when the user attaches a wired headset to the device.&lt;br /&gt;
&lt;br /&gt;
Event listening and change enforcement in the Resource Manager happens through plugin modules. Using the MeeGo OS in some new device effectively involves creating suitable Resource Manager policies and writing the necessary plugins for listening device/application events and changing device behavior accordingly. Though not pure HW adaptation, this can be considered as a form of MeeGo OS &amp;quot;device adaptation&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Mode Control Entity (MCE) ====&lt;br /&gt;
&lt;br /&gt;
The MCE component (starting from MeeGo 1.2) can be used to listen to events that have an impact to the device mode (e.g. touch screen locked vs. unlocked) and change the device mode accordingly. The MCE is used e.g. for: &lt;br /&gt;
* Listening to various keys and switches in the device (e.g. power key, volume key, camera button, slider switch)&lt;br /&gt;
* Controlling LEDs&lt;br /&gt;
* Touch screen or HW keyboard enabling/disabling depending on device state&lt;br /&gt;
* Keyboard backlight control&lt;br /&gt;
* Display state (on/off) and brightness control&lt;br /&gt;
&lt;br /&gt;
The MCE has its own plugin architecture that can be used to adapt it to different HW environments.&lt;br /&gt;
&lt;br /&gt;
=== Display and Graphics Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo visual services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view]. &lt;br /&gt;
&lt;br /&gt;
The key ingredients of the display and graphics architecture in MeeGo are the X Window System (X Server with its extensions) and the Khronos graphics APIs (OpenGL ES, OpenVG and EGL with their extensions).&lt;br /&gt;
&lt;br /&gt;
The display and graphics HW adaptation SW needs to enable the X Window System and the Khronos APIs to function on the device HW. In practice, the adaptation SW needs to have an X display/video driver (hosted inside the X Server) and libraries that implement the Khronos graphics APIs, both supporting the features and functionality required by MeeGo. Also some configuration file changes may be needed. Any additional user space and kernel space components needed for the HW adaptation are implementation dependent.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering display content to external displays, the Resource Manager component may be used to coordinate the display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Audio Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The audio architecture in MeeGo is centered around the GStreamer and PulseAudio frameworks. In addition, the Resource Manager plays a role in coordinating the audio related behavior of the device (audio routings). The audio HW adaptation SW needs to provide GStreamer elements and PulseAudio plugins that enable the GStreamer and PulseAudio client interfaces used for e.g. for audio playback, recording and volume control to work on the device. Typical required components include e.g. codec elements for GStreamer and sink/source plugins for PulseAudio.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer and PulseAudio plugins, the audio HW adaptation SW can be implemented with different technologies and APIs, including ALSA and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework as needed. Use of the ALSA framework and APIs is encouraged, however, as they allow significant reuse of components and functionality on the PulseAudio level and are already a part of the upstream Linux kernel. If ALSA is not used to implement the kernel side parts of the audio adaptation, the solution that is used instead should still be aligned with the upstream Linux kernel.&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo media services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view]. &lt;br /&gt;
&lt;br /&gt;
=== Camera Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo still imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework and the CameraBin GStreamer element. The still imaging HW adaptation SW is required to contain a GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element. Thus, the required HW adaptation interfaces are the relevant GStreamer plugin interfaces and especially the interfaces expected by the CameraBin element, in particular the GstPhotography interface.&lt;br /&gt;
&lt;br /&gt;
If HW accelerated encoders are supported, they should be also offered to the system as GStreamer elements.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
=== Video and Imaging Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo video imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework, the CameraBin GStreamer element (video recording) and the Playbin2 GStreamer element (video playback). The video imaging HW adaptation SW is required to contain:&lt;br /&gt;
:* A GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element (this is common with still imaging) &lt;br /&gt;
:* If HW accelerated codecs are supported, GStreamer elements that wrap the codecs&lt;br /&gt;
:* If HW accelerated filters are supported (e.g. video scaler, rotation engines, color conversion engines), GStreamer elements that wrap the filters&lt;br /&gt;
:* A GStreamer video sink element that offers the GStreamer X Overlay Interface. Note that if the XVideo extension is supported on the X Server side, the xvimagesink element can be used as the video sink element and no new elements are needed.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the video imaging HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering video content to external displays, the Resource Manager component may be used to coordinate the video/display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Communications Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo communications services architecture, see [http://meego.com/developers/meego-architecture/comms-services Comms Services].&lt;br /&gt;
&lt;br /&gt;
==== Cellular ====&lt;br /&gt;
&lt;br /&gt;
The cellular telephony architecture in MeeGo is centered on the oFono, PulseAudio and Telepathy frameworks. In addition, the Resource Manager plays a role in coordinating the device behavior during voice calls.&lt;br /&gt;
&lt;br /&gt;
The cellular modem HW adaptation SW must implement the following interfaces towards the MeeGo OS:&lt;br /&gt;
:* oFono modem plugin/driver API&lt;br /&gt;
:* Linux network interface for the Linux TCP/IP stack (for data communications)&lt;br /&gt;
:* Relevant PulseAudio plugin interfaces for cellular voice call audio handling&lt;br /&gt;
&lt;br /&gt;
For more detailed information about the oFono APIs, see the documentation and source code available at [http://git.kernel.org/?p=network/ofono/ofono.git;a=summary oFono git].&lt;br /&gt;
&lt;br /&gt;
==== USB ====&lt;br /&gt;
&lt;br /&gt;
The foundation of the the MeeGo USB functionality is the standard Linux USB subsystem. The Linux USB subsystem defines the USB related HW adaptation interfaces that need to be supported in MeeGo. In practice, these are kernel side interfaces between the generic USB functionality and a HW dependent USB host controller driver.&lt;br /&gt;
&lt;br /&gt;
==== WLAN ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo WLAN architecture is centered on the [http://linuxwireless.org/ Linux wireless] (IEEE-802.11) subsystem. The Linux wireless SW stack defines the WLAN HW adaptation SW interfaces that need to be used in MeeGo. In practice, the required interfaces are defined by cfg80211 for FullMAC WLAN devices and by mac80211 for SoftMAC WLAN devices. In addition, a Linux network interface needs to be supported towards the Linux TCP/IP stack.&lt;br /&gt;
&lt;br /&gt;
==== Bluetooth ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Bluetooth architecture is centered on the [http://www.bluez.org/ BlueZ] SW stack. The BlueZ SW stack defines the Bluetooth HW adaptation SW interfaces that need to be used in MeeGo. In practice, these are Linux kernel side interfaces between the generic HCI (Host Controller Interface) core and a HW specific HCI driver.&lt;br /&gt;
&lt;br /&gt;
=== Location Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The MeeGo location architecture is based on [http://http://labs.trolltech.com/page/Projects/QtMobility| QtMobility Location API].  The QtMobility 1.0 Location API provides geographic coordinates only.  The QtMobility 1.1 Location API provides geocoding and reverse geocoding, POI search, navigation, and mapping.  The 1.0 Location API is available in MeeGo 1.1.  The 1.1 or later Location API will be available in MeeGo 1.2.  The Location API uses a plugin system for implementations of the underlying backend.  MeeGo compliance requirements require support for the QtMobility Location API and thus require one or more plugins to support these APIs.  MeeGo places no restrictions as to how the plugins are implemented, however. Adaptation to location related HW may be done by manufacturers or service providers and the way how it's done is not defined by the API.&lt;br /&gt;
&lt;br /&gt;
MeeGo will use [http://www.freedesktop.org/wiki/Software/GeoClue GeoClue] as the reference location framework and the reference implementation of the Qt Mobility location API backend will be written on top of GeoClue. GeoClue defines a set of (D-Bus) APIs for accessing location services provided by service providers implemented as D-Bus services. In addition, GeoClue includes a set of service provider implementations and (at the time of this writing) an experimental master service provider that can act as a proxy between clients and the actual service providers. If a device vendor wants to take advantage of this existing functionality, the vendor can implement their location services &amp;quot;behind&amp;quot; the GeoClue APIs as GeoClue service providers. In such a case, adaptation to the location related HW would happen inside the service providers as defined by the service provider designs.&lt;br /&gt;
&lt;br /&gt;
=== Sensor Adaptation === &lt;br /&gt;
&lt;br /&gt;
The key component in the MeeGo sensor handling architecture is the Sensor Framework. The Sensor Framework uses both HW independent logical sensor plugins and HW dependent sensor adaptor plugins in its operation. The required sensor HW adaptation interfaces in MeeGo are the interfaces that the Sensor Framework and the logical sensor plugins define for the sensor adaptor plugins to implement. The sensor adaptor plugins typically communicate directly with sensor HW drivers in the Linux kernel. The interfaces that the sensor HW drivers expose to the user space are not defined by MeeGo. Sensor HW adaptation in MeeGo thus consists of adaptor plugins in the Sensor Framework and sensor HW drivers in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Note that thermal sensors are handled in a different manner as described in the [[#Power and thermal management|''Power and thermal management'']] section above.&lt;br /&gt;
&lt;br /&gt;
=== Input Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Touch ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the touch input handling path in MeeGo are the touch HW device driver, Linux kernel input subsystem, X server, X input driver, Qt and finally the MeeGo Touch Framework. Enabling touch support for some new HW requires at least the implementation of the corresponding touch HW device driver in the Linux kernel. If this driver communicates touch events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, basically the existing functionality in X server (e.g. evdev input driver) and above can be used as such. In case the kernel-to-user-space interface is non-standard, it is also possible to implement a new X input driver as a part of the touch HW adaptation.&lt;br /&gt;
&lt;br /&gt;
Multi-touch support in X requires a new version, 2.1, of the [http://cgit.freedesktop.org/~whot/inputproto/tree/XI2proto.txt?h=multitouch X Input Extension] and this also requires support from the client side, in this case Qt's multi-touch support. Once this support has been implemented throughout the SW stack, including X evdev input driver, supporting multi-touch for some new HW should require only the implementation of a touch HW device driver that implements the standard Linux multi-touch interface. This should be the case in MeeGo 1.2. &lt;br /&gt;
&lt;br /&gt;
Before 1.2, multi-touch support in MeeGo uses a special X input driver (mtev), X server multi-pointer support (MPX) and Qt multi-touch support written on top of MPX. This solution requires the touch HW device driver to expose a user-space interface that is compatible with mtev.&lt;br /&gt;
&lt;br /&gt;
==== HW keyboard ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the HW keyboard input handling path in MeeGo are the keyboard HW device driver, Linux kernel input subsystem, X server, X input driver and Qt. Enabling keyboard support for some new HW requires typically only the implementation of the corresponding keyboard HW device driver in the Linux kernel. If this driver communicates key events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, the existing functionality in X server (e.g. evdev input driver) and above should work as such. In case the kernel-to-user space interface is non-standard, it is also possible to implement a new X input driver as a part of the keyboard HW adaptation.&lt;br /&gt;
&lt;br /&gt;
==== Buttons and switches ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo includes the MCE and System SW Qt API (QmSystem) components. The MCE can be used to control the device mode and it listens to power button events and e.g. device open/close switch events via the respective device driver interfaces. The System SW Qt API on the other hand provides a Qt API to various system information, including events from various physical buttons in the device (e.g. volume button, camera button). The System SW Qt API gets the button events either by listening to the relevant device driver interfaces or through the MCE component.&lt;br /&gt;
&lt;br /&gt;
Both the MCE and the System SW Qt API components can be adapted to new devices by device vendors.&lt;br /&gt;
&lt;br /&gt;
=== Haptics and Vibra Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Haptics ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Touch Framework present (at least) in the MeeGo handset device category contains a component called Feedback Framework (meegotouch-feedback) that handles the creation of auditory and/or haptic feedback to touch events. The haptic feedback can be created e.g. with vibra motors or piezo elements. In the Feedback Framework, the different types of feedback are created by backend libraries implemented as plugins. &lt;br /&gt;
&lt;br /&gt;
The haptics related HW adaptation interface from MeeGo OS perspective is the backend plugin interface defined by the Feedback Framework. The plugins can then communicate with the HW either through some device driver interface or some intermediate SW layers (MeeGo places no restrictions as to how the plugins are implemented).&lt;br /&gt;
&lt;br /&gt;
==== Vibra (notifications/alerts) ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo (at least the handset category) will include a component called Non-Graphical Feedback Framework (NGF). This component offers the capability of playing e.g. audio, vibra or led as an indication of events such as incoming call/message, clock and calendar alarms, missed calls, unread messages etc. The NGF also integrates with the Resource Policy to decide about the available playback resources based on policy rules and the current system state.&lt;br /&gt;
&lt;br /&gt;
The actual playback of the different types of notifications is handled by NGF plugins that can be created by device vendors. The plugins communicate with the relevant HW as they see best, e.g. directly through some device driver interface or via some intermediate user space SW components. The plugin interfaces defined by NGF thus form the notification/alert vibra adaptation interface in MeeGo.&lt;br /&gt;
&lt;br /&gt;
=== Production Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Production deals with areas such as flashing, testing, tuning and certification. The current understanding is that these areas are handled in a vendor specific manner, including the adaptation.&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Noel</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/MeeGo_Porting_Guide</id>
		<title>MeeGo Porting Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/MeeGo_Porting_Guide"/>
				<updated>2011-06-24T22:37:54Z</updated>
		
		<summary type="html">&lt;p&gt;Noel: /* Working under MeeGo.com */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The goal of MeeGo Porting Guide (MPG) is to provide valuable information and instructions to people who want to run MeeGo OS on their (new) HW and eventually create products based on the MeeGo OS. The MPG starts with an overview of the porting process, tools, and other related background information and then moves on to describing what the porting actually means in individual technical/functional areas.&lt;br /&gt;
&lt;br /&gt;
The porting guide is not strictly tied to any particular MeeGo OS version or device category. Instead, it tries to be general enough to cover the different device categories, as well as follow changes introduced in new MeeGo OS versions.&lt;br /&gt;
&lt;br /&gt;
Detailed porting information in the different technical areas is dependent on the respective [http://meego.com/developers/meego-architecture MeeGo architecture]. In some cases, this architecture may still be open and this is noted in the applicable sections.&lt;br /&gt;
&lt;br /&gt;
=== Feedback ===&lt;br /&gt;
&lt;br /&gt;
Contribution to these pages is open. Any MeeGo community member is free to ''improve'' these pages at any time. You can also leave feedback in the [http://lists.meego.com/listinfo/meego-porting MeeGo porting mailing list].&lt;br /&gt;
&lt;br /&gt;
== General porting information/guidelines ==&lt;br /&gt;
&lt;br /&gt;
=== MeeGo compliance ===&lt;br /&gt;
&lt;br /&gt;
Perhaps the most important piece of background information related to the MPG are the [[Quality/Compliance|MeeGo compliance requirements]]. A device that is meant to be MeeGo compliant will need to fulfill the requirements listed in the MeeGo compliance specification for the applicable device category (the first version of the specification is supposed to be available in October 2010). In short, a MeeGo compliant device will need to:&lt;br /&gt;
* Meet the minimum HW performance and component requirements for the applicable device category&lt;br /&gt;
* Include all SW components that form the MeeGo core OS&lt;br /&gt;
* Include the additional SW components required to be present in devices in the applicable device category&lt;br /&gt;
* Not break the API/ABI of any of the components coming from MeeGo&lt;br /&gt;
* Follow the MeeGo SW packaging conventions&lt;br /&gt;
&lt;br /&gt;
The compliance rules will also specify CPU architecture specific requirements concerning how MeeGo OS itself and MeeGo applications are to be compiled to different environments (instruction set used, compiler version, compiler options, etc.).&lt;br /&gt;
&lt;br /&gt;
A device vendor may include additional functionality, HW components and SW components in their devices, as long as they don't break MeeGo compliance. The vendor can also patch MeeGo OS components, if the patches don't break MeeGo compliance. A device vendor's own SW components can be either open source or closed source components, as long as they adhere to the rules set by the applicable SW licenses.&lt;br /&gt;
&lt;br /&gt;
From the MeeGo Porting Guide perspective, by defining the SW components and HW components that need to be present, the compliance requirements effectively define the minimum set of porting tasks required from a device vendor and what SW components are involved from MeeGo OS side.&lt;br /&gt;
&lt;br /&gt;
=== Porting process and tools ===&lt;br /&gt;
&lt;br /&gt;
==== Overview ====&lt;br /&gt;
&lt;br /&gt;
As long as a vendor's device is MeeGo compliant, as defined above, it is basically up to the vendor to decide how they build the SW that ends up in the device. The vendor may use their own build machinery or set up an OBS build system that is also used in MeeGo. Regardless of what the vendor's build system is, it needs to integrate with the MeeGo build infrastructure, at least to fetch the MeeGo source packages for the builds, as well as build each MeeGo component in the same way as it would be built in the MeeGo build system (such as with the same compiler and compiler options). Whatever the case, the intention in MeeGo is to use and offer an open toolset that any HW or SW vendor can use for efficient SW creation. It is likely that using the same toolset as MeeGo, will offer the easiest way to integrate vendor's own build system with the the MeeGo build infrastructure.&lt;br /&gt;
&lt;br /&gt;
The key ingredients of the MeeGo build infrastructure and toolset are:&lt;br /&gt;
* [http://meego.gitorious.org MeeGo Gitorious]&lt;br /&gt;
** A version control system for the source files of various MeeGo specific SW components and tools&lt;br /&gt;
* [http://build.meego.com MeeGo OBS]&lt;br /&gt;
** The build system that is used to build MeeGo packages (RPMs) from their sources&lt;br /&gt;
* [http://repo.meego.com MeeGo Repository]&lt;br /&gt;
** The place where the built MeeGo releases, that is where MeeGo packages and images are stored&lt;br /&gt;
* [http://wiki.meego.com/Image_Creation MeeGo Image Creator]&lt;br /&gt;
** The tool used to build MeeGo images that can be installed/flashed on HW&lt;br /&gt;
* MeeGo release tools&lt;br /&gt;
** Tools such as BOSS and REVS that are used in the creation of the MeeGo releases under repo.meego.com&lt;br /&gt;
&lt;br /&gt;
For additional information, see [[Build Infrastructure]], [[Release Infrastructure]] and [[Release Engineering]].&lt;br /&gt;
&lt;br /&gt;
For another overview of the MeeGo porting process, see [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process].&lt;br /&gt;
&lt;br /&gt;
==== Vendor's own OBS ====&lt;br /&gt;
&lt;br /&gt;
So, ultimately, when creating actual products running the MeeGo OS, the vendor may end up setting up their own OBS build system. Setting up your own OBS system may also be beneficial in earlier HW/product development phases, as it offers a flexible way to modify and build MeeGo OS to test it on the new HW. The vendor's own OBS system can link to the MeeGo OBS for handling packages that come directly from MeeGo and it can link to other sources for handling, such as closed source packages that are specific to the vendor. See [[Release_Engineering/Process#Making a product out of MeeGo Release|an overview picture of this setup]].&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Sets up their own OBS system&lt;br /&gt;
** [[User:Stskeeps/10_easy_steps_to_a_local_OBS|Instructions related to setting up an OBS system]],  [[Build_Infrastructure/Sysadmin_Distro/OBS_setup_openSUSE112|OBS Applicances]] [http://en.opensuse.org/openSUSE:Build_Service_private_instance Open Suse OBS Wiki].&lt;br /&gt;
* Creates projects under the their own OBS for their own components&lt;br /&gt;
* Links their own OBS to the MeeGo OBS for MeeGo components&lt;br /&gt;
* May have trial patches to MeeGo components in their own OBS&lt;br /&gt;
** NOTE. Eventually all patches to MeeGo components required in a final MeeGo based product ''should'' be pushed to MeeGo.com. However, this is not an absolute must requirement, as long as the MeeGo compliance requirements and applicable SW license rules are fulfilled. &lt;br /&gt;
** See [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below&lt;br /&gt;
* Needs to set up the necessary machinery to create releases and images from the packages built with OBS&lt;br /&gt;
** This machinery can be based on the toolset used in MeeGo (see above)&lt;br /&gt;
&lt;br /&gt;
==== Working under MeeGo.com ====&lt;br /&gt;
&lt;br /&gt;
Another way of porting MeeGo to some new HW is to get the new HW accepted as one MeeGo reference HW and have the MeeGo build machinery create builds for the reference HW as a part of the normal MeeGo release building cycle (see [[Release Engineering/Release Timeline|Release Timeline]] and [[Release Engineering/Process|Release Process]]). This setup can also include QA support for the reference HW on the MeeGo side (see [[Quality]]). At the time of this writing, the actual process of getting new reference HW to MeeGo is still somewhat unclear. In any case, this model requires active participation from the vendor in MeeGo work in general and especially in supporting their reference HW in MeeGo.&lt;br /&gt;
&lt;br /&gt;
In this setup, the vendor:&lt;br /&gt;
* Creates a device/platform development project under the MeeGo OBS for their components. The open source components would then get submitted to MeeGo Trunk:Testing and get reviewed like any other MeeGo component for inclusion.&lt;br /&gt;
** Note that it is also possible to have closed source binary components in the MeeGo OBS to be included in the MeeGo builds for some reference HW. These are submitted to the Trunk:non-oss repository. Licensing is usually required to at least include redistributability, as the components cannot be mirrored from or hosted at repo.meego.com otherwise. It is not possible to have components within Trunk:Testing require closed source dependencies.&lt;br /&gt;
* Pushes patches to other MeeGo components at MeeGo.com as necessary (see [[#Upstream_projects,_MeeGo,_products_and_patches|''Upstream projects, MeeGo, products and patches'']] below)&lt;br /&gt;
* Creates (or supports the creation of) a MIC kickstart file for building images for their reference HW&lt;br /&gt;
* As necessary, supports adding support for their reference HW and SW components in the MeeGo build and release infrastructure tools&lt;br /&gt;
&lt;br /&gt;
==== Trials ====&lt;br /&gt;
&lt;br /&gt;
A lightweight but also more limited &amp;quot;try it out&amp;quot; alternative to the above processes is discussed below.&lt;br /&gt;
&lt;br /&gt;
===== Initial bring-up attempt =====&lt;br /&gt;
&lt;br /&gt;
* Grab an already built root filesystem / image for a MeeGo reference device that's the most closest to your target. For ARMv7 this is typically the Nokia N900 handset image, for Atom, this could be netbook image or handset image.&lt;br /&gt;
* Build a Linux kernel for your device and install the modules into /lib/modules.&lt;br /&gt;
* Boot the root filesystem and modify the configuration and drop in components to bring up the device to UX. Note down the things you had to modify or add as this will be input for your porting work.&lt;br /&gt;
&lt;br /&gt;
===== Building your first image =====&lt;br /&gt;
&lt;br /&gt;
The second step to a proper hardware adaptation is making sure you can build your own image. Since we based our work before on a reference device image, it makes sense to try to build this image first. MeeGo images are constructed on the basis of so called 'kickstart files' which describe the intended contents of a image. &lt;br /&gt;
&lt;br /&gt;
* Install the MeeGo Image Creator tool (MIC)&lt;br /&gt;
* Download the kickstart file (.ks) from the same directory you found your reference device image. &lt;br /&gt;
* Create a image using mic-image-creator (should be elaborated).&lt;br /&gt;
* Test out your freshly baked image as in previous step.&lt;br /&gt;
&lt;br /&gt;
===== Building your port's first reproduciable image =====&lt;br /&gt;
&lt;br /&gt;
* Download the MeeGo kernel, possibly modifying the kernel with additional patches (including new device drivers) and building the kernel (see [[#Getting_new_chipset_support_to_the_MeeGo_kernel|''Getting new chipset support to the MeeGo kernel'']] below). &lt;br /&gt;
* Add the repository containing your kernel package to the kickstart file (to be elaborated)&lt;br /&gt;
* Remove parts of the kickstart file specific to the reference device.&lt;br /&gt;
* Add a mention of your kernel package in the %packages section.&lt;br /&gt;
* Build packages or include shell scripts in %post section of kickstart file that adds/modifies configuration fitting your device.&lt;br /&gt;
&lt;br /&gt;
A detailed description of a variation of this model can be found from [[ARM/Meego on Beagleboard from scratch|here]] (Better description needed).&lt;br /&gt;
&lt;br /&gt;
==== Getting new chipset support to the MeeGo kernel ====&lt;br /&gt;
&lt;br /&gt;
See [[How-to: getting new chipset support to the MeeGo kernel]] for more detailed information about how to work with the MeeGo kernel and make it support new HW.&lt;br /&gt;
&lt;br /&gt;
=== Upstream projects, MeeGo, products and patches ===&lt;br /&gt;
&lt;br /&gt;
When building a product based on MeeGo, the product vendor will typically augment the MeeGo OS with their own SW components as well as make fixes and adjustments to the MeeGo OS code (in the limits set by the compliance rules). While vendors can manage their own SW components as they wish, the strong preference is that any changes made to the MeeGo OS SW components are delivered as patches primarily to the respective upstream projects or secondarily to MeeGo.com. In this way vendors can relieve themselves from the burden of managing a potentially big patch set on top of MeeGo OS and also verify the quality and safety of their patches. Having the patches in upstream projects again lessens the patch set management load at MeeGo.com.&lt;br /&gt;
&lt;br /&gt;
For information about pushing patches to MeeGo, see [http://meego.com/about/contribution-guidelines Contribution Guidelines] and [http://meego.com/developers/hardware-enabling-process Hardware Enabling Process] (especially section ''How Do Patches Get Integrated and Accepted?'') and [http://meego.gitorious.org/meego-os-base/kernel-source/blobs/master/README.workflow Kernel workflow].&lt;br /&gt;
&lt;br /&gt;
=== Adaptation subsystems and interfaces ===&lt;br /&gt;
&lt;br /&gt;
In the MeeGo architecture model (see e.g. [http://meego.com/developers/meego-architecture/meego-architecture-domain-view MeeGo Architecture Domain View]), adaptation is represented as adaptation subsystems. SW components in the adaptation subsystem ''realizations'' do things that are expected by the OS and communicate with the OS through interfaces defined by the OS.&lt;br /&gt;
 &lt;br /&gt;
The key goal in the sections below is to identify the interface(s) that the adaptation SW needs to implement/use in order to communicate with the OS in the required manner. Behind these interfaces the adaptation SW can basically handle the required functionality as it sees best. In some cases, however, there may also be some preferred way of implementing the adaptation.&lt;br /&gt;
&lt;br /&gt;
In some areas, the adaptation work may consist of just writing a suitable Linux device driver for the HW in question. In some other areas, the adaptation work may consist of writing one or more device drivers as well as one or more user space components (e.g. plugins to some user space SW frameworks). Various configuration file changes may also be required as a part of the adaptation work.&lt;br /&gt;
&lt;br /&gt;
== Porting by adaptation subsystems ==&lt;br /&gt;
&lt;br /&gt;
=== System Core Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Boot ====&lt;br /&gt;
&lt;br /&gt;
MeeGo places no restrictions as to what SW components are used to handle the pre-OS boot phases in a MeeGo compliant device. Thus, vendors are free to choose e.g. the boot loader as they see fit. Note however that full utilization of the MeeGo platform security requires that the pre-OS boot phases form a trusted boot chain that ultimately builds on chipset-level security support.&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, MeeGo does not define anything special with regard to what information the boot loader is expected to pass to the Linux kernel e.g. via the kernel command line.&lt;br /&gt;
&lt;br /&gt;
The kernel-level boot phases can be tailored as necessary to the specific CPU, chipset or device in a standard Linux manner.&lt;br /&gt;
&lt;br /&gt;
The post-kernel boot phases (startup scripts) can be tailored by device vendors as necessary for their devices in the limits set by MeeGo compliance requirements (certain SW components need to be present in the system).&lt;br /&gt;
&lt;br /&gt;
==== Kernel fundamentals ====&lt;br /&gt;
&lt;br /&gt;
Regarding the Linux kernel, each MeeGo release defines the kernel version to be used and a set of patches on top of that. In addition, the Linux kernel used in MeeGo compliant devices is assumed to have been built with a set of fixed build-time configuration values that are not allowed to be changed. In addition to the fixed values, device vendors can define other kernel configuration values as required by their devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo does not place any special requirements concerning how the boot loader passes information to the kernel or how the HW configuration and initialization of the system is handled.&lt;br /&gt;
&lt;br /&gt;
CPU, chipset (SoC) and device vendors are assumed to implement the elementary CPU architecture/chipset/device support for the Linux kernel used in MeeGo in a standard Linux manner. This includes:&lt;br /&gt;
* HW (board) configuration&lt;br /&gt;
* Mapping the fundamental Linux kernel functionality (e.g. IRQ, DMA, GPIO, RTC and memory handling) to the HW in question&lt;br /&gt;
* Creation/modification of the necessary device drivers to support the core SoC interfaces (e.g. I2C, SPI, SDIO)&lt;br /&gt;
* Permanent memory support&lt;br /&gt;
* Debugging and tracing support&lt;br /&gt;
&lt;br /&gt;
==== Power and thermal management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, the understanding is that MeeGo in general relies on established Linux kernel frameworks and APIs for power management. Some of these frameworks and APIs may be applicable only in certain CPU architectures. In addition, the HW capabilities related to power management may vary between different HW platforms potentially meaning that the SW is assumed perform somewhat different tasks in different environments.&lt;br /&gt;
&lt;br /&gt;
The Linux power management frameworks and APIs include:&lt;br /&gt;
* CPU frequency control (support for the different voltage and frequency operating points) via the cpufreq infrastructure&lt;br /&gt;
* CPU idle state management (different levels of sleep) through the cpuidle infrastructure&lt;br /&gt;
* Clock management through the clock framework&lt;br /&gt;
* Suspend/resume&lt;br /&gt;
* Runtime power management&lt;br /&gt;
* HW voltage/current regulator control via the regulator framework&lt;br /&gt;
* PM_QOS (power management quality of service) framework for making and listening to PM QoS requests&lt;br /&gt;
&lt;br /&gt;
Whether MeeGo will have some user space SW components or framework related to power management is under discussion at the time of this writing.&lt;br /&gt;
&lt;br /&gt;
In the thermal management area, the Device State Management Entity (DSME) component in the Device Health subsystem is supposed to make thermal state management decisions in the system. The DSME has a thermal manager module that again uses other DSME modules (thermal objects) to access the actual thermal sensor information in the HW. To port this functionality to new HW, one or more DSME thermal object modules need to be implemented.&lt;br /&gt;
&lt;br /&gt;
The APIs that the thermal object modules use to access the thermal sensor information are not strictly defined by MeeGo. At device driver level, however, the preferred approach is to utilize standard Linux interfaces such as the generic thermal sysfs API or the hwmon sysfs API.&lt;br /&gt;
&lt;br /&gt;
==== Energy management ====&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, basically the only thing that MeeGo requires from HW adaptation in the energy management area (battery charging and monitoring) is support for the Linux power supply sysfs class. Additional energy management related functionality can be handled in a vendor specific manner.&lt;br /&gt;
&lt;br /&gt;
==== Device state ====&lt;br /&gt;
&lt;br /&gt;
The DSME component participates in device state management e.g. by managing device run level, reboot and shutdown, by monitoring the device thermal state and shutting down the device in fatal thermal conditions, and by handling HW watchdog kicking activity.&lt;br /&gt;
&lt;br /&gt;
In a new HW environment, the DSME needs to be adapted to handle the watchdog kicking through the right device driver interfaces and at the right intervals. In addition, to port the DSME thermal management functionality to new HW, one or more DSME thermal object modules need to be implemented as described above in the [[#Power_and_thermal_management|''Power and thermal management'']] section.&lt;br /&gt;
&lt;br /&gt;
=== Security Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Work is ongoing in bringing platform security functionality to the MeeGo OS based on the Mandatory Access Control (MAC), Integrity Measurement Architecture (IMA) and Extended Verification Module (EVM) technologies in the Linux kernel. Maximum security can be reached if the MeeGo platform security functionality can rely on trusted platform support &amp;quot;below&amp;quot; the Linux kernel, effectively in the HW and the boot loader(s). MeeGo, however, places no strict requirements as to how the trusted platform support is implemented in MeeGo based devices.&lt;br /&gt;
&lt;br /&gt;
MeeGo also includes the OpenSSL open source toolkit implementing general purpose cryptography functionality. Algorithms and operations supported by the OpenSSL toolkit can be accelerated in HW by using the OpenSSL engine architecture. OpenSSL also supports a cryptodev engine that uses crypto algorithms implemented in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Some devices may have a security watchdog in the HW that needs &amp;quot;kicking&amp;quot; at regular intervals to keep the device up and running. In MeeGo, watchdog kicking functionality is implemented in the Device State Management Entity (DSME) component. If security watchdog kicking is needed, the DSME needs to be adapted to handle that through the right device driver interface and at the right intervals.&lt;br /&gt;
&lt;br /&gt;
=== Device Mode Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Resource Policy ====&lt;br /&gt;
&lt;br /&gt;
The Resource (Policy) Manager component in the Device Health subsystem offers a generic framework for:&lt;br /&gt;
* Monitoring device and application events&lt;br /&gt;
* Managing policies that specify rules about what should happen in the device when certain events occur&lt;br /&gt;
* Making policy decisions when events occur (determining the needed changes in the device)&lt;br /&gt;
* Enforcing changes in the system through policy enforcement points&lt;br /&gt;
&lt;br /&gt;
The Resource Manager can be used e.g. to change the audio routing in the device when the user attaches a wired headset to the device.&lt;br /&gt;
&lt;br /&gt;
Event listening and change enforcement in the Resource Manager happens through plugin modules. Using the MeeGo OS in some new device effectively involves creating suitable Resource Manager policies and writing the necessary plugins for listening device/application events and changing device behavior accordingly. Though not pure HW adaptation, this can be considered as a form of MeeGo OS &amp;quot;device adaptation&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Mode Control Entity (MCE) ====&lt;br /&gt;
&lt;br /&gt;
The MCE component (starting from MeeGo 1.2) can be used to listen to events that have an impact to the device mode (e.g. touch screen locked vs. unlocked) and change the device mode accordingly. The MCE is used e.g. for: &lt;br /&gt;
* Listening to various keys and switches in the device (e.g. power key, volume key, camera button, slider switch)&lt;br /&gt;
* Controlling LEDs&lt;br /&gt;
* Touch screen or HW keyboard enabling/disabling depending on device state&lt;br /&gt;
* Keyboard backlight control&lt;br /&gt;
* Display state (on/off) and brightness control&lt;br /&gt;
&lt;br /&gt;
The MCE has its own plugin architecture that can be used to adapt it to different HW environments.&lt;br /&gt;
&lt;br /&gt;
=== Display and Graphics Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo visual services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view]. &lt;br /&gt;
&lt;br /&gt;
The key ingredients of the display and graphics architecture in MeeGo are the X Window System (X Server with its extensions) and the Khronos graphics APIs (OpenGL ES, OpenVG and EGL with their extensions).&lt;br /&gt;
&lt;br /&gt;
The display and graphics HW adaptation SW needs to enable the X Window System and the Khronos APIs to function on the device HW. In practice, the adaptation SW needs to have an X display/video driver (hosted inside the X Server) and libraries that implement the Khronos graphics APIs, both supporting the features and functionality required by MeeGo. Also some configuration file changes may be needed. Any additional user space and kernel space components needed for the HW adaptation are implementation dependent.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering display content to external displays, the Resource Manager component may be used to coordinate the display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Audio Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The audio architecture in MeeGo is centered around the GStreamer and PulseAudio frameworks. In addition, the Resource Manager plays a role in coordinating the audio related behavior of the device (audio routings). The audio HW adaptation SW needs to provide GStreamer elements and PulseAudio plugins that enable the GStreamer and PulseAudio client interfaces used for e.g. for audio playback, recording and volume control to work on the device. Typical required components include e.g. codec elements for GStreamer and sink/source plugins for PulseAudio.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer and PulseAudio plugins, the audio HW adaptation SW can be implemented with different technologies and APIs, including ALSA and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework as needed. Use of the ALSA framework and APIs is encouraged, however, as they allow significant reuse of components and functionality on the PulseAudio level and are already a part of the upstream Linux kernel. If ALSA is not used to implement the kernel side parts of the audio adaptation, the solution that is used instead should still be aligned with the upstream Linux kernel.&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo media services architecture, see [http://meego.com/developers/meego-architecture/meego-architecture-domain-view the MeeGo architecture domain view]. &lt;br /&gt;
&lt;br /&gt;
=== Camera Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo still imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework and the CameraBin GStreamer element. The still imaging HW adaptation SW is required to contain a GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element. Thus, the required HW adaptation interfaces are the relevant GStreamer plugin interfaces and especially the interfaces expected by the CameraBin element, in particular the GstPhotography interface.&lt;br /&gt;
&lt;br /&gt;
If HW accelerated encoders are supported, they should be also offered to the system as GStreamer elements.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
=== Video and Imaging Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The central pieces of the MeeGo video imaging architecture are the [http://gstreamer.freedesktop.org/ GStreamer] multimedia framework, the CameraBin GStreamer element (video recording) and the Playbin2 GStreamer element (video playback). The video imaging HW adaptation SW is required to contain:&lt;br /&gt;
:* A GStreamer camera source element to be used &amp;quot;inside&amp;quot; the CameraBin element (this is common with still imaging) &lt;br /&gt;
:* If HW accelerated codecs are supported, GStreamer elements that wrap the codecs&lt;br /&gt;
:* If HW accelerated filters are supported (e.g. video scaler, rotation engines, color conversion engines), GStreamer elements that wrap the filters&lt;br /&gt;
:* A GStreamer video sink element that offers the GStreamer X Overlay Interface. Note that if the XVideo extension is supported on the X Server side, the xvimagesink element can be used as the video sink element and no new elements are needed.&lt;br /&gt;
&lt;br /&gt;
Behind the GStreamer elements, the video imaging HW adaptation SW can be implemented with different technologies and APIs, including V4L2 and OpenMAX. In case OpenMAX components are used, the gst-omx package must be used to offer those to the GStreamer framework.&lt;br /&gt;
&lt;br /&gt;
If the device supports delivering video content to external displays, the Resource Manager component may be used to coordinate the video/display routing related behavior of the device.&lt;br /&gt;
&lt;br /&gt;
=== Communications Adaptation ===&lt;br /&gt;
&lt;br /&gt;
For an overview of the MeeGo communications services architecture, see [http://meego.com/developers/meego-architecture/comms-services Comms Services].&lt;br /&gt;
&lt;br /&gt;
==== Cellular ====&lt;br /&gt;
&lt;br /&gt;
The cellular telephony architecture in MeeGo is centered on the oFono, PulseAudio and Telepathy frameworks. In addition, the Resource Manager plays a role in coordinating the device behavior during voice calls.&lt;br /&gt;
&lt;br /&gt;
The cellular modem HW adaptation SW must implement the following interfaces towards the MeeGo OS:&lt;br /&gt;
:* oFono modem plugin/driver API&lt;br /&gt;
:* Linux network interface for the Linux TCP/IP stack (for data communications)&lt;br /&gt;
:* Relevant PulseAudio plugin interfaces for cellular voice call audio handling&lt;br /&gt;
&lt;br /&gt;
For more detailed information about the oFono APIs, see the documentation and source code available at [http://git.kernel.org/?p=network/ofono/ofono.git;a=summary oFono git].&lt;br /&gt;
&lt;br /&gt;
==== USB ====&lt;br /&gt;
&lt;br /&gt;
The foundation of the the MeeGo USB functionality is the standard Linux USB subsystem. The Linux USB subsystem defines the USB related HW adaptation interfaces that need to be supported in MeeGo. In practice, these are kernel side interfaces between the generic USB functionality and a HW dependent USB host controller driver.&lt;br /&gt;
&lt;br /&gt;
==== WLAN ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo WLAN architecture is centered on the [http://linuxwireless.org/ Linux wireless] (IEEE-802.11) subsystem. The Linux wireless SW stack defines the WLAN HW adaptation SW interfaces that need to be used in MeeGo. In practice, the required interfaces are defined by cfg80211 for FullMAC WLAN devices and by mac80211 for SoftMAC WLAN devices. In addition, a Linux network interface needs to be supported towards the Linux TCP/IP stack.&lt;br /&gt;
&lt;br /&gt;
==== Bluetooth ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Bluetooth architecture is centered on the [http://www.bluez.org/ BlueZ] SW stack. The BlueZ SW stack defines the Bluetooth HW adaptation SW interfaces that need to be used in MeeGo. In practice, these are Linux kernel side interfaces between the generic HCI (Host Controller Interface) core and a HW specific HCI driver.&lt;br /&gt;
&lt;br /&gt;
=== Location Adaptation ===&lt;br /&gt;
&lt;br /&gt;
The MeeGo location architecture is based on [http://http://labs.trolltech.com/page/Projects/QtMobility| QtMobility Location API].  The QtMobility 1.0 Location API provides geographic coordinates only.  The QtMobility 1.1 Location API provides geocoding and reverse geocoding, POI search, navigation, and mapping.  The 1.0 Location API is available in MeeGo 1.1.  The 1.1 or later Location API will be available in MeeGo 1.2.  The Location API uses a plugin system for implementations of the underlying backend.  MeeGo compliance requirements require support for the QtMobility Location API and thus require one or more plugins to support these APIs.  MeeGo places no restrictions as to how the plugins are implemented, however. Adaptation to location related HW may be done by manufacturers or service providers and the way how it's done is not defined by the API.&lt;br /&gt;
&lt;br /&gt;
MeeGo will use [http://www.freedesktop.org/wiki/Software/GeoClue GeoClue] as the reference location framework and the reference implementation of the Qt Mobility location API backend will be written on top of GeoClue. GeoClue defines a set of (D-Bus) APIs for accessing location services provided by service providers implemented as D-Bus services. In addition, GeoClue includes a set of service provider implementations and (at the time of this writing) an experimental master service provider that can act as a proxy between clients and the actual service providers. If a device vendor wants to take advantage of this existing functionality, the vendor can implement their location services &amp;quot;behind&amp;quot; the GeoClue APIs as GeoClue service providers. In such a case, adaptation to the location related HW would happen inside the service providers as defined by the service provider designs.&lt;br /&gt;
&lt;br /&gt;
=== Sensor Adaptation === &lt;br /&gt;
&lt;br /&gt;
The key component in the MeeGo sensor handling architecture is the Sensor Framework. The Sensor Framework uses both HW independent logical sensor plugins and HW dependent sensor adaptor plugins in its operation. The required sensor HW adaptation interfaces in MeeGo are the interfaces that the Sensor Framework and the logical sensor plugins define for the sensor adaptor plugins to implement. The sensor adaptor plugins typically communicate directly with sensor HW drivers in the Linux kernel. The interfaces that the sensor HW drivers expose to the user space are not defined by MeeGo. Sensor HW adaptation in MeeGo thus consists of adaptor plugins in the Sensor Framework and sensor HW drivers in the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
Note that thermal sensors are handled in a different manner as described in the [[#Power and thermal management|''Power and thermal management'']] section above.&lt;br /&gt;
&lt;br /&gt;
=== Input Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Touch ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the touch input handling path in MeeGo are the touch HW device driver, Linux kernel input subsystem, X server, X input driver, Qt and finally the MeeGo Touch Framework. Enabling touch support for some new HW requires at least the implementation of the corresponding touch HW device driver in the Linux kernel. If this driver communicates touch events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, basically the existing functionality in X server (e.g. evdev input driver) and above can be used as such. In case the kernel-to-user-space interface is non-standard, it is also possible to implement a new X input driver as a part of the touch HW adaptation.&lt;br /&gt;
&lt;br /&gt;
Multi-touch support in X requires a new version, 2.1, of the [http://cgit.freedesktop.org/~whot/inputproto/tree/XI2proto.txt?h=multitouch X Input Extension] and this also requires support from the client side, in this case Qt's multi-touch support. Once this support has been implemented throughout the SW stack, including X evdev input driver, supporting multi-touch for some new HW should require only the implementation of a touch HW device driver that implements the standard Linux multi-touch interface. This should be the case in MeeGo 1.2. &lt;br /&gt;
&lt;br /&gt;
Before 1.2, multi-touch support in MeeGo uses a special X input driver (mtev), X server multi-pointer support (MPX) and Qt multi-touch support written on top of MPX. This solution requires the touch HW device driver to expose a user-space interface that is compatible with mtev.&lt;br /&gt;
&lt;br /&gt;
==== HW keyboard ====&lt;br /&gt;
&lt;br /&gt;
The key SW components on the HW keyboard input handling path in MeeGo are the keyboard HW device driver, Linux kernel input subsystem, X server, X input driver and Qt. Enabling keyboard support for some new HW requires typically only the implementation of the corresponding keyboard HW device driver in the Linux kernel. If this driver communicates key events to the user space in a &amp;quot;standard&amp;quot; manner via the Linux kernel input subsystem, the existing functionality in X server (e.g. evdev input driver) and above should work as such. In case the kernel-to-user space interface is non-standard, it is also possible to implement a new X input driver as a part of the keyboard HW adaptation.&lt;br /&gt;
&lt;br /&gt;
==== Buttons and switches ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo includes the MCE and System SW Qt API (QmSystem) components. The MCE can be used to control the device mode and it listens to power button events and e.g. device open/close switch events via the respective device driver interfaces. The System SW Qt API on the other hand provides a Qt API to various system information, including events from various physical buttons in the device (e.g. volume button, camera button). The System SW Qt API gets the button events either by listening to the relevant device driver interfaces or through the MCE component.&lt;br /&gt;
&lt;br /&gt;
Both the MCE and the System SW Qt API components can be adapted to new devices by device vendors.&lt;br /&gt;
&lt;br /&gt;
=== Haptics and Vibra Adaptation ===&lt;br /&gt;
&lt;br /&gt;
==== Haptics ====&lt;br /&gt;
&lt;br /&gt;
The MeeGo Touch Framework present (at least) in the MeeGo handset device category contains a component called Feedback Framework (meegotouch-feedback) that handles the creation of auditory and/or haptic feedback to touch events. The haptic feedback can be created e.g. with vibra motors or piezo elements. In the Feedback Framework, the different types of feedback are created by backend libraries implemented as plugins. &lt;br /&gt;
&lt;br /&gt;
The haptics related HW adaptation interface from MeeGo OS perspective is the backend plugin interface defined by the Feedback Framework. The plugins can then communicate with the HW either through some device driver interface or some intermediate SW layers (MeeGo places no restrictions as to how the plugins are implemented).&lt;br /&gt;
&lt;br /&gt;
==== Vibra (notifications/alerts) ====&lt;br /&gt;
&lt;br /&gt;
Starting from version 1.2, MeeGo (at least the handset category) will include a component called Non-Graphical Feedback Framework (NGF). This component offers the capability of playing e.g. audio, vibra or led as an indication of events such as incoming call/message, clock and calendar alarms, missed calls, unread messages etc. The NGF also integrates with the Resource Policy to decide about the available playback resources based on policy rules and the current system state.&lt;br /&gt;
&lt;br /&gt;
The actual playback of the different types of notifications is handled by NGF plugins that can be created by device vendors. The plugins communicate with the relevant HW as they see best, e.g. directly through some device driver interface or via some intermediate user space SW components. The plugin interfaces defined by NGF thus form the notification/alert vibra adaptation interface in MeeGo.&lt;br /&gt;
&lt;br /&gt;
=== Production Adaptation ===&lt;br /&gt;
&lt;br /&gt;
Production deals with areas such as flashing, testing, tuning and certification. The current understanding is that these areas are handled in a vendor specific manner, including the adaptation.&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;/div&gt;</summary>
		<author><name>Noel</name></author>	</entry>

	<entry>
		<id>http://wiki.meego.com/MeeGo_Porting_Guide</id>
		<title>MeeGo Porting Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.meego.com/MeeGo_Porting_Guide"/>
				<updated>2011-06-24T22:36:18Z</updated>
		
		<summary type="html">&lt;p&gt;Noel: /* Vendor's own OBS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The goal of MeeGo Porting Guide (MPG) is to provide valuable information and instructions to people who want to run MeeGo OS on their (new) HW and eventually create products based on the MeeGo OS. The MPG starts with an overview of the porting process, tools, and other related background information and then moves on to describing what the porting actually means in individual technical/functional areas.&lt;br /&gt;
&lt;br /&gt;
The porting guide is not strictly tied to any particular MeeGo OS version or device category. Instead, it tries to be general enough to cover the different device categories, as well as follow changes introduced in new MeeGo OS versions.&lt;br /&gt;
&lt;br /&gt;
Detailed porting information in the different technical areas is dependent on the respective [http://meego.com/developers/meego-architecture MeeGo architecture]. In some cases, this architecture may still be open and this is noted in the applicable sections.&lt;br /&gt;
&lt;br /&gt;
=== Feedback ===&lt;br /&gt;
&lt;br /&gt;
Contribution to these pages is open. Any MeeGo community member is free to ''improve'' these pages at any time. You can also leave feedback in the [http://lists.meego.com/listinfo/meego-porting MeeGo porting mailing list].&lt;br /&gt;
&lt;br /&gt;
== General porting information/guidelines ==&lt;br /&gt;
&lt;br /&gt;
=== MeeGo compliance ===&lt;br /&gt;
&lt;br /&gt;
Perhaps the most important piece of background information related to the MPG are the [[Quality/Compliance|MeeGo compliance requirements]]. A device that is meant to be MeeGo compliant will need to fulfill the requirements listed in the MeeGo compliance specification for the applicable device category (the first version of the specification is supposed to be available in October 2010). In short, a MeeGo compliant device will need to:&lt;br /&gt;
* Meet the minimum HW performance and component requirements for the applicable device category&lt;br /&gt;
* Include all SW components that form the MeeGo core OS&lt;br /&gt;
* Include the additional SW components required to be present in devices in the applicable device category&lt;br /&gt;
* Not break the API/ABI of any of the components coming from MeeGo&lt;br /&gt;
* Follow the MeeGo SW packaging conventions&lt;br /&gt;
&lt;br /&gt;
The compliance rules will also specify CPU architecture specific requirements concerning how MeeGo OS itself and MeeGo applications are to be compiled to different environments (instruction set used, compiler version, compiler options, etc.).&lt;br /&gt;
&lt;br /&gt;
A device vendor may include additional functionality, HW components and SW components in their devices, as long as they don't break MeeGo compliance. The vendor can also patch MeeGo OS components, if the patches don't break MeeGo compliance. A device vendor's own SW components can be either open source or closed source components, as long as they adhere to the rules set by the applicable SW licenses.&lt;br /&gt;
&lt;br /&gt;
From the MeeGo Porting Guide perspective, by defining the SW components and HW components that need to be present, the compliance requirements effectively define the minimum set of porting tasks required from a device vendor and what SW components are involved from MeeGo OS side.&lt;br /&gt;
&lt;br /&gt;
=== Porting process and tools ===&lt;br /&gt;
&lt;br /&gt;
==== Overview ====&lt;br /&gt;
&lt;br /&gt;
As long as a vendor's device is MeeGo compliant, as defined above, it i