LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 04-11-2012, 09:29 AM   #1
andrmuel
LQ Newbie
 
Registered: Apr 2012
Posts: 4

Rep: Reputation: Disabled
As the kernel finds the correct driver on the disk?


Can someone explain to me where the table with the assignement between
the hardware and drivers to be loaded can be found in the system?

Or:

How does the kernel know which driver has to be load when it sees a peace of hardware ?
 
Old 04-11-2012, 10:29 AM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,987

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
Which distro. The methods vary depending on the distro.
 
Old 04-11-2012, 11:50 PM   #3
bsat
Member
 
Registered: Feb 2009
Posts: 347

Rep: Reputation: 72
I think this is handled by the udev .
 
Old 04-12-2012, 12:51 AM   #4
andrmuel
LQ Newbie
 
Registered: Apr 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by kilgoretrout View Post
Which distro. The methods vary depending on the distro.
oh - really ?
I thought it was kernel task ..

Debian Squeeze
 
Old 04-12-2012, 12:54 AM   #5
andrmuel
LQ Newbie
 
Registered: Apr 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bsat View Post
I think this is handled by the udev .
..but where exactly is the associated table: HARDWARE <---> DRIVER
 
Old 04-13-2012, 02:46 AM   #6
bsat
Member
 
Registered: Feb 2009
Posts: 347

Rep: Reputation: 72
I am not sure if it is dependent or distro or not, but here is the working of udev system

https://www.linux.com/news/hardware/...ls/180950-udev
 
Old 04-15-2012, 03:49 AM   #7
WizadNoNext
Member
 
Registered: Nov 2009
Posts: 140

Rep: Reputation: 9
It is not depend on distro. The association is make by kernel and kernel alone! It is part of /lib/modules/ and files are created using depmod, which is reading all modules and extract pci.ids and usb.ids and include it to files.
Code:
alias pci:v000010B7d0000900Asv*sd*bc*sc*i* 3c59x
alias pci:v000010B7d00009006sv*sd*bc*sc*i* 3c59x
alias pci:v000010B7d00009005sv*sd*bc*sc*i* 3c59x
alias pci:v000010B7d00009004sv*sd*bc*sc*i* 3c59x
alias pci:v000010B7d00009001sv*sd*bc*sc*i* 3c59x
alias pci:v000010B7d00009000sv*sd*bc*sc*i* 3c59x
alias pci:v000010B7d00005952sv*sd*bc*sc*i* 3c59x
alias pci:v000010B7d00005951sv*sd*bc*sc*i* 3c59x
alias pci:v000010B7d00005950sv*sd*bc*sc*i* 3c59x
alias pci:v000010B7d00005970sv*sd*bc*sc*i* 3c59x
alias pci:v000010B7d00005920sv*sd*bc*sc*i* 3c59x
alias pci:v000010B7d00005900sv*sd*bc*sc*i* 3c59x
alias pci:v000010B7d0000990Asv*sd*bc*sc*i* typhoon
alias pci:v000010B7d00009909sv*sd*bc*sc*i* typhoon
alias pci:v000010B7d00009908sv*sd*bc*sc*i* typhoon
alias pci:v000010B7d00009905sv*sd00002102bc*sc*i* typhoon
alias pci:v000010B7d00009905sv*sd00002101bc*sc*i* typhoon
alias pci:v000010B7d00009905sv*sd00001102bc*sc*i* typhoon
alias pci:v000010B7d00009905sv*sd00001101bc*sc*i* typhoon
alias pci:v000010B7d00009904sv*sd00002000bc*sc*i* typhoon
alias pci:v000010B7d00009904sv*sd00001102bc*sc*i* typhoon
alias pci:v000010B7d00009904sv*sd00001000bc*sc*i* typhoon
alias pci:v000010B7d00009903sv*sd*bc*sc*i* typhoon
alias pci:v000010B7d00009902sv*sd*bc*sc*i* typhoon
alias pci:v000010B7d00009900sv*sd*bc*sc*i* typhoon
alias pci:v00001022d00007462sv*sd*bc*sc*i* amd8111e
alias pci:v00001023d00002000sv*sd*bc02sc00i* pcnet32
alias pci:v00001022d00002000sv*sd*bc*sc*i* pcnet32
alias pci:v00001022d00002001sv*sd*bc*sc*i* pcnet32
alias pci:v00001969d00001048sv*sd*bc*sc*i* atl1
alias pci:v00001969d00002048sv*sd*bc*sc*i* atl2
alias pci:v00001969d00001066sv*sd*bc*sc*i* atl1e
alias pci:v00001969d00001026sv*sd*bc*sc*i* atl1e
alias pci:v00001969d00001083sv*sd*bc*sc*i* atl1c
alias pci:v00001969d00001073sv*sd*bc*sc*i* atl1c
alias pci:v00001969d00002062sv*sd*bc*sc*i* atl1c
alias pci:v00001969d00002060sv*sd*bc*sc*i* atl1c
alias pci:v00001969d00001062sv*sd*bc*sc*i* atl1c
alias pci:v00001969d00001063sv*sd*bc*sc*i* atl1c
alias ssb:v4243id0806rev* b44
alias pci:v000014E4d0000170Csv*sd*bc*sc*i* b44
alias pci:v000014E4d00004402sv*sd*bc*sc*i* b44
alias pci:v000014E4d00004401sv*sd*bc*sc*i* b44
alias pci:v000014E4d0000163Csv*sd*bc*sc*i* bnx2
alias pci:v000014E4d0000163Bsv*sd*bc*sc*i* bnx2
alias pci:v000014E4d0000163Asv*sd*bc*sc*i* bnx2
alias pci:v000014E4d00001639sv*sd*bc*sc*i* bnx2
alias pci:v000014E4d000016ACsv*sd*bc*sc*i* bnx2
alias pci:v000014E4d000016AAsv*sd*bc*sc*i* bnx2
alias pci:v000014E4d000016AAsv0000103Csd00003102bc*sc*i* bnx2
alias pci:v000014E4d0000164Csv*sd*bc*sc*i* bnx2
alias pci:v000014E4d0000164Asv*sd*bc*sc*i* bnx2
alias pci:v000014E4d0000164Asv0000103Csd00003106bc*sc*i* bnx2
you would find it in modules.alias

