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

# Yocto Build with Repo Manifest

This section covers how to sync and build the meta-qcom release snapshot using
the [repo](https://source.android.com/docs/setup/reference/repo) tool. Although
Qualcomm recommends the `kas` tool as the preferred method for building and
consuming meta‑qcom, this workflow is retained for legacy users who are already
familiar with it and need to continue supporting or maintaining existing setups.

As part of this guide, you'll

* Install additional packages required for this workflow
* Sync the meta layers required for the build using `repo` tool
* Use the helper script to translate the kas configuration files into
  BitBake configuration files and setup the environment
* Execute a Yocto build using native BitBake commands

## Host Setup

* These packages are required in addition to the default packages
  to perform a manifest based build.

  ```bash theme={null}
  sudo apt install repo python3-yaml
  ```

## Configuration Parameters

The following table describes the build tags for the current release. These
values will be need to be substituted in the build commands.

| Release Tag           | Identifier |
| --------------------- | ---------- |
| meta-qcom-release-tag | qli-2.0    |

## Build Instructions

* Download the Qualcomm Yocto and supporting layers using `repo`. For the latest
  `<meta-qcom-release-tag>`, see [Configuration Parameters](#configuration-parameters).
  ```bash theme={null}
  repo init -u https://github.com/qualcomm-linux/qcom-manifest -b qcom-linux-wrynose -m <meta-qcom-release-tag>.xml
  repo sync
  ```

- Set up the Yocto build environment using the helper script. This script expects
  kas configuration files to be passed as parameters and converts these kas
  configuration files into the `auto.conf` and `bblayers.conf` configuration
  required by BitBake

  <CodeGroup>
    ```bash IQ-9075-EVK theme={null}
    source setup-environment --machine meta-qcom/ci/iq-9075-evk.yml --distro meta-qcom/ci/qcom-distro.yml
    ```

    ```bash IQ-8275-EVK theme={null}
    source setup-environment --machine meta-qcom/ci/iq-8275-evk.yml --distro meta-qcom/ci/qcom-distro.yml
    ```

    ```bash IQ-615-EVK theme={null}
    source setup-environment --machine meta-qcom/ci/iq-615-evk.yml --distro meta-qcom/ci/qcom-distro.yml
    ```

    ```bash QCS6490 theme={null}
    source setup-environment --machine meta-qcom/ci/rb3gen2-core-kit.yml --distro meta-qcom/ci/qcom-distro.yml
    ```

    ```bash IQ-X7181-EVK theme={null}
    source setup-environment --machine meta-qcom/ci/iq-x7181-evk.yml --distro meta-qcom/ci/qcom-distro.yml
    ```

    ```bash IQ-X5121-EVK theme={null}
    source setup-environment --machine meta-qcom/ci/iq-x5121-evk.yml --distro meta-qcom/ci/qcom-distro.yml
    ```
  </CodeGroup>

- Build the image by invoking BitBake
  ```bash theme={null}
  bitbake qcom-multimedia-proprietary-image
  ```

* The build creates a single tarball containing all the relevant files to
  perform a full clean flash, including partition metadata, boot firmware,
  ESP partition and the rootfs. After a successful build, check if the
  qcomflash tarball exists in the build artifacts. The following examples
  use `qcom-multimedia-proprietary-image` as the image name.

  <CodeGroup>
    ```bash IQ-9075-EVK theme={null}
    ls build/tmp/deploy/images/iq-9075-evk/qcom-multimedia-proprietary-image-iq-9075-evk.rootfs.qcomflash.tar.gz
    ```

    ```bash IQ-8275-EVK theme={null}
    ls build/tmp/deploy/images/iq-8275-evk/qcom-multimedia-proprietary-image-iq-8275-evk.rootfs.qcomflash.tar.gz
    ```

    ```bash IQ-615-EVK theme={null}
    ls build/tmp/deploy/images/iq-615-evk/qcom-multimedia-proprietary-image-iq-615-evk.rootfs.qcomflash.tar.gz
    ```

    ```bash QCS6490 theme={null}
    ls build/tmp/deploy/images/rb3gen2-core-kit/qcom-multimedia-proprietary-image-rb3gen2-core-kit.rootfs.qcomflash.tar.gz
    ```

    ```bash IQ-X7181-EVK theme={null}
    ls build/tmp/deploy/images/iq-x7181-evk/qcom-multimedia-proprietary-image-iq-x7181-evk.rootfs.qcomflash.tar.gz
    ```

    ```bash IQ-X5121-EVK theme={null}
    ls build/tmp/deploy/images/iq-x5121-evk/qcom-multimedia-proprietary-image-iq-x5121-evk.rootfs.qcomflash.tar.gz
    ```
  </CodeGroup>
