# 使用 GitHub 编译

使用详细的指令来同步和编译 Qualcomm Yocto Dockerfile 的 QIRP SDK 的层，使用独立命令或Dockerfile。

**前提条件：**

> 
> 
> 确保您已根据 [搭建主机环境](https://docs.qualcomm.com/doc/80-70018-265Y/topic/setup-host-env.html#setup-host-env) 配置主机。

对于 QIRP SDK，可以使用以下两种方式进行编译：

- [使用独立命令编译](https://docs.qualcomm.com/doc/80-70018-265Y/topic/download-binaries.html#download-binaries)
- [使用 Dockerfile 编译](https://docs.qualcomm.com/doc/80-70018-265Y/topic/compile_3_2_3.html#compile-3-2-3)

## 使用独立命令编译

> 
> 
> 使用独立命令下载并编译 QIRP SDK 以及机器人镜像。支持 manifest或 `git clone` 方法。
> 
> 
> **步骤：**
> 
> 1. 使用 manifest 或 `git clone` 下载 Qualcomm Yocto 和 QIRP SDK 的层。
> 
>     - **使用 manifest 下载**：通过运行以下命令下载 QIRP SDK 的层。
> 
> 
> Note
> 
> 
> 请参阅 [Qualcomm^®^ Linux Intelligent Robotics Product SDK (QIRP SDK) 2.0 Release Notes](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-260)，获取最新的 `<robotics-release-manifest>`。
> 
> 
> cd <workspace>
>             repo init -u https://github.com/quic-yocto/qcom-manifest -b qcom-linux-scarthgap -m <robotics-release-manifest>
>             repo sync -c -j8
>             Copy to clipboard
> 
> 
>         **示例：**
> 
> 
>         以下命令用于下载manifest 为 `qcom-6.6.65-QLI.1.4-Ver.1.1_robotics-product-sdk-1.1.xml` 的发布版本：
> 
> 
> repo init -u https://github.com/quic-yocto/qcom-manifest -b qcom-linux-scarthgap -m qcom-6.6.65-QLI.1.4-Ver.1.1_robotics-product-sdk-1.1.xml
>             repo sync -c -j8
>             Copy to clipboard
>     - **使用** `git clone` 下载：
> 
>         1. 按照 [Qualcomm Repo Manifest README 文件](https://github.com/quic-yocto/qcom-manifest/blob/qcom-linux-scarthgap/README.md)的说明，搭建主机环境并同步最新 Yocto Project BSP。
>         2. 根据下载的 Yocto 项目 BSP 的 `<workspace>` 目录下载 QIRP SDK 的各层。
> 
> 
> cd <workspace>
>                 git clone https://github.com/ros/meta-ros -b scarthgap layers/meta-ros && cd layers/meta-ros && git checkout c560699e810e60a9526f4226c2c23f8d877280c8 && cd ../../
>                 git clone https://github.com/quic-yocto/meta-qcom-robotics.git -b qcom-6.6.65-QLI.1.4-Ver.1.1_robotics-product-sdk-1.1 layers/meta-qcom-robotics
>                 git clone https://github.com/quic-yocto/meta-qcom-robotics-distro.git -b qcom-6.6.65-QLI.1.4-Ver.1.1_robotics-product-sdk-1.1 layers/meta-qcom-robotics-distro
>                 git clone https://github.com/quic-yocto/meta-qcom-robotics-sdk.git -b qcom-6.6.65-QLI.1.4-Ver.1.1_robotics-product-sdk-1.1 layers/meta-qcom-robotics-sdk
>                 git clone https://github.com/quic-yocto/meta-qcom-qim-product-sdk -b qcom-6.6.65-QLI.1.4-Ver.1.1_qim-product-sdk-1.1.2 layers/meta-qcom-qim-product-sdk
>                 Copy to clipboard
> 
> 
> 
> 
> > 
> > 
> > **结果：** 上述命令下载以下层：
> > 
> > 
> > meta-qcom
> >             meta-qcom-hwe
> >             meta-qcom-distro
> >             meta-ros
> >             meta-qcom-robotics
> >             meta-qcom-robotics-distro
> >             meta-qcom-robotics-sdk
> >             meta-qcom-qim-product-sdk
> >             Copy to clipboard
> 2. 搭建编译环境。
> 
> 
> Note
> 
> 
> 如果您在 Arm64 Mac 的 Ubuntu Server VM 上编译 QIRP SDK，请在以下设置命令中添加变量设置 `SDKMACHINE=aarch64`。
> 
> 
> MACHINE=<Machine_name> DISTRO=<Distro_name>  SDKMACHINE=aarch64 QCOM_SELECTED_BSP=<Build_override> source setup-robotics-environment <Build_directory>
>         Copy to clipboard
> 
>     - 如果您**使用manifest下载**方法，请运行以下命令：
> 
> 
> cd <workspace>
>             MACHINE=<Machine_name> DISTRO=<Distro_name>  QCOM_SELECTED_BSP=<Build_override> source setup-robotics-environment <Build_directory>
>             Copy to clipboard
>     - 如果您**使用** `git clone` 方法下载，请运行以下命令：
> 
> 
> cd <workspace>
>             ln -s layers/meta-qcom-robotics-distro/set_bb_env.sh ./setup-robotics-environment
>             ln -s layers/meta-qcom-robotics-sdk/scripts/qirp-build ./qirp-build
>             MACHINE=<Machine_name> DISTRO=<Distro_name>  QCOM_SELECTED_BSP=<Build_override> source setup-robotics-environment <Build_directory>
>             Copy to clipboard
> 
> 
> 
> 
> 表：编译参数
> 
> 
>     | 参数 | RB3 Gen 2 机器视觉套件 | IQ-9075 评估套件 | IQ-8 Beta 评估套件 |
>     | --- | --- | --- | --- |
>     | `Machine_name` | `qcs6490-rb3gen2-vision-kit` | `qcs9075-rb8-core-kit` | `qcs8300-ride-sx` |
>     | `Distro_name` | `qcom-robotics-ros2-jazzy` | `qcom-robotics-ros2-jazzy` | `qcom-robotics-ros2-jazzy` |
>     | `Build_override` | `custom` | <ul class="simple"><br><li><p><code class="docutils literal notranslate"><span class="pre">custom</span></code></p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">base</span></code></p></li><br></ul> | <ul class="simple"><br><li><p><code class="docutils literal notranslate"><span class="pre">custom</span></code></p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">base</span></code></p></li><br></ul> |
>     | `Build_directory` | `build-qcs6490-custom` | <ul class="simple"><br><li><p><code class="docutils literal notranslate"><span class="pre">build-qcs9075-custom</span></code></p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">build-qcs9075-base</span></code></p></li><br></ul> | <ul class="simple"><br><li><p><code class="docutils literal notranslate"><span class="pre">build-qcs8300-custom</span></code></p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">build-qcs8300-base</span></code></p></li><br></ul> |
> 
> 
> 
> Note
> 
> 
> 对于 Qualcomm^®^ IQ-8 Beta 评估套件和 Qualcomm Dragonwing^TM^ IQ-9075 评估套件，编译命令还支持 `base` 和 `custom` *Build\_override* 值。默认override为 `custom`，您可以根据需要设置override为 `base`。以下示例设置了机器 `qcs9075-rb8-core-kit`： 的 `base` 编译override参数
> 
> 
> MACHINE=qcs9075-rb8-core-kit DISTRO=qcom-robotics-ros2-jazzy QCOM_SELECTED_BSP=base source setup-robotics-environment build-qcs9075-base
>         Copy to clipboard
> 3. 编译机器人镜像和 QIRP SDK 文件。
> 
> 
> ../qirp-build qcom-robotics-full-image
>         Copy to clipboard
> 
> 
>     **结果：**
> 
> 
> Tab RB3 Gen 2 机器视觉开发套件
> Tab IQ-9075 评估套件
> Tab IQ-8 Beta 评估套件
> 
> - QIRP SDK artifact:
> 
> 
> 
> 
> > 
> > 
> > <workspace>/build-qcs6490-custom/tmp-glibc/deploy/qirpsdk_artifacts/qcs6490-rb3gen2-vision-kit/qirp-sdk_<version>.tar.gz
> >         Copy to clipboard
> 
> 
>     - 机器人镜像：
> 
> 
> 
> 
> > 
> > 
> > <workspace>/build-qcs6490-custom/tmp-glibc/deploy/images/qcs6490-rb3gen2-vision-kit/qcom-robotics-full-image
> >         Copy to clipboard
> 
> > 
> > 
> > **使用** `custom` **override的示例**
> 
> 
>     - QIRP SDK artifact:
> 
> 
> 
> > 
> > 
> > <workspace>/build-qcs9075-custom/tmp-glibc/deploy/qirpsdk_artifacts/qcs9075-rb8-core-kit/qirp-sdk_<version>.tar.gz
> >             Copy to clipboard
>     - 机器人镜像：
> 
> 
> 
> > 
> > 
> > <workspace>/build-qcs9075-custom/tmp-glibc/deploy/images/qcs9075-rb8-core-kit/qcom-robotics-full-image
> >             Copy to clipboard
> 
> 
> 
> 
> > 
> > 
> > **使用** `base` **override的示例**
> 
> 
>     - QIRP SDK artifact:
> 
> 
> 
> > 
> > 
> > <workspace>/build-qcs9075-base/tmp-glibc/deploy/qirpsdk_artifacts/qcs9075-rb8-core-kit/qirp-sdk_<version>.tar.gz
> >             Copy to clipboard
>     - 机器人镜像：
> 
> 
> 
> > 
> > 
> > <workspace>/build-qcs9075-base/tmp-glibc/deploy/images/qcs9075-rb8-core-kit/qcom-robotics-full-image
> >             Copy to clipboard
> 
> **使用** `custom` **override的示例**
> 
>     - QIRP SDK artifact:
> 
> 
> 
> > 
> > 
> > <workspace>/build-qcs8300-custom/tmp-glibc/deploy/qirpsdk_artifacts/qcs8300-ride-sx/qirp-sdk_<version>.tar.gz
> >             Copy to clipboard
>     - 机器人镜像：
> 
> 
> 
> > 
> > 
> > <workspace>/build-qcs8300-custom/tmp-glibc/deploy/images/qcs8300-ride-sx/qcom-robotics-full-image
> >             Copy to clipboard
> 
> 
> 
> **使用** `base` **override的示例**
> 
>     - QIRP SDK artifact:
> 
> 
> 
> > 
> > 
> > <workspace>/build-qcs8300-base/tmp-glibc/deploy/qirpsdk_artifacts/qcs8300-ride-sx/qirp-sdk_<version>.tar.gz
> >             Copy to clipboard
>     - 机器人镜像：
> 
> 
> 
> > 
> > 
> > <workspace>/build-qcs8300-base/tmp-glibc/deploy/images/qcs8300-ride-sx/qcom-robotics-full-image
> >             Copy to clipboard

## 使用 Dockerfile 编译

> 
> 
> 使用 Dockerfile 编译 QIRP SDK 以及机器人镜像，并基于 Qualcomm Linux 镜像进行编译。
> 
> 
> **步骤：**
> 
> 1. 按照[使用 Dockerfile 编译](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-254/build_from_source_github_intro.html#build-with-dockerfile)下的步骤编译 Qualcomm Linux 镜像。
> 
>     1. 按照 [Ubuntu 主机设置](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-254/build_from_source_github_intro.html#ubuntu-host-setup-2)和[检查主机配置](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-254/build_from_source_github_intro.html#host-computer-requirements)进行操作。
>     2. 按照[编译 BSP 镜像](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-254/build_from_source_github_intro.html#build-bsp-image-2)中的步骤操作。
> 2. 运行 `docker run` 命令。
> 
> 
> Note
> 
> 
> 在 Qualcomm Linux 编译位置内运行以下命令。
> 
> 
> cd <workspace_path>/qcom-download-utils/qcom-6.6.65-QLI.1.4-Ver.1.1
>         bash
>         docker run -it -v "${HOME}/.gitconfig":"/home/${USER}/.gitconfig" -v "${HOME}/.netrc":"/home/${USER}/.netrc" -v $(pwd):$(pwd) -w $(pwd) qcom-6.6.65-qli.1.4-ver.1.0_22.04 /bin/bash
>         Copy to clipboard
> 3. 根据 `<workspace>` 目录下载 QIRP SDK 的层。
> 
> 
> git clone https://github.com/ros/meta-ros -b scarthgap layers/meta-ros && cd layers/meta-ros && git checkout c560699e810e60a9526f4226c2c23f8d877280c8 && cd ../../
>         git clone https://github.com/quic-yocto/meta-qcom-robotics.git -b qcom-6.6.65-QLI.1.4-Ver.1.1_robotics-product-sdk-1.1 layers/meta-qcom-robotics
>         git clone https://github.com/quic-yocto/meta-qcom-robotics-distro.git -b qcom-6.6.65-QLI.1.4-Ver.1.1_robotics-product-sdk-1.1 layers/meta-qcom-robotics-distro
>         git clone https://github.com/quic-yocto/meta-qcom-robotics-sdk.git -b qcom-6.6.65-QLI.1.4-Ver.1.1_robotics-product-sdk-1.1 layers/meta-qcom-robotics-sdk
>         git clone https://github.com/quic-yocto/meta-qcom-qim-product-sdk -b qcom-6.6.65-QLI.1.4-Ver.1.1_qim-product-sdk-1.1.2 layers/meta-qcom-qim-product-sdk
>         Copy to clipboard
> 4. 搭建编译环境。
> 
> 
> Note
> 
> 
> 如果您在 Arm64 Mac 的 Ubuntu Server VM 上编译 QIRP SDK，请在以下设置命令中添加变量设置 `SDKMACHINE=aarch64`。
> 
> 
> MACHINE=<Machine_name> DISTRO=<Distro_name>  SDKMACHINE=aarch64 QCOM_SELECTED_BSP=<Build_override> source setup-robotics-environment <Build_directory>
>         Copy to clipboard
> 
> 
> ln -s layers/meta-qcom-robotics-distro/set_bb_env.sh ./setup-robotics-environment
>         ln -s layers/meta-qcom-robotics-sdk/scripts/qirp-build ./qirp-build
>         MACHINE=<Machine_name> DISTRO=<Distro_name>  QCOM_SELECTED_BSP=<Build_override> source setup-robotics-environment <Build_directory>
>         Copy to clipboard
> 
> 
> 
> 表：编译参数
> 
> 
>     | 参数 | RB3 Gen 2 机器视觉套件 | IQ-9075 评估套件 | IQ-8 Beta 评估套件 |
>     | --- | --- | --- | --- |
>     | `Machine_name` | `qcs6490-rb3gen2-vision-kit` | `qcs9075-rb8-core-kit` | `qcs8300-ride-sx` |
>     | `Distro_name` | `qcom-robotics-ros2-jazzy` | `qcom-robotics-ros2-jazzy` | `qcom-robotics-ros2-jazzy` |
>     | `Build_override` | `custom` | <ul class="simple"><br><li><p><code class="docutils literal notranslate"><span class="pre">custom</span></code></p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">base</span></code></p></li><br></ul> | <ul class="simple"><br><li><p><code class="docutils literal notranslate"><span class="pre">custom</span></code></p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">base</span></code></p></li><br></ul> |
>     | `Build_directory` | `build-qcs6490-custom` | <ul class="simple"><br><li><p><code class="docutils literal notranslate"><span class="pre">build-qcs9075-custom</span></code></p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">build-qcs9075-base</span></code></p></li><br></ul> | <ul class="simple"><br><li><p><code class="docutils literal notranslate"><span class="pre">build-qcs8300-custom</span></code></p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">build-qcs8300-base</span></code></p></li><br></ul> |
> 5. 编译机器人镜像和 QIRP SDK 文件。
> 
> 
> ../qirp-build qcom-robotics-full-image
>         Copy to clipboard
> 
> 
>     **结果：**
> 
> 
> Tab RB3 Gen 2 机器视觉开发套件
> Tab IQ-9075 评估套件
> Tab IQ-8 Beta 评估套件
> 
> - QIRP SDK artifact:
> 
> 
> <workspace>/qcom-download-utils/qcom-6.6.65-QLI.1.4-Ver.1.1/build-qcs6490-custom/tmp-glibc/deploy/qirpsdk_artifacts/qcs6490-rb3gen2-vision-kit/qirp-sdk_<version>.tar.gz
>             Copy to clipboard
>     - 机器人镜像：
> 
> 
> <workspace>/qcom-download-utils/qcom-6.6.65-QLI.1.4-Ver.1.1/build-qcs6490-custom/tmp-glibc/deploy/images/qcs6490-rb3gen2-vision-kit/qcom-robotics-full-image
>             Copy to clipboard
> 
> **使用** `custom` **override的示例**
> 
>     - QIRP SDK artifact:
> 
> 
> 
> > 
> > 
> > <workspace>/qcom-download-utils/qcom-6.6.65-QLI.1.4-Ver.1.1/build-qcs9075-custom/tmp-glibc/deploy/qirpsdk_artifacts/qcs9075-rb8-core-kit/qirp-sdk_<version>.tar.gz
> >             Copy to clipboard
>     - 机器人镜像：
> 
> 
> 
> > 
> > 
> > <workspace>/qcom-download-utils/qcom-6.6.65-QLI.1.4-Ver.1.1/build-qcs9075-custom/tmp-glibc/deploy/images/qcs9075-rb8-core-kit/qcom-robotics-full-image
> >             Copy to clipboard
> 
> 
> 
> **使用** `base` **override的示例**
> 
>     - QIRP SDK artifact:
> 
> 
> <workspace>/qcom-download-utils/qcom-6.6.65-QLI.1.4-Ver.1.1/build-qcs9075-base/tmp-glibc/deploy/qirpsdk_artifacts/qcs9075-rb8-core-kit/qirp-sdk_<version>.tar.gz
>             Copy to clipboard
>     - 机器人镜像：
> 
> 
> <workspace>/qcom-download-utils/qcom-6.6.65-QLI.1.4-Ver.1.1/build-qcs9075-base/tmp-glibc/deploy/images/qcs9075-rb8-core-kit/qcom-robotics-full-image
>             Copy to clipboard
> 
> **使用** `custom` **override的示例**
> 
>     - QIRP SDK artifact:
> 
> 
> 
> > 
> > 
> > <workspace>/build-qcs8300-custom/tmp-glibc/deploy/qirpsdk_artifacts/qcs8300-ride-sx/qirp-sdk_<version>.tar.gz
> >             Copy to clipboard
>     - 机器人镜像：
> 
> 
> 
> > 
> > 
> > <workspace>/build-qcs8300-custom/tmp-glibc/deploy/images/qcs8300-ride-sx/qcom-robotics-full-image
> >             Copy to clipboard
> 
> 
> 
> **使用** `base` **override的示例**
> 
>     - QIRP SDK artifact:
> 
> 
> 
> > 
> > 
> > <workspace>/build-qcs8300-base/tmp-glibc/deploy/qirpsdk_artifacts/qcs8300-ride-sx/qirp-sdk_<version>.tar.gz
> >             Copy to clipboard
>     - 机器人镜像：
> 
> 
> 
> > 
> > 
> > <workspace>/build-qcs8300-base/tmp-glibc/deploy/images/qcs8300-ride-sx/qcom-robotics-full-image
> >             Copy to clipboard

## 将 QIRP 刷写到设备

将机器人图像刷写到设备，并安装 QIRP SDK。

- 要将机器人图像刷写到设备，请参阅[刷写软件镜像](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-254/flash_images.html)。
- 要在设备上安装 QIRP SDK，请参阅 [在设备上安装 QIRP SDK](https://docs.qualcomm.com/doc/80-70018-265Y/topic/flash-and-install_4_3.html#install-qirp-sdk)。

Last Published: May 12, 2025

[Previous Topic
使用 QSC CLI 编译](https://docs.qualcomm.com/bundle/publicresource/80-70018-265Y/topics/build-with-qsc-cli_3_1.md) [Next Topic
使用 GitHub 编译（固件和附加功能）](https://docs.qualcomm.com/bundle/publicresource/80-70018-265Y/topics/using-detailed-instructions_3_2.md)