Expand description
Kernel source acquisition: tarball download, GitHub codeload snapshot, git clone, local tree.
The acquisition entry points each return an AcquiredSource
carrying the source directory, cache key, and metadata the caller
needs to proceed to configuration and build: download_tarball
(kernel.org stable/RC), download_github_archive (a GitHub codeload
commit snapshot), git_clone_kinded (a kind-directed shallow clone
that dispatches to git_clone_tag / git_clone), and
local_source (an on-disk tree).
Structs§
- Acquired
Source - Downloaded/cloned kernel source ready for building.
- Local
Source State - Result of
inspect_local_source_state— git hash and dirty/git classification of a canonical source-tree path. Pulled out oflocal_sourceso the post-build dirty re-check (a second call fromcrate::cli::kernel_build_pipeline) reuses the exact same gix path.
Functions§
- arch_
info - Target architecture string and boot image name.
- compose_
local_ cache_ key - Compose the cache key for a local source given its arch, optional
HEAD short hash, canonical source path, and optional user
.confighash. - download_
tarball - Download a kernel tarball (stable or RC) and extract it.
- fetch_
latest_ stable_ version - Fetch the latest stable kernel version from kernel.org.
- fetch_
version_ for_ prefix - Resolve the highest version matching a prefix.
- git_
clone - Shallow-clone a git repository at a BRANCH ref.
- inspect_
local_ source_ state - Inspect a canonical source-tree path for git hash + dirty state.
- is_
major_ minor_ prefix - Return true when
sis a kernel major.minor prefix like"6.14"(as opposed to a full patch version"6.14.2"or an rc tag"6.15-rc3"). Callers use this to decide whether the input needs prefix resolution viafetch_version_for_prefix. - local_
source - Use a local kernel source tree.
- shared_
client - Return the process-wide shared [
reqwest::blocking::Client]. First call constructs it viaClient::builder()withSHARED_CLIENT_CONNECT_TIMEOUTapplied; every subsequent call returns a reference to the same instance. This helper is for top-level CLI entries that want the default client.