> ## Documentation Index
> Fetch the complete documentation index at: https://dragonwingdocs.qualcomm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# meta-qcom-distro

该层为 Qualcomm Linux 提供参考发行版配置。该层定义了镜像配方和软件包组。

## **发行版配置**

下表介绍了发行版配置，这些配置可在 [GitHub](https://github.com/qualcomm-linux/meta-qcom-distro/tree/master/conf/distro) 上获取。

|            **发行版配置**           |                             **说明**                             |
| :----------------------------: | :------------------------------------------------------------: |
| `conf/distro/qcom-distro.conf` | 此发行版配置文件定义了 `qcom-distro` 发行版。您可以在以下示例命令中使用 `qcom-distro` 发行版： |

> ```text theme={null}
> kas shell meta-qcom/ci/rb3gen2-core-kit.yml:meta-qcom/ci/qcom-distro.yml
> bitbake qcom-multimedia-image
> ```

`meta-qcom-distro/conf/distro/include/qcom-base.inc` 配置定义了通用的 DISTRO\_FEATURES。`meta-qcom-distro/conf/distro/qcom-distro.conf` 配置添加了以下特性：

> * `glvnd`
> * `opencl`
> * `opengl`
> * `vulkan`
> * `wayland`

Yocto Project 文档在[发行版特性](https://docs.yoctoproject.org/singleindex.html#distro-features)中定义了这些发行版特性。

| `conf/distro/qcom-distro-catchall.conf` | 此发行版配置文件定义了带 Wayland、启用 SELinux 和 OStree 的 Qualcomm 参考发行版。它将 `selinux` 和 `sota` 添加到 `DISTRO_FEATURES`。                                      |
| :-------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------ |
| `conf/distro/qcom-distro-selinux.conf`  | 此发行版配置文件定义了带 Wayland、启用 SELinux 的 Qualcomm 参考发行版。它将 `selinux` 添加到 `DISTRO_FEATURES`。                                                        |
| `conf/distro/qcom-distro-sota.conf`     | 此发行版配置文件定义了带 Wayland 且同时启用 OTA 的 Qualcomm 参考发行版。它将 `sota` 添加到 `DISTRO_FEATURES`，这是通过继承 `meta-updater` 中的 `conf/distro/sota.conf.inc` 文件实现的。 |

```text theme={null}
DISTRO_FEATURES:append = " \
    efi \
    glvnd \
    kvm \
    minidebuginfo \
    opencl \
    overlayfs \
    pam \
    pni-names \
    security \
    tpm2 \
    virtualization \
    wifi \
    x11 \
"
```

要了解这些 DISTRO\_FEATURES 的用途，请参阅[发行版特性](https://docs.yoctoproject.org/singleindex.html#distro-features)。

`conf/distro/include/qcom-base.inc` 文件设置 `INIT_MANAGER = "systemd"` 并定义了上面所示的基础 `DISTRO_FEATURES`。`kvm` 在 `DISTRO_FEATURES` 中默认启用 — 基于 KVM 的虚拟化在所有受支持的平台上均可用，无需单独的发行版配置。专用的 `qcom-distro-kvm.conf` 已被移除；KVM 的启用现在通过 `MACHINE_FEATURES` 按机器控制。

## **何时创建自定义 DISTRO**

要添加自定义发行版配置并重新构建工作区，请参阅[添加自定义发行版配置](./add-custom-distribution-configurations)。

## **软件包组**

软件包组在 `meta-qcom` 和 `meta-qcom-distro` 中定义。下表介绍了这些软件包组：

|                **软件包组**               |           **说明**          |
| :-----------------------------------: | :-----------------------: |
|    `packagegroup-qcom-benchmark.bb`   |      引入基准测试软件包的软件包组。      |
|    `packagegroup-qcom-security.bb`    |      引入安全所需软件包的软件包组。      |
|    `packagegroup-qcom-test-pkgs.bb`   |     引入测试镜像所需软件包的软件包组。     |
|    `packagegroup-qcom-utilities.bb`   | 适用于 Qualcomm 平台的用户空间实用程序。 |
| `packagegroup-qcom-virtualization.bb` |      引入虚拟化所需软件包的软件包组。     |

## **镜像配方**

`meta-qcom-distro` Qualcomm Linux 元数据层定义了镜像配方，这些配方可在 [GitHub](https://github.com/qualcomm-linux/meta-qcom-distro/tree/master/recipes-products/images) 上获取。下表列出了各种镜像、它们的 `IMAGE_FEATURES` 以及这些镜像的功能：

|         **镜像配方**        |                       **镜像说明**                       |
| :---------------------: | :--------------------------------------------------: |
| `qcom-minimal-image.bb` | 定义一个可启动到 shell 的小型 `rootfs`。启用的 `IMAGE_FEATURES` 如下： |

```text theme={null}
IMAGE_FEATURES += "splash tools-debug allow-root-login post-install-logging"
```

有关 `IMAGE_FEATURES` 的更多信息，请参阅[镜像特性](https://docs.yoctoproject.org/6.0/singleindex.html#image-features)。

| `qcom-console-image.bb` | 扩展 `qcom-minimal-image`，添加了更多软件包并启用了更多 `IMAGE_FEATURES`： |
| :---------------------- | :------------------------------------------------------- |

```text theme={null}
IMAGE_FEATURES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', '', 'package-management', d)} \
         ssh-server-openssh"
```

| `qcom-multimedia-image.bb`              | 需要 `DISTRO_FEATURE` wayland，并在 `rootfs` 中包含所有多媒体软件包。 |
| :-------------------------------------- | :--------------------------------------------------- |
| `qcom-multimedia-proprietary-image.bb`  | 在多媒体镜像基础上构建的镜像，用于专有功能。此镜像仅与 aarch64（ARMv8）兼容。        |
| `qcom-container-orchestration-image.bb` | 在多媒体专有镜像基础上构建的镜像，包含 Kubernetes 和容器运行时软件包。            |

## **创建自定义镜像配方**

要添加自定义镜像配方并使用 BitBake 构建，请参阅[添加镜像配方](./add-image-recipes)。

## **QDL 烧录工具**

QDL 是一种烧录工具，它与 USB 设备通信，将闪存加载器上传到设备。闪存加载器将镜像烧录到设备内置的通用闪存存储（UFS）或嵌入式多媒体卡（eMMC）。有关 `QDL flashing` 的更多信息，请参阅 [QDL](https://dragonwingdocs.qualcomm.com/Key-Documents/Flash-Guide/flash-with-qdl)。
