Kernel metadata (kmeta) for NVIDIA L4T-supported machines on linux-yocto: the vendor patch
queues, their .scc feature descriptions, and the scripts that maintain them.
Three queues, applied in do_patch order via KERNEL_FEATURES:tegra:
| Queue | Source | Applied at build as |
|---|---|---|
platform |
NVIDIA linux/patches/<ver> |
First, on the yocto base |
sauce |
NVIDIA <ver> integration branch, reference-filtered |
On top of platform |
distro |
Hand-maintained OE/distro patches (tegra-distro.scc) |
Last, after the NVIDIA queues |
The platform and sauce queues live in features/tegra/<queue>/patches/ with a generated
<queue>.scc listing their patches; tegra-patches.scc aggregates them in order.
tegra-distro.scc is hand-maintained and not generated by the scripts.
Kernel config is a fragment (cfg/tegra.cfg), not patches; config-only commits are
dropped on export.
Patches are exported per queue as the delta since the previous queue's HEAD, so the git state during a refresh matches bitbake's apply order.
refresh.sh builds the queues in a detached worktree (.refresh-worktree),
pausing on conflicts for resolution, then rewrites the patches and regenerates
the SCCs.
The common case: linux-yocto's SRCREV advanced and you need the existing patches
to keep applying. refresh.sh re-applies the patches onto the new base
(git am --3way), pausing only if a moved base introduces a conflict, then
rewrites them.
./scripts/refresh.sh --linux-yocto /path/to/linux-yoctoOverride the base with YOCTO_BASE=<ref> (defaults to yocto_base_ref in
sources/branches.yaml). Name queues to refresh a subset; predecessors are
applied to build the cumulative base but only the named queues are rewritten.
When refresh.sh pauses, resolve in .refresh-worktree with the helper,
which verifies no markers remain before continuing:
scripts/resolve-conflict.sh status
scripts/resolve-conflict.sh union|ours|theirs <file>...
scripts/resolve-conflict.sh continue | skip | abortA clean 3-way merge that produces no net change (content already present) is
skipped automatically. --non-interactive fails on conflicts instead of
pausing (for CI).
version_suffix in sources/branches.yaml is the single source of truth; the
{version} placeholders (yocto_base_ref, each nvidia_branch) are substituted
at load. A minor bump (6.18 -> 6.19) is that one edit, then re-run. For a major
bump also confirm each nvidia_branch still resolves on the NVIDIA remote and
review cfg/tegra.cfg for renamed Kconfig symbols.
./scripts/verify-queues.sh # SCC lists match disk
./scripts/verify-queues.sh --apply --linux-yocto <path> # git am the whole chain--apply proves the patches apply, not that the kernel compiles. For a real
check, build (bitbake linux-yocto -c compile). To map a compile error back to
a queue: rg -l '<filename>' features/tegra/*/patches/*.patch, then re-refresh
that queue.
| Script | Purpose |
|---|---|
refresh.sh |
Re-apply existing patches onto an updated linux-yocto |
refresh-from-nvidia.sh |
Re-derive queues from NVIDIA branches (requires NVIDIA access) |
resolve-conflict.sh |
Safe conflict resolution during a refresh |
verify-queues.sh |
SCC vs disk check; --apply runs git am on all patches |
generate-scc.sh |
Per-queue .scc, or --aggregator for tegra-patches.scc |
lib/refresh-common.sh |
Shared worktree, apply, conflict, and write-patch machinery |
sources/branches.yaml- queue manifest and reference filterfeatures/tegra/<queue>/patches/+<queue>.scc- generated per queuefeatures/tegra/tegra-patches.scc- aggregator (KERNEL_FEATURES)features/tegra/tegra-distro.scc- hand-maintained distro patchescfg/tegra.cfg- shared Kconfig fragment (pulled in by the patch queues)cfg/<machine>.cfg- per-machine config overlay (applied by the BSP)
Do not hand-edit patch files or generated .scc files. Edit tegra-distro.scc
and its patches directly; the scripts do not touch it.