harmony(鸿蒙)Compilation and Building

  • 2022-08-09
  • 浏览 (738)

Compilation and Building

The compilation and building subsystem provides a framework based on Generate Ninja (GN) and Ninja. This subsystem allows you to:

  • Build products based on different chipset platforms, for example, Hi3516D V300.

  • Package capabilities required by a product by assembling modules based on the product configuration.

Basic Concepts

It is considered best practice to learn the following basic concepts before you start building:

  • Platform

    A combination of development boards and kernels. Supported subsystems and components vary with the platform.

  • Subsystem

    OpenHarmony is designed with a layered architecture, which consists of the kernel layer, system service layer, framework layer, and application layer from the bottom up. System functions are developed by the level of system, subsystem, and component. In a multi-device deployment scenario, you can customize subsystems and components as required. A subsystem is a logical concept and is a flexible combination of components.

  • Component

    A component is a reusable software unit that contains source code, configuration files, resource files, and build scripts. A component can be built independently, integrated in binary mode, and then tested independently.

  • GN

    GN is a system used to generate build files for Ninja.

  • Ninja

    Ninja is a small high-speed build system.

Working Principles

The compilation and build process of OpenHarmony is as follows:

  • Parsing commands: Parse the name of the product to build and load related configurations.
  • Running GN: Configure the toolchain and global options based on the parsed product name and compilation type.
  • Running Ninja: Start building and generate a product distribution.

Building a Mini or Small System

See build_lite.

Building a Standard System

See build.

Repositories Involved

Compilation and building

build_lite

build

你可能感兴趣的鸿蒙文章

harmony(鸿蒙)ArkCompiler JS Runtime

harmony(鸿蒙)DeviceProfile

harmony(鸿蒙)System Ability Manager

harmony(鸿蒙)Security

harmony(鸿蒙)Account

harmony(鸿蒙)AI

harmony(鸿蒙)ArkUI

harmony(鸿蒙)Bundle Management

harmony(鸿蒙)Common Event and Notification

harmony(鸿蒙)commonlibrary

0  赞