<?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.dita">Kernel & 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 suppplied 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-93D5D175-5493-55F2-B0C2-E1EEE852474D"><p><xref href="GUID-9540A82E-F83D-55F5-B441-868CF77468E9.dita">Media
Drivers</xref> </p> </li>
<li id="GUID-85D744D4-81B2-55EC-B746-F3DF263B306D"><p><xref href="GUID-0C435514-EEC6-5660-BB5F-535790349632.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-1499E635-B6E3-51A0-AE38-ADF99FF86CD6.dita">Sound
Driver</xref> </p> </li>
<li id="GUID-C69A5E75-E65B-51F7-AE89-22DC80AFB6F9"><xref href="GUID-AD195629-81CE-5E57-A59E-C67AACF7A2C2.dita">USB
Client Driver Technology</xref><p> </p> </li>
</ul> </section>
</conbody></concept>