User:Aslantis/Find needed kernel drivers
This is a short guide on how to find the kernel drivers needed for your device. The main wiki has tons of information about configuring your kernel, but little about finding what to enable, to get things like basic hardware support. This leaves new users struggling, trying to figure out why their WiFi card or trackpad isn't working.
This is a methodology created by yours truly. It might not be the best way to go about it, but it's the way I made to go about it. Contributions are welcome.
Step uno: Start configuring your custom kernel
if you don't want, you don't even need to make config, just compile the basic kernel sources and install it. Of course, I recommend everyone to go through the kernel configurator, but it isn't a necessity for this guide.
Note! The only thing you need to configure your kernel for at this stage is your filesystem. If you're using something other than ext, enable it in the kernel before building!
Boot into this kernel, and execute lspci -vknn > customkernel.txt
Step dos: Boot with a preconfigured kernel
There are two ways to do this: either with a liveUSB of another distro (I used manjaro), or with Gentoo's distribution kernel (the pre-compiled one). Once booted into one of these kernels, then run the same command: lspci -vknn > binarykernel.txt
Note! If you used a liveUSB, make sure to move this text file to your proper root partition, preferably same directory as your last!
Step tres: Results!
Run this simple command: diff customkernel.txt binarykernel.txt
. This will show which kernel drivers were in use by the pre-configured kernel, but not those in use now, and for which devices they were in use for. To get information on just the drivers, run: diff customkernel.txt binarykernel.txt | grep -i "kernel"
.
Then, configure your kernel with make menuconfig
. You can search with the slash button!