• Home
Name Date Size #Lines LOC

..--

device_info/07-Sep-2024-904644

figures/07-Sep-2024-

initsync/07-Sep-2024-218134

interfaces/07-Sep-2024-13,3999,255

scripts/07-Sep-2024-172124

services/07-Sep-2024-41,67934,455

simulator/07-Sep-2024-613501

test/07-Sep-2024-33,36823,166

ueventd/07-Sep-2024-2,4961,997

watchdog/07-Sep-2024-205169

CODEOWNERSD07-Sep-2024660 1514

LICENSED07-Sep-202410.1 KiB177150

OAT.xmlD07-Sep-20245.8 KiB8539

README.mdD07-Sep-202420.3 KiB260228

README_zh.mdD07-Sep-20244.8 KiB9267

begetd.gniD07-Sep-20241.7 KiB5442

bundle.jsonD07-Sep-20246.2 KiB174173

README.md

1# init<a name="EN-US_TOPIC_0000001129033057"></a>
2
3-   [Introduction](#section469617221261)
4-   [Directory Structure](#section15884114210197)
5-   [Constraints](#section12212842173518)
6-   [Usage](#section837771600)
7-   [Repositories Involved](#section641143415335)
8
9## Introduction<a name="section469617221261"></a>
10
11The init module starts system service processes from the time the kernel loads the first user-space process to the time the first application is started. In addition to loading key system processes, the module needs to configure their permissions during the startup and keep the specified process alive after sub-processes are started. If a process exits abnormally, the module needs to restart it, and to perform system reset for a special process.
12
13## Directory Structure<a name="section15884114210197"></a>
14
15```
16base/startup/init/             # init module
17├── LICENSE
18└── services
19    ├── include                  # Header files for the init module
20    ├── src                      # Source files for the init module
21    └── test                     # Source files of the test cases for the init module
22        └── unittest
23vendor
24└──huawei
25        └──camera
26                └──init_configs  # init configuration files (in JSON format, and deployed in /etc/init.cfg after image burning)
27```
28
29## Constraints<a name="section12212842173518"></a>
30
31Currently, the init module applies only to small-system devices \(reference memory ≥ 1 MB\), for example, Hi3516D V300 and Hi3518E V300.
32
33## Usage<a name="section837771600"></a>
34
35init divides the system startup into three phases:
36
37pre-init: operations required before system services are started, for example, mounting a file system, creating a folder, and modifying permissions
38
39init: operations required for starting system services.
40
41post-init: operations required after system services are started.
42
43In the  **init.cfg**  file, each of the preceding phases is represented by a job, which corresponds to a command set. The init\_lite module initializes the system by executing the commands in each job in sequence. Jobs are executed in the following sequence: pre-init \> init \> post-init. All jobs are stored in the  **jobs**  array in the  **init.cfg**  file.
44
45In addition to the  **jobs**  array, the  **init.cfg**  file also provides a  **services**  array, which is used to store the names, executable file paths, permissions, and other attribute information of the key system services that need to be started by the init process.
46
47The file is stored in  **/vendor/hisilicon/hispark\_aries/init\_configs/**  under  **/etc/**. It is in JSON format, and its size cannot exceed 100 KB.
48
49The format and content of the  **init.cfg**  file are as follows:
50
51```
52{
53    "jobs" : [{
54            "name" : "pre-init",
55            "cmds" : [
56                "mkdir /testdir",
57                "chmod 0700 /testdir",
58                "chown 99 99 /testdir",
59                "mkdir /testdir2",
60                "mount vfat /dev/mmcblk0p0 /testdir2 noexec nosuid"
61            ]
62        }, {
63            "name" : "init",
64            "cmds" : [
65                "start service1",
66                "start service2"
67             ]
68        }, {
69             "name" : "post-init",
70             "cmds" : []
71        }
72    ],
73    "services" : [{
74            "name" : "service1",
75            "path" : "/bin/process1",
76            "uid" : 1,
77            "gid" : 1,
78            "secon" : "u:r:untrusted_app:s0",
79            "once" : 0,
80            "importance" : 1,
81            "caps" : [0, 1, 2, 5]
82    }, {
83            "name" : "service2",
84            "path" : "/bin/process2",
85            "uid" : 2,
86            "gid" : 2,
87            "secon" : "u:r:untrusted_app:s0",
88            "once" : 1,
89            "importance" : 0,
90            "caps" : []
91        }
92    ]
93}
94```
95
96**Table  1**  Job description
97
98<a name="table1801509284"></a>
99<table><thead align="left"><tr id="row680703289"><th class="cellrowborder" valign="top" width="13.4%" id="mcps1.2.3.1.1"><p id="p11805012282"><a name="p11805012282"></a><a name="p11805012282"></a>Job Name</p>
100</th>
101<th class="cellrowborder" valign="top" width="86.6%" id="mcps1.2.3.1.2"><p id="p2811605289"><a name="p2811605289"></a><a name="p2811605289"></a>Description</p>
102</th>
103</tr>
104</thead>
105<tbody><tr id="row178140112810"><td class="cellrowborder" valign="top" width="13.4%" headers="mcps1.2.3.1.1 "><p id="p6811809281"><a name="p6811809281"></a><a name="p6811809281"></a>pre-init</p>
106</td>
107<td class="cellrowborder" valign="top" width="86.6%" headers="mcps1.2.3.1.2 "><p id="p18115019284"><a name="p18115019284"></a><a name="p18115019284"></a>Job that is executed first. Operations (for example, creating a folder) required before the process startup are executed in this job.</p>
108</td>
109</tr>
110<tr id="row381120182817"><td class="cellrowborder" valign="top" width="13.4%" headers="mcps1.2.3.1.1 "><p id="p148116002812"><a name="p148116002812"></a><a name="p148116002812"></a>init</p>
111</td>
112<td class="cellrowborder" valign="top" width="86.6%" headers="mcps1.2.3.1.2 "><p id="p14818016288"><a name="p14818016288"></a><a name="p14818016288"></a>Job that is executed in between. Operations (for example, service startup) are executed in this job.</p>
113</td>
114</tr>
115<tr id="row181100162813"><td class="cellrowborder" valign="top" width="13.4%" headers="mcps1.2.3.1.1 "><p id="p3811804281"><a name="p3811804281"></a><a name="p3811804281"></a>post-init</p>
116</td>
117<td class="cellrowborder" valign="top" width="86.6%" headers="mcps1.2.3.1.2 "><p id="p18116016285"><a name="p18116016285"></a><a name="p18116016285"></a>Job that is finally executed. Operations (for example, mounting the device after the driver initialization) required after the process startup are executed in this job.</p>
118</td>
119</tr>
120</tbody>
121</table>
122
123A single job can hold a maximum of 30 commands \(only  **start**,  **mkdir**,  **chmod**,  **chown**,  **mount**, and  **loadcfg**  are supported currently\). The command name and parameters \(128 bytes or less\) must be separated by only one space.
124
125**Table  2**  Commands supported by a job
126
127<a name="table122681439144112"></a>
128<table><thead align="left"><tr id="row826873984116"><th class="cellrowborder" valign="top" width="10.15%" id="mcps1.2.4.1.1"><p id="p826833919412"><a name="p826833919412"></a><a name="p826833919412"></a>Command</p>
129</th>
130<th class="cellrowborder" valign="top" width="34.089999999999996%" id="mcps1.2.4.1.2"><p id="p3381142134118"><a name="p3381142134118"></a><a name="p3381142134118"></a>Format and Example</p>
131</th>
132<th class="cellrowborder" valign="top" width="55.76%" id="mcps1.2.4.1.3"><p id="p1268539154110"><a name="p1268539154110"></a><a name="p1268539154110"></a>Description</p>
133</th>
134</tr>
135</thead>
136<tbody><tr id="row142681039124116"><td class="cellrowborder" valign="top" width="10.15%" headers="mcps1.2.4.1.1 "><p id="p2083714604313"><a name="p2083714604313"></a><a name="p2083714604313"></a>mkdir</p>
137</td>
138<td class="cellrowborder" valign="top" width="34.089999999999996%" headers="mcps1.2.4.1.2 "><p id="p143811842154111"><a name="p143811842154111"></a><a name="p143811842154111"></a>mkdir <em id="i59061027135319"><a name="i59061027135319"></a><a name="i59061027135319"></a>target folder</em></p>
139<p id="p4377174213435"><a name="p4377174213435"></a><a name="p4377174213435"></a>Example: mkdir /storage/myDirectory</p>
140</td>
141<td class="cellrowborder" valign="top" width="55.76%" headers="mcps1.2.4.1.3 "><p id="p56817536457"><a name="p56817536457"></a><a name="p56817536457"></a>Creates a folder. <strong id="b1111653719537"><a name="b1111653719537"></a><a name="b1111653719537"></a>mkdir</strong> and the target folder must be separated by only one space.</p>
142</td>
143</tr>
144<tr id="row1268133919413"><td class="cellrowborder" valign="top" width="10.15%" headers="mcps1.2.4.1.1 "><p id="p97961563461"><a name="p97961563461"></a><a name="p97961563461"></a>chmod</p>
145</td>
146<td class="cellrowborder" valign="top" width="34.089999999999996%" headers="mcps1.2.4.1.2 "><p id="p20381144234118"><a name="p20381144234118"></a><a name="p20381144234118"></a>chmod <em id="i15124416538"><a name="i15124416538"></a><a name="i15124416538"></a>permission</em> <em id="i1056644195314"><a name="i1056644195314"></a><a name="i1056644195314"></a>target</em></p>
147<p id="p6334213124413"><a name="p6334213124413"></a><a name="p6334213124413"></a>Examples: chmod 0600 /storage/myFile.txt</p>
148<p id="p1748214543444"><a name="p1748214543444"></a><a name="p1748214543444"></a>chmod 0750 /storage/myDir</p>
149</td>
150<td class="cellrowborder" valign="top" width="55.76%" headers="mcps1.2.4.1.3 "><p id="p2023822074614"><a name="p2023822074614"></a><a name="p2023822074614"></a>Modifies the permission, which must be in the <strong id="b8112193214139"><a name="b8112193214139"></a><a name="b8112193214139"></a>0<em id="i11455534181314"><a name="i11455534181314"></a><a name="i11455534181314"></a>xxx</em></strong> format. <strong id="b2675148175310"><a name="b2675148175310"></a><a name="b2675148175310"></a>chmod</strong>, <em id="i46798488538"><a name="i46798488538"></a><a name="i46798488538"></a>permission</em>, and <em id="i667944825318"><a name="i667944825318"></a><a name="i667944825318"></a>target</em> must be separated by only one space.</p>
151</td>
152</tr>
153<tr id="row7268143918416"><td class="cellrowborder" valign="top" width="10.15%" headers="mcps1.2.4.1.1 "><p id="p8255346174610"><a name="p8255346174610"></a><a name="p8255346174610"></a>chown</p>
154</td>
155<td class="cellrowborder" valign="top" width="34.089999999999996%" headers="mcps1.2.4.1.2 "><p id="p238114423418"><a name="p238114423418"></a><a name="p238114423418"></a>chown uid gid <em id="i161565145312"><a name="i161565145312"></a><a name="i161565145312"></a>target</em></p>
156<p id="p1118592184518"><a name="p1118592184518"></a><a name="p1118592184518"></a>Example: chown 900 800 /storage/myDir</p>
157<p id="p1235374884510"><a name="p1235374884510"></a><a name="p1235374884510"></a>chown 100 100 /storage/myFile.txt</p>
158</td>
159<td class="cellrowborder" valign="top" width="55.76%" headers="mcps1.2.4.1.3 "><p id="p18408185817467"><a name="p18408185817467"></a><a name="p18408185817467"></a>Modifies the owner group. <strong id="b19641958195310"><a name="b19641958195310"></a><a name="b19641958195310"></a>chown</strong>, <strong id="b15698584534"><a name="b15698584534"></a><a name="b15698584534"></a>uid</strong>, <strong id="b1692058135310"><a name="b1692058135310"></a><a name="b1692058135310"></a>gid</strong>, and <em id="i56935885316"><a name="i56935885316"></a><a name="i56935885316"></a>target</em> must be separated by only one space.</p>
160</td>
161</tr>
162<tr id="row109751379478"><td class="cellrowborder" valign="top" width="10.15%" headers="mcps1.2.4.1.1 "><p id="p1017823174717"><a name="p1017823174717"></a><a name="p1017823174717"></a>mount</p>
163</td>
164<td class="cellrowborder" valign="top" width="34.089999999999996%" headers="mcps1.2.4.1.2 "><p id="p10381124244117"><a name="p10381124244117"></a><a name="p10381124244117"></a>mount fileSystemType src dst flags data</p>
165<p id="p572019493485"><a name="p572019493485"></a><a name="p572019493485"></a>Example: mount vfat /dev/mmcblk0 /sdc rw,umask=000</p>
166<p id="p7381173625313"><a name="p7381173625313"></a><a name="p7381173625313"></a>mount jffs2 /dev/mtdblock3 /storage nosuid</p>
167</td>
168<td class="cellrowborder" valign="top" width="55.76%" headers="mcps1.2.4.1.3 "><p id="p11976107144710"><a name="p11976107144710"></a><a name="p11976107144710"></a>Mounts devices. Every two parameters must be separated by only one space. Currently, supported flags include <strong id="b5512525411"><a name="b5512525411"></a><a name="b5512525411"></a>nodev</strong>, <strong id="b41014514541"><a name="b41014514541"></a><a name="b41014514541"></a>noexec</strong>, <strong id="b5101152543"><a name="b5101152543"></a><a name="b5101152543"></a>nosuid</strong>, <strong id="b20103555419"><a name="b20103555419"></a><a name="b20103555419"></a>rdonly</strong>, and optionally <strong id="b41045175420"><a name="b41045175420"></a><a name="b41045175420"></a>data</strong>.</p>
169</td>
170</tr>
171<tr id="row1334911198482"><td class="cellrowborder" valign="top" width="10.15%" headers="mcps1.2.4.1.1 "><p id="p1214153117480"><a name="p1214153117480"></a><a name="p1214153117480"></a>start</p>
172</td>
173<td class="cellrowborder" valign="top" width="34.089999999999996%" headers="mcps1.2.4.1.2 "><p id="p133816420411"><a name="p133816420411"></a><a name="p133816420411"></a>start serviceName</p>
174<p id="p2036714132541"><a name="p2036714132541"></a><a name="p2036714132541"></a>Example: start foundation</p>
175<p id="p115951820185412"><a name="p115951820185412"></a><a name="p115951820185412"></a>start shell</p>
176</td>
177<td class="cellrowborder" valign="top" width="55.76%" headers="mcps1.2.4.1.3 "><p id="p4350121915488"><a name="p4350121915488"></a><a name="p4350121915488"></a>Starts services. <em id="i87951116544"><a name="i87951116544"></a><a name="i87951116544"></a>serviceName</em> must be contained in the <strong id="b379981145417"><a name="b379981145417"></a><a name="b379981145417"></a>services</strong> array.</p>
178</td>
179</tr>
180<tr id="row96921442712"><td class="cellrowborder" valign="top" width="10.15%" headers="mcps1.2.4.1.1 "><p id="p1693642018"><a name="p1693642018"></a><a name="p1693642018"></a>loadcfg</p>
181</td>
182<td class="cellrowborder" valign="top" width="34.089999999999996%" headers="mcps1.2.4.1.2 "><p id="p1969364211116"><a name="p1969364211116"></a><a name="p1969364211116"></a>loadcfg filePath</p>
183<p id="p1858112368211"><a name="p1858112368211"></a><a name="p1858112368211"></a>Example: loadcfg /patch/fstab.cfg</p>
184</td>
185<td class="cellrowborder" valign="top" width="55.76%" headers="mcps1.2.4.1.3 "><p id="p13986141320510"><a name="p13986141320510"></a><a name="p13986141320510"></a>Loads other <strong id="b280561515549"><a name="b280561515549"></a><a name="b280561515549"></a>.cfg</strong> files. The maximum size of the target file (only <strong id="b105471717135416"><a name="b105471717135416"></a><a name="b105471717135416"></a>/patch/fstab.cfg</strong> supported currently) is 50 KB. Each line in the <strong id="b14853122910540"><a name="b14853122910540"></a><a name="b14853122910540"></a>/patch/fstab.cfg</strong> file is a command. The command types and formats must comply with their respective requirements mentioned in this table. A maximum of 20 commands are allowed.</p>
186</td>
187</tr>
188</tbody>
189</table>
190
191**Table  3**  Elements in the  **services**  array
192
193<a name="table14737791471"></a>
194<table><thead align="left"><tr id="row273839577"><th class="cellrowborder" valign="top" width="10.37%" id="mcps1.2.3.1.1"><p id="p107382095711"><a name="p107382095711"></a><a name="p107382095711"></a>Field</p>
195</th>
196<th class="cellrowborder" valign="top" width="89.63%" id="mcps1.2.3.1.2"><p id="p17738189277"><a name="p17738189277"></a><a name="p17738189277"></a>Description</p>
197</th>
198</tr>
199</thead>
200<tbody><tr id="row17386911716"><td class="cellrowborder" valign="top" width="10.37%" headers="mcps1.2.3.1.1 "><p id="p17384912710"><a name="p17384912710"></a><a name="p17384912710"></a>name</p>
201</td>
202<td class="cellrowborder" valign="top" width="89.63%" headers="mcps1.2.3.1.2 "><p id="p1173818913714"><a name="p1173818913714"></a><a name="p1173818913714"></a>Name of the current service. The value cannot be empty and can contain a maximum of 32 bytes.</p>
203</td>
204</tr>
205<tr id="row1473810916714"><td class="cellrowborder" valign="top" width="10.37%" headers="mcps1.2.3.1.1 "><p id="p127381991571"><a name="p127381991571"></a><a name="p127381991571"></a>path</p>
206</td>
207<td class="cellrowborder" valign="top" width="89.63%" headers="mcps1.2.3.1.2 "><p id="p1073815910717"><a name="p1073815910717"></a><a name="p1073815910717"></a>Full path (including parameters) of the executable file for the current service. This is an array. Ensure that the first element is the path of the executable file, the maximum number of elements is 20, and each element is a string that contains a maximum of 64 bytes.</p>
208</td>
209</tr>
210<tr id="row77381291271"><td class="cellrowborder" valign="top" width="10.37%" headers="mcps1.2.3.1.1 "><p id="p77381391770"><a name="p77381391770"></a><a name="p77381391770"></a>uid</p>
211</td>
212<td class="cellrowborder" valign="top" width="89.63%" headers="mcps1.2.3.1.2 "><p id="p107387920711"><a name="p107387920711"></a><a name="p107387920711"></a>User ID (UID) of the current service process.</p>
213</td>
214</tr>
215<tr id="row127381591673"><td class="cellrowborder" valign="top" width="10.37%" headers="mcps1.2.3.1.1 "><p id="p47388919715"><a name="p47388919715"></a><a name="p47388919715"></a>gid</p>
216</td>
217<td class="cellrowborder" valign="top" width="89.63%" headers="mcps1.2.3.1.2 "><p id="p12738691479"><a name="p12738691479"></a><a name="p12738691479"></a>Group ID (GID) of the current service process.</p>
218</td>
219</tr>
220<tr id="row127381591693"><td class="cellrowborder" valign="top" width="10.37%" headers="mcps1.2.3.1.1 "><p id="p47388919793"><a name="p47388919793"></a><a name="p47388919715"></a>secon</p>
221</td>
222<td class="cellrowborder" valign="top" width="89.63%" headers="mcps1.2.3.1.2 "><p id="p12738691493"><a name="p12738691493"></a><a name="p12738691493"></a>Security context of the current service process (no need to set currently).</p>
223</td>
224</tr>
225<tr id="row188301014171116"><td class="cellrowborder" valign="top" width="10.37%" headers="mcps1.2.3.1.1 "><p id="p183112146115"><a name="p183112146115"></a><a name="p183112146115"></a>once</p>
226</td>
227<td class="cellrowborder" valign="top" width="89.63%" headers="mcps1.2.3.1.2 "><p id="p18548317195715"><a name="p18548317195715"></a><a name="p18548317195715"></a>Whether the current service process is a one-off process.</p>
228<p id="p103571840105812"><a name="p103571840105812"></a><a name="p103571840105812"></a><strong id="b7898115614817"><a name="b7898115614817"></a><a name="b7898115614817"></a>1</strong>: The current service process is a one-off process. If the process exits, the init process does not restart it.</p>
229<p id="p5831191431116"><a name="p5831191431116"></a><a name="p5831191431116"></a><strong id="b20971155820811"><a name="b20971155820811"></a><a name="b20971155820811"></a>0</strong>: The current service process is not a one-off process. If the process exits, the init process restarts it upon receiving the SIGCHLD signal.</p>
230<p id="p378912714010"><a name="p378912714010"></a><a name="p378912714010"></a>Note: If a non-one-off process exits for five consecutive times within four minutes, the init process will no longer restart it at the fifth exit.</p>
231</td>
232</tr>
233<tr id="row386110321155"><td class="cellrowborder" valign="top" width="10.37%" headers="mcps1.2.3.1.1 "><p id="p14861113212156"><a name="p14861113212156"></a><a name="p14861113212156"></a>importance</p>
234</td>
235<td class="cellrowborder" valign="top" width="89.63%" headers="mcps1.2.3.1.2 "><p id="p166448210816"><a name="p166448210816"></a><a name="p166448210816"></a>Whether the current service process is a key system process.</p>
236<p id="p8572182712811"><a name="p8572182712811"></a><a name="p8572182712811"></a><strong id="b72917915010"><a name="b72917915010"></a><a name="b72917915010"></a>0</strong>: The current service process is not a key system process. If it exits, the init process does not reset or restart the system.</p>
237<p id="p11861032111516"><a name="p11861032111516"></a><a name="p11861032111516"></a><strong id="b1074320101309"><a name="b1074320101309"></a><a name="b1074320101309"></a>1</strong>: The current service process is a key system process. If it exits, the init process resets and restarts the system.</p>
238</td>
239</tr>
240<tr id="row1689310618179"><td class="cellrowborder" valign="top" width="10.37%" headers="mcps1.2.3.1.1 "><p id="p108931367177"><a name="p108931367177"></a><a name="p108931367177"></a>caps</p>
241</td>
242<td class="cellrowborder" valign="top" width="89.63%" headers="mcps1.2.3.1.2 "><p id="p489313618173"><a name="p489313618173"></a><a name="p489313618173"></a>Capabilities required by the current service. They are evaluated based on the capabilities supported by the security subsystem and configured in accordance with the principle of least permission. Currently, a maximum of 100 values can be configured.</p>
243</td>
244</tr>
245</tbody>
246</table>
247
248## Repositories Involved<a name="section641143415335"></a>
249
250[Startup subsystem](https://gitee.com/openharmony/docs/blob/master/en/readme/startup.md)
251
252[startup\_syspara\_lite](https://gitee.com/openharmony/startup_syspara_lite/blob/master/README.md)
253
254[startup\_appspawn\_lite](https://gitee.com/openharmony/startup_appspawn_lite/blob/master/README.md)
255
256[startup\_bootstrap\_lite](https://gitee.com/openharmony/startup_bootstrap_lite/blob/master/README.md)
257
258**[startup\_init\_lite]**
259
260

README_zh.md

1# 启动子系统<a name="ZH-CN_TOPIC_0000001129033057"></a>
2
3## 简介<a name="section469617221261"></a>
4
5init组件负责处理从内核加载第一个用户态进程开始,到第一个应用程序启动之间的系统服务进程启动过程。启动恢复子系统除负责加载各系统关键进程之外,还需在启动的同时设置其对应权限,并在子进程启动后对指定进程实行保活(若进程意外退出要重新启动),对于特殊进程意外退出时,启动恢复子系统还要执行系统复位操作。
6
7## 系统架构
8
9**图 1** OHOS启动框架图
10
11![](figures/init系统架构.png)
12
13## 目录<a name="section15884114210197"></a>
14仓目录结构如下:
15```
16base/startup/init/
17├── device_info         # 提供设备信息的SA服务
18├── initsync            # 同步命令(小型系统)
19├── interfaces          # 对外接口
20├── scripts             # 脚本(LiteOS系统使用)
21├── services
22│   ├── begetctl        # 命令集合。提供服务的dump,拉起等一系列命令
23│   ├── etc             # init配置文件目录(标准系统)
24│   ├── etc_lite        # init配置文件目录(小型系统)
25│   ├── include         # init头文件目录
26│   ├── init            # init核心功能源码
27│   │   ├── adapter     # 内核适配层
28│   │   ├── include     # 头文件目录
29│   │   ├── lite        # init核心功能源码(小型系统)
30│   │   └── standard    # init核心功能源码(标准系统)
31│   ├── log             # init日志部件。
32│   ├── loopevent       # 事件库
33│   │   ├── include     # 头文件目录
34│   │   ├── loop        # 基于epoll封装的I/O多路复用接口
35│   │   ├── signal      # 信号处理接口封装。提供信号的添加,handler注册等功能
36│   │   ├── socket      # socket通信接口
37│   │   ├── task        # 事件的抽象任务,如signal, timer等事件都要创建对应task
38│   │   ├── timer       # 定时器接口
39│   │   └── utils       # loopevent通用接口
40│   ├── modules         # 插件化模块
41│   │   ├── bootchart   # bootchart插件化源码
42│   │   ├── bootevent   # bootevent插件化源码
43│   │   ├── init_hook   # init提供的回调函数
44│   │   ├── reboot      # reboot插件化源码
45│   │   ├── seccomp     # seccomp插件化源码
46│   │   └── selinux     # selinux插件化源码
47│   ├── param           # 系统参数部件
48│   └── utils           # init通用接口
49├── test                # init组件测试用例源文件目录
50├── ueventd             # ueventd服务源码
51│   ├── etc             # ueventd配置文件目录
52│   ├── include         # ueventd头文件目录
53│   ├── lite            # ueventd核心功能源码(小型系统)
54│   └── standard        # ueventd核心功能源码(标准系统)
55└── watchdog            # 看门狗服务源码
56```
57
58
59## 约束<a name="section12212842173518"></a>
60
61目前支持小型系统设备(参考内存≥1MB),标准系统Hi3516DV300、Hi3518EV300以及RK3568等
62
63## 说明<a name="section837771600"></a>
64
65详细使用说明参考开发指南:
66
67[启动恢复子系统概述](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/subsystems/subsys-boot-overview.md)
68
69[引导启动配置文件](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/subsystems/subsys-boot-init-cfg.md)
70
71[jobs管理](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/subsystems/subsys-boot-init-jobs.md)
72
73[插件](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/subsystems/subsys-boot-init-plugin.md)
74
75[沙盒管理](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/subsystems/subsys-boot-init-sandbox.md)
76
77[服务管理](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/subsystems/subsys-boot-init-service.md)
78
79[系统参数](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/subsystems/subsys-boot-init-sysparam.md)
80
81[日志管理](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/subsystems/subsys-boot-init-log.md)
82
83[组件化启动](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/subsystems/subsys-boot-init-sub-unit.md)
84
85## 相关仓<a name="section641143415335"></a>
86
87**[startup\_init\_lite](https://gitee.com/openharmony/startup_init_lite)**
88
89[startup\_appspawn](https://gitee.com/openharmony/startup_appspawn)
90
91[startup\_bootstrap\_lite](https://gitee.com/openharmony/startup_bootstrap_lite)
92