Embedded Linux under the USB drive development method-read less detours __linux

Source: Internet
Author: User

Embedded Linux under the USB belongs to all the driver of a very complex subsystem, in order to complete her conquest, it will take at least a few months time, not believe. That's something you didn't do.

I have done 2 years of embedded drive development, USB accounted for the half time. During a lot of detours, the following will be my blood lessons summed up, to engage in and are engaged in the comrades to do a little bit of contribution to it:

First, literacy;

To do is read the USB Spec (oh, in fact, a lot of articles, books and materials are really level or original good, like food often processed on the change of taste, if not contacted before you can see the Chinese, probably first impression, the work is actually very complicated and boring part. See the spec at the same time can go to the Internet to browse the relevant knowledge of USB development, this stage is literacy, do not seek diligence. At least you have to know the USB four types of transmission, you need to know the USB from the beginning of several states bar, you have to know what the USB devices are, and so on.

The second step is to glimpse the whole picture;

How the USB device works. In fact, the USB subsystem is a layered work, they cooperate with tacit understanding, do their own part of the matter, everything to the overall situation. USB drive can be divided into USB device driver, USB controller driver, hub drive, bus driver and so on. I suggest you go down the main line of the device driver.

Before you really start analyzing USB driver code, you need to understand the Linux module mechanism, Linux-driven platform bus architecture, and so on. After a module is loaded, from the driver point of view, the real device is driven from the probe start. You should know that. You have to know why USB can plug and Play, software friends should know the thread of this thing, and she has a relationship. One of the most important characters in the USB system is the show, Urb. Everything must be done around her. Pipe paved the road for her, and she carried the data. USB Device-driven work is ready for this URB after her mission is basically completed, then she gave Urb who. This is the previously mentioned USB controller driver, host.

As for host, there are a lot of money in the market now, if your boss gives you use the most mature like EHCI, then you are too lucky. This basic need not you write, as long as a little modification, register her on the bus can be. If you are unfortunate, using a host such as MUSB, you are miserable, you have suffered. Oh. If the useful can contact me, had studied before, may be able to help what kind of busy AH.

Step three, keep improving;

This time the drive you also adjusted, may have run now, may not have run up. Perhaps you began to impetuous, to this time what also past months, if the results are not inevitable impatient.    Well, if that's the case, what should you do? Look at the spec again, look at the whole drive again, and repeat what you've done before. This time you will never see the same again. What you have to learn at this time is, persistence, endurance ... .....

Finally, I want to introduce you to my own good information, you can refer to. Like a friend in Fudan wrote Linux that Thing (in the appendix, everyone too trouble can come to me to download linux things I am a U disk. pdf ), LDD3, the best information is the source code.

Need information friends can give a message, I can send to you, I have a pile of information in the library, I like to see the electronic version, so if you and I like to see electronic books, I am happy to dedicate Oh ~ ~

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.