Results 1 to 3 of 3
Thread: Finding device drivers
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Oct 2007
Finding device drivers
In order to configure kernel I need to know what configuration files are used by the default kernel which is currently used.
I am using Mandriva on IBM Thinkpad T41.
I know that the process looks like
1 Find the proper sysfs class device that the device is bound to. Network devices are listed in /sys/class/net and tty devices in /sys/class/tty. Other types of devices are listed in other directories in /sys/class, depending on the type of device.
2 Trace through the sysfs tree to find the module name that controls this device. It will be found in the /sys/class/class_name/device_name/device/driver/module, and can be displayed using the readlink and basename applications:
$ basename `readlink /sys/class/class_name/device_name/device/driver/
3 Search the kernel Makefiles for the CONFIG_ rule that builds this module name by using find and grep:
$ find -type f -name Makefile | xargs grep module_name
4 Search in the kernel configuration system for that configuration value and go to the location in the menu that it specifies to enable that driver to be built.
What I don't know is how do I detect all the devices which are used, because /sys/class/ contains lots of folders. I've detected network adaptor, but there is only one folder in /sys/class/net/ so it was easy.
Thanks in advance.
Hi rast, I don't think you need to compile a new kernel if you are doing it for the Atheros drivers, but if you really need to do this, there is a .config file in your present kernel. If you compile a new one, you simply copy it over to the new kernel and proceed to customize it from there. There are a lot of how tos on re-compiling kernels out there, and even though I admire your spunk for taking it on, it is a very challenging task for a new user. You need to know for sure that you need to re-compile before taking it on.
- Join Date
- Oct 2007
no, i'm just doing it to get to know linux better. i know that i need to copy current kernel config file instead of new one. the question is how do i know the hardware used by the current kernel to configure and compile new one.