Repository navigation
linux-qcom: make the kernel release independent of the git checkout - #3381
Merged
Ricardo Salveti (ricardosalveti) merged 2 commits intoOct 20, 2026
Conversation
With CONFIG_LOCALVERSION_AUTO enabled, setlocalversion builds the kernel release from the git checkout: the git describe distance from the last tag, and -dirty when the tree has local changes. Neither is part of the task signature, and the distance depends on whether the fetcher unpacked a full clone or the shallow tarball, which has no tags: 7.2.0-01462-gd49c33864d06-dirty (full clone) 7.2.0-gd49c33864d06-dirty (shallow tarball) The kernel's do_compile is not restored from sstate, so a module recipe that has to be rebuilt compiles the kernel again from a fresh checkout, and can get a release that the kernel packages from sstate do not provide: nothing provides kernel-7.2.0-gd49c33864d06-dirty needed by kernel-module-msm-kgsl-7.2.0-gd49c33864d06-dirty-1.0.17-r0 Disable it, as the linux-yocto kernels already do through the yocto-kernel-cache base fragment (ktypes/base/base.cfg), so the release is the kernel version plus the exported LOCALVERSION, whatever the checkout looks like; the rt flavors inherit the fragment. uname -r loses its git-describe suffix, including the -dirty that the quilt-applied patch gives linux-qcom 6.18. Assisted-by: Claude Code:claude-fable-5 Signed-off-by: Ricardo Salveti <ricardo.salveti@oss.qualcomm.com>
With LOCALVERSION_AUTO disabled, uname -r no longer tells which kernel revision a board runs. Set KERNEL_LOCALVERSION to -g<sha> of the revision the fetcher resolved for SRC_URI (the fetched head for AUTOREV builds), plus -p<count> for the SRC_URI patches applied on top of it, similar to the +g<sha>+p<count> suffix meta-freescale uses. linux-qcom 6.18 reports 6.18.44-gb5a6060def87-p1 and linux-qcom-next 7.3.0-rc4-g1a0586064ee1, the same for every build of those inputs. Assisted-by: Claude Code:claude-fable-5 Signed-off-by: Ricardo Salveti <ricardo.salveti@oss.qualcomm.com>
Dmitry Baryshkov (lumag)
approved these changes
Oct 19, 2026
This comment has been minimized.
This comment has been minimized.
Test Results 118 files ± 0 718 suites ±0 8h 16m 42s ⏱️ - 49m 57s For more details on these failures, see this check. Results for commit 7e53bb5. ± Comparison against base commit e02726e. This pull request removes 5 tests.♻️ This comment has been updated with latest results. |
Jose Quaresma (quaresmajose)
approved these changes
Oct 20, 2026
Contributor
Author
|
Known issues. |
Ricardo Salveti (ricardosalveti)
merged commit Oct 20, 2026
74a7ed8
into
qualcomm-linux:master
216 of 217 checks passed
Contributor
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin wrynose
git worktree add -d .worktree/backport/3381-to-wrynose origin/wrynose
cd .worktree/backport/3381-to-wrynose
git switch --create backport/3381-to-wrynose
git cherry-pick -x 1769f29d54b9e16ba064b075b366879fa9ffbcda 7e53bb5655fb870650a051bbe41f4deeef0cf4d3 |
Contributor
Author
|
Will backport once #3384 is merged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With CONFIG_LOCALVERSION_AUTO enabled, setlocalversion derives the kernel
release from the git checkout: the
git describedistance and a-dirtysuffix. Neither is part of the task signature. The distance changes
depending on whether the fetcher unpacked a full clone or the shallow
tarball (
7.2.0-01462-gd49c33864d06-dirtyvs7.2.0-gd49c33864d06-dirty).The kernel's do_compile is not restored from sstate. When a module recipe
has to be rebuilt, the kernel is compiled again from a fresh checkout and
can produce a release that the kernel packages from sstate do not have.
do_rootfs then fails, as on every qcom-next row of #3361:
the kernel version plus the exported LOCALVERSION. The linux-yocto
kernels already do this through the yocto-kernel-cache base fragment.
uname -rtraceable by setting KERNEL_LOCALVERSION from the resolvedSRCREV and the SRC_URI patch count, e.g.
6.18.44-gb5a6060def87-p1and
7.3.0-rc4-g1a0586064ee1.The kernel task signatures change once, so the first build after this
rebuilds the kernels.