1 |
Thank you all ! Thanks for helping , now I know which things I should do .
|
2 |
|
3 |
|
4 |
------------------ 原始邮件 ------------------
|
5 |
发件人: "Michael Mol"<mikemol@×××××.com>;
|
6 |
发送时间: 2011年10月9日(星期天) 晚上9:40
|
7 |
收件人: "gentoo-user"<gentoo-user@l.g.o>;
|
8 |
|
9 |
主题: Re: [gentoo-user] Anyone can afford information about build kernel?
|
10 |
|
11 |
|
12 |
On Sun, Oct 9, 2011 at 9:30 AM, Michael Mol <mikemol@×××××.com> wrote:
|
13 |
> On Sun, Oct 9, 2011 at 12:53 AM, Lavender <448463782@××.com> wrote: |
14 |
>> Yeah, your reply is exact what I mean , but I'm really confused by those |
15 |
>> modules' names, I can't find any contact between the hard device name and |
16 |
>> its module name . For example, there is a module named 3c59x.ko , I totally |
17 |
>> don't know what device it present for , |
18 |
> |
19 |
> This got a *lot* easier back when sysfs was added. |
20 |
> |
21 |
> cd /sys/module/<modulename>/drivers/ |
22 |
> |
23 |
> And go from there |
24 |
> |
25 |
> lspci will help you see the 'text' name for the device in question. |
26 |
> |
27 |
> For example, let's say I don't know what the 'ahci' module is for. |
28 |
> |
29 |
> $ cd /sys/module/ahci/drivers |
30 |
> $ ls |
31 |
> pci:ahci |
32 |
> $ cd pci\:ahci/ |
33 |
> $ ls |
34 |
> 0000:00:11.0 bind module new_id remove_id uevent unbind |
35 |
> $ sudo lspci|grep 11.0 |
36 |
> 00:11.0 SATA controller: ATI Technologies Inc SB700/SB800 SATA |
37 |
> Controller [AHCI mode] |
38 |
> $ |
39 |
> |
40 |
> So now I know the ahci module manages my SATA controller. |
41 |
|
42 |
Came up with something possibly a little handier. This command should
|
43 |
tell you what driver is associated with every device on the system.
|
44 |
|
45 |
find /sys/devices -name driver -print0|xargs -0 ls -l|cut -d' '
|
46 |
-f10-|sed -e 's/\.\.\///g'
|
47 |
|
48 |
Output could probably still be a bit better cleaned up, but it should help.
|
49 |
|
50 |
--
|
51 |
:wq |