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

# 构建 — 基于 KVM 的 RT

## **在 QLI 2.0 上构建基于 KVM 的 RT**

### 前提条件 — 同步 QLI 2.0

```bash theme={null}
mkdir QLI2.0_rc3+20260513
cd QLI2.0_rc3+20260513/

git clone https://github.com/qualcomm-linux/meta-qcom-releases -b qli-2.0-rc3+20260513
kas checkout meta-qcom-releases/lock.yml
```

完整的源码构建说明请参阅 [QLI 官方构建指南](https://docs.qualcomm.com/doc/80-80022-254/topic/build_from_source_github_intro.html?product=895724676033554725\&facet=Build%20Guide\&version=2.0-rc3)。

***

### 通过 KAS 选择 RT 内核和 KVM

KVM 支持通过 `qcom-distro-kvm.yml` KAS overlay 添加。请将其与目标平台的 RT 内核 overlay 组合使用：

```bash theme={null}
kas build meta-qcom/ci/iq-9075-evk.yml \
          :meta-qcom/ci/qcom-distro-kvm.yml \
          :meta-qcom/ci/linux-qcom-rt-6.18.yml \
          :meta-qcom/ci/lock.yml \
          :meta-qcom/ci/downloads.yml
```

| KAS Overlay | 用途 |
| - | - |
| `iq-9075-evk.yml` | 板卡 / 机器配置 |
| `qcom-distro-kvm.yml` | 启用 KVM hypervisor 和 QEMU |
| `linux-qcom-rt-6.18.yml` | 选择 PREEMPT\_RT 6.18 内核 |
| `lock.yml` | 固定各 layer 的版本以确保可复现 |

> [!NOTE]
>
> 选择 `qcom-distro-kvm.yml` 后，`xbl_config_kvm.elf` EFI 二进制文件会自动包含在 `qcomflash` 包中，无需手动重新配置 UEFI BDS。

***

### 在运行时验证 RT 内核

烧录完成后，确认 RT 内核已生效（预期输出包含 `PREEMPT_RT`）：

```bash theme={null}
root@iq-9075-evk:~# uname -a
Linux iq-9075-evk 6.18.30-01897-gd58ad5c480fa-dirty #1 SMP PREEMPT_RT Wed Jun 10 17:31:48 UTC 2026 aarch64 GNU/Linux

root@iq-9075-evk:~# uname -v
#1 SMP PREEMPT_RT Wed Jun 10 17:31:48 UTC 2026
```

### 在运行时验证 KVM

```bash theme={null}
ls -la /dev/kvm
```

***

### 可用的客户机 VM 镜像配方

QLI 2.0 未提供专用的 VM 镜像配方。以下任一发行版镜像配方均可用作客户机 VM 镜像：

| 配方 | 说明 |
| - | - |
| `qcom-console-image.bb` | 最小化控制台镜像 |
| `qcom-multimedia-image.bb` | 支持多媒体的镜像 |
| `qcom-container-orchestration-image.bb` | 容器运行时镜像 |

配方位于 `<QLI2.0_Workspace_Path>/meta-qcom-distro/recipes-products/images` 目录下。

***

> [card] [RT 配置](https://dragonwingdocs-staging.qualcomm.com/zh/Suites/Industrial-Edge-Suite/rt-with-kvm-rt-config.md)
>
> 内核启动参数与 Yocto RT 调优变量

> [card] [NIC 与 SR-IOV](https://dragonwingdocs-staging.qualcomm.com/zh/Suites/Industrial-Edge-Suite/rt-with-kvm-nic-sriov.md)
>
> QLI 2.0 上的 Intel X550 NIC 与 SR-IOV 支持

> [card] [VM 管理](https://dragonwingdocs-staging.qualcomm.com/zh/Suites/Industrial-Edge-Suite/rt-with-kvm-vm-management.md)
>
> Virsh、libvirt 及 domain XML 示例文件

> [card] [基于 KVM 的 RT](https://dragonwingdocs-staging.qualcomm.com/zh/Suites/Industrial-Edge-Suite/rt-with-kvm.md)
>
> 返回概览
