Skip to content

[Backport kirkstone] classes: make localversion classes deterministic#1695

Merged
otavio merged 1 commit intokirkstonefrom
backport-1694-to-kirkstone
Dec 4, 2023
Merged

[Backport kirkstone] classes: make localversion classes deterministic#1695
otavio merged 1 commit intokirkstonefrom
backport-1694-to-kirkstone

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Description

Backport of #1694 to kirkstone.

The localversion string built into the kernel and u-boot should be
deterministic. With OpenEmbedded it is common practice to apply patches
to the sources. The commit id of HEAD will differ each time the patching
step is rerun. With the previous implementation of the fsl-{kernel,u-
boot}-localversion classes this produced non-deterministic commit ids to
be used. This is undesireable, because the commit-id read from the
version string during runtime is not present in the sources. It also
caused problems when building out-of-tree kernel-modules if the kernel
itself was taken from sstate cache but the kernel-module needed to be
rebuild and retriggered the kernels do_patch task (see #961).

Rework to produce a deterministic string that will use the commit id
given as SRCREV and count the number of patches applied on top.

With e.g. commit id 11aabbcc and 5 patches this will result in a version
string
  +g11aabbcc+p5

Fixes: #961

Signed-off-by: Daniel Wagenknecht <dwagenknecht@emlix.com>
(cherry picked from commit 4153739)
@otavio otavio merged commit 6245254 into kirkstone Dec 4, 2023
@otavio otavio deleted the backport-1694-to-kirkstone branch December 4, 2023 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant