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

# Qualcomm Linux 元数据层

本节介绍 [Qualcomm manifest](https://github.com/qualcomm-linux/meta-qcom-releases) 中包含的各个层。该 manifest 包含重现参考构建所需的所有层。

## **层堆栈概览**

下图展示了 Qualcomm Linux 版本中包含的各个层：

<div className="flex flex-col items-center gap-2">
  <img src="https://mintcdn.com/qualcomm-staging/uWQLnBcS9sxlZhgB/Key-Documents/Yocto-Guide/media/k2c-qli-yocto-build-ga/qualcomm_linux_metadata_layers.png?fit=max&auto=format&n=uWQLnBcS9sxlZhgB&q=85&s=51855b72f95e03df7c6f28d97a06b03f" alt="图：Qualcomm Linux 元数据层" width="1004" height="351" data-path="Key-Documents/Yocto-Guide/media/k2c-qli-yocto-build-ga/qualcomm_linux_metadata_layers.png" />

  <p className="text-sm text-gray-700">
    图：Qualcomm Linux 元数据层
  </p>
</div>

## **由 Qualcomm 维护的层**

以下层由 Qualcomm 维护，专用于 Qualcomm Linux 开发套件：

|      **元数据层**      |                                   **说明**                                  |
| :----------------: | :-----------------------------------------------------------------------: |
|     `meta-qcom`    | 包含为 Qualcomm 开发套件构建软件组件的配方（recipe），并提供适用于 Qualcomm SoC 的软件功能。这是主要的 BSP 层。 |
| `meta-qcom-distro` |                 为 Qualcomm 开发套件提供参考发行版配置。镜像配方和软件包组在此层中定义。                 |
| `meta-qcom-extras` |             可选的元数据层，用于启用部分组件的源码编译，这些组件在 `meta-qcom` 中以二进制形式提供。            |

## **使用的社区层**

Qualcomm Linux 使用以下由社区维护的层。有关上游参考资料，请参阅 [https://git.yoctoproject.org/yocto-docs](https://git.yoctoproject.org/yocto-docs)（wrynose 分支）。

|        **元数据层**       |                                                                                                               **说明**                                                                                                              |
| :-------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
|  `openembedded-core`  |                                                            为嵌入式操作系统发行版所需的各种软件组件提供构建工具和配方文件。更多信息请参阅 [openembedded-core](https://git.openembedded.org/openembedded-core)。                                                           |
|  `meta-openembedded`  |                                                               面向 OpenEmbedded 构建系统的层集合。更多信息请参阅 [meta-openembedded](https://git.openembedded.org/meta-openembedded)。                                                               |
| `meta-virtualization` |                                           包含用于构建 OpenEmbedded 虚拟化解决方案和虚拟化技术栈（如 Docker 和 Kubernetes）的软件包。更多信息请参阅 [meta-virtualization](https://git.yoctoproject.org/meta-virtualization)。                                          |
|     `meta-selinux`    | 启用 SELinux 支持。该层包含参考 SELinux 策略并提供必要的工具。要为 Qualcomm Linux 启用 SELinux，请在 `conf/distro/include/qcom-distro-selinux.inc` 中将变量 `DEFAULT_ENFORCING` 设置为 `enforcing`。更多信息请参阅 [meta-selinux](https://git.yoctoproject.org/meta-selinux)。 |
|    `meta-security`    |                                              为 Qualcomm Linux 内核提供安全工具和加固工具，以及用于实现安全机制的库。更多信息请参阅 [meta-security](https://git.yoctoproject.org/meta-security/tree/README.md?h=master)。                                             |
|     `meta-updater`    |                                            通过 OSTree 启用空中升级（OTA）。OSTree 是一款支持回滚能力的原子级全文件系统升级工具。更多信息请参阅 [meta-updater](https://github.com/uptane/meta-updater/blob/master/README.adoc)。                                            |

## **何时使用哪个层**

| **目标**                                 | **要修改的层**                                                |
| -------------------------------------- | -------------------------------------------------------- |
| 添加或更改机器配置                              | `meta-qcom`                                              |
| 更改发行版功能或添加镜像配方                         | `meta-qcom-distro`                                       |
| 源码编译专有组件（适用于拥有 Qualcomm ID 且通过公司验证的用户） | `meta-qcom-extras`                                       |
| 添加虚拟化或容器支持                             | `meta-virtualization`                                    |
| 启用 SELinux                             | `meta-selinux`                                           |
| 启用 OTA 更新                              | `meta-updater`                                           |
| 添加第三方层                                 | 参阅[向工作区添加第三方层](./adding-third-party-layers-to-workspace) |

## **后续步骤**

* [meta-qcom](./meta-qcom) — 机器配置、固件配方、内核配方和 BitBake 类
* [meta-qcom-distro](./meta-qcom-distro) — 发行版配置、镜像配方和软件包组
* [meta-qcom-extras](./meta-qcom-extras) — 面向拥有 Qualcomm ID 且通过公司验证的用户的可选层
* [使用 Yocto 构建 Qualcomm Linux](./build-qualcomm-linux)
