我的 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内核版本号中的+
是什么意思?
最佳答案
这个在构建时负责生成本地版本字符串的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 存储库时,脚本将其视为“脏”,即:未在签名或带注释的标签上 checkout (请参阅 git-tag
documentation 了解其含义) .
关于linux-kernel - Linux 内核版本号中的 + 意味着什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68514583/