Current location - Education and Training Encyclopedia - Education and training - How to learn the development and solution of embedded Linux driver
How to learn the development and solution of embedded Linux driver
2. Create an application that can run makefile.

3. Learn to write a driven makefile

4. Write a simple char driver. makefile has been compiled. It can be insmod, lsmod, rmmod. After printing Hello World in the init function of the driver, you should be able to see the output through dmesg.

5. Write a complete drive A, plus various functions realized by the drive, such as reading, writing, ioctl and polling. The structural transformation from user space to kernel space is completed in ioctl.

6. Write a block driver, plus read, write, ioctl, poll and other functions.

7. Simply learn the most difficult memory management and understand the implementation details of various memory alloc functions. This is the basic skill of linux development.

8. Learn the application of locking mechanism, which is not the most difficult but also the most error-prone, involving many synchronization and concurrency problems.

9. Look at the driver code actually applied in the kernel. You will find that you already know that the most basic and large frameworks are the same, which are nothing more than the implementation of functions such as read, write and ioctl, but contain many, many small implementation details that you didn't know before. At this time, many other issues should be considered, not just the realization of basic functions. For example, Lingyang Education Embedded linux Training Course Phase IV: The learning of embedded microprocessor and Linux device driver development is mainly through the development of three simple learning drivers: ARM hardware interface principle, embedded Linux device driver development and embedded Linux advanced driver design. Let students be familiar with the kernel mechanism of Linux, the interface between drivers and user-level applications, and master the concurrent operation of devices by the system.