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

This layer provides a reference distribution configuration for Qualcomm Linux. This layer defines the image recipes and package groups.

## **Distribution configuration**

The following table provides an introduction to the distribution configurations, which are available on [GitHub](https://github.com/qualcomm-linux/meta-qcom-distro/tree/master/conf/distro).

| **Distribution configuration** |                                                                      **Description**                                                                      |
| :----------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------: |
| `conf/distro/qcom-distro.conf` | This distribution configuration file defines the `qcom-distro` distribution. You can use the `qcom-distro` distribution in the following example command: |

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

The `meta-qcom-distro/conf/distro/include/qcom-base.inc` configuration defines common DISTRO\_FEATURES. The `meta-qcom-distro/conf/distro/qcom-distro.conf` configuration adds the following features:

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

The Yocto Project documentation defines these distribution features at [Distribution features](https://docs.yoctoproject.org/singleindex.html#distro-features).

| `conf/distro/qcom-distro-catchall.conf` | This distribution configuration file defines Qualcomm reference distribution with Wayland with SELinux-enabled and OStree. It adds `selinux` and `sota` to `DISTRO_FEATURES`.                                                                       |
| :-------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `conf/distro/qcom-distro-selinux.conf`  | This distribution configuration file defines Qualcomm reference distribution with Wayland with SELinux-enabled. It adds `selinux` to `DISTRO_FEATURES`.                                                                                             |
| `conf/distro/qcom-distro-sota.conf`     | This distribution configuration file defines Qualcomm reference distribution with Wayland where OTA is also enabled. It adds `sota` to `DISTRO_FEATURES`, which is done by inheriting `conf/distro/sota.conf.inc` file available in `meta-updater`. |

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

To understand the purpose of these DISTRO\_FEATURES, see [Distribution features](https://docs.yoctoproject.org/singleindex.html#distro-features).

The `conf/distro/include/qcom-base.inc` file sets `INIT_MANAGER = "systemd"` and defines the base `DISTRO_FEATURES` shown above. `kvm` is enabled by default in `DISTRO_FEATURES` — KVM-based virtualization is available on all supported platforms without requiring a separate distro configuration. The dedicated `qcom-distro-kvm.conf` has been removed; KVM enablement is now controlled per-machine via `MACHINE_FEATURES`.

## **When to create a custom DISTRO**

To add a custom distribution configuration and rebuild the workspace, see [Add custom distribution configurations](./add-custom-distribution-configurations).

## **Package groups**

Package groups are defined in `meta-qcom` and `meta-qcom-distro`. The following table provides an introduction to the package groups:

|           **Package group**           |                         **Description**                         |
| :-----------------------------------: | :-------------------------------------------------------------: |
|    `packagegroup-qcom-benchmark.bb`   |         Package group to bring in benchmarking packages.        |
|    `packagegroup-qcom-security.bb`    |    Package group to bring in packages required for security.    |
|    `packagegroup-qcom-test-pkgs.bb`   |   Package group to bring in packages required to test images.   |
|    `packagegroup-qcom-utilities.bb`   |           Userspace utilities for Qualcomm platforms.           |
| `packagegroup-qcom-virtualization.bb` | Package group to bring in packages required for virtualization. |

## **Image recipes**

The `meta-qcom-distro` Qualcomm Linux metadata layer defines image recipes, which are available on [GitHub](https://github.com/qualcomm-linux/meta-qcom-distro/tree/master/recipes-products/images). The following table lists various images, their `IMAGE_FEATURES`, and the functions that the images serve:

|     **Image recipe**    |                                 **Description of the image**                                |
| :---------------------: | :-----------------------------------------------------------------------------------------: |
| `qcom-minimal-image.bb` | Defines a small `rootfs` to boot to the shell. The `IMAGE_FEATURES` enabled are as follows: |

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

For more information about `IMAGE_FEATURES`, see [Image features](https://docs.yoctoproject.org/master/singleindex.html#image-features).

| `qcom-console-image.bb` | Extends `qcom-minimal-image` by adding more packages and enabling more `IMAGE_FEATURES`: |
| :---------------------- | :--------------------------------------------------------------------------------------- |

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

| `qcom-multimedia-image.bb`              | Requires `DISTRO_FEATURE` wayland and it includes all the multimedia packages in `rootfs`.                              |
| :-------------------------------------- | :---------------------------------------------------------------------------------------------------------------------- |
| `qcom-multimedia-proprietary-image.bb`  | An image built on top of multimedia image for proprietary features. This image is compatible only with aarch64 (ARMv8). |
| `qcom-container-orchestration-image.bb` | An image built on top of the multimedia proprietary image with Kubernetes and container runtime packages.               |

## **Creating a custom image recipe**

To add a custom image recipe and build using BitBake, see [Add image recipes](./add-image-recipes).

## **QDL flashing tool**

QDL is a flashing tool that communicates with the USB devices to upload flash loader to the device. The flash loader flashes the images to universal flash storage (UFS) or embedded multimedia card (eMMC) built into the device. For more information about `QDL flashing`, see [QDL](https://dragonwingdocs.qualcomm.com/Key-Documents/Flash-Guide/flash-with-qdl).
