just put a driver under proper directory, it can be used by kernel?

本帖最後由 u2on 於 2010-1-17 16:01 編輯

I have a usb lan card, but kernel compiled neither with driver in kernel nor as a module

1. just find a driver elsewhere and put it in the righe directory such as
/lib/modules/$(uname -r)/kernel/drivers/net/usb/pegasus.ko
it can be used by kernel or not?

2. put the driver inside initrd.img
it can be used by kernel or not?


If the driver doesn't come with source, you better find a source version, because binary modules only can be load on the kernel version that it built for.
By the way, the driver you said is already included in most linux distributions, no need to download seperately.


pegasus 用了好耐 (另一支常見既係係 rtl8150),kernel 早就有的


本帖最後由 u2on 於 2010-1-18 09:00 編輯

Thanks for input.

I am testing Nokia N810 and its OS natively support  RTL8150 wired lan chip.
This question is for it.

The latest firmware Nokia provided for N810 is

config for kernel cannot be found and the RTL8150 is the only lan chip supported.

Now user can install

which include
  1. catc.ko
  2. dm9601.ko
  3. kaweth.ko
  4. mcs7830.ko
  5. pegasus.ko
  6. rt73.ko
to provide other lan chip support

I have tested my usb lan card which use pegasus.ko

I don't know why user can do this ie. not recompile the original kernel but just add some other modules to achieve this.

That's what I want to make clear.

I agree with lazyfai's opinion, "binary modules only can be load on the kernel version that it built for."

But at some other situations, Not open sourced binary driver indeed be used in linux kernel.  This kind of source code never be accessed by linux community, how and why?


another example is NDISwrapper which enables the use of Windows XP drivers for network devices.



無咁先進既器材,但 "一直以來" 都未用過 ndiswrapper

試下 modinfo 個 module 睇睇 ?

install 未必問題所在,
modprobe 有沒有 message ?

But at some other situations, Not open sourced binary driver indeed be used in linux kernel.  This kind of source code never be accessed by linux community, how and why?

