Linux driven Learning Driver development readiness

Source: Internet
Author: User

First, open the road of driving development

1, the preparation of driving development

(1) The Development Board of the normal running Linux system. The zimage of Linux in the Development Board must be compiled by itself and not compiled by others. The reason is that security checks are performed when the module is installed

(2) kernel source tree, in fact, is a configuration after the compilation of the kernel source code. We need the kernel source to compile our own modules

(3) NFS Mount Rootfs, host Ubuntu must build an NFS server. This is essential for driving development upfront and can improve our development efficiency.

2, drive the development of the steps

(1) Drive source code writing, makefile writing, compiling

(2) Insmod loading module, test, Rmmod unloading module

3. Practice

(1) Copy the original provided x210kernel.tar.bz2, find a clean directory (/root/driver), unzip it, and configure the compilation. After the compilation has been completed: 1, the kernel source tree. 2, compile OK zimage

(2) FastBoot The 1th step of the zimage burned to the Development Board to start (or throw zimage to tftp shared directory, uboot start tftp download start), in the future after the driver is compiled, you can test in this kernel

Try. Because this zimage and the kernel source tree is a bunch of, so the driver installs the version check does not have the error.

I generally choose to use TFTP to download the zimage image file in the host server-side shared directory after uboot boot, instead of burning the zimage image file directly into Flash, because we may be in the process of developing the driver

The kernel will be re-configured to compile, and then let the development Board to start the newly compiled kernel image file, if this repeated burning flash is more troublesome, not high efficiency.

Reference: "Zhu Youpeng embedded Linux Development \5.linux Driver Development \5.2. Character Device driver Basics"

Linux driven Learning Driver development readiness

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.