Subject: | |
From: | |
Reply To: | |
Date: | Wed, 11 Mar 2009 10:39:59 -0500 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Hi Troy,
I'm looking for something more basic. I'm trying to craft an init script
for an initrd image to load appropriate drivers. Nothing fancy. Just the
basics. Like what sort of hard drives are on the system. SATA or IDE? The
SATA issue confuses me since there is a plethora of SATA drivers. Does the
init script have to try each one to see if it finds a match or is there
something in /proc or /sys that provides some identification?
The only tool I have in my initrd image is busybox and it doesnt have an
lspci equivalent. The /proc system contains a subdirectory that lists all
devices on PCI but as bus.device files. I tried cat'ing the files but they
are not ascii. I'm guessing it's possible to walk these files to extract
the information I need. I can dig deeper but to save time, I'd ask if
someone already knows the answer.
Ken
Troy Dawson wrote:
> Mark Stodola wrote:
>> I believe most of anaconda's "magic" comes from probing the PCI and
>> USB bus for vendor and device IDs. If you dig into a driver (for
>> example, e1000e), you will find a pcitable listing all of the IDs the
>> driver supports. If you look in /lib/modules/<kernel>/ you will find
>> a modules.pcimap and modules.usbmap among other bus types.
>>
>> Hope that helps.
>>
>> Cheers,
>> Mark
>>
>> Ken Teh wrote:
>>> How does a system determine the appropriate sata driver?
>>> Specifically, how does anaconda figure out to write
>>>
>>> alias scsi_hostadapter ata_piix
>>>
>>> in my modprobe.conf and to bind it into my initrd image?
>>>
>>> I took apart boot.iso but didnt find anything "readable" that
>>> indicated how this was determined.
>>>
>>> Thanks!
>>>
>>> Ken
>>>
>>
>>
>
> Hi Ken,
> On SL 5, alot of that data comes from hwdata, which is in the
> /usr/share/hwdata directory.
> The main ones people and programs look at is
> pci.ids and usb.ids
> But there are other files in there.
> Troy
|
|
|