Again it is not distro depend! It is plainly kernel thing and for instance you have id in pci.ids, but as long as kernel do not include device in driver, you wont be able to use device!
 
1 members found this post helpful.
Old 04-17-2012, 05:47 AM   #8
andrmuel
LQ Newbie
 
Registered: Apr 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thanks a lot!!!
That was the answer I searched for!!

.. and now I search for the method how the kernel creates
such ID's:
pci:v000014E4d0000164Asv*sd*bc*sc*i*

But I think the kernel will create an ID without '*' and the
'*' are wildcards ..

Can I create such an ID by hand with a tool ??


Quote:
Originally Posted by WizadNoNext View Post
It is not depend on distro. The association is make by kernel and kernel alone! It is part of /lib/modules/ and files are created using depmod, which is reading all modules and extract pci.ids and usb.ids and include it to files.
Code:
alias pci:v000014E4d0000164Asv*sd*bc*sc*i* bnx2
alias pci:v000014E4d0000164Asv0000103Csd00003106bc*sc*i* bnx2
you would find it in modules.alias

Again it is not distro depend! It is plainly kernel thing and for instance you have id in pci.ids, but as long as kernel do not include device in driver, you wont be able to use device!
 
Old 04-17-2012, 08:42 AM   #9
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,670
Blog Entries: 4

Rep: Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945
udev is the mechanism by which device entries are located and the proper drivers are selected for them. The same mechanism also comes into play (IIRC...) when a USB device is inserted.

A device driver is always "part of the kernel" and it may therefore either be resident, or a loadable module.

Personally, I like to use a bootable-CD distro to determine what drivers are suitable for my system, then specify those specific drivers in a custom-built kernel. Drivers needed for non-removable hardware are compiled in. Drivers needed for removable hardware that I know I need, are modules. In this way I am able to eliminate the "initial RAM disk" step at boot-time altogether. If I don't have, say, a "DECsystem token-ring adapter card," I don't need to build a driver for it and I don't need to search for it at startup time.

Last edited by sundialsvcs; 04-17-2012 at 08:43 AM.
 
Old 04-18-2012, 02:23 AM   #10
WizadNoNext
Member
 
Registered: Nov 2009
Posts: 140

Rep: Reputation: 9
You are free to do so, but I am afraid it won't work, as module won't have this id.

sundialsvcs: I recommend to you to build kernel with modules for most hardware even this integrated in motherboard. It comes handy when you want to reset hardware - simply unload module.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
grub finds kernel but not able to load/execute it amber_474 Linux - Kernel 7 07-26-2006 03:28 PM
building driver disk for 2.6 kernel jputhuka Fedora 0 11-07-2005 12:32 PM
YUM finds 4 updates while up2date finds 29? guest Linux - Newbie 3 03-15-2005 09:01 PM
Correct Disk Usage lwsivad Linux - General 2 11-21-2003 02:01 PM
Gaim 0.71: pkg-config finds 2.2.3, ./configure finds 2.2.1 GreenPenInc Linux - Software 3 10-23-2003 08:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 04:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration