9 --> |
9 --> |
10 <!DOCTYPE concept |
10 <!DOCTYPE concept |
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
12 <concept id="GUID-A3449F37-89BB-5208-8FD5-F4DF73F7E71A" xml:lang="en"><title>System |
12 <concept id="GUID-A3449F37-89BB-5208-8FD5-F4DF73F7E71A" xml:lang="en"><title>System |
13 Startup Overview</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
13 Startup Overview</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
14 <section id="GUID-C41A0540-2C28-4CCC-B8AA-8236C68CEB18"><title> Configuring and Controlling a device's boot process </title> <p>Whenever |
14 <section id="GUID-C41A0540-2C28-4CCC-B8AA-8236C68CEB18"><title> Configuring |
15 a Symbian device is powered up a number of things have to happen before it |
15 and Controlling a device's boot process </title> <p>Whenever a Symbian device |
16 is ready to be used. A number of processes and applications have to be started |
16 is powered up a number of things have to happen before it is ready to be used. |
17 and certain tasks performed. </p> <p>The System Starter and its related components |
17 A number of processes and applications have to be started and certain tasks |
18 control the startup process. This guide describes what the System Starter |
18 performed. </p> <p>The System Starter and its related components control the |
19 does and how it may be configured. Configuration is the responsibility of |
19 startup process. This guide describes what the System Starter does and how |
20 device manufacturers. A manufacturer may choose to enable operators, third |
20 it may be configured. Configuration is the responsibility of device manufacturers. |
21 parties and users to extend the startup configuration. </p> <p>There are numerous |
21 A manufacturer may choose to enable operators, third parties and users to |
22 considerations when configuring device startup. These include: </p> <ul> |
22 extend the startup configuration. </p> <p>There are numerous considerations |
|
23 when configuring device startup. These include: </p> <ul> |
23 <li id="GUID-5BA1769D-D1FC-59A4-87F6-30D031443CD9"><p>which processes, tasks |
24 <li id="GUID-5BA1769D-D1FC-59A4-87F6-30D031443CD9"><p>which processes, tasks |
24 and applications are required, </p> </li> |
25 and applications are required, </p> </li> |
25 <li id="GUID-48D7345B-0D3B-5ADA-A646-A3DAC85FE4F5"><p>the sequence of, and |
26 <li id="GUID-48D7345B-0D3B-5ADA-A646-A3DAC85FE4F5"><p>the sequence of, and |
26 inter-dependencies between, activities, </p> </li> |
27 inter-dependencies between, activities, </p> </li> |
27 <li id="GUID-9C7A919A-8C67-5DC0-BDD8-D1DC12AE0636"><p>the user experience, </p> </li> |
28 <li id="GUID-9C7A919A-8C67-5DC0-BDD8-D1DC12AE0636"><p>the user experience, </p> </li> |
36 <li id="GUID-5E519AE8-3268-5C2B-A623-2E99229947F8"><p>aftermarket applications </p> </li> |
37 <li id="GUID-5E519AE8-3268-5C2B-A623-2E99229947F8"><p>aftermarket applications </p> </li> |
37 </ul> <p><b>Processes and Applications </b> </p> <p>In the interest of readability |
38 </ul> <p><b>Processes and Applications </b> </p> <p>In the interest of readability |
38 this document frequently<b> uses the terms application and process interchangeably</b>. |
39 this document frequently<b> uses the terms application and process interchangeably</b>. |
39 Unless specifically stated otherwise you may assume that the term used refers |
40 Unless specifically stated otherwise you may assume that the term used refers |
40 to both. </p> </section> |
41 to both. </p> </section> |
41 <section id="GUID-528B2FD1-7233-413A-81C8-5064095135AB"><title>Static Startup Configuration</title> <p>The System Starter |
42 <section id="GUID-528B2FD1-7233-413A-81C8-5064095135AB"><title>Static Startup |
42 is automatically invoked as part of the boot process once the file system |
43 Configuration</title> <p>The System Starter is automatically invoked as part |
43 has been mounted. It works by processing a list of instructions in sequence. |
44 of the boot process once the file system has been mounted. It works by processing |
44 The list is referred to as a Static Startup Configuration, or SSC. In practical |
45 a list of instructions in sequence. The list is referred to as a Static Startup |
45 terms the SSC is defined in a resource file and is built into the ROM. </p> <p>A |
46 Configuration, or SSC. In practical terms the SSC is defined in a resource |
46 fundamental feature of the SSC is that it allows the start up procedure to |
47 file and is built into the ROM. </p> <p>A fundamental feature of the SSC is |
47 be optimised. Though the commands are processed in sequence their effect is |
48 that it allows the start up procedure to be optimised. Though the commands |
48 to perform tasks not only in <b>sequence</b> (wait for the application or |
49 are processed in sequence their effect is to perform tasks not only in <b>sequence</b> (wait |
49 process to initialise before continuing) but also in <b>parallel</b> (do not |
50 for the application or process to initialise before continuing) but also in <b>parallel</b> (do |
50 wait for initialisation) and <b>at the optimum time</b> (wait until conditions |
51 not wait for initialisation) and <b>at the optimum time</b> (wait until conditions |
51 are right). </p> <p>For further information on the contents of an SSC see: </p> <ul> |
52 are right). </p> <p>For further information on the contents of an SSC see: </p> <ul> |
52 <li id="GUID-1F8911D9-F92B-5A4F-8548-942842A7ED2A"><p><xref href="GUID-57F38146-1DA3-5657-ADF4-76DF740363C5.dita">Static |
53 <li id="GUID-1F8911D9-F92B-5A4F-8548-942842A7ED2A"><p><xref href="GUID-57F38146-1DA3-5657-ADF4-76DF740363C5.dita">Static |
53 Startup Configuration</xref> </p> </li> |
54 Startup Configuration</xref> </p> </li> |
54 </ul> <p>Though an SSC cannot be changed, a number of SSCs may be included |
55 </ul> <p>Though an SSC cannot be changed, a number of SSCs may be included |
55 in a ROM. This allows a device to be started with one of a number of different |
56 in a ROM. This allows a device to be started with one of a number of different |
57 <li id="GUID-92E0E027-8A4F-55A5-AC48-4252164E2E77"><p>The mode determines |
58 <li id="GUID-92E0E027-8A4F-55A5-AC48-4252164E2E77"><p>The mode determines |
58 which SSC the System Starter uses to start the system. Symbian has defined |
59 which SSC the System Starter uses to start the system. Symbian has defined |
59 (and reserved) a number of Startup Modes (for test and reference purposes): |
60 (and reserved) a number of Startup Modes (for test and reference purposes): |
60 Full, Emulator, Emergency, Battery charge & Test. Device manufacturers |
61 Full, Emulator, Emergency, Battery charge & Test. Device manufacturers |
61 may use their own startup modes and reserve their own unique range of values |
62 may use their own startup modes and reserve their own unique range of values |
62 by sending an email to the Device Services package mailing list (<xref href="mailto:td-os_base_services-dev@lists.symbian.org" scope="external">td-os_base_services-dev@lists.symbian.org</xref>) |
63 by sending an email to the Device Services package mailing list (<xref href="mailto:td-os_base_services-dev@lists.symbian.org" scope="external">td-os_base_services-dev@lists.symbian.org</xref>) specifying: </p> <ol id="GUID-E4D9A3AB-4BD5-5E5E-8B70-8E6435842F06"> |
63 specifying: </p> <ol id="GUID-E4D9A3AB-4BD5-5E5E-8B70-8E6435842F06"> |
|
64 <li id="GUID-9F4658CA-4DCE-5E88-91FC-AE0F3CA65997"><p>the device manufacturer |
64 <li id="GUID-9F4658CA-4DCE-5E88-91FC-AE0F3CA65997"><p>the device manufacturer |
65 name </p> </li> |
65 name </p> </li> |
66 <li id="GUID-AA1CC293-099A-5534-BA71-3EEE6691BE53"><p>the number of start-up |
66 <li id="GUID-AA1CC293-099A-5534-BA71-3EEE6691BE53"><p>the number of start-up |
67 mode ranges required (each range has 32 values)</p> </li> |
67 mode ranges required (each range has 32 values)</p> </li> |
68 </ol> </li> |
68 </ol> </li> |
69 </ul> <p>SSC files are named <filepath>SCCForStartupModeN.rss</filepath> where |
69 </ul> <p>SSC files are named <filepath>SCCForStartupModeN.rss</filepath> where |
70 N is the number of the mode. The method of selecting the mode, and therefore |
70 N is the number of the mode. The method of selecting the mode, and therefore |
71 the SSC file, for each startup is defined by the licensee. </p> <p>The degree |
71 the SSC file, for each startup is defined by the licensee. </p> <p>The degree |
72 to which an SSC can control and optimise the boot process is further enhanced |
72 to which an SSC can control and optimise the boot process is further enhanced |
73 by the concepts of <b>Startup States</b> and <b>Staged Startup</b>. </p> <p><b> Startup States</b> </p> <p>An SSC is divided into a series of states which |
73 by the concepts of <b>Startup States</b> and <b>Staged Startup</b>. </p> <p><b> Startup |
74 follow each other sequentially. Those described here are defined by Symbian. |
74 States</b> </p> <p>An SSC is divided into a series of states which follow |
75 Licencees may add or insert further states by defining them and including |
75 each other sequentially. Those described here are defined by Symbian. Licencees |
76 them in an SSC. The Symbian defined states have a certain significance: </p> <ul> |
76 may add or insert further states by defining them and including them in an |
|
77 SSC. The Symbian defined states have a certain significance: </p> <ul> |
77 <li id="GUID-4C3113C7-CFAF-59AE-A271-51424F6B2478"><p> <b>The Critical Static |
78 <li id="GUID-4C3113C7-CFAF-59AE-A271-51424F6B2478"><p> <b>The Critical Static |
78 State:</b> This is when the essential ROM based components are started. Nothing |
79 State:</b> This is when the essential ROM based components are started. Nothing |
79 started in this state relies on anything outside the ROM. </p> </li> |
80 started in this state relies on anything outside the ROM. </p> </li> |
80 <li id="GUID-56754FF8-08A4-56BE-A4C2-A8F2A25AE738"><p> <b> The Critical Dynamic |
81 <li id="GUID-56754FF8-08A4-56BE-A4C2-A8F2A25AE738"><p> <b> The Critical Dynamic |
81 State:</b> This is when essential non-ROM based components and components |
82 State:</b> This is when essential non-ROM based components and components |
82 which use non-ROM based files are started. </p> </li> |
83 which use non-ROM based files are started. </p> </li> |
83 <li id="GUID-804244EC-006E-5216-B286-D9FC6B9495EA"><p> <b> The Non-critical |
84 <li id="GUID-804244EC-006E-5216-B286-D9FC6B9495EA"><p> <b> The Non-critical |
84 State:</b> Components started here are not essential for the basic functionality |
85 State:</b> Components started here are not essential for the basic functionality |
85 of the device. i.e. the phone will be 'up and running' before these components |
86 of the device. i.e. the phone will be 'up and running' before these components |
86 are started. </p> </li> |
87 are started. </p> </li> |
87 </ul> <p><b>Staged |
88 </ul><p><b>Staged Startup</b> </p> <p>A further level of startup control and |
88 Startup</b> </p> <p>A further level of startup control and configuration can |
89 configuration can be achieved using Staged Startup. This technique enables |
89 be achieved using Staged Startup. This technique enables components to perform |
90 components to perform their initialisation procedure as separate stages - |
90 their initialisation procedure as separate stages - essential earlier, non-essential |
91 essential earlier, non-essential later. This enables further reduction of |
91 later. This enables further reduction of the effective boot time. </p> <p>Applications |
92 the effective boot time. </p> <p>Applications must be <b>Staged Startup Aware |
92 must be <b>Staged Startup Aware (SSA)</b> to take advantage of the staged |
93 (SSA)</b> to take advantage of the staged startup facilities. They must register |
93 startup facilities. They must register with the Starter so that they can receive |
94 with the Starter so that they can receive state-change notifications. An SSA |
94 state-change notifications. An SSA application may perform a <b>stage</b> of |
95 application may perform a <b>stage</b> of its startup during each SSC <b>state</b>. </p> <p>Staged |
95 its startup during each SSC <b>state</b>. </p> <p>Staged startup subdivides |
96 startup subdivides each state into five ordered domains: Kernel, Base, OS |
96 each state into five ordered domains: Kernel, Base, OS Services, Application |
97 Services, Application Services and UI Framework (these correspond to the <xref href="http://developer.symbian.org/wiki/index.php/Symbian_System_Model" scope="external">Symbian |
97 Services and UI Framework (these correspond to the <xref href="GUID-98E4DFEE-D7FA-581B-A56C-89797890D418.dita">Symbian |
98 System Model</xref>). Each SSA component associates itself with a domain according |
98 OS System Model</xref>). Each SSA component associates itself with a domain |
99 to its location in the System Model. Within each state the domains are processed |
99 according to its location in the System Model. Within each state the domains |
100 sequentially. This allows application dependency to be accommodated without |
100 are processed sequentially. This allows application dependency to be accommodated |
101 individual applications having to manage these dependencies. </p> </section> |
101 without individual applications having to manage these dependencies. </p> </section> |
102 <section id="GUID-F58AE201-31BF-4E36-96B6-50D61A53B9CA"><title>Dynamic Startup |
102 <section id="GUID-F58AE201-31BF-4E36-96B6-50D61A53B9CA"><title>Dynamic Startup Configuration (DSC) </title> <p>All of the |
103 Configuration (DSC) </title> <p>All of the components included in the Static |
103 components included in the Static Startup Configuration are present for the |
104 Startup Configuration are present for the life of the device. Components installed |
104 life of the device. Components installed after the ROM has been built, or |
105 after the ROM has been built, or after the device has been shipped, may also |
105 after the device has been shipped, may also be started during boot by being |
106 be started during boot by being added to a Dynamic Startup Configuration (DSC). </p> <p>One |
106 added to a Dynamic Startup Configuration (DSC). </p> <p>One or more DSCs may |
107 or more DSCs may be included at various points in an SSC. </p> <p>A run-time |
107 be included at various points in an SSC. </p> <p>A run-time API allows entries |
108 API allows entries to be added to and deleted from a DSC. This means that |
108 to be added to and deleted from a DSC. This means that aftermarket applications, |
109 aftermarket applications, updates and patches can be inserted automatically |
109 updates and patches can be inserted automatically on installation, over the |
110 on installation, over the air by a Network Operator, or by the user. </p> <ul> |
110 air by a Network Operator, or by the user. </p> <ul> |
|
111 <li id="GUID-84D36270-880B-56F4-BBD9-5C80F9DA1BEF"><p><xref href="GUID-E3941FAF-988E-5FB3-8E62-84E192E41EA1.dita">How |
111 <li id="GUID-84D36270-880B-56F4-BBD9-5C80F9DA1BEF"><p><xref href="GUID-E3941FAF-988E-5FB3-8E62-84E192E41EA1.dita">How |
112 to use the DSC API</xref> </p> </li> |
112 to use the DSC API</xref> </p> </li> |
113 </ul> </section> |
113 </ul> </section> |
114 <section id="GUID-D6D28700-0BAD-4F88-8CE9-2E0330233468"><title>Specifying action on failure </title> <p>Though system startup |
114 <section id="GUID-D6D28700-0BAD-4F88-8CE9-2E0330233468"><title>Specifying |
115 is an automatic process, things can go wrong. In some cases the device can |
115 action on failure </title> <p>Though system startup is an automatic process, |
116 continue to function if a component fails to start, in others it cannot. Applications |
116 things can go wrong. In some cases the device can continue to function if |
117 can fail to start or fail after they have started for a variety of reasons. |
117 a component fails to start, in others it cannot. Applications can fail to |
118 Symbian OS provides mechanisms for detecting and handling failure. </p> <p>When |
118 start or fail after they have started for a variety of reasons. Symbian provides |
119 an application is started using an SSC or a DSC several parameters must be |
119 mechanisms for detecting and handling failure. </p> <p>When an application |
120 specified in its resource. These include: </p> <ul> |
120 is started using an SSC or a DSC several parameters must be specified in its |
|
121 resource. These include: </p> <ul> |
121 <li id="GUID-4DC8B8DA-FA50-57E9-B1FD-B60991C927C1"><p>a startup method (<codeph>EFireAndForget</codeph>, <codeph>EWaitForStart</codeph>, <codeph>EDeferredWaitForStart</codeph>) </p> </li> |
122 <li id="GUID-4DC8B8DA-FA50-57E9-B1FD-B60991C927C1"><p>a startup method (<codeph>EFireAndForget</codeph>, <codeph>EWaitForStart</codeph>, <codeph>EDeferredWaitForStart</codeph>) </p> </li> |
122 <li id="GUID-8236B8FB-CDD9-544A-91FA-F53231EDEDAF"><p>the number of retries |
123 <li id="GUID-8236B8FB-CDD9-544A-91FA-F53231EDEDAF"><p>the number of retries |
123 (attempts to start the application) </p> </li> |
124 (attempts to start the application) </p> </li> |
124 <li id="GUID-A9EA3792-BA99-59C8-8AE1-40A34CFAC095"><p>a timeout period (after |
125 <li id="GUID-A9EA3792-BA99-59C8-8AE1-40A34CFAC095"><p>a timeout period (after |
125 which an EWaitForStart startup will be considered to have failed) </p> </li> |
126 which an EWaitForStart startup will be considered to have failed) </p> </li> |
128 <li id="GUID-F737C84D-3BAB-5256-858E-4D9EF9C0AB19"><p>a restart mode (the |
129 <li id="GUID-F737C84D-3BAB-5256-858E-4D9EF9C0AB19"><p>a restart mode (the |
129 phone might restart in a 'Safe Mode', for instance) </p> </li> |
130 phone might restart in a 'Safe Mode', for instance) </p> </li> |
130 <li id="GUID-2030D3D4-D1C6-5E80-B75E-F8F656CA5168"><p>whether to initiate |
131 <li id="GUID-2030D3D4-D1C6-5E80-B75E-F8F656CA5168"><p>whether to initiate |
131 monitoring after the component has made its rendezvous. </p> </li> |
132 monitoring after the component has made its rendezvous. </p> </li> |
132 </ul> <p>If, after the <b>timeout period</b> the application has not made |
133 </ul> <p>If, after the <b>timeout period</b> the application has not made |
133 its rendezvous, the OS can make further attempts to start it. If, after the <b>number |
134 its rendezvous, the platform can make further attempts to start it. If, after |
134 of retries</b> specified, it has not succeeded it will take the specified <b>restart |
135 the <b>number of retries</b> specified, it has not succeeded it will take |
135 action</b>. If the restart action is <codeph>ERestartOS</codeph> or <codeph>ERestartOSWithMode</codeph> it |
136 the specified <b>restart action</b>. If the restart action is <codeph>ERestartOS</codeph> or <codeph>ERestartOSWithMode</codeph> it |
136 will shut down the device and restart it (in the second case in the <b>restart |
137 will shut down the device and restart it (in the second case in the <b>restart |
137 mode</b> specified). If <b>monitoring</b> is enabled the System Monitor will |
138 mode</b> specified). If <b>monitoring</b> is enabled the System Monitor will |
138 continue to monitor the process after a successful rendezvous and, if it stops |
139 continue to monitor the process after a successful rendezvous and, if it stops |
139 unexpectedly at any time, will re-use the same configuration information and |
140 unexpectedly at any time, will re-use the same configuration information and |
140 act accordingly. </p> <ul> |
141 act accordingly. </p> <ul> |
141 <li id="GUID-64BFBF8C-3279-5DE5-9350-19DB7FD5D481"><p><xref href="GUID-4E195F2A-78AE-5664-A115-AD65BF457AB1.dita">How |
142 <li id="GUID-64BFBF8C-3279-5DE5-9350-19DB7FD5D481"><p><xref href="GUID-4E195F2A-78AE-5664-A115-AD65BF457AB1.dita">How |
142 to use the System Monitor</xref> </p> </li> |
143 to use the System Monitor</xref> </p> </li> |
143 </ul> <p>Note that processes or threads declared 'System Critical' use an |
144 </ul> <p>Note that processes or threads declared 'System Critical' use an |
144 aternative monitoring mechanism, which pre-dates the System Monitor, to restart |
145 aternative monitoring mechanism, which pre-dates the System Monitor, to restart |
145 the OS when they fail (see <xref href="GUID-B0E661BC-4058-3256-B9C3-5A4FD52F6DE5.dita#GUID-B0E661BC-4058-3256-B9C3-5A4FD52F6DE5/GUID-AF3E8BE4-FE65-3CCE-8B5A-6C4585BEA2EC"><apiname>RThread::SetCritical()</apiname></xref>). The |
146 the platform, when they fail (see <xref href="GUID-B0E661BC-4058-3256-B9C3-5A4FD52F6DE5.dita#GUID-B0E661BC-4058-3256-B9C3-5A4FD52F6DE5/GUID-AF3E8BE4-FE65-3CCE-8B5A-6C4585BEA2EC"><apiname>RThread::SetCritical()</apiname></xref>). |
146 System Monitor offers two significant advantages: the ability to restart the |
147 The System Monitor offers two significant advantages: the ability to restart |
147 process without restarting the OS and the option of restarting in a specified |
148 the process without restarting the platform, and the option of restarting |
148 mode. </p> </section> |
149 in a specified mode. </p> </section> |
149 </conbody></concept> |
150 </conbody></concept> |