Find the answer to your Linux question:
Results 1 to 4 of 4
A general device driver question: Is it possible to replace a device driver with a loadable library? How to do it? Where to find Windows/Linux samples to do this? Thanks!...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2006
    Posts
    1

    Smile How to replace a device driver with a loadable library?


    A general device driver question: Is it possible to replace a device driver with a loadable library? How to do it? Where to find Windows/Linux samples to do this? Thanks!

  2. #2
    Linux User fernape's Avatar
    Join Date
    Dec 2005
    Location
    Holland
    Posts
    301
    Although I have not a direct answer to this, I can guess that it is not possible.

    If you try to merge library code into the kernel you can't cause libraries are executed in userspace, so they are prepared to have a big stack (even MB's of stack) But the kernel's stack is fixed and not big. So I think that if you'd try to do that your kernel would be broken.

    In addition it is possible that the library needs some other libraries/binaries from userland so you'd have even more problems.

    If you mean to write a userland program (library or binary application) to manage a device I think it is not possible without other facility to help. For example, you can write a filesystem driver in userspace but using the functions provided by FUSE.

    I don't know if there is any similar framework for your purposes.

    Regards

  3. #3
    Just Joined!
    Join Date
    Jun 2006
    Posts
    15
    Dear Fernape!
    If the loadable library is not possible, What is mean by API?
    For example, Instead of writing device driver for USB device,We can access the USB device from user space by Libusb API. Please clear my doubt...
    Regards,
    Prakash.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux User fernape's Avatar
    Join Date
    Dec 2005
    Location
    Holland
    Posts
    301
    AFAIK, yes, you can use libusb to access that kind of devices.

    Best regards

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •