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

# 烧录软件镜像（Windows）

## 简介

将预构建镜像烧录到设备上。虽然 Qualcomm 硬件通常预装了镜像，但您可以使用此流程更新到较新的软件版本，或部署从源代码构建的镜像。

要烧录预构建镜像，需要执行以下步骤：

* 设置工作区 – [设置工作区](#set-up-workspace)
* 下载烧录镜像所需的软件包 – [下载所需软件包](#download-required-packages)
* 获取可烧录镜像 – [获取可烧录镜像](#obtain-flashable-image)
* 确定设备的存储配置 – [确定存储配置](#identify-storage-configuration)
* 根据参考套件选择合适的 CDT – [配置 CDT](#configure-cdt)
* 将设备切换到 EDL 模式 – [将设备切换到 EDL 模式](#switch-device-to-edl-mode)
* 预配 UFS – [预配 UFS](#provision-ufs)
* 烧录 SAIL – [烧录 SAIL](#flash-sail)
* 烧录软件镜像 – [烧录软件镜像](#flash-software-image)

## 设置工作区

打开 PowerShell 实例并导航到您偏好的工作区路径。您将在此处下载并解压 QDL、下载可烧录镜像，并将镜像烧录到设备上。

```powershell theme={null}
cd <workspace-directory>
```

## 下载所需软件包

QDL 是一个软件实用程序，用于与处于紧急下载（EDL）模式的
Qualcomm USB 设备通信，使您能够上传
刷写加载程序并将软件镜像烧录到设备上。请按照
以下步骤在您的系统上下载并设置 QDL：

* 使用以下命令从 Qualcomm Software Center 下载 QDL
  二进制文件：

  <CodeGroup>
    ```powershell Windows x64 theme={null}
    Invoke-WebRequest -Uri "https://softwarecenter.qualcomm.com/api/download/software/tools/Qualcomm_Device_Loader/Windows/latest.zip" -OutFile qdl.zip
    ```

    ```powershell Windows ARM theme={null}
    Invoke-WebRequest -Uri "https://softwarecenter.qualcomm.com/api/download/software/tools/Qualcomm_Device_Loader/Windows/ARM64/latest.zip" -OutFile qdl.zip
    ```
  </CodeGroup>

* 解压下载的压缩包：

  ```powershell theme={null}
  Expand-Archive -Path qdl.zip -DestinationPath .
  ```

* 将 QDL 可执行文件添加到您的用户 PATH：
  * 按 **Win + S**，搜索 `environment variables`，然后打开
    **编辑账户的环境变量**。
  * 在**用户变量**下，选择 **Path** 并点击**编辑**。
  * 点击**新建**并添加 `<unzipped-qdl-directory>` 的完整路径。
  * 在每个打开的对话框中点击**确定**以保存更改。

    <Note>
      重启 PowerShell 以使更新后的 PATH 生效。
    </Note>

    <img src="https://mintcdn.com/qualcomm-staging/uWQLnBcS9sxlZhgB/Key-Documents/Flash-Guide/media/k2c-qli-build-ga/user-environment.png?fit=max&auto=format&n=uWQLnBcS9sxlZhgB&q=85&s=4cb62ce2cc9ef2ecac4ccf207dc20e74" alt="设置环境变量" width="844" height="679" data-path="Key-Documents/Flash-Guide/media/k2c-qli-build-ga/user-environment.png" />

* 验证 QDL 可执行文件是否可访问：

  ```powershell theme={null}
  qdl.exe --version
  ```

* 从解压后的 QDL 目录中运行 `install_driver.bat` 以安装 QDL
  驱动程序。
  * 在文件资源管理器中，导航到 `<unzipped-qdl-directory>`。
  * 右键点击 `install_driver.bat` 并选择**以管理员身份运行**。

## 获取可烧录镜像

在刷写之前，您的主机上需要有一个可刷写的镜像目录。
根据您获取镜像的方式，选择以下路径之一。

<Tabs>
  <Tab title="预构建镜像">
    预构建镜像以压缩包形式分发。请从 [获取预构建镜像](/zh/Key-Documents/Flash-Guide/obtain-prebuilts)
    部分下载适用于您设备的压缩包，解压该压缩包，然后进入解压后的目录。

    * 解压压缩包：

      ```powershell theme={null}
      Expand-Archive -Path <prebuilt-image>.zip -DestinationPath .
      ```

    * 进入解压后的目录：

      ```powershell theme={null}
      cd <unzipped-image-directory>\images\<machine>\<image>-<machine>
      ```
  </Tab>

  <Tab title="编译镜像">
    构建成功后，可刷写的镜像目录已存在于
    您的构建输出中。请直接进入该目录。

    ```powershell theme={null}
    cd build\tmp\deploy\images\<machine>\<image>-<machine>.rootfs.qcomflash
    ```
  </Tab>
</Tabs>

<Warning>
  除非另有说明，后续所有指令都应在此目录中
  运行。
</Warning>

## 确定存储配置

机器配置默认启用 UFS 或 eMMC 存储，
这些设置也反映在预构建的镜像中。如果您需要修改
存储类型，则必须更新配置并重新构建镜像，因为
在预构建的二进制文件中无法更改此设置。

支持平台的默认存储配置如下

| 机器           | 存储类型       |
| :----------- | :--------- |
| IQ-9075-EVK  | UFS        |
| IQ-8275-EVK  | UFS        |
| QCS6490      | UFS        |
| IQ-615-EVK   | EMMC       |
| IQ-X7181-EVK | UFS/SPINOR |
| IQ-X5121-EVK | UFS/SPINOR |
| SHIKRA-EVK   | EMMC       |

## 配置 CDT

配置数据表（CDT）包含正确进行平台初始化所需的
设备特定信息。在刷写之前，您需要根据您的参考套件
选择正确的 CDT 文件。

<Tabs>
  <Tab title="QCS6490/QCS5430">
    * qcomflash tarball 中提供了多个 CDT 二进制文件。
      请为您的套件选择正确的 CDT 二进制文件，并用相应的文件替换默认的
      `cdt.bin`。

          <CodeGroup>
            ```powershell Rb3Gen2 Core Kit theme={null}
            cp cdt_core_kit.bin cdt.bin
            ```

            ```powershell Rb3Gen2 Vision Kit theme={null}
            cp cdt_vision_kit.bin cdt.bin
            ```

            ```powershell Rb3Gen2 Industrial Kit theme={null}
            cp cdt_industrial_kit.bin cdt.bin
            ```

            ```powershell Rb3Gen2 Industrial Mezz Kit theme={null}
            cp cdt_industrial_mezz_kit.bin cdt.bin
            ```
          </CodeGroup>

    * 整个刷写过程成功后，您可以通过查看 UEFI 串口日志来验证是否加载了
      正确的 CDT。使用 *Subtype* 字段来识别
      加载到您设备上的 CDT。

      ```text Sample output theme={null}
      Platform Init [ 1966] BDS
      Platform : IOT
      Subtype : 2
      Boot Device : UFS
      Chip Name : QCS6490
      Chip Ver : 1.0
      ```

      | Subtype | 平台描述                     |
      | ------- | ------------------------ |
      | 2       | Vision Kit（Moselle 连接）   |
      | 5       | RB3Gen2 Core Kit（HSP 连接） |
      | 7       | Vision Kit（HSP 连接）       |
      | 9       | Industrial Kit           |
      | 13      | Industrial Mezz Kit      |
  </Tab>

  <Tab title="IQ-X7181/IQ-X5121">
    * 从 [CodeLinaro](https://artifacts.codelinaro.org/ui/native/codelinaro-le/Qualcomm_Linux/X1E80100/cdt/) 下载 CDT 二进制文件：

      ```powershell theme={null}
      Invoke-WebRequest -Uri "https://artifacts.codelinaro.org/artifactory/codelinaro-le/Qualcomm_Linux/X1E80100/cdt/IQ-X.1.4-EVK-CDT.tar.gz" -OutFile IQ-X.1.4-EVK-CDT.tar.gz
      ```

    * 解压 tarball 压缩包：

      ```powershell theme={null}
      tar -xzf IQ-X.1.4-EVK-CDT.tar.gz
      ```

    * 进入解压后的目录：

      ```powershell theme={null}
      cd IQ-X.1.4-EVK-CDT
      ```

    * 刷写 CDT：

      ```powershell theme={null}
      qdl.exe --storage spinor xbl_s_devprg_ns.melf rawprogram0_BLANK_GPT.xml
      qdl.exe --storage spinor xbl_s_devprg_ns.melf rawprogram0_WIPE_PARTITIONS.xml
      qdl.exe xbl_s_devprg_ns.melf rawprogram0.xml patch0.xml
      ```

    * 返回上一级目录：
      ```powershell theme={null}
      cd ..
      ```
  </Tab>

  <Tab title="CQ-2390/IQ-2390">
    * 从 [CodeLinaro](https://artifacts.codelinaro.org/ui/native/codelinaro-le/Qualcomm_Linux/CQ2390/cdt/) 下载 CDT 二进制文件：

          <CodeGroup>
            ```powershell CQ-2390 EVK theme={null}
            Invoke-WebRequest -Uri "https://artifacts.codelinaro.org/artifactory/codelinaro-le/Qualcomm_Linux/CQ2390/cdt/cq2390-itp.zip" -OutFile cq2390-itp.zip
            ```

            ```powershell IQ-2390 EVK theme={null}
            Invoke-WebRequest -Uri "https://artifacts.codelinaro.org/artifactory/codelinaro-le/Qualcomm_Linux/CQ2390/cdt/iq2390-itp.zip" -OutFile iq2390-itp.zip
            ```
          </CodeGroup>

    * 解压下载的压缩包：

      ```powershell theme={null}
      Expand-Archive -Path <cdt-zip-file>.zip -DestinationPath .
      ```

    * 刷写 CDT：

      ```powershell theme={null}
      qdl.exe --storage emmc prog_firehose_ddr.elf rawprogram1.xml patch1.xml
      ```

    * CDT 刷写完成后，终端会显示 `flashed "cdt" successfully`。
  </Tab>

  <Tab title="其他套件">
    * 对于 IQ-9075、IQ-8275 和 IQ-615 套件，qcomflash tarball 中包含的默认
      `cdt.bin` 已经是适用于您套件的正确 CDT。在刷写之前无需
      执行任何操作来选择 CDT。
  </Tab>
</Tabs>

## 将设备切换到 EDL 模式

在刷写软件镜像之前，设备必须处于 EDL 模式。
如果设备上电后没有镜像或镜像已损坏，Qualcomm 支持的
设备默认会进入 EDL 模式。请按照以下
步骤强制设备进入 EDL 模式。

<Tabs>
  <Tab title="QCS6490/QCS5430">
    * 按住 **F\_DL** 按钮。
          <img src="https://mintcdn.com/qualcomm-staging/uWQLnBcS9sxlZhgB/Key-Documents/Flash-Guide/media/k2c-qli-build-ga/RB3Gen2_device.png?fit=max&auto=format&n=uWQLnBcS9sxlZhgB&q=85&s=1bd80845818e8f8ee149d1c4f631452a" alt="图：RB3Gen2_device" width="1001" height="710" data-path="Key-Documents/Flash-Guide/media/k2c-qli-build-ga/RB3Gen2_device.png" />
    * 将设备连接到 **+12 V 壁式电源**。
    * 通过 USB Type-C 接口将设备连接到主机系统。
    * 松开 **F\_DL** 按钮。设备现在处于 EDL 模式。
    * 整个刷写过程完成后，拔下电源线以退出 EDL 模式。
  </Tab>

  <Tab title="IQ-9075">
    <Tabs>
      <Tab title="IQ-9 Beta Evaluation Kit (EVK)">
        * 将设备连接到 **+12 V 壁式电源**。
        * 通过 USB Type-C 接口将设备连接到主机系统。
        * 打开拨码开关 S5-4，使设备进入 EDL 模式。
                  <img src="https://mintcdn.com/qualcomm-staging/uWQLnBcS9sxlZhgB/Key-Documents/Flash-Guide/media/k2c-qli-build-ga/qcs9075_qdl_mode_manual.png?fit=max&auto=format&n=uWQLnBcS9sxlZhgB&q=85&s=8efa9f7436cb24cc5125cc45e450d396" alt="图：qcs9075_qdl_mode_manual" width="1094" height="305" data-path="Key-Documents/Flash-Guide/media/k2c-qli-build-ga/qcs9075_qdl_mode_manual.png" />
        * 整个刷写过程完成后，关闭 S5-4 拨码开关。
      </Tab>

      <Tab title="IQ-9075 EVK">
        * 将设备连接到 **+12 V 壁式电源**。
        * 通过 USB Type-C 接口将设备连接到主机系统。
        * 打开拨码开关 SW2-3，使设备进入 EDL 模式。
                  <img src="https://mintcdn.com/qualcomm-staging/uWQLnBcS9sxlZhgB/Key-Documents/Flash-Guide/media/k2c-qli-build-ga/IQ_9075_EVK.png?fit=max&auto=format&n=uWQLnBcS9sxlZhgB&q=85&s=a84595c4b264c39d903c30d0471f2276" alt="图：IQ_9075_EVK" width="1131" height="318" data-path="Key-Documents/Flash-Guide/media/k2c-qli-build-ga/IQ_9075_EVK.png" />
        * 整个刷写过程完成后，关闭 SW2-3 拨码开关。
      </Tab>
    </Tabs>
  </Tab>

  <Tab title="IQ-8275">
    <Tabs>
      <Tab title="IQ-8 Beta Evaluation Kit (EVK)">
        * 将设备连接到 **+12 V 壁式电源**。
        * 通过 USB Type-C 接口将设备连接到主机系统。
        * 打开拨码开关 S5-4，使设备进入 EDL 模式。
                  <img src="https://mintcdn.com/qualcomm-staging/uWQLnBcS9sxlZhgB/Key-Documents/Flash-Guide/media/k2c-qli-build-ga/qcs9075_qdl_mode_manual.png?fit=max&auto=format&n=uWQLnBcS9sxlZhgB&q=85&s=8efa9f7436cb24cc5125cc45e450d396" alt="图：qcs9075_qdl_mode_manual" width="1094" height="305" data-path="Key-Documents/Flash-Guide/media/k2c-qli-build-ga/qcs9075_qdl_mode_manual.png" />
        * 整个刷写过程完成后，关闭 S5-4 拨码开关。
      </Tab>

      <Tab title="IQ-8275 EVK">
        * 将设备连接到 **+12 V 壁式电源**。
        * 通过 USB Type-C 接口将设备连接到主机系统。
        * 打开拨码开关 S2-8，使设备进入 EDL 模式。
                  <img src="https://mintcdn.com/qualcomm-staging/uWQLnBcS9sxlZhgB/Key-Documents/Flash-Guide/media/k2c-qli-build-ga/IQ_9075_EVK.png?fit=max&auto=format&n=uWQLnBcS9sxlZhgB&q=85&s=a84595c4b264c39d903c30d0471f2276" alt="图：IQ_9075_EVK" width="1131" height="318" data-path="Key-Documents/Flash-Guide/media/k2c-qli-build-ga/IQ_9075_EVK.png" />
        * 整个刷写过程完成后，关闭 S2-8 拨码开关。
      </Tab>
    </Tabs>
  </Tab>

  <Tab title="IQ-615">
    * 将设备连接到 **+12 V 壁式电源**。
    * 通过 USB Type-C 接口将设备连接到主机系统。
    * 关闭 SW 开关并打开拨码开关 SW3-4，使设备进入 EDL 模式。
          <img src="https://mintcdn.com/qualcomm-staging/uWQLnBcS9sxlZhgB/Key-Documents/Flash-Guide/media/k2c-qli-build-ga/qcs615_qdl_mode_manual.png?fit=max&auto=format&n=uWQLnBcS9sxlZhgB&q=85&s=89d35942be50ac68890845fae62840db" alt="图：qcs615_qdl_mode_manual" width="800" height="667" data-path="Key-Documents/Flash-Guide/media/k2c-qli-build-ga/qcs615_qdl_mode_manual.png" />
    * 整个刷写过程完成后，打开 SW 开关并关闭 SW3-4 拨码开关。
  </Tab>

  <Tab title="IQ-X7181/IQ-X5121">
    * 将设备连接到 **+12 V 壁式电源**。
    * 通过 USB Type-C 接口将设备连接到主机系统。
    * 打开 S2-4 开关，使设备进入 EDL 模式。
          <img src="https://mintcdn.com/qualcomm-staging/uWQLnBcS9sxlZhgB/Key-Documents/Flash-Guide/media/k2c-qli-build-ga/x7181_edl_mode_manual.png?fit=max&auto=format&n=uWQLnBcS9sxlZhgB&q=85&s=6b82bb7d3483b273273cafa8c159f02d" alt="图：x7181_edl_mode_manual" width="1429" height="718" data-path="Key-Documents/Flash-Guide/media/k2c-qli-build-ga/x7181_edl_mode_manual.png" />
    * 整个刷写过程完成后，关闭 S2-4 拨码开关。
  </Tab>

  <Tab title="CQ-2390/IQ-2390">
    <Tabs>
      <Tab title="CQ-2390 EVK">
        * 打开 S1011-1 DIP 开关，使设备进入 EDL 模式。
                  <img src="https://mintcdn.com/qualcomm-staging/bpPV96hxF3W6ng5f/Key-Documents/Flash-Guide/media/k2c-qli-build-ga/cq2390_edl_mode_manual.png?fit=max&auto=format&n=bpPV96hxF3W6ng5f&q=85&s=e3515611b1e089b993d659b538e16690" alt="图：cq2390_edl_mode_manual" width="1141" height="553" data-path="Key-Documents/Flash-Guide/media/k2c-qli-build-ga/cq2390_edl_mode_manual.png" />
        * 将设备连接到 **+12 V 壁式电源**。
        * 通过 USB Type-C 接口将设备连接到主机系统。
        * 整个刷写过程完成后，关闭 S1011-1 DIP 开关。
      </Tab>

      <Tab title="IQ-2390 EVK">
        * 打开 S1011-1 DIP 开关，使设备进入 EDL 模式。
                  <img src="https://mintcdn.com/qualcomm-staging/bpPV96hxF3W6ng5f/Key-Documents/Flash-Guide/media/k2c-qli-build-ga/iq2390_edl_mode_manual.png?fit=max&auto=format&n=bpPV96hxF3W6ng5f&q=85&s=c66fa629149feed756eff60528fcf4c1" alt="图：iq2390_edl_mode_manual" width="1142" height="665" data-path="Key-Documents/Flash-Guide/media/k2c-qli-build-ga/iq2390_edl_mode_manual.png" />
        * 将设备连接到 **+12 V 壁式电源**。
        * 通过 USB Type-C 接口将设备连接到主机系统。
        * 按下 **SYS\_ON** 电源按钮。
                  <img src="https://mintcdn.com/qualcomm-staging/bpPV96hxF3W6ng5f/Key-Documents/Flash-Guide/media/k2c-qli-build-ga/iq2390_sys_on_power_button.png?fit=max&auto=format&n=bpPV96hxF3W6ng5f&q=85&s=41ff7cc16d7e003fce7a76ea7f807a81" alt="图：iq2390_sys_on_power_button" width="947" height="552" data-path="Key-Documents/Flash-Guide/media/k2c-qli-build-ga/iq2390_sys_on_power_button.png" />
        * 整个刷写过程完成后，关闭 S1011-1 DIP 开关。在 IQ-2390S EVK 上，关闭 DIP 开关后按下 **SYS\_ON** 电源按钮。
      </Tab>
    </Tabs>
  </Tab>
</Tabs>

打开**设备管理器**并确认出现 Qualcomm USB 设备，
以验证设备是否处于 EDL 模式。该设备**不应**出现在
**COM 端口**下。

<img src="https://mintcdn.com/qualcomm-staging/uWQLnBcS9sxlZhgB/Key-Documents/Flash-Guide/media/k2c-qli-build-ga/device-manager.jpg?fit=max&auto=format&n=uWQLnBcS9sxlZhgB&q=85&s=ccc97778332baaf5114ab55382425ff6" alt="检查设备管理器" width="1027" height="848" data-path="Key-Documents/Flash-Guide/media/k2c-qli-build-ga/device-manager.jpg" />

## 预配 UFS

通用闪存存储（UFS）配置（provisioning）有助于将存储
划分为多个 LUN，从而分别存储不同类型的数据。这
提高了访问效率和系统组织性。

在 Qualcomm 硬件上，UFS 默认已完成配置。只有在自定义 LUN 布局时才需要
重新配置。此时，Qualcomm 提供的 `provision.zip` 将与您的
自定义布局不匹配 —— 您必须提供自己的 provision 文件。以下命令展示了如何运行
重新配置流程。

<Note>
  UFS 配置步骤不适用于 CQ-2390 / IQ-2390。
</Note>

* 从 Qualcomm 的工件服务器下载 provision 文件：

  <CodeGroup>
    ```powershell IQ-9075-EVK theme={null}
    Invoke-WebRequest -Uri "https://artifacts.codelinaro.org/artifactory/codelinaro-le/Qualcomm_Linux/QCS9100/provision.zip" -OutFile provision.zip
    ```

    ```powershell IQ-8275-EVK theme={null}
    Invoke-WebRequest -Uri "https://artifacts.codelinaro.org/artifactory/codelinaro-le/Qualcomm_Linux/QCS8300/provision.zip" -OutFile provision.zip
    ```

    ```powershell QCS6490 theme={null}
    Invoke-WebRequest -Uri "https://artifacts.codelinaro.org/artifactory/codelinaro-le/Qualcomm_Linux/QCS6490/provision.zip" -OutFile provision.zip
    ```

    ```powershell IQ-X7181 theme={null}
    Invoke-WebRequest -Uri "https://artifacts.codelinaro.org/artifactory/codelinaro-le/Qualcomm_Linux/X1E80100/provision.zip" -OutFile provision.zip
    ```

    ```powershell IQ-X5121 theme={null}
    Invoke-WebRequest -Uri "https://artifacts.codelinaro.org/artifactory/codelinaro-le/Qualcomm_Linux/X1E80100/provision.zip" -OutFile provision.zip
    ```
  </CodeGroup>

* 解压下载的压缩包：
  ```powershell theme={null}
  Expand-Archive -Path provision.zip -DestinationPath provision
  ```

* 进入解压后的目录：
  ```powershell theme={null}
  cd provision
  ```

* 配置 UFS：

  <CodeGroup>
    ```powershell IQ-9075-EVK theme={null}
    qdl.exe --storage ufs prog_firehose_ddr.elf provision_1_2.xml
    ```

    ```powershell IQ-8275-EVK theme={null}
    qdl.exe --storage ufs prog_firehose_ddr.elf provision_1_3.xml
    ```

    ```powershell QCS6490 theme={null}
    qdl.exe --storage ufs prog_firehose_ddr.elf provision_1_3.xml
    ```

    ```powershell IQ-X7181 theme={null}
    qdl.exe --storage ufs xbl_s_devprg_ns.melf provision.xml
    ```

    ```powershell IQ-X5121 theme={null}
    qdl.exe --storage ufs xbl_s_devprg_ns.melf provision.xml
    ```
  </CodeGroup>

<Note>
  UFS 配置完成后，设备将从 USB 断开连接。请先将
  电源开关关闭再打开，使设备重新启动进入 EDL 模式，然后再继续。
</Note>

* 返回上一级目录：
  ```powershell theme={null}
  cd ..
  ```

## 烧录 SAIL

Safety Island (SAIL) 镜像包含隔离的、安全关键的固件，
该固件运行在专用的 safety island 上，以确保安全启动和可靠的系统
运行独立于主处理器。

<Note>
  Safety Island (SAIL) 仅适用于 Qualcomm Dragonwing™ IQ-9075
  和 Qualcomm Dragonwing™ IQ-8275 开发套件。如果您使用的不是
  这些开发套件之一，请跳过本节。
</Note>

* SAIL 工件位于解包后的 qcomflash 目录中的 `sail_nor` 目录下。
  进入以下目录：
  ```powershell theme={null}
  cd sail_nor
  ```

* 刷写 SAIL：
  ```powershell theme={null}
  qdl.exe --storage spinor prog_firehose_ddr.elf rawprogram0.xml patch0.xml
  ```

* 返回上一级目录：
  ```powershell theme={null}
  cd ..
  ```

## 烧录软件镜像

本节介绍如何使用 QDL 刷写镜像
并验证刷写过程是否成功。

* 通过选择相应的存储选项，使用 QDL 刷写软件镜像。

  <CodeGroup>
    ```powershell UFS theme={null}
    qdl.exe --storage ufs prog_firehose_ddr.elf rawprogram0.xml rawprogram1.xml rawprogram2.xml rawprogram3.xml rawprogram4.xml rawprogram5.xml patch0.xml patch1.xml patch2.xml patch3.xml patch4.xml patch5.xml
    ```

    ```powershell EMMC theme={null}
    qdl.exe --storage emmc prog_firehose_ddr.elf rawprogram0.xml rawprogram1.xml patch0.xml patch1.xml
    ```

    ```powershell UFS/SPINOR theme={null}
    cd spinor
    qdl.exe --storage spinor xbl_s_devprg_ns.melf rawprogram0.xml patch0.xml
    cd ..
    qdl.exe --storage ufs xbl_s_devprg_ns.melf rawprogram0.xml rawprogram1.xml patch0.xml patch1.xml
    ```
  </CodeGroup>

* 如果您在终端窗口中看到可引导分区消息，则表明刷写成功，例如：

  <CodeGroup>
    ```text UFS theme={null}
    partition 1 is now bootable
    ```

    ```text EMMC theme={null}
    partition 0 is now bootable
    ```

    ```text UFS/SPINOR theme={null}
    11 patches applied
    ```
  </CodeGroup>

* 如果刷写失败，请执行以下步骤，然后重试刷写流程：
  * 关闭设备电源
  * 断开与主机的连接
  * 重启主机

## 相关主题

* [如何使用 PCAT 烧录镜像？](./flash-with-pcat)
* [如何使用 UART 切换到 EDL 模式？](./how-to-trigger-edl-with-uart)
* [如何使用 ADB 切换到 EDL 模式？](./how-to-trigger-edl-with-adb)
* [如何为 Yocto BSP 构建配置存储类型？](/zh/Key-Documents/Yocto-Guide/how-to-configure-storage-type)
* [如何连接 WiFi？](./how-to-connect-to-wifi)
* [如何使用 SSH 登录？](./how-to-sign-in-with-ssh)
* [如何通过 RJ45 端口配置以太网？](./how-to-configure-ethernet-rj45-port)
* [如何更新 USB 和以太网控制器固件？](./how-to-update-usb-ethernet-controller-firmware)
* [如何配置设备驱动程序？](./how-to-configure-device-drivers)
