【发布时间】:2019-12-11 13:18:42
【问题描述】:
我正在尝试修改其中一个 CentOS (7.6) 内核源文件并重新编译它们以供以后安装。
我按照 wiki.centos 上的指南进行定制内核: https://wiki.centos.org/HowTos/Custom_Kernel
我发现在第 5 步中,RPM 方法总是从 tar 文件中解压源文件并替换我在 BUILD/ 中的修改。
因此,我改变了自己的方式。我将修改放在另一个地方,并在 SPECS/ 下的 kernel.spec 文件中添加了一行,以将我的文件复制到 BUILD/ 中。即在kernel.spec(解包后)中,%build 前面加上cp 命令的一行。但是,%build 部分的编译出错了:
...
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.Vd6by5
BUILDING A KERNEL FOR x86_64...
USING ARCH=x86_64
...
###
### Now generating an X.509 key pair to be used for signing modules.
###
### If this takes a long time, you might wish to run rngd in the
### background to keep the supply of entropy topped up. It
### needs to be run as root, and uses a hardware random
### number generator if one is available.
###
Generating a 3072 bit RSA private key
....++
......................................................................................................................................................................................++
writing new private key to 'signing_key.priv'
-----
###
### Key pair generated.
###
- Including cert /home/user/rpmbuild/BUILD/kernel-3.10.0-957.12.2.el7/linux-3.10.0-957.12.2.el7.v2.x86_64/centos-kpatch.x509
- Including cert /home/user/rpmbuild/BUILD/kernel-3.10.0-957.12.2.el7/linux-3.10.0-957.12.2.el7.v2.x86_64/centos-ldup.x509
- Including cert signing_key.x509
RPM build errors:
有人可以建议我在编译过程中替换源文件的更好方法吗? 谢谢。
【问题讨论】:
标签: compilation kernel centos7 rpm