CentOS 8.3: Trying to build custom kernel

Issues related to applications and software problems and general support
Post Reply
LA_FORGE
Posts: 4
Joined: 2021/01/11 20:49:41

CentOS 8.3: Trying to build custom kernel

Post by LA_FORGE » 2021/01/12 10:42:02

Hi,

I'm trying to build a custom/homebrew kernel for CentOS 8.3. I just followed the instructions in the Wiki. The preparations were successful but when I'm trying to run rpmbuild, the following dependencies are missing:

Code: Select all

[steve@trinity SPECS]$ rpmbuild -bp --target=x86_64 kernel.spec
Building target platforms: x86_64
Building for target x86_64
error: Failed build dependencies:
        dwarves is needed by kernel-4.18.0-240.1.1.el8.x86_64
        libbabeltrace-devel is needed by kernel-4.18.0-240.1.1.el8.x86_64
        libbpf-devel is needed by kernel-4.18.0-240.1.1.el8.x86_64
I tried to install them but the packages can't be found:

Code: Select all

[steve@trinity SPECS]# dnf install dwarves libbabeltrace-devel libbpf-devel
Last metadata expiration check: 1:43:47 ago on Mon Jan 11 20:12:10 2021.
No match for argument: dwarves
No match for argument: libbabeltrace-devel
No match for argument: libbpf-devel
Error: Unable to find a match: dwarves libbabeltrace-devel libbpf-devel
Where can I get these packages?


Best

LA_FORGE

scottro
Forum Moderator
Posts: 2476
Joined: 2007/09/03 21:18:09
Location: NYC
Contact:

Re: CentOS 8.3: Trying to build custom kernel

Post by scottro » 2021/01/12 14:06:55

While it doesn't always work, (say, if the packages simply aren't available), you can use, one you have the spec file

Code: Select all

 dnf builddep kernel.spec
(or whatever the spec file is called. You will need to use sudo.

A very quick look indicates that dwarves is provided by the epel repo with a newer version from the powertools repo.
New users should check the FAQ and Read Me First pages

LA_FORGE
Posts: 4
Joined: 2021/01/11 20:49:41

Re: CentOS 8.3: Trying to build custom kernel

Post by LA_FORGE » 2021/01/12 16:27:17

This worked very well. Thank you very much. Can you locate the Repo for libbabeltrace-devel
and libbpf-devel as well because it wasn't found in the epel repo. Or should I build these libs from the sources?

sml
Posts: 152
Joined: 2020/01/17 09:01:44

Re: CentOS 8.3: Trying to build custom kernel

Post by sml » 2021/01/12 16:42:06

They are in powertools:

Code: Select all

$ dnf -q provides lib{babeltrace,bpf}-devel
libbabeltrace-devel-1.5.4-3.el8.i686 : Common Trace Format Babel Tower
Repo        : powertools
Matched from:
Provide    : libbabeltrace-devel = 1.5.4-3.el8

libbabeltrace-devel-1.5.4-3.el8.x86_64 : Common Trace Format Babel Tower
Repo        : powertools
Matched from:
Provide    : libbabeltrace-devel = 1.5.4-3.el8

libbpf-devel-0.0.8-4.el8.i686 : Development files for libbpf
Repo        : powertools
Matched from:
Provide    : libbpf-devel = 0.0.8-4.el8

libbpf-devel-0.0.8-4.el8.x86_64 : Development files for libbpf
Repo        : powertools
Matched from:
Provide    : libbpf-devel = 0.0.8-4.el8
FWIW, I usually build in a Mock chroot. Among other things, it spares me the chasing after build dependencies.

LA_FORGE
Posts: 4
Joined: 2021/01/11 20:49:41

Re: CentOS 8.3: Trying to build custom kernel

Post by LA_FORGE » 2021/01/12 17:29:36

Thank you very much

Code: Select all

[steve@trinity linux]$ time make -j16
real    0m36.927s
user    6m19.360s
sys     2m41.734s
These are fantastic build times since I didn't remove any module or other code in the kernel, I just took the config from /boot/config-4.18.0-240.1.1.el8_3.x86_64

User avatar
TrevorH
Forum Moderator
Posts: 30160
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: CentOS 8.3: Trying to build custom kernel

Post by TrevorH » 2021/01/12 19:17:58

You should really use mock not rpmbuild.
CentOS 6 died in November 2020 - migrate to a new version!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

LA_FORGE
Posts: 4
Joined: 2021/01/11 20:49:41

Re: CentOS 8.3: Trying to build custom kernel

Post by LA_FORGE » 2021/01/13 15:14:05

Ok, thanks. I'll do it next build.

Post Reply

Return to “CentOS 8 - General Support”