好奇時,可以 unpack kernel source 後 make arch=XXXX 睇 menuconfig ?
pegasus usb lan 係好多年前既 10/100



  1. modinfo /nokiaN81/lib/modules/2.6.21-omap1/usbNet/pegasus.ko
  2. filename:       /nokiaN81/lib/modules/2.6.21-omap1/usbNet/pegasus.ko
  3. license:        GPL
  4. description:    Pegasus/Pegasus II USB Ethernet driver
  5. author:         Petko Manolov <[email protected]>
  6. alias:          usb:v067Cp1001d*dc*dsc*dp*ic*isc*ip*
  7. alias:          usb:v15E8p9110d*dc*dsc*dp*ic*isc*ip*
  8. alias:          usb:v15E8p9100d*dc*dsc*dp*ic*isc*ip*
  9. alias:          usb:v0707p0201d*dc*dsc*dp*ic*isc*ip*
  10. alias:          usb:v0707p0200d*dc*dsc*dp*ic*isc*ip*
  11. alias:          usb:v08D1p0003d*dc*dsc*dp*ic*isc*ip*
  12. alias:          usb:v0B39p0901d*dc*dsc*dp*ic*isc*ip*
  13. alias:          usb:v0B39p0109d*dc*dsc*dp*ic*isc*ip*
  14. alias:          usb:v0846p1020d*dc*dsc*dp*ic*isc*ip*
  15. alias:          usb:v045Ep007Ad*dc*dsc*dp*ic*isc*ip*
  16. alias:          usb:v0411p0009d*dc*dsc*dp*ic*isc*ip*
  17. alias:          usb:v0411p0005d*dc*dsc*dp*ic*isc*ip*
  18. alias:          usb:v0411p0001d*dc*dsc*dp*ic*isc*ip*
  19. alias:          usb:v066Bp200Cd*dc*dsc*dp*ic*isc*ip*
  20. alias:          usb:v066Bp400Bd*dc*dsc*dp*ic*isc*ip*
  21. alias:          usb:v077Bp08B4d*dc*dsc*dp*ic*isc*ip*
  22. alias:          usb:v066Bp2206d*dc*dsc*dp*ic*isc*ip*
  23. alias:          usb:v066Bp2204d*dc*dsc*dp*ic*isc*ip*
  24. alias:          usb:v066Bp2203d*dc*dsc*dp*ic*isc*ip*
  25. alias:          usb:v066Bp2202d*dc*dsc*dp*ic*isc*ip*
  26. alias:          usb:v056Ep200Cd*dc*dsc*dp*ic*isc*ip*
  27. alias:          usb:v056EpABC1d*dc*dsc*dp*ic*isc*ip*
  28. alias:          usb:v056Ep400Bd*dc*dsc*dp*ic*isc*ip*
  29. alias:          usb:v056Ep4005d*dc*dsc*dp*ic*isc*ip*
  30. alias:          usb:v056Ep4002d*dc*dsc*dp*ic*isc*ip*
  31. alias:          usb:v0951p000Ad*dc*dsc*dp*ic*isc*ip*
  32. alias:          usb:v04BBp0913d*dc*dsc*dp*ic*isc*ip*
  33. alias:          usb:v04BBp0904d*dc*dsc*dp*ic*isc*ip*
  34. alias:          usb:v03F0p811Cd*dc*dsc*dp*ic*isc*ip*
  35. alias:          usb:v0E66p400Cd*dc*dsc*dp*ic*isc*ip*
  36. alias:          usb:v1044p8002d*dc*dsc*dp*ic*isc*ip*
  37. alias:          usb:v05CCp3000d*dc*dsc*dp*ic*isc*ip*
  38. alias:          usb:v1342p0304d*dc*dsc*dp*ic*isc*ip*
  39. alias:          usb:v056Ep4010d*dc*dsc*dp*ic*isc*ip*
  40. alias:          usb:v0DB7p0002d*dc*dsc*dp*ic*isc*ip*
  41. alias:          usb:v2001pABC1d*dc*dsc*dp*ic*isc*ip*
  42. alias:          usb:v2001p4003d*dc*dsc*dp*ic*isc*ip*
  43. alias:          usb:v2001p200Cd*dc*dsc*dp*ic*isc*ip*
  44. alias:          usb:v2001p400Bd*dc*dsc*dp*ic*isc*ip*
  45. alias:          usb:v2001p4102d*dc*dsc*dp*ic*isc*ip*
  46. alias:          usb:v2001p4002d*dc*dsc*dp*ic*isc*ip*
  47. alias:          usb:v2001p4001d*dc*dsc*dp*ic*isc*ip*
  48. alias:          usb:v07AAp000Dd*dc*dsc*dp*ic*isc*ip*
  49. alias:          usb:v07AAp0004d*dc*dsc*dp*ic*isc*ip*
  50. alias:          usb:v08DDp8511d*dc*dsc*dp*ic*isc*ip*
  51. alias:          usb:v08DDp0988d*dc*dsc*dp*ic*isc*ip*
  52. alias:          usb:v049Fp8511d*dc*dsc*dp*ic*isc*ip*
  53. alias:          usb:v08DDp0987d*dc*dsc*dp*ic*isc*ip*
  54. alias:          usb:v08DDp0986d*dc*dsc*dp*ic*isc*ip*
  55. alias:          usb:v050Dp0121d*dc*dsc*dp*ic*isc*ip*
  56. alias:          usb:v07C9pB100d*dc*dsc*dp*ic*isc*ip*
  57. alias:          usb:v3334p1701d*dc*dsc*dp*ic*isc*ip*
  58. alias:          usb:v07A6p07C2d*dc*dsc*dp*ic*isc*ip*
  59. alias:          usb:v07A6p0986d*dc*dsc*dp*ic*isc*ip*
  60. alias:          usb:v07A6p8515d*dc*dsc*dp*ic*isc*ip*
  61. alias:          usb:v07A6p8513d*dc*dsc*dp*ic*isc*ip*
  62. alias:          usb:v07A6p8511d*dc*dsc*dp*ic*isc*ip*
  63. alias:          usb:v083ApB004d*dc*dsc*dp*ic*isc*ip*
  64. alias:          usb:v083Ap5046d*dc*dsc*dp*ic*isc*ip*
  65. alias:          usb:v083Ap1046d*dc*dsc*dp*ic*isc*ip*
  66. alias:          usb:v07B8p200Cd*dc*dsc*dp*ic*isc*ip*
  67. alias:          usb:v07B8pABC1d*dc*dsc*dp*ic*isc*ip*
  68. alias:          usb:v07B8p400Cd*dc*dsc*dp*ic*isc*ip*
  69. alias:          usb:v07B8p400Bd*dc*dsc*dp*ic*isc*ip*
  70. alias:          usb:v07B8p4002d*dc*dsc*dp*ic*isc*ip*
  71. alias:          usb:v07B8p4102d*dc*dsc*dp*ic*isc*ip*
  72. alias:          usb:v07B8p4007d*dc*dsc*dp*ic*isc*ip*
  73. alias:          usb:v07B8p4004d*dc*dsc*dp*ic*isc*ip*
  74. alias:          usb:v07B8p4104d*dc*dsc*dp*ic*isc*ip*
  75. alias:          usb:v07B8p110Cd*dc*dsc*dp*ic*isc*ip*
  76. alias:          usb:v0557p2007d*dc*dsc*dp*ic*isc*ip*
  77. alias:          usb:v0506p4601d*dc*dsc*dp*ic*isc*ip*
  78. depends:        
  79. vermagic:       2.6.21-omap1 mod_unload ARMv6
  80. parm:           loopback:Enable MAC loopback mode (bit 0) (bool)
  81. parm:           mii_mode:Enable HomePNA mode (bit 0),default=MII mode = 0 (bool)
  82. parm:           devid:The format is: 'DEV_name:VendorID:DeviceID:Flags' (charp)
  83. parm:           msg_level:Override default message level (int)


Nokia N810 kernel source code seems not open.


RE: just put a driver under proper directory, it can be used by kernel?

u2on 發表於 2010-1-19 06:25

there is source code of pegasus.c inside the kernel linux-2.6.21

download the kernel source

but I m not sure if you have enough weapon on your nokia stuff  to compile it.

u may load the binary driver by insmod, then check  the driver with lsmod | grep ...,  or cat /proc/devices | grep ...

good luck


thanks a lot.

Now my usb lan card is OK.

But I am still curious if "just put a driver under proper directory, it can be used by kernel?"

The example I given are used to show at some situation just put driver in but not change the kernel, module can be directly used by kernel.

I hope to know if this is a general case.

"binary modules only can be load on the kernel version that it built for."  is widely acceptable.

Nokia N810 pegasus usb lan card and NDISwrapper are two examples I gave to discuss if indeed there are some exception that binary modules can be used not directly compiled with the kernel.