1 Star 0 Fork 5.1K

youguilin / docs

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
compilation-and-building-overview-0.md 2.70 KB
一键复制 编辑 原始数据 按行查看 历史
NEEN 提交于 2021-06-02 22:39 . !333 update docs bugs

Compilation and Building Overview

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 platform is a combination of development boards and kernels.

    Supported subsystems and modules vary according to the platform.

  • Subsystems

    OpenHarmony is designed with a layered architecture, which from bottom to top consists of the kernel layer, system service layer, framework layer, and application layer. System functions are expanded by levels, from system to subsystem, and further to module. In a multi-device deployment scenario, unnecessary subsystems and modules can be excluded from the system as required. A subsystem is a logical concept and is a flexible combination of functions.

  • Module

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

  • GN

    GN is short for Generate Ninja, which is used to generate Ninja files.

  • Ninja

    Ninja is a small high-speed build system.

Working Principles

The process to build OpenHarmony is as follows:

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

Limitations and Constraints

  • You must download the source code using method 3 described in Source Code Acquisition.

  • The build environment must be Ubuntu 18.04 or later.

  • You must install the software package required for build.

    The installation command is as follows:

    sudo apt-get install binutils git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip m4
1
https://gitee.com/yougl/docs.git
git@gitee.com:yougl/docs.git
yougl
docs
docs
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891