From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RCtdR-0000aw-VD for garchives@archives.gentoo.org; Sun, 09 Oct 2011 13:41:46 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0949821C102; Sun, 9 Oct 2011 13:41:31 +0000 (UTC) Received: from mail-bw0-f53.google.com (mail-bw0-f53.google.com [209.85.214.53]) by pigeon.gentoo.org (Postfix) with ESMTP id CF19621C02B for ; Sun, 9 Oct 2011 13:40:31 +0000 (UTC) Received: by bkbzt12 with SMTP id zt12so9339171bkb.40 for ; Sun, 09 Oct 2011 06:40:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=XaGfLy6ONRi90p1rbfyTcsPb6PYjAyc3j1B40q5jAZY=; b=W84k15De3JUXRjsnbfnKYOo7yJlzcKy2GoMSMoXX5yuqukzDHqp7CLFyN92GV28Fw/ /ntDItzaALSz2K69+P+WYr4Xe7LT0QxZSFxyeJf9YqLzFapMTYbmwc8mp6/SsnXiL3EO KYDMMyR18Cogr/SUD5mdIlYxDZjWpfEUrqb6g= Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 10.204.135.72 with SMTP id m8mr3289680bkt.101.1318167630855; Sun, 09 Oct 2011 06:40:30 -0700 (PDT) Received: by 10.204.177.199 with HTTP; Sun, 9 Oct 2011 06:40:30 -0700 (PDT) In-Reply-To: References: Date: Sun, 9 Oct 2011 09:40:30 -0400 Message-ID: Subject: Re: [gentoo-user] Anyone can afford information about build kernel? From: Michael Mol To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: fa5470012c0966a72bbb8196b4ab11c4 On Sun, Oct 9, 2011 at 9:30 AM, Michael Mol wrote: > On Sun, Oct 9, 2011 at 12:53 AM, Lavender <448463782@qq.com> wrote: >> Yeah, your reply is exact what I mean , but I'm really confused by those >> modules' names, I can't find any contact between the hard device name an= d >> its module name=C2=A0. For example,=C2=A0 there is a module named 3c59x.= ko , I=C2=A0totally >> don't know what device it present for , > > This got a *lot* easier back when sysfs was added. > > cd /sys/module//drivers/ > > And go from there > > lspci will help you see the 'text' name for the device in question. > > For example, let's say I don't know what the 'ahci' module is for. > > $ cd /sys/module/ahci/drivers > $ ls > pci:ahci > $ cd pci\:ahci/ > $ ls > 0000:00:11.0 =C2=A0bind =C2=A0module =C2=A0new_id =C2=A0remove_id =C2=A0u= event =C2=A0unbind > $ sudo lspci|grep 11.0 > 00:11.0 SATA controller: ATI Technologies Inc SB700/SB800 SATA > Controller [AHCI mode] > $ > > So now I know the ahci module manages my SATA controller. Came up with something possibly a little handier. This command should tell you what driver is associated with every device on the system. find /sys/devices -name driver -print0|xargs -0 ls -l|cut -d' ' -f10-|sed -e 's/\.\.\///g' Output could probably still be a bit better cleaned up, but it should help. --=20 :wq