Linux driver development focuses on content-from "embedded Linux driver template overview and project practices", embedded driver development
This article is excerpted from my lecture on Embedded Linux driver templates and project practices.
Initially, it seems that the development of Linux Device Drivers involves a lot of content, and the devices that need to implement drivers are very different. In fact, after a while, the main reasons for driver development are as follows:
(1) classify the drivers, first classify them into which type of drivers, and use the subsystems provided by the kernel for development, we often find that many common things have already been done by the kernel. A good driver engineer should make the best use of the kernel resources. After all, the kernel has achieved high stability and portability.
(2) Find the sub-system provided by the kernel, and then make a representation of the sub-system provided for this type of device, that is, to describe the structure of this type of driver, define the struct to initialize the required data, and call the interface functions provided by the kernel subsystem to submit them to the kernel management. This is a strategic process for most driver development.
(3) identify what the subsystem has done and what needs to be implemented in its own driver. The common practice is to find a close driver for modification, rather than writing a line of code. Finding a similar driver routine in the kernel is a good and fast method. These routines basically provide how to use the interface and call the process.
(4) The above are basically related to the kernel interface, and the second driver involves the chip manual, which is consistent with other embedded software, therefore, this part is a strong point for developers who turn from single-chip microcomputer software development or other operating system software development to Linux driver development.
(5) another driver is the protocol. Various embedded bus protocols, from simple SPI to complex PCI or USB, etc. The basic knowledge of the Protocol needs to be mastered, and various common protocols are provided in the form of subsystems. Most common tasks are done in subsystems, which greatly reduces the workload for development.
Therefore, an important aspect of learning to drive development is to learn the kernel and be familiar with the Organization and Thinking Modes of the kernel. Therefore, it is necessary to summarize its ideas.
How familiar is the driver for Embedded linux driver development?
Hello, landlord:
I can give some insights. I have been training and have been working in this industry for nearly a year. Different companies have different admission rules for your questions, and there is no definite rule. I had such troubles before I got my first job. I want to help you with my thoughts.
If you are interviewing as a junior driver, you only need to be familiar with some important drivers, such as I2C and SPI, and have done small projects with such drivers, do your homework based on the company's supply occupation demands. This phase is more professional learning-driven after entry.
If you have many years of experience as a senior engineer, you will naturally be familiar with most drivers, such as USB, Nic, and storage devices.
For the driver framework, you must understand and be very familiar with the framework so that you can fill in the corresponding driver to implement its function. This is more important when you are looking for a job in an interview, but I think it is easy to master as long as you study the driver code carefully. The key is confidence and perseverance.
"To what extent do I need to configure and compile the driver ?" This is a concern of enterprises and companies. It cares about the product market. To what extent, you must implement the basic functions well, if you have plenty of time, try to optimize your code so that the driver consumes less resources, saves power, and delivers better data transmission.
The above are my personal opinions. I wish you success!
Can I download the embedded Linux driver and system development instance?
For more information, see book.knowsky.com/book_32428.htm.