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

# 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-prod/T1k4QQ7G3l_dE-rX/Key-Documents/Yocto-Guide/media/k2c-qli-yocto-build-ga/qualcomm_linux_metadata_layers.png?fit=max&auto=format&n=T1k4QQ7G3l_dE-rX&q=85&s=68be9a6ba7a0b2177dbc1abc0edb398f" 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 开发套件构建软件组件的配方，并提供适用于 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)
