1# Compilation and Building<a name="EN-US_TOPIC_0000001162500073"></a> 2 3 4The compilation and building subsystem provides a framework based on Generate Ninja (GN) and Ninja. This subsystem allows you to: 5 6- Build products based on different chipset platforms, for example, Hi3516D V300. 7 8- Package capabilities required by a product by assembling modules based on the product configuration. 9 10## Basic Concepts<a name="section175012297491"></a> 11 12It is considered best practice to learn the following basic concepts before you start building: 13 14- Platform 15 16 A combination of development boards and kernels. Supported subsystems and components vary with the platform. 17 18- Subsystem 19 20 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. 21 22- Component 23 24 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. 25 26- GN 27 28 GN is a system used to generate build files for Ninja. 29 30- Ninja 31 32 Ninja is a small high-speed build system. 33 34 35## Working Principles<a name="section193961322175011"></a> 36 37The compilation and build process of OpenHarmony is as follows: 38 39- Parsing commands: Parse the name of the product to build and load related configurations. 40- Running GN: Configure the toolchain and global options based on the parsed product name and compilation type. 41- Running Ninja: Start building and generate a product distribution. 42 43## Building a Mini or Small System<a name="section119041639115811"></a> 44 45See [build\_lite](https://gitee.com/openharmony/build_lite/blob/master/README.md). 46 47## Building a Standard System<a name="section8750514195912"></a> 48 49See the readme of the **build** repository. 50 51## Repositories Involved<a name="section44651652878"></a> 52 53**Compilation and building** 54 55[build\_lite](https://gitee.com/openharmony/build_lite) 56 57[build](https://gitee.com/openharmony/build) 58