目标“deb-pkg”的内核编译错误配方失败

ebi*_*bin 5 compiling debian linux-kernel

我正在编译从 Linus 的 git 存储库克隆的最新内核以应对挑战。以下是我遵循的步骤,
1.安装交叉编译工具

sudo apt-get install git build-essential kernel-package fakeroot libncurses5-dev  
Run Code Online (Sandbox Code Playgroud)

2.克隆最新的git仓库

$ git clone https://github.com/torvalds/linux.git  
Run Code Online (Sandbox Code Playgroud)

3. 将当前构建配置复制到源代码树的根目录并更新配置文件。

yes '' | make oldconfig  
Run Code Online (Sandbox Code Playgroud)

4. make clean
5. 制作linux镜像和头文件.deb

make -j `getconf _NPROCESSORS_ONLN` deb-pkg LOCALVERSION=-custom  
Run Code Online (Sandbox Code Playgroud)

编译几分钟后,显示错误

dpkg-genchanges: warning: package linux-firmware-image-4.2.0-rc3-custom listed in files list but not in control info
dpkg-genchanges: warning: package linux-headers-4.2.0-rc3-custom listed in files list but not in control info
dpkg-genchanges: warning: package linux-headers-4.3.0-rc1-eudyptula listed in files list but not in control info
dpkg-genchanges: warning: package linux-image-4.2.0-rc3-custom-dbg listed in files list but not in control info
dpkg-genchanges: warning: package linux-image-4.3.0-rc1-eudyptula listed in files list but not in control info
dpkg-genchanges: warning: package linux-image-4.2.0-rc3-custom listed in files list but not in control info
dpkg-genchanges: warning: package linux-image-4.3.0-rc1-eudyptula-dbg listed in files list but not in control info
dpkg-genchanges: warning: package linux-firmware-image-4.3.0-rc1-eudyptula listed in files list but not in control info
dpkg-genchanges: error: package linux-image-4.2.0-rc3-custom-dbg has section kernel in control file but debug in files list
scripts/package/Makefile:91: recipe for target 'deb-pkg' failed
make[1]: *** [deb-pkg] Error 255
Makefile:1226: recipe for target 'deb-pkg' failed
make: *** [deb-pkg] Error 2 
Run Code Online (Sandbox Code Playgroud)

我认为错误发生在 .deb 包的制作中。我真的不明白错误信息

 linux-image-4.2.0-rc3-custom-dbg has section kernel in control file but debug in files list  
Run Code Online (Sandbox Code Playgroud)

它的真正含义是什么?。请帮忙!

Wou*_*lst 5

首先,通过yes '' | make oldconfig更容易完成该步骤make olddefconfig

话说回来,

发生的情况是内核Makefiledebian/目录中生成了许多不完全遵循规范的文件。结合多年来在构建工具中逐渐严格执行此规范,意味着过去曾经工作的黑客(生成.deb未在debian/control.这些天不再工作了。

就我个人而言,我不推荐make deb-pkg构建一个 vanilla 内核的 D​​ebian 包的方法。如果你想这样做,一个更好的 IME 方法是使用作为kernel-packageDebian 一部分的软件包:

apt install kernel-package fakeroot
cd /path/to/git/checkout
make defconfig
make-kpkg --rootcmd fakeroot kernel_image
Run Code Online (Sandbox Code Playgroud)

这应该会为您提供一个.config可以安装在 Debian 系统上的软件包(带有您创建的文件)。