/lib/模块/版本与/lib/模块/版本&#x2B之间有什么区别(加号)?

发布于 2025-02-06 23:20:13 字数 118 浏览 2 评论 0原文

请帮助,谁知道/lib/模块/版本和/lib/模块/版本+(加号) 例如,eg/lib/modules/3.4.61和/lib/modules/3.4.61+。

对不起,我的英语弱和弱Linux(我是新手)。

Please help, who know between /lib/modules/version and /lib/modules/version+ (plus sign)
e.g. /lib/modules/3.4.61 and /lib/modules/3.4.61+.

Sorry my weak English and weak Linux (I am newbie).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

始终不够 2025-02-13 23:20:13

首先,您需要了解版本版本之间的区别。
版本是三个字段值,例如v5.0.1。我们可以为同一版本提供替代方案,尤其是在开发方面。

作为真实示例:Linus现在正在努力发布Linux V6.0.0。在推动它之前,他正在制作许多6.0.0测试版本,我们称其为发布候选人

他将每个释放候选者释放为v6.0.0.0rc2,然后是v6.0.0rc3,并且不断增加。版本前缀保持不变,仅更改后缀(RCN)。当它足够好时,我们将发布“官方” v6.0.0。
因此,发行是“版本的版本”。这是一个非常具体的时刻/提交。

我们可以使用make -s kernelversionmake -s kerneLrease检查版本和发布字符串。
kerneLrease 只是 kernelversion 与释放后缀的串联

kernelversion是从文件./ makefile的第一行中提取的:

# SPDX-License-Identifier: GPL-2.0
VERSION = 6
PATCHLEVEL = 0
SUBLEVEL = 0
EXTRAVERSION =

kernelversion只是这三个由'。'分开的第一个第一个值。

让我们查看./ scripts/setLocalversion算法,他是讲述其版本后缀的人:

if [ -z "$(git describe --exact-match 2>/dev/null)" ]; then
    ...
    if $short; then
        echo "+"
        return
    fi
    ...
fi

请注意,如果他不返回带注释的标签,它将返回“+”。这意味着,如果版本为“ 6.0.0”,它将变为“ 6.0.0+”。

我们需要的第一件事

  1. 是,要避免使用git标签,以避免使用“+”。
    立即使用
git tag -a mytag -m 'Commenting about this tag'

./ scripts/setLocalversion可能返回什么(空)。

  1. .config上启用自动补充。
CONFIG_LOCALVERSION=""
CONFIG_LOCALVERSION_AUTO=y
  1. 用您想要的后缀制作文件.scmversion(如果需要)。
echo 'mysuffix' > .scmversion

现在,使用make -s kerneLrease再次检查它。预计将解决:)

First, you need to understand the difference between version and release.
Version is a three fields value, like v5.0.1. We can have alternatives for the same version, especially on development.

As real example: Linus is now working to publish Linux v6.0.0. Before pushing it, he is making many 6.0.0 testing versions, we call it release candidates.

He releases each release candidate as v6.0.0rc2, then v6.0.0rc3, and it keeps increasing. The version prefix keeps the same, it only changes the release suffix (rcN). When its good enough, we releases the 'official' v6.0.0.
So, release is kind of 'version of a version'. Its a very specific moment/commit.

We can check version and release strings using make -s kernelversion and make -s kernelrelease.
kernelrelease is just kernelversion concatenated with a release suffix.

Kernelversion is extracted from the file ./Makefile, from its first lines:

# SPDX-License-Identifier: GPL-2.0
VERSION = 6
PATCHLEVEL = 0
SUBLEVEL = 0
EXTRAVERSION =

Kernelversion is just these three first values separated by '.'.

Lets see ./scripts/setlocalversion algorithm, he is the guy who tells its release suffix:

if [ -z "$(git describe --exact-match 2>/dev/null)" ]; then
    ...
    if $short; then
        echo "+"
        return
    fi
    ...
fi

Note that he checks git describe, if it doesn't return an annoted tag, it will return "+". That means, if the version is '6.0.0', it will become '6.0.0+'.

TUTORIAL

  1. First thing we need, is to asure we have a git annoted tag, to avoid the '+'.
    Use
git tag -a mytag -m 'Commenting about this tag'

Now ./scripts/setlocalversion may return nothing (empty).

  1. Enable auto complement on .config.
CONFIG_LOCALVERSION=""
CONFIG_LOCALVERSION_AUTO=y
  1. Make a file .scmversion with the suffix you want (if you want any).
echo 'mysuffix' > .scmversion

Now check it again with make -s kernelrelease. Its expected to be solved :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文