OpenHarmony lightweight system subsystem, components that matter

OpenHarmony follows the layered design as a whole, from bottom to top: kernel layer, system service layer, framework layer and application layer. The system functions are expanded step by step according to "system > subsystem > component". In the multi-device deployment scenario, some unnecessary components can be cut according to actual needs. The OpenHarmony technical architecture is as follows:

OpenHarmony supports the following system types:

  • Lightweight system (mini system)

    For MCU-type processors such as Arm Cortex-M, RISC-V 32-bit devices, the hardware resources are extremely limited, and the minimum memory supported by the device is 128KiB. It can provide a variety of lightweight network protocols, lightweight graphics frameworks, and Abundant IOT bus read and write components, etc. Supportable products such as connection modules, sensor devices, and wearable devices in the smart home field.

  • small system

    For devices with application processors such as Arm Cortex-A, the minimum supported device memory is 1MiB, which can provide higher security capabilities, standard graphics frameworks, and multimedia capabilities for video codecs. Supportable products such as IP Cameras in the field of smart home, electronic peepholes, routers, and driving recorders in the field of smart travel, etc.

  • standard system

    For devices with application processors such as Arm Cortex-A, the minimum memory supported by the device is 128MiB, which can provide enhanced interactive capabilities, 3D GPU and hardware synthesis capabilities, more controls and graphics capabilities with richer dynamic effects, and a complete application framework . Supportable products such as high-end refrigerator displays.

Two basic concepts included in OpenHarmony:

  • subsystem

    OpenHarmony follows the layered design as a whole, from bottom to top: kernel layer, system service layer, framework layer and application layer. The system functions are expanded step by step according to "system > subsystem > component". In the multi-device deployment scenario, some unnecessary components can be cut according to actual needs. A subsystem is a logical concept that is specifically composed of corresponding components.

  • components

    Further splitting of subsystems, reusable software units, which include source code, configuration files, resource files and compilation scripts; binary units that can be built independently, integrated in binary form, and have independent verification capabilities.

 In order to realize the chip solution, the product solution and OpenHarmony are decoupled and pluggable. The path, directory tree and configuration of components, chip solutions and product solutions all need to follow certain rules, as follows:

1. The naming rules of component source code paths are: {domain}/{subsystem}/{component}

2. The chip solution is a special component, and the source code path rule is: device/{chip solution manufacturer}/{development board}

3. The source code path rules for product solutions are: vendor/{product solution vendor}/{product name}. Product solutions are also a special component.

As shown in the figure below, add a demolink component. Build.gnd defines the source code, dependent files, and dependent libraries of this component.

 After defining the component, we configure this component to the subsystem. It can be seen that there are many subsystems in build/lite, and each subsystem has a json configuration file. 

Taking the sensor subsystem as an example, configure components in sensors.json as a json array. We can add newly added components to this subsystem.

 

 

chip solution

 Product Solutions 

 

There are three ways to import dependencies in OpenHarmony:

1. Add component dependencies in product configuration config.json

 

2. The deps configuration component dependency in the existing module BUILD.gn

3. Add source code paths to existing modules and introduce dependencies through files

 

Reference courses: HarmonyOS Connect Device Development Series
https://mp.weixin.qq.com/s/B5UmQEY2U1WoagD_XLYl6w
https://mp.weixin.qq.com/s/saI5sMcyIuyi97V1Mjzt7Q
https://mp.weixin.qq.com /s/hNWv9S3nJ46YW4ushyYUTg

Guess you like

Origin blog.csdn.net/sd2131512/article/details/122178576