由于缺少“二进制通用”配方,内核自定义构建不起作用

Ant*_*cca 6 debug compiling debian kernel

我在Ubuntu 18.04 上,我正在尝试通过本指南本指南构建我自己的内核。

不幸的是命令:

AUTOBUILD=1 fakeroot debian/rules binary-headers binary-generic binary-perarch skipdbg=false
Run Code Online (Sandbox Code Playgroud)

给我这个错误:

dh binary-headers
dh: Unknown sequence binary-headers (choose from: binary binary-arch binary-indep build build-arch build-indep clean install install-arch install-indep)
debian/rules:35: recipe for target 'binary-headers' failed
make: *** [binary-headers] Error 2
Run Code Online (Sandbox Code Playgroud)

我怀疑指南没有更新,我搜索了很多关于规则脚本接收列表的内容,但我没有找到任何有用的东西。

有人可以帮助我吗?

谢谢!

编辑 1允许的接收者是,binary binary-arch binary-indep build build-arch build-indep clean install install-arch install-indep但这些尚未产生带有嵌入式调试符号的内核。

编辑 2 Debian 规则存入/usr/src/linux-source-{KERNEL-VERSION}/debian/rules.d并存入0-common-vars.mk您可以找到所有允许的开关。

use*_*.dz 0

如果您正在寻找未修改内核的调试符号(dbgsym),那么只需从官方存储库下载它们,如下所示:

否则对于来自其他来源的任何内核(如 Debian 软件包)。

  • Ubuntu Wiki - 构建您自己的内核:调试符号

    您所需要做的只是安装pkg-config-dbgsym软件包并将skipdbg=false标志添加到 Debian make 文件 ( debian/rules)

    sudo apt-get install pkg-config-dbgsym
    LANG=C fakeroot debian/rules clean
    LANG=C fakeroot debian/rules binary-headers binary-generic binary-perarch skipdbg=false
    
    Run Code Online (Sandbox Code Playgroud)

    重要提示 clean:在更改配置、添加标志或错过安装某些构建依赖项后,必须执行此处的命令。因此,对于每次尝试,您都需要运行 clean 命令,make将使用更新的当前设置重新配置构建树。