AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1519868
Accepted
mpboden
mpboden
Asked: 2024-07-08 07:58:53 +0800 CST2024-07-08 07:58:53 +0800 CST 2024-07-08 07:58:53 +0800 CST

当以“Debian 方式”编译内核时,如何添加本地版本修饰符?

  • 772

我一直在尝试编译自己的内核,在按照BuildYourOwnKernel的说明进行操作时,添加本地版本修饰符时遇到了困难。这是使用 编译内核的“Debian 方式”,fakefoot debian/rules binary-generic而不是使用 从主线编译make bindeb-pkg。

按照说明操作后,我实际上成功编译了内核。但是,+test1我作为本地版本修饰符添加的后缀仅添加到.deb存档文件中,而不会添加到任何二进制包中。因此,我在安装过程中遇到冲突,因为名称与当前安装的内核匹配。

我正在使用 Ubuntu 22.04 Server。

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.4 LTS
Release:    22.04
Codename:   jammy

当前内核:

$ uname -r
5.15.0-113-generic

以下是我遵循的步骤:

1.安装依赖项

sudo apt build-dep linux linux-image-unsigned-$(uname -r)
sudo apt install fakeroot crash kexec-tools kernel-wedge libncurses5 libncurses5-dev binutils-dev

2.下载源码

apt source linux-image-unsigned-$(uname -r)

3. 进入源目录

cd linux-5.15.0

4.修改debian.master/changelog

按照说明:

为了使您的内核比您基于的 Ubuntu 内核“更新”,您应该添加本地版本修饰符。在构建之前,在 debian.master/changelog 文件中的第一个版本号末尾添加类似“+test1”的内容。

+test1因此,我在第一个版本号末尾添加了以下内容:

$ head -n1 debian.master/changelog
linux (5.15.0-113.123+test1) jammy; urgency=medium

5. 构建内核

fakeroot debian/rules clean
fakeroot debian/rules binary-headers binary-generic

编译完成后你会看到+test1所有文件都添加了后缀.deb:

$ tree -L 1 /home/mike
/home/mike
├── linux-5.15.0
├── linux_5.15.0-113.123.diff.gz
├── linux_5.15.0-113.123.dsc
├── linux_5.15.0.orig.tar.gz
├── linux-buildinfo-5.15.0-113-generic_5.15.0-113.123+test1_amd64.deb
├── linux-cloud-tools-5.15.0-113-generic_5.15.0-113.123+test1_amd64.deb
├── linux-headers-5.15.0-113_5.15.0-113.123+test1_all.deb
├── linux-headers-5.15.0-113-generic_5.15.0-113.123+test1_amd64.deb
├── linux-image-unsigned-5.15.0-113-generic_5.15.0-113.123+test1_amd64.deb
├── linux-modules-5.15.0-113-generic_5.15.0-113.123+test1_amd64.deb
├── linux-modules-extra-5.15.0-113-generic_5.15.0-113.123+test1_amd64.deb
├── linux-modules-iwlwifi-5.15.0-113-generic_5.15.0-113.123+test1_amd64.deb
└── linux-tools-5.15.0-113-generic_5.15.0-113.123+test1_amd64.deb

但问题是+test1该文件内的任何文件都没有添加后缀.deb,因此在安装内核时会发生冲突。

$ sudo dpkg -i linux-image-unsigned-5.15.0-113-generic_5.15.0-113.123+test1_amd64.deb 
dpkg: regarding linux-image-unsigned-5.15.0-113-generic_5.15.0-113.123+test1_amd64.deb containing linux-image-unsigned-5.15.0-113-generic:
 linux-image-unsigned-5.15.0-113-generic conflicts with linux-image-5.15.0-113-generic
  linux-image-5.15.0-113-generic (version 5.15.0-113.123) is present and installed.

dpkg: error processing archive linux-image-unsigned-5.15.0-113-generic_5.15.0-113.123+test1_amd64.deb (--install):
 conflicting packages - not installing linux-image-unsigned-5.15.0-113-generic
Errors were encountered while processing:
 linux-image-unsigned-5.15.0-113-generic_5.15.0-113.123+test1_amd64.deb

但是,标题已安装:

$ sudo dpkg -i linux-headers-5.15.0-113-generic_5.15.0-113.123+test1_amd64.deb 
(Reading database ... 138403 files and directories currently installed.)
Preparing to unpack linux-headers-5.15.0-113-generic_5.15.0-113.123+test1_amd64.deb ...
Unpacking linux-headers-5.15.0-113-generic (5.15.0-113.123+test1) over (5.15.0-113.123+test1) ...
Setting up linux-headers-5.15.0-113-generic (5.15.0-113.123+test1) ...
/etc/kernel/header_postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.15.0-113-generic
   ...done.

