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-patchreviewandoe-selftestroutinely, and runyocto-check-layerbefore opening/updating a PR, via the CI helper scripts.
meta-qcom is an OpenEmbedded / Yocto Project hardware enablement layer for Qualcomm based platforms.
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 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 pattern:
:ci/<machine>.yml[:distro.yml][:kernel.yml]
Example:
export KAS_YAMLS="ci/rb3gen2-core-kit.yml:ci/qcom-distro.yml"
"${KAS_CONTAINER:-kas-container}" build "${KAS_YAMLS}"For routine local validation, run:
ci/kas-container-shell-helper.sh ci/yocto-patchreview.sh
ci/kas-container-shell-helper.sh ci/oe-selftest.shRun yocto-check-layer only before opening/updating a pull request:
ci/kas-container-shell-helper.sh ci/yocto-check-layer.sh- Script:
ci/oe-selftest.sh - Auto-discovers tests in
lib/oeqa/selftest/cases/when no test list is given. - Honors
DL_DIRandSSTATE_DIRfrom environment (recommended for shared cache).
Run a subset:
"${KAS_CONTAINER:-kas-container}" shell ci/base.yml \
--command "/repo/ci/oe-selftest.sh /repo /work qcom_fitimage.QcomFitImageMatrixTests"If passing explicit tests directly (without helper), call:
ci/oe-selftest.sh "$REPO_DIR" "$KAS_WORK_DIR" qcom_fitimage.QcomFitImageMatrixTestsFor one-off commands:
kas-container shell --skip repos_checkout ci/rb3gen2-core-kit.yml -c "bitbake <target>"
kas-container shell --skip repos_checkout ci/rb3gen2-core-kit.yml -c "oe-selftest --run-tests qcom_fitimage"Use the helper scripts for CI parity whenever possible.
Follow the contribution workflow documented in CONTRIBUTING.md:
- Target branch: master.
- Fork
qualcomm-linux/meta-qcom, create a topic branch, implement changes. - Rebase on latest upstream
master. - Open a GitHub pull request.
- Use PR discussion for review iteration.
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.sh
ci/kas-container-shell-helper.sh ci/oe-selftest.shFollow the commit subject and message requirements documented in
CONTRIBUTING.md: an atomic change per commit, a
recipe-name: summary of the changes subject, a plain-English body that
explains the problem before the imperative actions, and the mandatory
Signed-off-by (and, when applicable, Assisted-by) trailers.
When committing programmatically, take the Signed-off-by identity from the
local git configuration and append the trailer explicitly:
Signed-off-by: $(git config user.name) <$(git config user.email)>
Never fabricate a name or email; always read them from git config.
Fixups within the same patch series are not allowed; changes should be corrected in the patch where they are introduced.