1e41f4b71Sopenharmony_ci# Building Source Code 2e41f4b71Sopenharmony_ci 3e41f4b71Sopenharmony_ci 4e41f4b71Sopenharmony_ciYou can build source code with hb or the **build.sh** script. This topic describes how to build source code with hb. For details about how to use the **build.sh** script, see [Building Source Code Using the build.sh Script](quickstart-pkg-common-build.md). 5e41f4b71Sopenharmony_ci 6e41f4b71Sopenharmony_ci 7e41f4b71Sopenharmony_ciFor details about the functions of the OpenHarmony compilation and building module, see [Compilation and Building Guide](../subsystems/subsys-build-all.md). 8e41f4b71Sopenharmony_ci 9e41f4b71Sopenharmony_ci 10e41f4b71Sopenharmony_ci## Prerequisites 11e41f4b71Sopenharmony_ci 12e41f4b71Sopenharmony_ci- The [required libraries and tools](quickstart-pkg-install-package.md) have been installed. 13e41f4b71Sopenharmony_ci 14e41f4b71Sopenharmony_ci- The [compilation tools](quickstart-pkg-install-tool.md) have been installed. 15e41f4b71Sopenharmony_ci 16e41f4b71Sopenharmony_ci- The Hello World program is ready for use. 17e41f4b71Sopenharmony_ci 18e41f4b71Sopenharmony_ci- The access to the Ubuntu environment is normal. 19e41f4b71Sopenharmony_ci 20e41f4b71Sopenharmony_ci 21e41f4b71Sopenharmony_ci## Procedure 22e41f4b71Sopenharmony_ci 23e41f4b71Sopenharmony_ciGo to the root directory of the source code and run the build command. 24e41f4b71Sopenharmony_ci 25e41f4b71Sopenharmony_ci1. Set the build path. 26e41f4b71Sopenharmony_ci 27e41f4b71Sopenharmony_ci ``` 28e41f4b71Sopenharmony_ci hb set 29e41f4b71Sopenharmony_ci ``` 30e41f4b71Sopenharmony_ci 31e41f4b71Sopenharmony_ci2. Select the current path. 32e41f4b71Sopenharmony_ci 33e41f4b71Sopenharmony_ci ``` 34e41f4b71Sopenharmony_ci . 35e41f4b71Sopenharmony_ci ``` 36e41f4b71Sopenharmony_ci 37e41f4b71Sopenharmony_ci3. Select **ipcamera_hispark_taurus** under **hisilicon** and press **Enter**. 38e41f4b71Sopenharmony_ci >  **NOTE** 39e41f4b71Sopenharmony_ci > 40e41f4b71Sopenharmony_ci > When adapting the development board to a specific use case, select an appropriate build form factor, that is, **product** settings. For details, see [Build Form Factors](quickstart-appendix-compiledform.md). 41e41f4b71Sopenharmony_ci 42e41f4b71Sopenharmony_ci **Figure 1** Hi3516 build settings 43e41f4b71Sopenharmony_ci 44e41f4b71Sopenharmony_ci  45e41f4b71Sopenharmony_ci 46e41f4b71Sopenharmony_ci4. Start building. 47e41f4b71Sopenharmony_ci >  **NOTE** 48e41f4b71Sopenharmony_ci > - To build a component (for example, **hello**), run the **hb build -T *targetName*** command. 49e41f4b71Sopenharmony_ci > 50e41f4b71Sopenharmony_ci > - To build a product incrementally, run the **hb build** command. 51e41f4b71Sopenharmony_ci > 52e41f4b71Sopenharmony_ci > - To build a product from the scratch, run the **hb build -f** command. 53e41f4b71Sopenharmony_ci > 54e41f4b71Sopenharmony_ci > This example builds a product from the scratch. 55e41f4b71Sopenharmony_ci 56e41f4b71Sopenharmony_ci 57e41f4b71Sopenharmony_ci ``` 58e41f4b71Sopenharmony_ci hb build -f 59e41f4b71Sopenharmony_ci ``` 60e41f4b71Sopenharmony_ci 61e41f4b71Sopenharmony_ci5. Check the build result. If "build success" is displayed, the building is successful. 62e41f4b71Sopenharmony_ci >  **NOTICE** 63e41f4b71Sopenharmony_ci > 64e41f4b71Sopenharmony_ci > Paths to burning-related files: 65e41f4b71Sopenharmony_ci > 66e41f4b71Sopenharmony_ci > - Build result and log files: **out/hispark_taurus/ipcamera_hispark_taurus** 67e41f4b71Sopenharmony_ci > 68e41f4b71Sopenharmony_ci > - U-Boot file: **device/board/hisilicon/hispark_taurus/uboot/out/boot/u-boot-hi3516dv300.bin** 69