但请注意,没有目录包含本地版本后缀+test。它似乎只是覆盖了现有的标题。

$ tree -L 1 /usr/src
/usr/src
├── linux-headers-5.15.0-113-generic
└── python3.10

以下是内容的片段linux-headers-5.15.0-113-generic_5.15.0-113.123+test1_amd64.deb:

$ dpkg -c linux-headers-5.15.0-113-generic_5.15.0-113.123+test1_amd64.deb | head -n20
drwxr-xr-x root/root         0 2024-07-07 16:31 ./
drwxr-xr-x root/root         0 2024-07-07 16:27 ./lib/
drwxr-xr-x root/root         0 2024-07-07 16:27 ./lib/modules/
drwxr-xr-x root/root         0 2024-07-07 16:27 ./lib/modules/5.15.0-113-generic/
drwxr-xr-x root/root         0 2024-07-07 16:31 ./usr/
drwxr-xr-x root/root         0 2024-07-07 16:31 ./usr/share/
drwxr-xr-x root/root         0 2024-07-07 16:31 ./usr/share/doc/
drwxr-xr-x root/root         0 2024-07-07 16:31 ./usr/share/doc/linux-headers-5.15.0-113-generic/
-rw-r--r-- root/root    714273 2024-07-07 15:58 ./usr/share/doc/linux-headers-5.15.0-113-generic/changelog.Debian.gz
-rw-r--r-- root/root      1292 2024-07-07 15:58 ./usr/share/doc/linux-headers-5.15.0-113-generic/copyright
drwxr-xr-x root/root         0 2024-07-07 16:27 ./usr/src/
drwxr-xr-x root/root         0 2024-07-07 16:27 ./usr/src/linux-headers-5.15.0-113-generic/
-rw-r--r-- root/root    261963 2024-07-07 16:27 ./usr/src/linux-headers-5.15.0-113-generic/.config
-rw-r--r-- root/root        39 2024-07-07 16:27 ./usr/src/linux-headers-5.15.0-113-generic/.gitignore
-rw-r--r-- root/root      1013 2024-07-07 16:27 ./usr/src/linux-headers-5.15.0-113-generic/.missing-syscalls.d
-rw-r--r-- root/root   1818060 2024-07-07 16:27 ./usr/src/linux-headers-5.15.0-113-generic/Module.symvers
drwxr-xr-x root/root         0 2024-07-07 16:27 ./usr/src/linux-headers-5.15.0-113-generic/arch/
drwxr-xr-x root/root         0 2024-07-07 16:27 ./usr/src/linux-headers-5.15.0-113-generic/arch/x86/
drwxr-xr-x root/root         0 2024-07-07 16:27 ./usr/src/linux-headers-5.15.0-113-generic/arch/x86/entry/
drwxr-xr-x root/root         0 2024-07-07 16:27 ./usr/src/linux-headers-5.15.0-113-generic/arch/x86/entry/syscalls/

以下是内容linux-image-unsigned-5.15.0-113-generic_5.15.0-113.123+test1_amd64.deb:

$ dpkg -c linux-image-unsigned-5.15.0-113-generic_5.15.0-113.123+test1_amd64.deb
drwxr-xr-x root/root         0 2024-07-07 16:29 ./
drwxr-xr-x root/root         0 2024-07-07 16:26 ./boot/
-rw------- root/root  11680480 2024-07-07 16:26 ./boot/vmlinuz-5.15.0-113-generic
drwxr-xr-x root/root         0 2024-07-07 16:29 ./usr/
drwxr-xr-x root/root         0 2024-07-07 16:27 ./usr/lib/
drwxr-xr-x root/root         0 2024-07-07 16:27 ./usr/lib/linux/
drwxr-xr-x root/root         0 2024-07-07 16:27 ./usr/lib/linux/triggers/
drwxr-xr-x root/root         0 2024-07-07 16:29 ./usr/share/
drwxr-xr-x root/root         0 2024-07-07 16:29 ./usr/share/doc/
drwxr-xr-x root/root         0 2024-07-07 16:29 ./usr/share/doc/linux-image-unsigned-5.15.0-113-generic/
-rw-r--r-- root/root    714273 2024-07-07 15:58 ./usr/share/doc/linux-image-unsigned-5.15.0-113-generic/changelog.Debian.gz
-rw-r--r-- root/root      1292 2024-07-07 15:58 ./usr/share/doc/linux-image-unsigned-5.15.0-113-generic/copyright

