How qualcomm-linux/meta-qcom works
Project Type and Purpose
• This is a Yocto/OpenEmbedded hardware-enablement meta-layer (“meta-qcom”) that provides machine configurations, BSP recipes, kernel recipes, firmware packages, and tooling for Qualcomm-based platforms.
• It is not a runtime application but a collection of build metadata (recipes, classes, configs) plugged into a BitBake build system to produce embedded Linux images.
High‐Level File Structure Analysis
• Top level:
• .github/ – CI workflows for GitHub Actions (build-on-push, nightly, tests).
• ci/ – KAS CI config files and LAVA test definitions.
• classes-recipe/ & classes/ – Custom BitBake classes for image types and boot artifacts.
• conf/ – layer.conf (registers this layer with BitBake) and machine/ (per-board .conf and .inc files).
• dynamic-layers/ – on-the-fly meta-layer fragments applied against OE-core or meta-oe.
• recipes-*/* – organized by domain:
– recipes-bsp: firmware, u-boot, packagegroups, partition tables, initramfs images.
– recipes-kernel: linux-yocto kernel recipes, patches, device-tree overlays, generic drivers.
– recipes-graphics: Mesa/Wayland tweaks for Qualcomm GPUs.
– recipes-devtools: QDL, partition-utils, debug tools.
– recipes-support: run-time support utilities (rpc, initrd scripts, bootctl, etc.).
– recipes-test: test images, diagnostics utilities.
• scripts/ – helper scripts and canned WIC (disk-image) layouts.
• Additional indicators: COPYING.MIT, README.md, SECURITY.md for governance and licensing.
README Insights
• Describes layer dependencies (OE-core, optional meta-oe).
• Points to ‘ci/*.yml’ for example KAS builds.
• Outlines flash workflow (using QDL tool).
• Machine support via conf/machine/*.conf.
Components
a. Developer/CI Environment
• Host machine (Linux) with BitBake and optionally KAS tool installed.
• Source repositories: meta-qcom (this layer), openembedded-core, (optional) meta-openembedded, KAS config files.
• GitHub Actions (push, PR, nightly workflows) and LAVA test farm integration.
b. Build Orchestration
• KAS (or manual setup) reads a .yml (e.g. ci/qcs6490-rb3gen2-core-kit.yml) and generates build environment.
• BitBake engine loads:
• layer.conf from each layer
• .bb and .bbappend recipe metadata
• classes (.bbclass), dynamic-layers fragments
• machine and distro configuration
• BitBake resolves dependencies and executes tasks (fetch → unpack → patch → configure → compile → package).
c. Metadata Layers
• meta-qcom: holds domain-specific recipes (BSP, kernel, graphics, devtools, support, test).
• OE-core: base classes, core recipes.
• meta-oe: optional extra recipes (connectivity, devtools, navigation).
• dynamic-layers: applied patches/overlays on OE-core or meta-oe.
d. Build Output
• Deployed images: core-image, initramfs, firmware archives, SDK, SDK-image.
• Artifacts staged under deploy/images/<machine>.
e. Flash/Test Workflow
• QDL tool (from recipes-devtools) used to flash image to hardware.
• LAVA test definitions (ci/lava/<board>/boot.yaml) define how tests run on hardware farm.
Key Architectural Patterns & Design Principles
• Layered architecture: each meta-layer encapsulates domain (core, board-support, devtools).
• Extend‐over‐override: .bbappend and dynamic-layers override core behavior.
• Declarative configuration: machine .conf and .inc files define board features.
• Reusability: classes (.bbclass) shared across recipes.
Technologies & Frameworks
• BitBake build engine
• Yocto Project / OpenEmbedded metadata model
• KAS for environment orchestration
• GitHub Actions + LAVA for CI/CD and hardware validation
• Shell/Python scripts for image layout (wic), CI helpers