How nvidia/nv-kernels works
1. This repository is not kernel source itself; it is the CI/orchestration layer for the NV-Kernels project. Its purpose is to automate branch rebases, patch validation, and kernel build/test verification using GitHub Actions.
2. The repo’s core boundary is branch separation:
- linux: pristine upstream Linux mirror
- linux-nvidia-*: NVIDIA kernel branches with patches on top of stable releases
- github-actions: a dedicated control branch that stores only workflow logic and helper scripts
This separation exists because linux is periodically reset to upstream and must not carry repo-owned automation files.
3. update-and-rebase.yml is the synchronization subsystem. It runs on a schedule and manually, rebasing the NVIDIA kernel branches onto the latest stable tags from Greg KH’s linux.git. Its output is new rebased branch tips named by kernel version, which then become inputs to downstream build validation.
4. kernel-build.yml is the validation subsystem. It builds kernels across a matrix of targets:
- x86_64 defconfig
- ARM64 with 4K pages
- ARM64 with 64K pages
It also performs QEMU boot tests and kselftests for selected kernel areas, so this workflow acts as the main quality gate after rebases or manual build requests.
5. patchscan.yml is the patch correctness subsystem. On pull requests targeting 24.04_linux-nvidia-6.17-next, it checks whether cherry-picked commits are missing upstream Fixes: patches. The workflow fails if it finds gaps and comments the results back on the PR, using origin/linux as the upstream reference point.
6. The .github/scripts/ directory contains reusable automation used by the workflows. Based on the README and filenames, it holds the patch scanning logic and PR validation helpers, plus Python dependencies (requirements.txt) needed to run those checks in GitHub Actions without relying on target branches.
7. The workflow inputs and outputs form a simple pipeline:
- upstream stable/Linux sources feed the rebase workflow
- rebased NVIDIA branches feed the build/test workflow
- pull requests feed the patch scan workflow
- workflow results are surfaced through GitHub Actions statuses and PR comments
This makes GitHub Actions the central control plane for branch maintenance.
8. The config_4k and config_64k workflow files are likely build configuration assets for the ARM64 matrix entries. They represent a repository-owned boundary around platform-specific kernel configuration needed by the build job.
9. Operationally, the repository relies on GitHub Actions features more than application code: scheduled cron execution, manual dispatch, PR triggers, and branch-scoped workflow behavior. The default branch being github-actions is an architectural choice required because scheduled workflows only run from the default branch.
10. The main external dependencies are:
- GitHub Actions as the execution environment
- upstream Linux kernel sources/tags (linux.git / origin/linux)
- kernel build/test tooling, including QEMU and kselftests
The repo’s architecture is therefore best drawn as a small automation hub coordinating external kernel branches and CI validation rather than a traditional software service.
Main entry points: patchscan.yml patchscan · kernel-build.yml kernel-build · update-and-rebase.yml update-and-rebase · config_4k config_4k
Components 16
Control plane
Branch and workflow orchestration
- github-actions · Default branch that hosts repo-owned workflows and scripts
- linux · Pristine upstream Linux mirror branch reset from upstream
- linux-nvidia-* · NVIDIA patch series branches rebased on stable Linux tags
Rebase flow
Keeping NVIDIA branches aligned with upstream stable Linux
- update-and-rebase · Scheduled/manual rebase workflow for NVIDIA branches
.github/workflows/update-and-rebase.yml
Build validation
Kernel build and boot verification
- kernel-build · Matrix build, boot, and selftest validation workflow
.github/workflows/kernel-build.yml - config_4k · ARM64 4K page build configuration asset
.github/workflows/config_4k - config_64k · ARM64 64K page build configuration asset
.github/workflows/config_64k
Patch scan
PR-time correctness checks for missing fixes
- patchscan · PR workflow that checks for missing upstream fixes
.github/workflows/patchscan.yml
Shared automation
Reusable scripts and workflow assets
- patchscan logic · Reusable patch scanning implementation
.github/scripts/patchscan - PR helpers · Reusable pull-request validation helpers
.github/scripts/validate-pr - Python deps · Python requirements for GitHub Actions scripts
.github/scripts/requirements.txt
External systems
GitHub and upstream kernel dependencies
- GitHub Actions · Execution environment and control plane for scheduled and PR workflows
- linux.git · Greg KH stable Linux repository and tags used as rebase targets
- Pull requests · Incoming PRs that trigger patch scanning
- QEMU · Emulated boot target used by kernel-build validation
- kselftests · Selected kernel selftest suites run after builds
Connections 23
- GitHub Actions → update-and-rebase: runs · Schedules and dispatches the rebase workflow
- GitHub Actions → kernel-build: runs · Executes the build validation workflow
- GitHub Actions → patchscan: runs · Triggers patch scanning on PR events
- github-actions → update-and-rebase: hosts · Default branch contains the workflow definition
- github-actions → kernel-build: hosts · Default branch contains the workflow definition
- github-actions → patchscan: hosts · Default branch contains the workflow definition
- linux.git → update-and-rebase: inputs · Stable tags and upstream source feed rebasing
- update-and-rebase → linux-nvidia-*: rebases · Produces refreshed NVIDIA branch tips
- update-and-rebase → linux: keeps mirror · Maintains the pristine upstream mirror branch
- linux-nvidia-* → kernel-build: inputs · Rebased branch tips are validated by builds
- kernel-build → config_4k: uses · ARM64 4K configuration matrix entry
- kernel-build → config_64k: uses · ARM64 64K configuration matrix entry
- kernel-build → QEMU: boots · Runs boot verification in emulation
- kernel-build → kselftests: runs · Executes selected kernel selftests
- Pull requests → patchscan: triggers · PRs targeting the next branch invoke patch scanning
- patchscan → patchscan logic: uses · Workflow delegates to shared scan logic
- patchscan → PR helpers: uses · Workflow delegates to PR validation helpers
- patchscan → Python deps: installs · Workflow installs Python dependencies for checks
- patchscan → linux: compares to · Uses origin/linux as upstream reference for Fixes coverage
- patchscan → Pull requests: comments · Reports findings back on the pull request
- patchscan → GitHub Actions: status · Surface pass/fail status through GitHub Actions
- kernel-build → GitHub Actions: status · Surface build/test results through GitHub Actions
- update-and-rebase → GitHub Actions: status · Surface rebase results through GitHub Actions