以下是构建过程结束时的一些尾部输出。请注意指示构建包的行,其中包尚未+test1包含.deb。

dpkg-deb: building package 'linux-image-unsigned-5.15.0-113-generic' in '../linux-image-unsigned-5.15.0-113-generic_5.15.0-113.123+test1_amd64.deb'.
dh_installchangelogs -plinux-modules-5.15.0-113-generic
dh_installdocs -plinux-modules-5.15.0-113-generic
dh_compress -plinux-modules-5.15.0-113-generic
dh_fixperms -plinux-modules-5.15.0-113-generic -X/boot/
dh_shlibdeps -plinux-modules-5.15.0-113-generic 
dh_installdeb -plinux-modules-5.15.0-113-generic
dh_installdebconf -plinux-modules-5.15.0-113-generic
flock -w 60 /home/mike/linux-5.15.0/debian/.LOCK dh_gencontrol -plinux-modules-5.15.0-113-generic -- -Vlinux:rprovides='spl-modules,  spl-dkms,  zfs-modules,  zfs-dkms,  v4l2loopback-modules,  v4l2loopback-dkms, ' 
dpkg-gencontrol: warning: Depends field of package linux-modules-5.15.0-113-generic: substitution variable ${shlibs:Depends} used, but is not defined
dpkg-gencontrol: warning: Built-Using field of package linux-modules-5.15.0-113-generic: substitution variable ${linux:BuiltUsing} used, but is not defined
dh_md5sums -plinux-modules-5.15.0-113-generic
dh_builddeb -plinux-modules-5.15.0-113-generic
dpkg-deb: building package 'linux-modules-5.15.0-113-generic' in '../linux-modules-5.15.0-113-generic_5.15.0-113.123+test1_amd64.deb'.
if [ -f debian.master/control.d/generic.inclusion-list ] ; then \
                dh_installchangelogs -plinux-modules-extra-5.15.0-113-generic; \
