# 刷写和安装

Source: [https://docs.qualcomm.com/doc/80-65220-2Y/topic/flash-and-install_4_3.html](https://docs.qualcomm.com/doc/80-65220-2Y/topic/flash-and-install_4_3.html)

描述在主机上部署 QIRP SDK 并在设备上安装的过程。

## About this task

**前提条件：**

- 在“Permissive”模式下按照 [如何使用 SSH](https://docs.qualcomm.com/bundle/publicresource/topics/80-70014-254/how_to.html#how-to-ssh-) 中介绍的步骤启用 `SSH`。

**刷写机器人镜像**

**步骤：**

1. 将设备连接到主机。参见 [Qualcomm® RB3 Gen2 开发套件快速入门指南](https://docs.qualcomm.com/bundle/publicresource/topics/80-70014-253)中的[部署设备](https://docs.qualcomm.com/bundle/publicresource/topics/80-70014-253/set_up_the_device.html)
2. 将机器人镜像刷写到设备。
    - 对于预编译的机器人镜像，按照[未注册用户刷写镜像](https://docs.qualcomm.com/bundle/publicresource/topics/80-70014-254/flash_images_unregistered.html)中的步骤操作。
    - 对于[使用 Github 编译（基础层）](https://docs.qualcomm.com/doc/80-65220-2Y/topic/build-with-github-binaries.html)中生成的机器人镜像，按照[未注册用户刷写镜像](https://docs.qualcomm.com/bundle/publicresource/topics/80-70014-254/flash_images_unregistered.html)中的步骤操作。
    - 对于[使用 Github 编译（固件和附加功能）](https://docs.qualcomm.com/doc/80-65220-2Y/topic/using-detailed-instructions_3_2.html)生成的机器人镜像，按照 [已注册用户刷写镜像](https://docs.qualcomm.com/bundle/publicresource/topics/80-70014-254/flash_images.html) 中的步骤操作。

**在设备上安装 QIRP SDK**

**步骤：**

## Procedure

1. 在主机上，转到 artifacts 目录并使用 `tar` 命令解压缩。
        
cd <workspace>/build-qcom-robotics-ros2-humble\
        /tmp-glibc/deploy/qirpsdk_artifacts
        tar -zxf qirp-sdk_<qirp_version>.tar.gzCopy to clipboard

`qirp-sdk` 目录已生成。

Note: `Qirp-sdk_<qirp_version>.tar.gz` 位于 QIRP 组件部署的路径中。`<qirp_version>` 随每个发行版本进行更改，例如，`2.0.0`、`2.0.1`。例如，整个包的名称可以是 `qirp-sdk_2.0.0.tar.gz`。对于所有已发布的版本，参见 [Qualcomm® Linux Intelligent Robotics Product SDK (QIRP SDK) 2.0 发行说明](https://docs.qualcomm.com/bundle/publicresource/topics/80-75695-1)。
2. 要部署 QIRP 组件，使用以下命令将 QIRP 文件推送到设备：
        
cd <workspace>/build-qcom-robotics-ros2-humble\
        /tmp-glibc/deploy/qirpsdk_artifacts/qirp-sdk
        scp ./runtime/qirp-sdk.tar.gz root@[ip-addr]:/opt/
        ssh root@[ip-addr]
        (ssh) cd /opt && tar -zxf ./qirp-sdk.tar.gz
        (ssh) chmod +x /opt/qirp-sdk/*.sh
        (ssh) cd /opt/qirp-sdk && ./install.shCopy to clipboard

**Parent Topic:** [编译和安装](https://docs.qualcomm.com/doc/80-65220-2Y/topic/advanced-usage.html)

Last Published: Aug 09, 2024

[Previous Topic
QIRP SDK 文件夹结构](https://docs.qualcomm.com/bundle/publicresource/80-65220-2Y/topics/qirp-sdk-layout_4.md) [Next Topic
开发机器人应用程序](https://docs.qualcomm.com/bundle/publicresource/80-65220-2Y/topics/develop-your-first-application_6.md)