This file guides automation agents to run builds / checks the same way CI does:
- use kas-container (isolated from host),
- keep
DL_DIRandSSTATE_DIRoutside the repo so caches are shared, - run
yocto-patchreviewroutinely, and runyocto-check-layerbefore opening/updating a PR, via the CI helper scripts.
meta-qcom-distro is the OpenEmbedded / Yocto Project reference distribution layer
for Qualcomm based platforms. It provides the qcom-distro DISTRO configuration
and reference images, and depends on the meta-qcom BSP layer. The two layers
are maintained as separate repositories.
kas-containeravailable on PATH, or setKAS_CONTAINER=/abs/path/to/kas-container(from kas-container).- Container runtime access (Docker/Podman backend used by
kas-container). - Work directories outside the repository for build outputs and shared caches.
Run Docker first:
docker run --rm hello-worldThen check Podman:
if command -v podman >/dev/null 2>&1; then
podman run --rm hello-world
else
echo "podman not installed; continue with Docker backend"
fiNotes:
- Do not use
sudounless the host setup explicitly requires it. - Do not create or modify user groups as part of this workflow.
- If Podman is unavailable, Docker-only operation is acceptable.
If KAS_WORK_DIR, DL_DIR, and SSTATE_DIR are already set in the environment, use them
directly — do not override them. Only set defaults when they are absent:
export REPO_DIR="$(pwd)" # meta-qcom-distro checkout
export KAS_WORK_DIR="${KAS_WORK_DIR:-/path/to/kas-work}" # outside repo to avoid polling the checkout
export DL_DIR="${DL_DIR:-/path/to/shared-cache/downloads}"
export SSTATE_DIR="${SSTATE_DIR:-/path/to/shared-cache/sstate-cache}"
mkdir -p "${DL_DIR}" "${SSTATE_DIR}" "${KAS_WORK_DIR}"CI build composition always pairs a machine config with the distro config:
ci/<machine>.yml:ci/qcom-distro.yml[:ci/<feature>.yml]
ci/<machine>.ymlselects the target machine (e.g.ci/rb3gen2-core-kit.yml,ci/qcom-armv8a.yml,ci/glymur-crd.yml) and includesci/base.yml, which pulls in themeta-qcomBSP layer (branchmaster). A machine config is required for any build, and replacesci/base.ymlin the composition.ci/qcom-distro.ymlsetsdistro: qcom-distro, adds the distro's dependency layers (meta-openembedded, meta-ai, meta-virtualization, meta-audioreach, meta-selinux, meta-updater, meta-security, meta-dpdk), and defines the default image targets (qcom-multimedia-image,qcom-multimedia-proprietary-image,qcom-container-orchestration-image,qcom-networking-image).
Optional feature fragments (e.g. ci/performance.yml, ci/linux-qcom-6.18.yml)
can be appended to the composition string.
Example:
export KAS_YAMLS="ci/rb3gen2-core-kit.yml:ci/qcom-distro.yml"
"${KAS_CONTAINER:-kas-container}" build "${KAS_YAMLS}"ci/kas-container-shell-helper.sh enters a kas shell composed from
ci/base.yml:ci/qcom-distro.yml and runs the given script with /repo /work.
For routine local validation, run:
ci/kas-container-shell-helper.sh ci/yocto-patchreview.shRun yocto-check-layer only before opening/updating a pull request:
ci/kas-container-shell-helper.sh ci/yocto-check-layer.shOptionally, profile build timings with:
ci/kas-container-shell-helper.sh ci/yocto-buildstats.shFor one-off commands (a machine config is required, e.g. ci/qcom-armv8a.yml):
kas-container shell --skip repos_checkout ci/qcom-armv8a.yml:ci/qcom-distro.yml -c "bitbake <target>"Use the helper scripts for CI parity whenever possible.
Follow the repository README.md contribution flow:
- Target branch: main for current development, or wrynose for the active LTS branch (Qualcomm Linux 2.x, aligned with Yocto Project 6.0 LTS). CI builds PRs against both.
- Fork
qualcomm-linux/meta-qcom-distro, create a topic branch, implement changes. - Rebase on latest upstream
main(orwrynosewhen targeting LTS). - Open a GitHub pull request.
- Use PR discussion for review iteration.
Direct contributions are accepted on main and wrynose. For the older LTS branches scarthgap and kirkstone, raise an issue with the suggested change instead.
Important:
- Follow Yocto submission guidance referenced in README: Preparing Changes for Submission
Before opening/updating a PR, run CI-equivalent checks in this order:
ci/kas-container-shell-helper.sh ci/yocto-patchreview.sh
ci/kas-container-shell-helper.sh ci/yocto-check-layer.shUse the style seen in recent history:
component: imperative summary(preferred when scoped), e.g.libvirt: drop qemu PACKAGECONFIG on 32-bit arm hosts (#367)ci/qcom-distro.yml: Enable meta-ai layer (#342)qcom-minimal-image: enable zram swap by default
- Or concise imperative summary when cross-cutting.
Every commit must include a Signed-off-by trailer using the identity from
the local git configuration:
git commit -s # or pass --signoff; fetches user.name / user.email from git configIf committing programmatically, append the trailer explicitly:
Signed-off-by: $(git config user.name) <$(git config user.email)>
Never fabricate a name or email; always read from git config.
Guidelines:
- Keep subject line short and specific; capture intent, not a file-by-file dump.
- Use imperative mood (
Add,Update,Drop,Enable,Revert). - Add a body for non-trivial changes explaining why and key design decisions.
- Wrap body lines for readability (~72 chars).
- Use consistent recipe bump wording for version updates, e.g.
recipe-name: Update to vX.Y.Z. - Include PR reference in subject when appropriate:
(#NNN). - Avoid mixing unrelated changes in one commit; split logically.
- Each patch must be logically coherent, self-contained, and independently buildable.
- The tree must remain in a functional state after every commit.
- Fixups within the same patch series are not allowed; changes should be corrected in the patch where they are introduced.