dh_installdocs -plinux-modules-extra-5.15.0-113-generic; \
dh_compress -plinux-modules-extra-5.15.0-113-generic; \
dh_fixperms -plinux-modules-extra-5.15.0-113-generic -X/boot/; \
dh_shlibdeps -plinux-modules-extra-5.15.0-113-generic ; \
dh_installdeb -plinux-modules-extra-5.15.0-113-generic; \
dh_installdebconf -plinux-modules-extra-5.15.0-113-generic; \
flock -w 60 /home/mike/linux-5.15.0/debian/.LOCK dh_gencontrol -plinux-modules-extra-5.15.0-113-generic -- -Vlinux:rprovides='spl-modules,  spl-dkms,  zfs-modules,  zfs-dkms,  v4l2loopback-modules,  v4l2loopback-dkms, ' ; \
dh_md5sums -plinux-modules-extra-5.15.0-113-generic; \
dh_builddeb -plinux-modules-extra-5.15.0-113-generic; \
fi
dpkg-gencontrol: warning: Depends field of package linux-modules-extra-5.15.0-113-generic: substitution variable ${shlibs:Depends} used, but is not defined
dpkg-deb: building package 'linux-modules-extra-5.15.0-113-generic' in '../linux-modules-extra-5.15.0-113-generic_5.15.0-113.123+test1_amd64.deb'.
dh_installchangelogs -plinux-modules-iwlwifi-5.15.0-113-generic
dh_installdocs -plinux-modules-iwlwifi-5.15.0-113-generic
dh_compress -plinux-modules-iwlwifi-5.15.0-113-generic
dh_fixperms -plinux-modules-iwlwifi-5.15.0-113-generic -X/boot/
dh_shlibdeps -plinux-modules-iwlwifi-5.15.0-113-generic 
dh_installdeb -plinux-modules-iwlwifi-5.15.0-113-generic
dh_installdebconf -plinux-modules-iwlwifi-5.15.0-113-generic
flock -w 60 /home/mike/linux-5.15.0/debian/.LOCK dh_gencontrol -plinux-modules-iwlwifi-5.15.0-113-generic -- -Vlinux:rprovides='spl-modules,  spl-dkms,  zfs-modules,  zfs-dkms,  v4l2loopback-modules,  v4l2loopback-dkms, ' 
dpkg-gencontrol: warning: Built-Using field of package linux-modules-iwlwifi-5.15.0-113-generic: substitution variable ${linux:BuiltUsing} used, but is not defined
dh_md5sums -plinux-modules-iwlwifi-5.15.0-113-generic
dh_builddeb -plinux-modules-iwlwifi-5.15.0-113-generic; 
dpkg-deb: building package 'linux-modules-iwlwifi-5.15.0-113-generic' in '../linux-modules-iwlwifi-5.15.0-113-generic_5.15.0-113.123+test1_amd64.deb'.
dh_installchangelogs -plinux-buildinfo-5.15.0-113-generic
dh_installdocs -plinux-buildinfo-5.15.0-113-generic
dh_compress -plinux-buildinfo-5.15.0-113-generic
dh_fixperms -plinux-buildinfo-5.15.0-113-generic -X/boot/
dh_shlibdeps -plinux-buildinfo-5.15.0-113-generic 
dh_installdeb -plinux-buildinfo-5.15.0-113-generic
dh_installdebconf -plinux-buildinfo-5.15.0-113-generic
flock -w 60 /home/mike/linux-5.15.0/debian/.LOCK dh_gencontrol -plinux-buildinfo-5.15.0-113-generic -- -Vlinux:rprovides='spl-modules,  spl-dkms,  zfs-modules,  zfs-dkms,  v4l2loopback-modules,  v4l2loopback-dkms, ' 
dpkg-gencontrol: warning: Depends field of package linux-buildinfo-5.15.0-113-generic: substitution variable ${shlibs:Depends} used, but is not defined
dpkg-gencontrol: warning: Built-Using field of package linux-buildinfo-5.15.0-113-generic: substitution variable ${linux:BuiltUsing} used, but is not defined
dh_md5sums -plinux-buildinfo-5.15.0-113-generic
dh_builddeb -plinux-buildinfo-5.15.0-113-generic
dpkg-deb: building package 'linux-buildinfo-5.15.0-113-generic' in '../linux-buildinfo-5.15.0-113-generic_5.15.0-113.123+test1_amd64.deb'.
dh_installchangelogs -plinux-headers-5.15.0-113-generic
dh_installdocs -plinux-headers-5.15.0-113-generic
dh_compress -plinux-headers-5.15.0-113-generic
dh_fixperms -plinux-headers-5.15.0-113-generic -X/boot/
dh_shlibdeps -plinux-headers-5.15.0-113-generic 
dh_installdeb -plinux-headers-5.15.0-113-generic
dh_installdebconf -plinux-headers-5.15.0-113-generic
flock -w 60 /home/mike/linux-5.15.0/debian/.LOCK dh_gencontrol -plinux-headers-5.15.0-113-generic -- -Vlinux:rprovides='spl-modules,  spl-dkms,  zfs-modules,  zfs-dkms,  v4l2loopback-modules,  v4l2loopback-dkms, ' 
dh_md5sums -plinux-headers-5.15.0-113-generic
dh_builddeb -plinux-headers-5.15.0-113-generic
dpkg-deb: building package 'linux-headers-5.15.0-113-generic' in '../linux-headers-5.15.0-113-generic_5.15.0-113.123+test1_amd64.deb'.
dh_installchangelogs -plinux-tools-5.15.0-113-generic
dh_installdocs -plinux-tools-5.15.0-113-generic
dh_compress -plinux-tools-5.15.0-113-generic
dh_fixperms -plinux-tools-5.15.0-113-generic -X/boot/
dh_shlibdeps -plinux-tools-5.15.0-113-generic 
dh_installdeb -plinux-tools-5.15.0-113-generic
dh_installdebconf -plinux-tools-5.15.0-113-generic
flock -w 60 /home/mike/linux-5.15.0/debian/.LOCK dh_gencontrol -plinux-tools-5.15.0-113-generic -- -Vlinux:rprovides='spl-modules,  spl-dkms,  zfs-modules,  zfs-dkms,  v4l2loopback-modules,  v4l2loopback-dkms, ' 
dh_md5sums -plinux-tools-5.15.0-113-generic
dh_builddeb -plinux-tools-5.15.0-113-generic
dpkg-deb: building package 'linux-tools-5.15.0-113-generic' in '../linux-tools-5.15.0-113-generic_5.15.0-113.123+test1_amd64.deb'.
dh_installchangelogs -plinux-cloud-tools-5.15.0-113-generic
dh_installdocs -plinux-cloud-tools-5.15.0-113-generic
dh_compress -plinux-cloud-tools-5.15.0-113-generic
dh_fixperms -plinux-cloud-tools-5.15.0-113-generic -X/boot/
dh_shlibdeps -plinux-cloud-tools-5.15.0-113-generic 
dh_installdeb -plinux-cloud-tools-5.15.0-113-generic
dh_installdebconf -plinux-cloud-tools-5.15.0-113-generic
flock -w 60 /home/mike/linux-5.15.0/debian/.LOCK dh_gencontrol -plinux-cloud-tools-5.15.0-113-generic -- -Vlinux:rprovides='spl-modules,  spl-dkms,  zfs-modules,  zfs-dkms,  v4l2loopback-modules,  v4l2loopback-dkms, ' 
dh_md5sums -plinux-cloud-tools-5.15.0-113-generic
dh_builddeb -plinux-cloud-tools-5.15.0-113-generic
dpkg-deb: building package 'linux-cloud-tools-5.15.0-113-generic' in '../linux-cloud-tools-5.15.0-113-generic_5.15.0-113.123+test1_amd64.deb'.

