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

# 使用 repo manifest 构建

<Note>
  **传统工作流。** Qualcomm 推荐将 `kas` 工具作为构建和使用 `meta-qcom` 的首选方式。
  这个基于 `repo` 的工作流仅为已经围绕它构建的现有环境而保留。对于新的构建,
  请使用[使用 Yocto 构建 Qualcomm Linux](/zh/Key-Documents/Yocto-Guide/build-qualcomm-linux)。
</Note>

本节介绍如何使用 [repo](https://source.android.com/docs/setup/reference/repo) 工具同步和构建
meta-qcom 发布快照,面向已经熟悉该工具且需要继续支持或维护现有环境的传统用户。

在本指南中,您将

* 安装此工作流所需的额外软件包
* 使用 `repo` 工具同步构建所需的 meta 层
* 使用辅助脚本将 kas 配置文件转换为 BitBake 配置文件并设置环境
* 使用原生 BitBake 命令执行 Yocto 构建

## 主机设置

* 除默认软件包外，还需要以下软件包
  才能执行基于清单（manifest）的构建。

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

## 配置参数

下表描述了当前版本的构建标签。在构建命令中需要替换
这些值。

| 版本标签                  | 标识符     |
| --------------------- | ------- |
| meta-qcom-release-tag | qli-2.1 |

## 构建说明

* 使用 `repo` 下载 Qualcomm Yocto 及配套层。有关最新的
  `<meta-qcom-release-tag>`，请参阅[配置参数](#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
  ```

- 使用辅助脚本设置 Yocto 构建环境。该脚本要求以参数形式传入
  kas 配置文件，并将这些 kas 配置文件转换为 BitBake 所需的
  `auto.conf` 和 `bblayers.conf` 配置

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

    ```bash IQ2390 / CQ2390 theme={null}
    source setup-environment --machine meta-qcom/ci/shikra-evk.yml --distro meta-qcom/ci/qcom-distro.yml
    ```
  </CodeGroup>

- 通过调用 BitBake 构建镜像
  ```bash theme={null}
  bitbake qcom-multimedia-proprietary-image
  ```

* 构建会创建一个 tarball，包含执行完整全新烧录所需的所有相关文件，
  包括分区元数据、启动固件、ESP 分区和 rootfs。构建成功后，
  检查构建产物中是否存在 qcomflash tarball。以下示例
  使用 `qcom-multimedia-proprietary-image` 作为镜像名称。

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

    ```bash IQ2390 / CQ2390 theme={null}
    ls build/tmp/deploy/images/shikra-evk/qcom-multimedia-proprietary-image-shikra-evk.rootfs.qcomflash.tar.gz
    ```
  </CodeGroup>
