> ## Documentation Index
> Fetch the complete documentation index at: https://qualcomm-3.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Build with QSC-CLI

## Introduction

This information provides instructions for syncing, building, and flashing images
using the `qsc-cli` tool. It is intended for registered users who have access
to Qualcomm’s proprietary resources. The qsc-cli tool streamlines the workflow
by providing a unified interface that runs tasks in containerized environments,
ensuring simplicity, consistency, and reproducibility.

At a high level, this information covers:

* Setting up and authenticating `qsc-cli` - [Install QSC-CLI](#install-qsc-cli)
* Syncing required sources and dependencies using `qsc-cli` - [Download the software](#download-the-software)
* Building Qualcomm images using `qsc-cli` - [Build the default configuration](#build-the-default-configuration)

## Supported chipsets

The QIR SDK supports the following chipsets. If your chipset is not
listed, the QSC CLI build process described here does not apply to your device.

| SoC | Description                                 | Supported |
| --- | ------------------------------------------- | --------- |
| IQ9 | Qualcomm Dragonwing™ IQ-9075 Evaluation Kit | ✓         |
| IQ8 | Qualcomm Dragonwing™ IQ-8275 Evaluation Kit | ✓         |

## Install QSC-CLI

`qsc-cli` is a command-line tool provided by Qualcomm that offers an end-to-end workflow
for accessing, managing, and building Qualcomm software. Follow these steps to install
`qsc-cli` on your system:

* Register your Qualcomm email ID by visiting the [Qualcomm Support Page](https://www.qualcomm.com/support/working-with-qualcomm).

* Download the Debian package for `qsc-cli`:

  <CodeGroup>
    ```bash x86 theme={null}
    wget https://softwarecenter.qualcomm.com/api/download/software/tools/Qualcomm_Software_Center/Linux/Debian/latest.deb -O qsc_installer.deb
    ```

    ```bash ARM64 theme={null}
    wget https://softwarecenter.qualcomm.com/api/download/software/tools/Qualcomm_Software_Center/Linux/ARM64/Debian/latest.deb -O qsc_installer.deb
    ```
  </CodeGroup>

* Install the `qsc-cli` Debian package:
  ```bash theme={null}
  sudo apt update
  sudo apt install ./qsc_installer.deb
  ```

* Sign in to `qsc-cli` using your registered email ID:
  ```bash theme={null}
  qsc-cli login -u <username>
  ```

## Configuration parameters

The following table lists the `--product`, `--release`, and `--image` parameter
values for the `chip-software download` command. Each product maps to one or
more firmware images that must be downloaded for a complete build.

| `--product`    | `--release` | `--image`                                                                    |
| -------------- | ----------- | ---------------------------------------------------------------------------- |
| QCS9100.LE.2.0 | r00131.2    | DSP.AT.1.0.1    <br />AOP.HO.3.6.1   <br />BOOT.MXF.1.0.c1<br />TZ.XF.5.29.1 |
| QCS8300.LE.2.0 | r00131.3    | DSP.AT.1.0.1    <br />AOP.HO.3.6.1   <br />BOOT.MXF.1.0.c1<br />TZ.XF.5.29.1 |

This table lists the `--distribution` parameter values you can use for building the QIR SDK:

| Distribution                                            | Description                                                     | Usage                                                               |
| ------------------------------------------------------- | --------------------------------------------------------------- | ------------------------------------------------------------------- |
| `Qualcomm_Linux.SPF.2.0\|TEST\|DEVICE\|PB_QIRPSDK`      | High level OS with QIR SDK and prebuilt firmware (No modem)     | Developers building for no modem with prebuilt firmware and QIR SDK |
| `Qualcomm_Linux.SPF.2.0\|AP\|Standard\|OEM\|NM_QIRPSDK` | High level OS with QIR SDK and firmware in source without modem | Developers building no modem firmware with HLOS and QIR SDK         |

## Download the software

Download a software release using the `chip-software download` command. Use the previous tables to look up the `--product`, `--release`, and `--distribution` values for your SoC:

```bash theme={null}
qsc-cli chip-software download --workspace-path '<absolute-workspace-path>' --product '<product-id>' --release '<release-id>'  --distribution '<distribution-name>'
```

## Build the default configuration

### Compile

When the download is complete, start the compilation process. Depending on the
size of the software and the host computer configuration, the compilation
process can take a few hours.

```bash theme={null}
qsc-cli chip-software compile --workspace-path '<absolute-workspace-path>'
```

This process builds the necessary Qualcomm firmware and completes the Qualcomm
Linux build.

### Recompile

To recompile individual software images after any modifications to the software
release, use your existing workspace built using QSC CLI:

```bash theme={null}
qsc-cli chip-software compile --image '<image-name>' --workspace-path '<absolute-workspace-path>'
```

## Build your own configuration

To build your own configuration, you must compile the build with the default
machine configuration and then compile the software product with your own
machine and distribution configuration files.

When compiling a software image, ensure that you also compile the software
product. For example, if you compile `BOOT.MXF.1.0.c1`, ensure that you also
compile the software product (such as `QCS9100.LE.2.0`).

* Compile the build for the default machine configuration

* Compile the software product with your own machine and distribution
  configuration files. This command opens a terminal.
  ```bash theme={null}
  qsc-cli chip-software open-build-env --workspace-path <absolute-workspace-path> --image <software-image-name>
  ```

* Update the highlighted command according to your own machine configuration
  and run it on the terminal: For example, to build IQ-9075-EVk
  change the value of `<machine.yml>` to `iq-9075-evk.yml`.
  <img src="https://mintcdn.com/qualcomm-3/yGkP9qWXD9bU7DYB/SDKs/QIR-SDK-2.0/media/qsc-cli-open-build-terminal.png?fit=max&auto=format&n=yGkP9qWXD9bU7DYB&q=85&s=157fd168acdf9eadea363825c4e4daf3" alt="build-own-config" width="1572" height="184" data-path="SDKs/QIR-SDK-2.0/media/qsc-cli-open-build-terminal.png" />

* The `Robotics images` and `QIR SDK` are generated in the following paths:

  <CodeGroup>
    ```bash IQ-9075-EVK theme={null}
    Robotics images: <workspace-path>/DEV/LE.QCROBOTICS.2.0/build/tmp/deploy/images/iq-9075-evk/qcom-robotics-proprietary-image-iq-9075-evk.rootfs.qcomflash
    QIR SDK: <workspace-path>/DEV/LE.QCROBOTICS.2.0/build/tmp/deploy/qirpsdk_artifacts/iq-9075-evk/qirp-sdk_<version>.tar.gz
    ```

    ```bash IQ-8275-EVK theme={null}
    Robotics images: <workspace-path>/DEV/LE.QCROBOTICS.2.0/build/tmp/deploy/images/iq-8275-evk/qcom-robotics-proprietary-image-iq-8275-evk.rootfs.qcomflash
    QIR SDK: <workspace-path>/DEV/LE.QCROBOTICS.2.0/build/tmp/deploy/qirpsdk_artifacts/iq-8275-evk/qirp-sdk_<version>.tar.gz
    ```
  </CodeGroup>

<Warning>
  An environment is set up to run your own build commands for a specific
  software image. QSC will not track the status of input workspaces in
  future releases, and you cannot flash these workspaces with qsc-cli.
</Warning>
