> ## 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.

# Build Mainline Variant

The [Yocto Build Guide](./build-qualcomm-linux) covers how to
build a stable and validated version of `meta-qcom`. The mainline build
tracks the latest development revision of meta-qcom and is intended for
developers who need early access to new features, fixes, or upstream changes.

## Build Instructions

* Download the development branch of meta-qcom.

  ```bash theme={null}
  git clone https://github.com/qualcomm-linux/meta-qcom -b master
  ```

- Build the software image using `kas`. You define build targets based
  on machine and distro combinations.

  <CodeGroup>
    ```bash IQ-9075-EVK theme={null}
    kas build meta-qcom/ci/iq-9075-evk.yml:meta-qcom/ci/qcom-distro.yml:meta-qcom/ci/performance.yml
    ```

    ```bash IQ-8275-EVK theme={null}
    kas build meta-qcom/ci/iq-8275-evk.yml:meta-qcom/ci/qcom-distro.yml:meta-qcom/ci/performance.yml
    ```

    ```bash IQ-615-EVK theme={null}
    kas build meta-qcom/ci/iq-615-evk.yml:meta-qcom/ci/qcom-distro.yml:meta-qcom/ci/performance.yml
    ```

    ```bash QCS6490 theme={null}
    kas build meta-qcom/ci/rb3gen2-core-kit.yml:meta-qcom/ci/qcom-distro.yml:meta-qcom/ci/performance.yml
    ```

    ```bash IQ-X7181-EVK theme={null}
    kas build meta-qcom/ci/iq-x7181-evk.yml:meta-qcom/ci/qcom-distro.yml:meta-qcom/ci/performance.yml
    ```

    ```bash IQ-X5121-EVK theme={null}
    kas build meta-qcom/ci/iq-x5121-evk.yml:meta-qcom/ci/qcom-distro.yml:meta-qcom/ci/performance.yml
    ```
  </CodeGroup>

  <Note>
    In some host machines `https://git.yoctoproject.org/git/meta-virtualization` may fail to clone. If you encounter this, configure Git to automatically redirect the URL to the working one:

    ```bash theme={null}
    git config --global url."https://git.yoctoproject.org/meta-virtualization".insteadOf \
        "https://git.yoctoproject.org/git/meta-virtualization"
    ```

    To verify the redirect is in place:

    ```bash theme={null}
    git config --global --get-regexp url
    ```
  </Note>

* 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>
