# 使用 GitHub 為未註冊用戶進行構建

以下部分說明如何使用 GitHub 並使用預建的專有二進位檔/影像檔進行構建。

備註

有關此建置方法支援的硬體 SoCs 的更多詳細資訊，請參閱 [發行說明](https://docs.qualcomm.com/bundle/publicresource/topics/RNO-250403001134/) 中的 *Sync and build methods* 表格。

## 主機電腦需求

| 配置 | 工具 | 權限 |
| --- | --- | --- |
| x86 機器 | Git 1.8.3.1 或更高版本 | 需要 `sudo` 權限來運行一些命令 |
| 四核中央處理器，例如，Intel i7-2600，時脈為3.4 GHz（相等或更好） | Tar 1.28 或更高版本 | 需要 `sudo` 權限來運行一些命令 |
| 300 GB 免費磁碟空間（交換分割區 &gt; 32 GB） | Python 3.10.2 或更高版本 | 需要 `sudo` 權限來運行一些命令 |
| 16 GB RAM | GCC 8.0 或更高版本 | 需要 `sudo` 權限來運行一些命令 |
| Ubuntu 22.04 | GNU Make 4.0 或更高版本 | 需要 `sudo` 權限來運行一些命令 |
|  |  |  |
|  |  |  |
|  |  |  |
|  |  |  |

備註

若要在 Microsoft:sup:® Windows^®^ 或 Apple^®^ macOS^®^ 上設置運行 Ubuntu 22.04 的虛擬機器 (VM)，請參閱 [Qualcomm Linux Virtual Machine Setup Guide](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-41/)。在 VM 上進行程式碼編譯是一個緩慢的過程，可能需要幾個小時。高通建議使用 Ubuntu 主機電腦進行編譯。

## 使用獨立命令進行建置

### Ubuntu 主機設置

在 Ubuntu 主機電腦上安裝並配置所需的軟體工具。

1. 安裝以下軟體包以準備您的主機環境進行 Yocto 構建：

sudo apt update
        sudo apt install repo gawk wget git diffstat unzip texinfo gcc build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev pylint xterm python3-subunit mesa-common-dev zstd liblz4-tool locales tar python-is-python3 file libxml-opml-simplegen-perl vim whiptail g++ libacl1
        Copy to clipboard
2. 設定語系（如果尚未設定）：

sudo locale-gen en_US.UTF-8
        sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
        export LC_ALL=en_US.UTF-8
        export LANG=en_US.UTF-8
        Copy to clipboard
3. 更新 git 配置：

# Check if your identity is configured in .gitconfig
        git config --get user.email
        git config --get user.name
        
        # Run the following commands if you don't have your account identity set in .gitconfig
        git config --global user.email <Your email ID>
        git config --global user.name <"Your Name">
        
        # Add the following UI color option for output of console (optional)
        git config --global color.ui auto
        
        # Add the following git configurations to fetch large size repositories and to avoid unreliable connections
        git config --global http.postBuffer 1048576000
        git config --global http.maxRequestBuffer 1048576000
        git config --global http.lowSpeedLimit 0
        git config --global http.lowSpeedTime 999999
        Copy to clipboard

### 同步

本節使用安裝在 [Ubuntu host setup](https://docs.qualcomm.com/doc/80-70020-254T/topic/github_workflow_unregistered_users.html#ubuntu-host-setup-github-unreg) 中的 Repo 工具來下載 git 儲存庫和其他屬性，這些屬性來自 [Qualcomm manifest](https://github.com/quic-yocto/qcom-manifest)。Repo 工具使用 `repo init` 命令下載清單。

下表顯示了將 Yocto 層映射到 manifest 發行標籤的示例。使用此映射來下載和構建 Qualcomm Linux。

將 Yocto 層映射到 manifest 發行標籤

| Yocto 層 | manifest 發行標籤 | 參考發行版（`DISTRO`） |
| --- | --- | --- |
| <ul class="simple"><br><li><p><code class="docutils literal notranslate"><span class="pre">meta-qcom</span></code></p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">meta-qcom-hwe</span></code></p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">meta-qcom-distro</span></code></p></li><br></ul> | BSP 構建：高級操作系統和預構建韌體（僅限 GPS）<br><br><br>`qcom-6.6.65-QLI.1.4-Ver.1.1.xml` | `qcom-wayland` |
| <ul class="simple"><br><li><p><code class="docutils literal notranslate"><span class="pre">meta-qcom</span></code></p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">meta-qcom-hwe</span></code></p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">meta-qcom-distro</span></code></p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">meta-qcom-qim-product-sdk</span></code></p></li><br></ul> | BSP 構建 + QIMP SDK 構建：<br><br><br>`qcom-6.6.65-QLI.1.4-Ver.1.1_qim-product-sdk-1.1.2.xml` | `qcom-wayland` |
| <ul class="simple"><br><li><p><code class="docutils literal notranslate"><span class="pre">meta-qcom</span></code></p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">meta-qcom-hwe</span></code></p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">meta-qcom-distro</span></code></p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">meta-qcom-realtime</span></code></p></li><br></ul> | BSP build + Real-time kernel build:<br><br><br>`qcom-6.6.65-QLI.1.4-Ver.1.1_realtime-linux-1.1.xml` | `qcom-wayland` |
| <ul class="simple"><br><li><p><code class="docutils literal notranslate"><span class="pre">meta-qcom</span></code></p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">meta-qcom-hwe</span></code></p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">meta-qcom-distro</span></code></p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">meta-ros</span></code></p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">meta-qcom-robotics</span></code></p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">meta-qcom-robotics-distro</span></code></p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">meta-qcom-robotics-sdk</span></code></p></li><br><li><p><code class="docutils literal notranslate"><span class="pre">meta-qcom-qim-product-sdk</span></code></p></li><br></ul> | BSP build + QIRP SDK build:<br><br><br>`qcom-6.6.65-QLI.1.4-Ver.1.0_robotics-product-sdk-1.0.xml` | `qcom-robotics-ros2-humble` |

備註

- manifest 發行標籤的語法：

    `qcom-<Linux LTS Kernel Version>-QLI.<version>-Ver.<release>.xml`

    例如，manifest 發行標籤 `qcom-6.6.65-QLI.1.4-Ver.1.1.xml` 表示以下內容：

    - 6.6.65：Qualcomm Linux 核心
    - QLI.1.4: Qualcomm Linux v1.4
    - 1.0：里程碑發行
- 附加產品化 manifest 發行標籤的語法：

    `qcom-<Linux LTS Kernel version>-QLI.<version>-Ver.<milestone release>_<product/customization>-<patch release>.xml`

    例如，附加產品化 manifest 發行標籤 `qcom-6.6.65-QLI.1.4-Ver.1.1_qim-product-sdk-1.1.2.xml` 表示以下內容：

    - 6.6.65：Qualcomm Linux 核心
    - QLI.1.4: Qualcomm Linux v1.4
    - qim-product-sdk-1.1.1：基於 QLI.1.4 的 QIMP SDK 發行

        其他產品/自訂示例：

        - *realtime-linux-1.0*
        - *robotics-product-sdk-1.1*
    - 1.0：里程碑發行
    - 1.1.1：與里程碑發行相關的補丁發行
- 有關 Yocto 層的更多資訊，請參閱 [Qualcomm Linux metadata layers](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-27/qualcomm_linux_metadata_layers_overview.html#qualcomm-linux-metadata-layers).

### 建置 BSP 影像

Board support package (BSP) 影像建置包含支援 Qualcomm 裝置的軟體元件和適用於 Qualcomm SoCs 的增值軟體功能。它包括 Qualcomm 開發套件的參考發行配置。

更多詳情, 請參閱 [Qualcomm Linux metadata layers](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-27/qualcomm_linux_metadata_layers_overview.html#qualcomm-linux-metadata-layers).

1. 下載 Qualcomm Yocto 和支援層：

# cd to directory where you have 300 GB of free storage space to create your workspaces
        mkdir <WORKSPACE_DIR>
        cd <WORKSPACE_DIR>
        repo init -u https://github.com/quic-yocto/qcom-manifest -b qcom-linux-scarthgap -m <manifest release tag>
        # Example, <manifest release tag> is qcom-6.6.65-QLI.1.4-Ver.1.1.xml
        repo sync
        Copy to clipboard

備註

有關最新的 `<manifest release tag>`, 請參閱 [Release Notes](https://docs.qualcomm.com/bundle/publicresource/topics/RNO-250403001134/) 中的 *Build-Critical Release Tags* 部分。
2. 設置構建環境：

MACHINE=<machine> DISTRO=qcom-wayland QCOM_SELECTED_BSP=<override> source setup-environment
        # Example, MACHINE=qcs6490-rb3gen2-vision-kit DISTRO=qcom-wayland QCOM_SELECTED_BSP=custom source setup-environment
        # source setup-environment: Sets the environment, creates the build directory build-qcom-wayland,
        # and enters into build-qcom-wayland directory.
        Copy to clipboard

備註

有關各種 `<machine>` 和 `<override>` 組合，請參閱 [Release Notes](https://docs.qualcomm.com/bundle/publicresource/topics/RNO-250403001134/).
3. 建置軟體影像：

備註

有關支援的影像配方，請參閱 [GitHub 工作流程中支援的影像配方](https://docs.qualcomm.com/doc/80-70020-254T/topic/how_to.html#image-recipes-github-workflow)。

bitbake <image recipe>
        # Example, bitbake qcom-multimedia-image
        Copy to clipboard

    在成功建置後，檢查 system.img 檔案是否位於 `<workspace_path> /build-qcom-wayland/tmp-glibc/deploy/images/qcs6490-rb3gen2-vision-kit/qcom-multimedia-image` 目錄中：

cd <workspace_path>/build-qcom-wayland/tmp-glibc/deploy/images/qcs6490-rb3gen2-vision-kit/qcom-multimedia-image
        ls -al system.img
        Copy to clipboard

### 建置 QIMP SDK 影像

Qualcomm® 智慧多媒體產品（QIMP）SDK 是四個獨立功能 SDK 的集合，分別是 Qualcomm® 智慧多媒體 SDK（IM SDK）、Qualcomm® 神經處理 SDK、Qualcomm® AI 引擎直接 SDK 和 Lite Runtime（LiteRT）。它還包括可用於開發用例的參考應用程式。

更多詳情請參閱 [QIMP SDK 快速入門指南](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-51).。

1. 下載 Qualcomm Yocto 和支援層：

備註

    - QIMP SDK 構建的 `<manifest release tag>` 與 BSP 構建相同。在 BSP 構建之上克隆 QIMP SDK 層。
    - 有關最新的 `<manifest release tag>`, 請參閱 [Release Notes](https://docs.qualcomm.com/bundle/publicresource/topics/RNO-250403001134/) 中的 *Build-Critical Release Tags* 部分。

# cd to directory where you have 300 GB of free storage space to create your workspaces
        mkdir <WORKSPACE_DIR>
        cd <WORKSPACE_DIR>
        repo init -u https://github.com/quic-yocto/qcom-manifest -b qcom-linux-scarthgap -m <manifest release tag>
        # Example, <manifest release tag> is qcom-6.6.65-QLI.1.4-Ver.1.1.xml
        repo sync
        Copy to clipboard
2. 將 QIMP SDK 層克隆到工作區：

git clone https://github.com/quic-yocto/meta-qcom-qim-product-sdk -b <meta-qcom-qim-product-sdk release tag> layers/meta-qcom-qim-product-sdk
        # Example, <meta-qcom-qim-product-sdk release tag> is qcom-6.6.65-QLI.1.4-Ver.1.1_qim-product-sdk-1.1.2
        Copy to clipboard

    構建 QIMP SDK 層：

export EXTRALAYERS="meta-qcom-qim-product-sdk"
        Copy to clipboard
3. 設置構建環境：

MACHINE=<machine> DISTRO=qcom-wayland QCOM_SELECTED_BSP=custom source setup-environment
        # Example, MACHINE=qcs6490-rb3gen2-vision-kit DISTRO=qcom-wayland QCOM_SELECTED_BSP=custom source setup-environment
        # source setup-environment: Sets the environment, creates the build directory build-qcom-wayland,
        # and enters into build-qcom-wayland directory.
        Copy to clipboard

備註

要了解 `MACHINE` 參數值，請參閱 [Release Notes](https://docs.qualcomm.com/bundle/publicresource/topics/RNO-250403001134/)。
4. 建置軟體影像：

bitbake qcom-multimedia-image
        # Build SDK image
        bitbake qcom-qim-product-sdk
        Copy to clipboard

    在成功建置後，檢查 system.img 檔案是否位於 `<workspace_path> /build-qcom-wayland/tmp-glibc/deploy/images/qcs6490-rb3gen2-vision-kit/qcom-multimedia-image` 目錄中：

cd <workspace_path>/build-qcom-wayland/tmp-glibc/deploy/images/qcs6490-rb3gen2-vision-kit/qcom-multimedia-image
        ls -al system.img
        Copy to clipboard

### 建置 QIRP SDK 影像

Qualcomm® 智慧機器人產品（QIRP）SDK 2.0 是一組元件，允許您在 Qualcomm 平台上開發機器人功能。此 SDK 適用於 Qualcomm Linux 發行版。

更多詳情請參閱 [QIRP SDK 2.0 使用者指南](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-265).

1. 下載 Qualcomm Yocto 和支援層：

備註

QIRP SDK 構建的 `<manifest release tag>` 與 BSP 構建相同。在 BSP 構建之上克隆 QIRP SDK 層。

# cd to directory where you have 300 GB of free storage space to create your workspaces
        mkdir <WORKSPACE_DIR>
        cd <WORKSPACE_DIR>
        repo init -u https://github.com/quic-yocto/qcom-manifest -b qcom-linux-scarthgap -m <manifest release tag>
        # Example, <manifest release tag> is qcom-6.6.65-QLI.1.4-Ver.1.1.xml
        repo sync
        Copy to clipboard

備註

有關最新的 `<manifest release tag>`, 請參閱 [Release Notes](https://docs.qualcomm.com/bundle/publicresource/topics/RNO-250403001134/) 中的 *Build-Critical Release Tags* 部分。
2. 將 QIRP SDK 層下載到 BSP 建置  `<WORKSPACE DIR>` 目錄：

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.0_robotics-product-sdk-1.0 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.0_robotics-product-sdk-1.0 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.0_robotics-product-sdk-1.0 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
3. 設置構建環境：

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> DISTRO=qcom-robotics-ros2-humble QCOM_SELECTED_BSP=<override> source setup-robotics-environment
        # Example, MACHINE=qcs6490-rb3gen2-vision-kit DISTRO=qcom-robotics-ros2-humble QCOM_SELECTED_BSP=custom source setup-robotics-environment
        # source setup-robotics-environment: Sets the environment, creates the build directory build-qcom-robotics-ros2-humble,
        # and enters into build-qcom-robotics-ros2-humble directory.
        Copy to clipboard

備註

有關各種 `<machine>` 和 `<override>` 組合，請參閱 [Release Notes](https://docs.qualcomm.com/bundle/publicresource/topics/RNO-250403001134/).
4. 建置機器人影像和 QIRP SDK 工件：

../qirp-build qcom-robotics-full-image
        Copy to clipboard

    成功構建後，檢查 QIRP SDK 構建工件是否位於以下路徑：

QIRP SDK artifacts: <WORKSPACE DIR>/build-qcom-robotics-ros2-humble/tmp-glibc/deploy/qirpsdk_artifacts/qirp-sdk_<version>.tar.gz
        # system.img is present in the following path
        Robotics image: <WORKSPACE DIR>/build-qcom-robotics-ros2-humble/tmp-glibc/deploy/images/qcs6490-rb3gen2-vision-kit/qcom-robotics-full-image
        Copy to clipboard

### 建置即時 Linux 影像

實時層提供運行 Qualcomm Linux 核心作為實時核心所需的配方和配置。實時核心通過配置 `CONFIG_PREEMPT_RT=y` 完全啟用搶佔。此層支持 `linux-kernel-qcom-rt` 配方，該配方獲取並構建支持的機器的 Qualcomm Linux 核心。此層基於核心版本附加到核心和上游 `PREEMPT_RT` 補丁，並啟用實時配置。

更多詳情請參閱 [Real-time kernel](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-3/real_time_kernel_overview.html)。

1. 下載 Qualcomm Yocto 和支援層：

備註

實時 Linux 影像的 `<manifest release tag>` 與 BSP 構建相同。在 BSP 構建之上克隆實時 Linux。

# cd to directory where you have 300 GB of free storage space to create your workspaces
        mkdir <WORKSPACE_DIR>
        cd <WORKSPACE_DIR>
        repo init -u https://github.com/quic-yocto/qcom-manifest -b qcom-linux-scarthgap -m <manifest release tag>
        # Example, <manifest release tag> is qcom-6.6.65-QLI.1.4-Ver.1.1.xml
        repo sync
        Copy to clipboard

備註

有關最新的 `<manifest release tag>`, 請參閱 [Release Notes](https://docs.qualcomm.com/bundle/publicresource/topics/RNO-250403001134/) 中的 *Build-Critical Release Tags* 部分。
2. 將實時 Linux 層克隆到工作區：

git clone https://github.com/quic-yocto/meta-qcom-realtime -b <meta-qcom-realtime release tag> layers/meta-qcom-realtime
        # Example, <meta-qcom-realtime release tag> is qcom-6.6.65-QLI.1.4-Ver.1.1_realtime-linux-1.1
        Copy to clipboard

    構建實時層：

export EXTRALAYERS="meta-qcom-realtime"
        Copy to clipboard
3. 設置構建環境：

MACHINE=<machine> DISTRO=qcom-wayland QCOM_SELECTED_BSP=<override> source setup-environment
        # Example, MACHINE=qcs6490-rb3gen2-vision-kit DISTRO=qcom-wayland QCOM_SELECTED_BSP=custom source setup-environment
        # source setup-environment: Sets the environment, creates the build directory build-qcom-wayland,
        # and enters into build-qcom-wayland directory.
        Copy to clipboard

備註

有關各種 `<machine>` 和 `<override>` 組合，請參閱 [Release Notes](https://docs.qualcomm.com/bundle/publicresource/topics/RNO-250403001134/).
4. 建置軟體影像：

bitbake qcom-multimedia-image
        Copy to clipboard

    在成功建置後，檢查 system.img 檔案是否位於 `<workspace_path> /build-qcom-wayland/tmp-glibc/deploy/images/qcs6490-rb3gen2-vision-kit/qcom-multimedia-image` 目錄中：

cd <workspace_path>/build-qcom-wayland/tmp-glibc/deploy/images/qcs6490-rb3gen2-vision-kit/qcom-multimedia-image
        ls -al system.img
        Copy to clipboard

### 燒錄

要將軟體影像燒錄到裝置，請參閱 [Flash software images](https://docs.qualcomm.com/doc/80-70020-254T/topic/flash_images.html#flash-images)。

Last Published: Dec 23, 2025

[Previous Topic
使用 QSC CLI 構建](https://docs.qualcomm.com/bundle/publicresource/80-70020-254T/topics/build_frm_source_qsc_cli.md) [Next Topic
註冊用戶使用 GitHub 構建](https://docs.qualcomm.com/bundle/publicresource/80-70020-254T/topics/build_from_source_github_intro.md)

Source: [https://docs.qualcomm.com/doc/80-70020-254T/topic/github_workflow_unregistered_users.html](https://docs.qualcomm.com/doc/80-70020-254T/topic/github_workflow_unregistered_users.html)