首页 > 解决方案 > Linux 最新稳定编译:不能代表对 vmlinux-gdb.py 的更改:

问题描述

问题:

我对内核版本优先级的了解:

  1. 使用您自己的发行版内核(不可能:太慢了)
  2. 使用最新的稳定内核
  3. 使用最新的 LTS 内核

我试过的:

git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
git checkout -b stable v5.1.2
cp /boot/config-`uname -r` .config
yes '' | make oldconfig
make -j `getconf _NPROCESSORS_ONLN\' deb-pkg LOCALVERSION=-fab

这给了我以下错误:

dpkg-source: error: cannot represent change to vmlinux-gdb.py:
dpkg-source: error:   new version is symlink to /home/fab-user/Documents/Source/linux/scripts/gdb/vmlinux-gdb.py
dpkg-source: error:   old version is nonexistent

在以下完整输出中:

make -j `getconf _NPROCESSORS_ONLN` deb-pkg LOCALVERSION=-fab
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/confdata.o
  HOSTCC  scripts/kconfig/expr.o
  LEX     scripts/kconfig/lexer.lex.c
  YACC    scripts/kconfig/parser.tab.h
  YACC    scripts/kconfig/parser.tab.c
  HOSTCC  scripts/kconfig/preprocess.o
  HOSTCC  scripts/kconfig/symbol.o
  HOSTCC  scripts/kconfig/lexer.lex.o
  HOSTCC  scripts/kconfig/parser.tab.o
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf  --syncconfig Kconfig
  UPD     include/config/kernel.release
make clean
/bin/bash ./scripts/package/mkdebian
  TAR     linux-5.1.2-fab.tar.gz
origversion=$(dpkg-parsechangelog -SVersion |sed 's/-[^-]*$//');\
    mv linux-5.1.2-fab.tar.gz ../linux-5.1.2-fab_${origversion}.orig.tar.gz
dpkg-buildpackage -r"fakeroot -u" -a$(cat debian/arch)  -i.git -us -uc
dpkg-buildpackage: source package linux-5.1.2-fab
dpkg-buildpackage: source version 5.1.2-fab-1
dpkg-buildpackage: source distribution xenial
dpkg-buildpackage: source changed by fab-user <fab-user@fab-ux-predator>
dpkg-buildpackage: host architecture amd64
 dpkg-source -i.git --before-build linux
 fakeroot -u debian/rules clean
rm -rf debian/*tmp debian/files
make clean
 dpkg-source -i.git -b linux
dpkg-source: info: using source format '1.0'
dpkg-source: warning: source directory 'linux' is not <sourcepackage>-<upstreamversion> 'linux-5.1.2-fab-5.1.2-fab'
dpkg-source: warning: .orig directory name linux.orig is not <package>-<upstreamversion> (wanted linux-5.1.2-fab-5.1.2-fab.orig)
dpkg-source: info: building linux-5.1.2-fab using existing linux-5.1.2-fab_5.1.2-fab.orig.tar.gz
dpkg-source: info: building linux-5.1.2-fab in linux-5.1.2-fab_5.1.2-fab-1.diff.gz
dpkg-source: error: cannot represent change to vmlinux-gdb.py:
dpkg-source: error:   new version is symlink to /home/fab-user/Documents/Source/linux/scripts/gdb/vmlinux-gdb.py
dpkg-source: error:   old version is nonexistent
dpkg-source: warning: ignoring deletion of file .scmversion, use --include-removal to override
dpkg-source: error: cannot represent change to linux-5.1.1-fab.tar.gz: binary file contents changed
dpkg-source: warning: the diff modifies the following upstream files: 
 .clang-format
 .cocciconfig
 .config.old
 .get_maintainer.ignore
 .mailmap
 .version
 CREDITS
 LICENSES/exceptions/GCC-exception-2.0
 LICENSES/exceptions/Linux-syscall-note
 LICENSES/other/Apache-2.0
 LICENSES/other/CDDL-1.0
 LICENSES/other/GPL-1.0
 LICENSES/other/ISC
 LICENSES/other/Linux-OpenIB
 LICENSES/other/MPL-1.1
 LICENSES/other/X11
 LICENSES/preferred/BSD-2-Clause
 LICENSES/preferred/BSD-3-Clause
 LICENSES/preferred/BSD-3-Clause-Clear
 LICENSES/preferred/GPL-2.0
 LICENSES/preferred/LGPL-2.0
 LICENSES/preferred/LGPL-2.1
 LICENSES/preferred/MIT
 MAINTAINERS
 Module.symvers
 README
dpkg-source: info: use the '3.0 (quilt)' format to have separate and documented changes to upstream files, see dpkg-source(1)
dpkg-source: error: unrepresentable changes to source
dpkg-buildpackage: error: dpkg-source -i.git -b linux gave error exit status 1
scripts/package/Makefile:70: recipe for target 'deb-pkg' failed
make[1]: *** [deb-pkg] Error 1
Makefile:1396: recipe for target 'deb-pkg' failed
make: *** [deb-pkg] Error 2

所以我最终做了:

git checkout -b v4.19.38 v4.19.38

这给了我高达 10MB/S 的速度,而不是我的发行版的标准内核的 12Mbps,而且效果很好,但如果我想保持 WiFi 驱动程序的全速,我需要每 24 小时重新启动一次机器。

问题:

我注定要留在 4.19.38 吗?
有没有办法让 4.19.39-5.12 版本永久工作?

标签: gitcompilationlinux-kernel

解决方案


只需删除vmlinux-pdb.py符号链接即可scripts/gdb/vmlinux-gdb.py为我解决问题。

所以在内核源代码的根目录下

$ rm vmlinux-gdb.py

另见https://www.spinics.net/lists/linux-kbuild/msg18761.html


推荐阅读