David Jones
David Jones

Reputation: 3352

What does + mean in a Linux kernel version number?

The Linux kernel on my NAS reports itself as version 4.19.165+

/boot/bzImage: Linux kernel x86 boot executable bzImage, version 4.19.165+ (root@developer) #56 SMP Fri Apr 2 17:16:25 CST 2021, RO-rootFS, swap_dev 0x28, Normal VGA

What does + mean in the Linux kernel version number?

Upvotes: 2

Views: 322

Answers (1)

Marco Bonelli
Marco Bonelli

Reputation: 69336

This is described in the shell script responsible for generating the local version string when building, which is scripts/setlocalversion:

# scm version string if not at a tagged commit
if test "$CONFIG_LOCALVERSION_AUTO" = "y"; then
    # full scm version string
    res="$res$(scm_version)"
else
    # 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
fi

So this most likely means that at the time of building the Git repository was deemed "dirty" by the script, that is: not checked out on a signed or annotated tag (see the git-tag documentation for the meaning of that).

Upvotes: 4

Related Questions