How to choose one version of the drivers to be loaded on boot when multiple drivers for the same hardware exist?

user3528438

I'm working with embedded linux.

There are two USB gadget drivers built as LKM, g_ether.ko and g_file_storage.ko.

I did depmod and then in modprobe -l both drivers show up in the list.

kernel/drivers/usb/gadget/g_ether.ko
kernel/drivers/usb/gadget/g_file_storage.ko

The problem is, the kernel doesn't load either of them on boot anatomically.

Curently my solution is to add boot scripts to /etc/init.d etc/rcX.d to force g_ether.ko to be loaded on boot as the default driver.

Are there other (better) ways to make g_ether.ko default driver?

A possible solution is, I make g_ether.ko a static driver, and make g_file_storage.ko an LKM, but I don't know how to turn off a static driver to release the hardware so that another LKM driver can be loaded.

Any suggestions?

Chris Tsui

It's a user choice to use USB peripheral controller as ethernet or storage. So there is no related hardware event for automatic client driver loading.

But there is a way to bind/unbind driver in user space through sysfs. Look at this: https://lwn.net/Articles/143397/

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

Fixing "multiple drivers" errors in Verilog

분류에서Dev

How to install monitor drivers manually?

분류에서Dev

Which nvidia driver from additional drivers option should I choose?

분류에서Dev

Black screen when installing Nvidia Drivers

분류에서Dev

How to install AMD graphic drivers on Ubuntu 18.04

분류에서Dev

How to permanently install Realtek HD audio drivers

분류에서Dev

How to Have Better Intel Graphics Drivers on Macbook?

분류에서Dev

ubuntu doesn't boot after installing quadro drivers

분류에서Dev

Repairing Corrupted Windows 7 USB/Internet Drivers from Linux Boot

분류에서Dev

Windows crashes when Installing RX 470 Drivers on Windows 10.

분류에서Dev

Drivers for new network card

분류에서Dev

Nvidia drivers on 14.04

분류에서Dev

Intel HD 530 Drivers

분류에서Dev

How to properly add new hard drivers to existing Ubuntu system?

분류에서Dev

how to install Wifi and Bluetooth drivers in ubuntu 12.04 lts

분류에서Dev

How do I install new Intel HDA sound drivers?

분류에서Dev

How do I install and enable wireless drivers on laptop with Ubuntu?

분류에서Dev

How can I uninstall old Nvidia drivers from DriverStore FileRepository?

분류에서Dev

How to compile all drivers in the staging tree of the Linux Kernel?

분류에서Dev

Deleted drivers. How to get them back with LiveUSB?

분류에서Dev

How to copy linpus Linux drivers and add/replace in ubuntu

분류에서Dev

How do I install sqlite3 ODBC drivers with unixODBC?

분류에서Dev

How do I get Brother printer drivers to work on Fedora?

분류에서Dev

Is it possible that newer hardware only supports Windows 10? Can I use Windows 10 drivers during Windows 7 installation?

분류에서Dev

How to choose php version in .htaccess

분류에서Dev

how to select multiple same column in one column

분류에서Dev

Additional Drivers crashes in Software Properties

분류에서Dev

Are Linux drivers part of the kernel or the rootfs

분류에서Dev

Debian upgrades with proprietary Nvidia drivers

Related 관련 기사

  1. 1

    Fixing "multiple drivers" errors in Verilog

  2. 2

    How to install monitor drivers manually?

  3. 3

    Which nvidia driver from additional drivers option should I choose?

  4. 4

    Black screen when installing Nvidia Drivers

  5. 5

    How to install AMD graphic drivers on Ubuntu 18.04

  6. 6

    How to permanently install Realtek HD audio drivers

  7. 7

    How to Have Better Intel Graphics Drivers on Macbook?

  8. 8

    ubuntu doesn't boot after installing quadro drivers

  9. 9

    Repairing Corrupted Windows 7 USB/Internet Drivers from Linux Boot

  10. 10

    Windows crashes when Installing RX 470 Drivers on Windows 10.

  11. 11

    Drivers for new network card

  12. 12

    Nvidia drivers on 14.04

  13. 13

    Intel HD 530 Drivers

  14. 14

    How to properly add new hard drivers to existing Ubuntu system?

  15. 15

    how to install Wifi and Bluetooth drivers in ubuntu 12.04 lts

  16. 16

    How do I install new Intel HDA sound drivers?

  17. 17

    How do I install and enable wireless drivers on laptop with Ubuntu?

  18. 18

    How can I uninstall old Nvidia drivers from DriverStore FileRepository?

  19. 19

    How to compile all drivers in the staging tree of the Linux Kernel?

  20. 20

    Deleted drivers. How to get them back with LiveUSB?

  21. 21

    How to copy linpus Linux drivers and add/replace in ubuntu

  22. 22

    How do I install sqlite3 ODBC drivers with unixODBC?

  23. 23

    How do I get Brother printer drivers to work on Fedora?

  24. 24

    Is it possible that newer hardware only supports Windows 10? Can I use Windows 10 drivers during Windows 7 installation?

  25. 25

    How to choose php version in .htaccess

  26. 26

    how to select multiple same column in one column

  27. 27

    Additional Drivers crashes in Software Properties

  28. 28

    Are Linux drivers part of the kernel or the rootfs

  29. 29

    Debian upgrades with proprietary Nvidia drivers

뜨겁다태그

보관