![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**<br>Due to the limitation of the image size, the full build for the debug version may fail to be burnt. You are advised to build the binary file for each module separately. Run the following command to build a module separately:
-v, --verbose show all command lines while building
--patch apply product patch before compiling
-shs, --sign_haps_by_server
--compact-mode compatible with standard build system set to false if we use build.sh as build entrance
sign haps by server
--gn-args GN_ARGS specifies gn build arguments, eg: --gn-args="foo="bar" enable=true blah=7"
--patch apply product patch before compiling
--keep-ninja-going keeps ninja going until 1000000 jobs fail
--compact-mode compatible with standard build system set to false if we use build.sh as build entrance
--build-only-gn only do gn parse, donot run ninja
--gn-args GN_ARGS specifies gn build arguments, eg: --gn-args="foo="bar" enable=true blah=7"
--log-level LOG_LEVEL
--keep-ninja-going keeps ninja going until 1000000 jobs fail
specifies the log level during compilationyou can select three levels: debug, info and error
--build-only-gn only do gn parse, donot run ninja
--fast-rebuild it will skip prepare, preloader, gn_gen steps so we can enable it only when there is no change
--log-level LOG_LEVEL
for gn related script
specifies the log level during compilationyou can select three levels: debug, info and error
--device-type DEVICE_TYPE
--fast-rebuild it will skip prepare, preloader, gn_gen steps so we can enable it only when there is no change
specifies device type
for gn related script
--build-variant BUILD_VARIANT
--device-type DEVICE_TYPE
specifies device operating mode
specifies device type
```
--build-variant BUILD_VARIANT
specifies device operating mode
- If you run **hb build** with no argument, the previously configured code directory, product, and options are used for the build. The **-f** option deletes all products to be built. It is equivalent to running **hb clean** and **hb build**.
```
- You can run **hb build** *{component_name}* to build product components separately based on the development board and kernel set for the product, for example, **hb build kv_store**.
- You can run **hb build -p ipcamera@hisilicon** to skip the setting step and build the product directly.
- If you run **hb build** with no argument, the previously configured code directory, product, and options are used for the build. The **-f** option deletes all products to be built. It is equivalent to running **hb clean** and **hb build**.
- You can run **hb build** in **device/board/device_company** to select the kernel and build an image that contains the kernel and drivers only based on the current development board and the selected kernel.
- You can run **hb build***{component_name}* to build product components separately based on the development board and kernel set for the product, for example, **hb build kv_store**.
- You can run **hb build -p ipcamera@hisilicon** to skip the setting step and build the product directly.
**hb clean**
- You can run **hb build** in **device/board/device_company** to select the kernel and build an image that contains the kernel and drivers only based on the current development board and the selected kernel.
Deletes all the files except **args.gn** and **build.log** in the **out** directory (default). To clear files in a specified directory, add the directory parameter to the command, for example, **hb clean out/board/product**.
```shell
**hb clean**
hb clean
usage: hb clean [-h] [out_path]
Deletes all the files except **args.gn** and **build.log** in the **out** directory (default). To clear files in a specified directory, add the directory parameter to the command, for example, **hb clean out/board/product**.