1 Star 0 Fork 5.1K

youguilin / docs

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
startup-10.md 5.96 KB
一键复制 编辑 原始数据 按行查看 历史
mamingshuai 提交于 2021-06-02 01:00 . update OpenHarmony 2.0 Canary

Startup

The startup subsystem provides the functions of starting key system processes after the kernel is started and before applications are started, and restoring the system to factory settings. The subsystem consists of the following modules:

  • init module

    This module corresponds to the init process, which is the first user-space process started after the kernel is initialized. Upon startup, the init process reads and parses the configuration file init.cfg. Based on the parsing result, the init module executes the commands listed in Table 2 in init Module and starts the key system service processes in sequence with corresponding permissions granted.

  • appspawn module

    This module spawns application processes upon receiving commands from the application framework, configures permissions for new processes, and calls the entry function of the application framework.

  • bootstrap module

    This module provides entry identifiers for starting services and features. When the Samgr is started, the entry function identified by boostrap is called and system services are started.

  • syspara module

    This module provides APIs for obtaining device information, such as the product name, brand name, and manufacturer name, based on the OpenHarmony Product Compatibility Specifications (PCS). It also provides APIs for setting and obtaining system parameters.

Limitations and Constraints

The directories of startup subsystem are applicable to different platforms.

Table 1 Directories and applicable platforms of the startup subsystem

Directory

Applicable Platform

base/startup/appspawn_lite

Small-system devices (reference memory ≥ 1 MB), for example, Hi3516D V300 and Hi3518E V300

base/startup/bootstrap_lite

Mini-system devices (reference memory ≥ 128 KB), for example, Hi3861 V100

base/startup/init_lite

Small-system devices (reference memory ≥ 1 MB), for example, Hi3516D V300 and Hi3518E V300

base/startup/syspara_lite

  • Mini-system devices (reference memory ≥ 128 KB), for example, Hi3861 V100
  • Small-system devices (reference memory ≥ 1 MB), for example, Hi3516D V300 and Hi3518E V300

Directory

Applicable Platform

base/startup/startup

Large-system devices (reference memory ≥ 1 GB)

base/startup/systemrestore

Large-system devices (reference memory ≥ 1 GB)

  • init module

    • After being burnt to the development board, the configuration file init.cfg changes to read-only. If you want to modify the file, you must repack and burn the rootfs image again.
    • The configuration file init.cfg must be in JSON format.
  • bootstrap module: The zInit code needs to be configured in the link script.

  • syspara module: The SetParameter and GetParameter APIs can only be called by applications whose UID is greater than 1000.

1
https://gitee.com/yougl/docs.git
git@gitee.com:yougl/docs.git
yougl
docs
docs
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891