3

I have a linux embedded device that I need to switch between USB file storage gadget driver and USB Ethernet gadget driver at runtime.

The approach I use now is to build both drivers into kernel modules and switch the modules on demand.

If I build those two drivers statically into the kernel, is there still a way to disable one driver, release the hardware, and enable another driver, at run time?

  • If the former approach is working, why do you want to use the latter? – Faheem Mitha Feb 29 '16 at 16:46
  • @FaheemMitha One difficulty is it's some extra effort to deploy updates when a header in the kernel is changed. If drivers are modules then I need to track and distribute all affected modules when a header is modified. However if drivers are built statically then I only need to distribute the uImage. – user3528438 Feb 29 '16 at 18:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.