发生什么了?

  • 这是一个错误吗?
  • 这是故意的吗?我没有正确理解这个过程?
  • 或者我做错了什么?
kernel
  • 1 1 个回答
  • 113 Views

1 个回答

  • Voted
  1. Best Answer
    mpboden
    2024-07-12T14:04:31+08:002024-07-12T14:04:31+08:00

    我参考的教程指出:

    为了使您的内核比您基于的 Ubuntu 内核“更新”,您应该添加本地版本修饰符。在构建之前,在 debian.master/changelog 文件中的第一个版本号末尾添加类似“+test1”的内容。

    我最初的理解是编辑第一行debian.master/changelog如下:

    linux (5.15.0-113.123+test1) jammy; urgency=medium
    

    但是,我认为我将本地版本修饰符放在了错误的位置。当我将其添加到 ABI 编号末尾而不是上传编号之后时,.deb 存档和所有软件包都会相应地命名。

    linux (5.15.0-113+test1.123) jammy; urgency=medium
    

    内核命名方案

    为了解释内核命名方案的不同部分, Ubuntu wiki 中的问题“特定的 Ubuntu 内核版本号是什么意思?”解释了:

    Ubuntu 内核的官方版本会告诉您很多信息,包括基本上游版本、当前 Ubuntu ABI 标识符和内核风格。(请参阅如何确定正在运行的内核的版本?以查找您当前的版本号。)

    给定一个像 2.6.35-6.9-generic 这样的版本,它可以分为以下四个部分:

    <base kernel version>-<ABI number>.<upload number>-<flavour> 
    

    基本内核版本代表 Ubuntu 内核所基于的主线版本。ABI 编号代表内核应用程序二进制接口的重大变化。上传编号是此基本版本的每次上传的单调递增计数器。风格表示这是哪种内核配置变体(请参阅什么是内核风格?)。


    阅读源代码

    为了更好地理解这个过程,我阅读了各种源代码文件,从中读取内核版本debian.master/changelog并将其分解为各个部分并分配给变量。然后使用这些变量来命名和构建二进制包。

    要注意的第一个定义来自debian/debian.env:

    DEBIAN=debian.master
    

    接下来,源包名称将是 中的第一个标记debian.master/changelog。这是在 的第 7 行定义的debian/rules.d/0-common-vars.mk:

    src_pkg_name=$(shell sed -n '1s/^\(.*\) (.*).*$$/\1/p' $(DEBIAN)/changelog)
    

    第 13 行debian/rules.d/0-common-vars.mk:

    release := $(shell sed -n '1s/^$(src_pkg_name).*(\(.*\)-.*).*$$/\1/p' $(DEBIAN)/changelog)
    revisions := $(shell sed -n 's/^$(src_pkg_name)\ .*($(release)-\(.*\)).*$$/\1/p' $(DEBIAN)/changelog | tac)
    revision ?= $(word $(words $(revisions)),$(revisions))
    

    第 82 行debian/rules.d/0-common-vars.mk:

    abinum  := $(shell echo $(revision) | sed -r -e 's/([^\+~]*)\.[^\.]+(~.*)?(\+.*)?$$/\1/')$(abi_suffix)
    

    第 84 行debian/rules.d/0-common-vars.mk:

    abi_release := $(release)-$(abinum)
    

    第 141 行debian/rules.d/0-common-vars.mk:

    bin_pkg_name_unsigned=linux-image-unsinged-$(abi_release)
    

    第 57 行debian/rules.d/2-binary-arch.mk:

    bin_pkg_name=$(bin_pkg_name_unsigned)
    

    第 582 行debian/rules.d/2-binary-arch.mk:

    binary-%: pkgimg = $(bin_pkg_name)-$*
    

    第 600 行debian/rules.d/2-binary-arch.mk:

    $(call dh_all,$(pkgimg))
    

    此行调用dh_all,这是一个从 的第 550 行开始的定义指令debian/rules.d/2.binary-arch.mk:

    define dh_all
        dh_installchangelogs -p$(1)
        dh_installdocs -p$(1)
        dh_compress -p$(1)
        dh_fixperms -p$(1) -X/boot/
        dh_shlibdeps -p$(1) $(shlibdeps_opts)
        dh_installdeb -p$(1)
        dh_installdebconf -p$(1)
        $(lockme) dh_gencontrol -p$(1) -- -Vlinux:rprovides='$(rprovides)'
        dh_md5sums -p$(1)
        dh_builddeb -p$(1)
    endef
    

    最后一行调用dh_builddeb,构建 Debian 二进制包。(有关更多信息,请参阅man dh_builddeb。)

    无论如何,要查看其中一些关键变量的值,您可以debian/rules printenv从内核源目录运行:

    $ debian/rules printenv | head -n10
    dh_testdir
    src package name  = linux
    series            = jammy
    release           = 5.15.0
    revisions         = 0.0 9.9 10.10 11.11 12.12 13.13 14.14 15.15 16.16 17.17 18.18 19.19 20.20 21.21 22.22 23.23 24.24 25.25 26.27 27.28 30.31 33.34 34.35 35.36 37.39 39.42 40.43 41.44 43.46 45.48 46.49 47.51 48.54 49.55 50.56 52.58 53.59 56.62 57.63 58.64 59.65 60.66 65.72 66.73 67.74 68.75 69.76 70.77 71.78 72.79 74.81 75.82 76.83 79.86 81.90 83.92 85.95 86.96 88.98 90.100 91.101 93.103 94.104 100.110 102.112 103.113 105.115 106.116 111.121 112.122 113+test1.123
    revision          = 113+test1.123
    uploadnum         = 113+123
    prev_revisions    = 0.0 0.0 9.9 10.10 11.11 12.12 13.13 14.14 15.15 16.16 17.17 18.18 19.19 20.20 21.21 22.22 23.23 24.24 25.25 26.27 27.28 30.31 33.34 34.35 35.36 37.39 39.42 40.43 41.44 43.46 45.48 46.49 47.51 48.54 49.55 50.56 52.58 53.59 56.62 57.63 58.64 59.65 60.66 65.72 66.73 67.74 68.75 69.76 70.77 71.78 72.79 74.81 75.82 76.83 79.86 81.90 83.92 85.95 86.96 88.98 90.100 91.101 93.103 94.104 100.110 102.112 103.113 105.115 106.116 111.121 112.122
    prev_revision     = 112.122
    abinum            = 113+test1
    

    最后说明

    我找不到很多关于这个特定主题的信息,详细说明了添加本地版本修改器。我发现的唯一一个基本上做了我在这里概述的同样事情的来源是 GitHub 存储库build-ubuntu-kernel 。在他们的构建脚本中,以下部分修改了 ABI 编号debian.master/changelog:

    # Examples:
    # 6.9.9-060909+customidle-generic
    # 6.9.9-060909+customfull-generic
    # 6.9.9-060909+customrt-generic
    # Note: A hyphen between label and type (e.g. customidle -> custom-idle) causes problems with some parsers
    # Because the final version name becomes: 6.9.9-060909+custom-idle-generic, so just keep it combined
    echo "*** Updating version in changelog (necessary for Ubuntu)... ✓";
    sed -i "s/${KERNEL_SUB_VER}/${KERNEL_SUB_VER}+${KERNEL_VERSION_LABEL}${KERNEL_TYPE}/g" ./debian.master/changelog;
    
    • 1

相关问题

  • 为 i7 处理器编译内核的最佳方法是什么?

  • 未连接到任何可见进程的令人讨厌的 CPU 峰值

  • 如何让我的电脑中的风扇在暂停时关闭?[关闭]

  • Ubuntu 是否支持与 SSD 一起使用的 TRIM 命令?

  • 使用 apt-get upgrade 时如何强制安装内核更新?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve