Find the answer to your Linux question:
Results 1 to 2 of 2
Hey all, Firstly, I would want to clarify that this is not a post related to any issue with Linux kernel per se. I am currently working on an academic ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2012
    Posts
    1

    Linux USB HC Driver Code portability


    Hey all,

    Firstly, I would want to clarify that this is not a post related to any issue with Linux kernel per se.
    I am currently working on an academic project to write USB driver for a small operating system called XINU. XINU is a very light-weight, minimal and simplified operating system.
    My aim is to write a USB driver for XINU.

    Linux USB subsystem, as I have read, is divided into layers, the lowest layer being the Host Controller Driver (HCD) which directly talks with the Host Controller (UHCI/OHCI/EHCI ...)
    So, what I was thinking was if maybe I could directly port the HCD, as is, from linux kernel to XINU, so that I will not have to concern myself with the hardware details. That is exactly what is expected from me out of the course, since with the time that I have available, it is simply not possible to write my own HCD from scratch. I know such "code reuse" (to put in nice terms) is frowned upon by the community, but I don't really have any other option.
    So, can any one give me any tips as to how I can go about using any existing code (only the HCD part, which direcltly talks with the hardware) into XINU.

    Thanking you all in anticipation.

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,709
    Why do you say that 'such "code reuse" is frowned on the the community'? Linux and FOSS in general is all about sharing. I wouldn't think anyone would object to this use. As for porting the code to XINU, I have no idea since I have never written any kernel code for that OS. You need to deal with low-level I/O reads/writes, and probably dma setup, as well as interrupt handlers. I'm sure that the linux code will help you understand what you need to do, but whether any of that code can be ported directly is unlikely.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

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