Introduction to Linux device driver Development (based on the latest 4.0 cores)

Source: Internet
Author: User

Linux has never stopped. Linus Torvalds, one of the world's greatest programmers, the founder of the Linux kernel, the creator of Git, is still merging patches all night and night, upgrading the kernel. Do technology, never straight path, spell is the stupidity peculiar of the bench.

This is a time when even the reading is fragmented, in such an era, people tend to be radical and impetuous. The inner peace of mind makes it extremely difficult for us to study what. I've seen a lot of Linux engineers whose resumes are written "proficient" Linux kernels with years of experience, while their "mastery" is simply changing a register from 0 to 1, from 1 to 0. I've seen tons of Linux engineers who have been working all day, Banging on their machines and boards, but never calmly thinking, and constantly reconstructing and sublimation of their knowledge system.

This is the programmer who is going to sit on the bottom of the cage. This "busy" programmer is never a good programmer.

Excellent programmers, the best quality is to be able to learn and think in peace of mind, dialysis code behind the structure, principles and design ideas. No thought of the code is garbage code, no thought of programmers, just in the completion of low-level repetitive construction of physical activity. A lot of programmers, even their own code to write the last in the machine how to run never ask, a lot of things inexplicably happened, a lot of bugs disappeared somehow ... It's always a muddle.

Thus, the first starting point of the new version of Linux device-driven development is to give readers more explanations on the ideas behind Linux development and lay the groundwork. Linux device driver Development (based on the 4.0 kernel) presented to the reader, more is a kind of thinking, rather than a simple list of knowledge points.

This update further reinforces the underlying mechanism of the Linux kernel involved in driver programming, and makes a large-scale rewrite of the first 2 versions of the basic theory section, and the case code is also heavily reconstructed. Significantly modified content includes interrupts, timers, process lifecycles, uevent, concurrency, compile chaos, execution chaos, wait queues, I/O models, memory management, and more. These points of knowledge are so important that they are the ones that really prove the programmer's understanding of Linux, and only when they are well grounded.

The new version removed the "Linux device Driver Development detailed" version of the first edition, the second edition of a large number of specific specific drive types of chapters such as sound, PCI, MTD, TTY, etc., and shifted more focus to the kernel behind the driver programming principle, And try to find out the internal law from hundreds of drive subsystem of Linux kernel, in order to cultivate the reader's extrapolate ability.

The Linux kernel has hundreds of drive subsystems, which can be seen from the drivers subdirectory of the kernel:


Well, a fool will be a directory to see a directory, a directory of a directory to learn from the beginning. We are bound to look for a variety of drive subsystem commonality, groping law. In this update, we will see more of each driver subsystem analogy, as well as the hierarchical design of the drive subsystem.

Technical work, never once and for all. The world is changing too fast, and the pace of technological innovation is now several times as long as the grandparents of our fathers and grandfathers passed by. It's time to prove you're a real fan or a fake fan. This is the pseudo-programmer of hell, but also the real programmer pain in the carnival.

From a vast knowledge system, constantly updated software version of lifelong learning, and constantly overcome a challenge, access to new nutrients, looking for new inspiration, this is really a dark code in the life of the brilliant light of the continuous flashing.

Since the first and second editions of this book have been released, the kernel version has been refreshed, 3.0, 3.1, 3.2 ... 3.19, 4.0, 4.1, the change is the software architecture, unchanged is the enthusiasm of Linus.

This is undoubtedly the second starting point for this upgrade, updating the knowledge system of Linux-driven programming to match the latest era. So, this update has a lot of new additions to device Tree, ARM Linux porting, Linux power Management, GPIO, clock, timer, PINMUX, DMA, and more. Our operating platform, also transferred to the QEMU simulation of the 4-core CORTEX-A9 circuit board, the book of examples, the basic transfer to the popular new chips on the market.

For the last two or three years, many programmers have complained about the lack of information about the new kernel and the lack of information about device tree from beginning to end, but I would say that this is really not a difficult point. The difficulty is still the first point of the book to solve the problem, if there is a good foundation, with excellent programmers strong learning ability, should be able to grasp these new knowledge quickly. The mechanism has not changed, but the change is only the strategy.

So learning ability, but also a good programmer of another quality. No life down is a genius, good learning ability training, itself is through continuous learning to obtain. It can be said that the more students learn, learn new things must be faster, learning ability has become stronger. Because there is too much commonality of knowledge.

Readers read the idea of this book, should not be an attempt to think of it as a reference book, search API books, but a comb the complete theoretical system, development ideas, software architecture book. Only in this way can we adapt to new changes in the future.

Unconsciously, the first publication from the book has been in the past seven years. Since the beginning of the implementation of this update, but also after a round of cold and cold replacement. Years, such as song, seven, I have not been the former youth. This book, version two, reprint, this is not originally expected. Looking back, we were amazed to find that this seven-year period is exactly the seven years that Linux was untrammelled by the weak and prosperous. is also a lot as I general code farming, married and have children seven years. What Linux will look like in the next seven years is beyond our wildest expectations. Whether there will be a further version of this book, we can not predict, as Linux does not have a road map. Community and Ecology is the best roadmap, everything, and the only constant is passion.

The rolling wheels of the era drive the Linux kernel's version to move forward and drive everyone's life. The Red dust rolling,

I don't want to be successful,

Now that you've chosen a distance,

Only to the trials and hardships.

Finally, this book can be published, thanks to lead my life mentor and my many small partners, they either changed me at the critical moment of my life, or brought me endless joy and motivation in the dark process of my career. My little friends, they have the strength of me, encourage me, also insult me, ridicule me, these are sincere friendship.

With this book, I extend to Mr. Yangpyeong, Ho Zhaojan, Fang Yiwei, Li Huayi, Ji, Du Changlong, Ye Xiangzhen, Liu Hao, Wang Yu, Zoje, Zeng, Lau Wing, Zhi Binghua, Zhang Junyi, Wang Wenqi, Lupeng, Liu Tao, Xu Xining, Wu He, Ning, Qinrontin, Huliangbing, Zhang Jiawan, Wang Lei, Bryan Wu, Eric Miao, Qipan Li, guoying Zhang, Jiansong Chen, the veterans, Haoyu Zhong, Liu Hongtao, Tiju, Shange, Sunzhizhong, Wu Guoju, Bob Liu, Goo, He Yafeng, Liu Shijie, Hao Yin and other teachers and small partners deeply grateful With this book, I extend to my parents, wife, elder brother and sister, great Mother deeply grateful, this book new version of the writing time more than a year, the process is a huge physical and mental torture, without their silent support and continuous spur, is impossible to complete; with this book, To the book to make a great contribution to the editor, planning teachers, especially Zhang Guoqiang teacher deeply grateful!

Because of the length of the relationship, I have no way to list all the people I am grateful to the list of thanks. But what I have gained from you over the years is far greater than what I have paid. So, deep inside, only with a deep gratitude to the small partners, continue to move forward. The years are like songs, my song is crazy.

Song Baohua

April 2015 in Pudong, Shanghai

Introduction to Linux device driver Development (based on the latest 4.0 cores)

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.