首页 > 解决方案 > Linux 内核版本号中的 + 是什么意思?

问题描述

我的 NAS 上的 Linux 内核将自身报告为版本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

+Linux内核版本号是什么意思?

标签: linux-kernel

解决方案


这在构建时负责生成本地版本字符串的shell脚本中进行了描述,即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

所以这很可能意味着在构建 Git 存储库时被脚本认为是“脏的”,即:未在签名或注释标签上签出(有关其含义,请参阅git-tag文档)。


推荐阅读