Adaptation/GUID-5CCF303A-B7D5-570D-9BE8-29DFBE184995.dita
author Graeme Price <GRAEME.PRICE@NOKIA.COM>
Fri, 15 Oct 2010 14:32:18 +0100
changeset 15 307f4279f433
permissions -rw-r--r--
Initial contribution of the Adaptation Documentation.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-5CCF303A-B7D5-570D-9BE8-29DFBE184995" xml:lang="en"><title>Porting Overview</title><shortdesc>This topic describes the typical steps that you will need
to do to create a base port. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<p>The easiest way to create a base port is to take the supplied template
port and expand it to suit your own hardware configuration(s). The
template port, is an outline, but working, framework that you can
modify to suit your own hardware. </p>
<p>The template port can be found under the <filepath>sf/os/kernelhwsrv/bsptemplate/</filepath> directory. For more information about the template port see <xref href="http://developer.symbian.org/wiki/index.php/Kernel_%26_Hardware_Services_Quick_Start" scope="external">Kernel &amp; Hardware Quick Start Guide</xref>.</p>
<section id="GUID-F8897488-2A94-461D-AA11-7AC2BDA1D3C5"><title>Set
up the environment</title> <p>The first thing to do is to set up your
environment for building, downloading onto your hardware, and testing
that the port works. </p> </section>
<section id="GUID-124A8A3A-D114-4A68-9E9E-7062815A8717"><title>Build,
download, and test the supplied template port</title> <p>As supplied,
the template port is designed to boot on any hardware. It should boot
successfully, but clearly, the system can do nothing more at this
time. A successful boot shows that your build environment has been
set up correctly. </p> </section>
<section id="GUID-89940537-DA6E-4DE6-9133-74771EB15F6F"><title>Copy
and rename the Template port</title> <p>When porting the base to a
new platform, you will need to code and build the Variant. This provides
those hardware dependent services required by the kernel. In nearly
all ports, this is split into an ASSP DLL and a Variant DLL. We usually
refer to the ASSP layer and the Variant layer. </p> <p>It is desirable
that code that depends only on the properties of the ASSP be segregated
from code that depends on details of the system outside the ASSP,
so that multiple systems that use the same ASSP can share common code. </p> <p>For example, in the template reference port, the <filepath>..\template_assp\...</filepath> directory contains source code that contains the ASSP code, whereas
the <filepath>...\template_variant\...</filepath> directory contains
the code specific to the template board. </p> </section>
<section id="GUID-B43B51BC-9ED4-4737-B738-182DBAF04C25"><title>Code
the Bootstrap</title> <p>The bootstrap consists of several generic
source and header files supplied as part of Symbian platform, and
a set of platform specific files. You need to create these platform
specific files as part of a base port. </p> <p>For details, see <xref href="GUID-53944506-5CA2-52BA-8D5A-9EE72092612B.dita">Bootstrap</xref>. </p> <p>The updated port can then be built, downloaded and tested. </p> </section>
<section id="GUID-699C7EE9-A65A-5431-B23D-C5BD80494C09"><title>Implement
the interrupt dispatcher</title> <p>An interrupt is a condition that
causes the CPU to suspend normal execution, enter interrupt handling
state and jump to a section of code called an interrupt handler. The
ASSP/Variant part of the base port must implement an interrupt dispatcher
class to manage interrupts. </p> <p>For details, see the <xref href="GUID-3C34724F-B476-5329-B0B1-6D5A34294979.dita">Interrupt Dispatcher
Implementation Tutorial</xref>. </p> <p>The updated port can then
be built, downloaded and tested. </p> </section>
<section id="GUID-57F05EBC-310B-5288-B35E-CAA27E933590"><title>Implement
the Asic class</title> <p>The Kernel requires that the ASSP/Variant
part of the base port provides an implementation of the <xref href="GUID-A83A7C3C-7DC0-3B9C-842F-70FCC751365D.dita"><apiname>Asic</apiname></xref> interface. This defines a small number of hardware-specific functions
that are used by the Kernel. </p> <p>For details, see the <xref href="GUID-E0DCBDCF-C056-53E5-A375-778327F848E4.dita#GUID-E0DCBDCF-C056-53E5-A375-778327F848E4/GUID-39010DA3-632A-5C27-92BF-9AA8B5966EAB">Asic Class Tutorial</xref>. </p> <p>The updated port can then be
built, downloaded and tested. </p> </section>
<section id="GUID-88B8F550-4E17-48FE-8A5A-1961E7F0642F"><title>Port
the User-Side Hardware Abstraction (HAL)</title> <p>The User-Side
Hardware Abstraction (HAL) component provides a simple interface for
programs to read and set hardware-specific settings, for example,
the display contrast. A base port must define the attributes that
clients can use on a phone, and implement any functions that are required
to get and set the attributes. </p> <p>For details, see <xref href="GUID-2D977A02-5928-5441-8AE7-42A722F2A4B8.dita#GUID-2D977A02-5928-5441-8AE7-42A722F2A4B8/GUID-4DA41221-40B9-5BC7-B2C6-7C6EB4522508">User-Side Hardware Abstraction</xref>. </p> </section>
<section id="GUID-BB519F80-9BE3-4816-9C84-FDD5DE67B6D0"><title>Port
the other drivers</title> <p>The remaining drivers can now be ported.
Go and see: </p> <ul>
<li id="GUID-6D6B4F23-9F27-5DBF-A0FB-9E48CCCAA4AF"><p><xref href="GUID-DF2F0439-AE1A-599C-91B9-6EF2177C3C7E.dita">DMA Framework</xref>  </p> </li>
<li id="GUID-A0CF718D-29D3-5137-9964-40A5C179674D"><p><xref href="GUID-E081474F-6B17-5D2E-833B-E8177778577A.dita">Digitizer Driver</xref>  </p> </li>
<li id="GUID-92D3BEC0-2BCD-51D1-9222-8214F9B6889E"><p><xref href="GUID-D048E187-6B1C-5A80-9CD0-89CD10688C6F.dita">Keyboard Driver</xref>  </p> </li>
<li id="GUID-E9E1CE2D-B8F4-577F-99EB-A9622F302C2A"><p><xref href="GUID-8C22AF20-EE0E-5AD2-BEFD-FED5A7DBB09B.dita">LCD Extension</xref>  </p> </li>
<li id="GUID-A59034CE-8742-5666-9585-0FD1A2DE30E7"><p> <xref href="GUID-5C223AD5-4676-58B4-B3A5-066F6B69AA4D.dita#GUID-5C223AD5-4676-58B4-B3A5-066F6B69AA4D/GUID-868866C8-E90C-5291-8732-BB4E86D6B43E">Local Media Subsystem</xref>   </p> </li>
<li id="GUID-85D744D4-81B2-55EC-B746-F3DF263B306D"><p><xref href="GUID-F5430A12-D89D-4936-B846-E917B434F755.dita">Power Management</xref>   </p> </li>
<li id="GUID-9AD5A0B3-83F7-50DC-AB8D-BDE8830235FA"><p> <xref href="GUID-A04F46F8-1BA9-5A77-B455-59C67DD4AA36.dita#GUID-A04F46F8-1BA9-5A77-B455-59C67DD4AA36/GUID-2AC9DD85-20AB-5E41-B21C-A08300989531">Serial Port Driver</xref>   </p> </li>
<li id="GUID-B9994028-8D4E-5752-8F84-018346EC617B"><p><xref href="GUID-669C77A3-89BA-5321-ABB1-4356A5FE478C.dita">Sound Driver</xref>   </p> </li>
<li id="GUID-C69A5E75-E65B-51F7-AE89-22DC80AFB6F9"><xref href="GUID-C06CFF3E-23E9-5E0B-99A1-51B8ED95465F.dita">USB Client Driver
Technology</xref><p>  </p> </li>
</ul> </section>
</conbody></concept>