Some necessary steps for Linux-driven Development learning

Source: Internet
Author: User

1. Learn to write simple makefile

2. Compile an application that can run with makefile

3. Learn to write driven makefile

4. Write a simple char drive, makefile compile through, can Insmod, Lsmod, Rmmod. Print Hello World in the init function of the driver, Insmod should be able to see the output through DMESG.

5. Write a complete driver, plus read, write, IOCTL, polling and other functions of the drive implementation. The implementation of transferring the structure from user space to kernel space is done in the IOCTL.

6. Write a block drive, plus a variety of functions such as read,write,ioctl,poll implementation.

7. Simple learning under memory management, this is the most difficult, understand the various memory alloc function implementation details. This is the basic skill of Linux development.

8. Learn the application of lock mechanism, this is not the most difficult but the most error-prone, involving a lot of synchronization and concurrency problems.

9. Look at the driver code that is actually applied in the kernel. You will find the most basic you already know, the big frame is the same, nothing but the implementation of read, write, IOCTL and other functions, but it contains a lot of small implementation details are not known before. It's time to consider a lot of other issues rather than just the implementation of basic functions. Recommended you see 2.6.20 in integrated of a driver KVM, remember is under the driver/lguest, very fun, is Linux under the virtual machine driver, code is not long, but powerful. Capable of writing an operating system on its own. Disk mirroring is loaded into the virtual machine as required, and the client can have its own 4G virtual address space.

10. Read the driver welcome you into the Linux kernel learning. The simplest way, follow ldd (Linux devive driver) to do it again.

Learning Linux Drive Development is a very long process, some people can wind waves, some people can only quit, I do not know what kind of person I am, just know that I am engaged in the work is a Linux drive work, and the work is not very easy, and not to my previous imagination so simple, And my ideals and goals may be postponed backwards. But I am also very fortunate, because I still have time, know oneself future road should how to go.
For my personal ability, I think that is not a qualified engineer, as if now the engineer as a driver, full street is an engineer, not a few can and their name true symmetry, so I also understand what I am doing now, what should be done, I am a once the goal is determined, will continue to go, So the only thing I can do now is to work hard and try again. Well, there's not much to say. In order to avoid some just contact people detours, I will be how to go into such an industry, and you should have what knowledge, you should walk step by step, etc. introduced to everyone,

First of all, learning Linux driver Development (2.4 and 2.6), really is a very general concept, that is how we should learn.
1, first of all you should be a computer professional students, because in college, there are a lot of basic courses (we say that the garbage class) are very important to drive learning courses, so we have to learn the basics, that is, we study in the University of each course is useful, want to become a real master, Must have the basic knowledge. For example: C language, assembly language, data structure, computer system structure, operating system, microcomputer principle, several points, mold electricity, and so on, in short, to learn these, only so you can move forward to drive the door, and not just when a patchwork of people (this sentence has been driven by the development of the people, You can understand what I mean. If it's not a computer professional, then you'll have to fill it up slowly ...

2 Next, we should take C language learning to mastery in mastery. That should be how to learn C to proficient in mastery, well, you just have to understand the five books, there is no problem.
1 the.c.programming.language.2nd.edition
2 C Language Interface and implementation--the technology of creating reusable software
3 C Traps and defects
4 C Language Reference manual fifth edition
5 C Expert Programming

3 When you have the above content, you can learn Linux. Well, I'll introduce you to the process of how to learn Linux. First you should use a period of time to learn the basics, including basic commands, service configuration, file system introduction. There is the operation of Linux, to achieve proficiency, it is easy to say that the Linux system will be used. Of course, this is only a beginning, the previous period of study not more than two months of time, fast words one months is enough. Well, focus on learning something, vi,gcc,gdb,shell,makefile learning and using, compiling a simple C program. To know that C is used in different environments is not the same, so we do not practice in Windows, to continue to do these things in Linux. This learning process also takes 2 months, we need to learn more about makefile and shell, before this study to learn slower, laying the groundwork to be a bit firmer.

More than 4 of the content you have mastered, the next step is to really enter the application layer of development. Because I am engaged in network development, so I can only give you a description of how to enter the network development ranks. First of all, you should learn the basics of the network, which is also very important oh. Including, the Computer Network Foundation, the TCP/IP study and so on, next you should buy two book, is about the Linux process development and the socket Development book. The process of learning is long. It's going to be a half year, at least.
Well, because of the time, today first write here, the next time will be driving the real learning to introduce. Don't worry, because these are enough for you to study for a while.

Some necessary steps for Linux-driven Development learning

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.