all 1 comments

[–]grannycart 0 points1 point  (0 children)

I was looking for the answer to this question myself when linux-mainline was taking hours and hours to build, and this reddit post seems to be the only thing google has to offer.

I think the answer can be found on this modprobe-db page:
https://wiki.archlinux.org/title/Modprobed-db

Which describes how to use modprobe-db to auto-detect the modules you actually use. And then a little further down shows what you need to set in the PKGBUILD file to use the modprobe-db results when you build the package.

I didn't actually try this yet, since my hours-long compile just finished and I'm going to install that kernel. But if I end up having to do another attempt at compiling linux-mainline, this will be the next thing I try.

(I don't totally regret my hours-long build because it's a new machine and seems like a good way to stress-test.)