linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Emmanuel Fleury <fleury@cs.aau.dk>
To: linux-kernel@vger.kernel.org
Subject: Re: [ANNOUNCE] Framework for automatic Configuration of a Kernel
Date: Tue, 27 Sep 2005 14:00:12 +0200	[thread overview]
Message-ID: <4339344C.9050305@cs.aau.dk> (raw)
In-Reply-To: <20050927093929.83645.qmail@web51010.mail.yahoo.com>

Hi,

First of all, I guess that the point of a script here is to decide
whether or not the hardware device is here or not. So, the output should
be something like "true" or "false", better than echoing some stupid
characters, maybe a direct "exit 0" and "exit 1" would be much less
troublesome.


Then, I might be wrong but I think we can get a more stable detection of
the PCI devices by grabbing directly the PCI vendor and device codes as
numbers instead of looking them up in the PCI ID database.

lspci -n

Or even, ask for a specific device like this:
lspci -d [<vendor>]:[<device>]

Which would give something like this:

[fleury@rade7 ~]$ lspci -d 8086:1a30
0000:00:01.0 PCI bridge: Intel Corporation 82845 845 (Brookdale) Chipset
AGP Bridge (rev 04)

Or if the device is not present:
[fleury@rade7 ~]$ lspci -d 8087:1a30
<no output>

This way just avoid to depend from the way the PCI database is written,
because whenever there is a change in the spelling of one keyword, it
might need quite a lot of updates in the Kconfigs. On the contrary, the
vendor and device PCI code will never change (hopefully).

So, the 'autorule' would look like this:

autorule pciscript.sh "8086:1a30"

And the script would be:
#/bin/sh

if [ -z "`lspci -d $1`" ]
then
    exit 1
else
    exit 0
fi

What do you think ?

Regards
-- 
Emmanuel Fleury

Unix is user-friendly. It's just more specific about his friends.
  -- Unknown

  reply	other threads:[~2005-09-27 12:02 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-27  9:39 [ANNOUNCE] Framework for automatic Configuration of a Kernel Ahmad Reza Cheraghi
2005-09-27 12:00 ` Emmanuel Fleury [this message]
2005-09-27 12:53   ` Ahmad Reza Cheraghi
2005-09-27 12:58     ` Emmanuel Fleury
2005-09-27 16:47       ` Ahmad Reza Cheraghi
2005-09-27 15:51     ` Emmanuel Fleury
2005-09-28  8:46       ` Andreas Jellinghaus
2005-09-28  8:46         ` Emmanuel Fleury
2005-09-28  9:05           ` Emmanuel Fleury
2005-09-28  9:16           ` Ahmad Reza Cheraghi
2005-09-28 17:11           ` Andreas Jellinghaus
2005-09-30  3:09       ` Randy.Dunlap
2005-09-30  3:23         ` Jody McIntyre
2005-09-28  9:25 ` Emmanuel Fleury
2005-09-28 11:22   ` Ahmad Reza Cheraghi
2005-09-28 11:43     ` Emmanuel Fleury
2005-09-29  7:22       ` Ahmad Reza Cheraghi
     [not found] <4Rne4-4sd-3@gated-at.bofh.it>
     [not found] ` <4Rq2b-i7-1@gated-at.bofh.it>
     [not found]   ` <E1EKSQx-0002Pf-M5@be1.lrz>
2005-09-28  8:36     ` Emmanuel Fleury

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4339344C.9050305@cs.aau.dk \
    --to=fleury@cs.aau.dk \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).