buildroot - how to change kernel version string
Asked Answered
D

2

5

I work on SAM9G25 EK board with buildroot and Armstrong linux (Linux4sam). My script is creating linux version "2.6.39+" and this "+" is confusing (/lib/modules folder etc.). I want to remove it. I found only two files .uImage.cmd, and kernel.release that contains this string, but both are generated.

Where is this string created ?

Deason answered 16/10, 2012 at 8:56 Comment(0)
M
7

You have a .config? Look in there for the value assigned to CONFIG_LOCALVERSION.

To have no local version specifed in the kernel's release, either remove CONFIG_LOCALVERSION or comment it out by starting the line containing it by a #.

The default shall be:

#CONFIG_LOCALVERSION is not set
Marathi answered 16/10, 2012 at 9:24 Comment(2)
Unfortunately CONFIG_LOCALVERSION="" #CONFIG_LOCALVERSION_AUTO is not setDeason
Change CONFIG_LOCALVERSION="" to #CONFIG_LOCALVERSION is not set. @Bartlomiej GrzeskowiakMarathi
D
1

In this case the main reason was : scripts/setlocalversion line >170:

# append a plus sign if the repository is not in a clean
# annotated or signed tagged state (as git describe only
# looks at signed or annotated tags - git tag -a/-s) and
# LOCALVERSION= is not specified
if test "${LOCALVERSION+set}" != "set"; then
    scm=$(scm_version --short)
    res="$res${scm:++}"
fi

I commented this part out.

Deason answered 16/10, 2012 at 13:32 Comment(2)
So you are pretending to be 2.6.39 when you are not.Vergeboard
So setting LOCALVERSION before running make (ie: export LOCALVERSION="") would accomplish the same thing. From the script, "touch .scmversion" would also work.Pertinent

© 2022 - 2024 — McMap. All rights reserved.