[PATCH] scripts/setlocalversion: Reinstate .scmversion support

Rasmus Villemoes ravi at prevas.dk
Tue Mar 4 10:24:06 CET 2025


On Sun, Mar 02 2025, Marek Vasut <marex at denx.de> wrote:

> The .scmversion is used by oe-core to append U-Boot version string.
>
> LOCALVERSION is not fully compatible replacement as it adds trailing
> "-dirty" string at the end of version string in case the U-Boot git
> tree contains uncommitted changes. This behavior itself is correct.
> However, OE builds do clone U-Boot sources from git and may apply
> additional patches on top, which are not tracked in U-Boot git tree,
> but rather in the OE metalayer git tree, which leads to the addition
> of "-dirty" string as well.
>

... which is then _also_ correct, no? It means that U-Boot is built from
v2024.10-321-gabcd1234 plus some entirely unknown additional patches,
which can be anything from fixing a typo in a printf string to
completely overhauling everything.

> The .scmversion used by oe-core used to replace the version string
> suffix fully, including the "-dirty" string. Reinstate support for
> the .scmversion to let OE core do exactly that as it used to do it.

No, please don't. Let's not let this script deviate from upstream linux
again, and let's instead try to fix the bug in oe-core that (ab)uses
this legacy .scmversion file. The fundamental bug is that oe-core
creates these .scmversion files unconditionally, even if they end up
empty, making CONFIG_LOCALVERSION_AUTO completely useless. I have long
since worked around those bugs in my own u-boot and linux recipes, but
I'd much rather be able to eventually drop those workarounds.

Why doesn't doing what kernel.bbclass has done,

export LOCALVERSION = "${UBOOT_LOCALVERSION}"

work for you?

Rasmus


More information about the U-Boot mailing list