Linux driver Kernel configuration

Source: Internet
Author: User
Tags dmesg
Linux driver Kernel configuration-Linux general technology-Linux programming and kernel information. The following is a detailed description. Obtain the simple_new.zip file.
Download to the local device and decompress the package:
Unzip simple_new.zip

1) Prepare the compilation environment:
Cd/usr/src/linux-2.6.9-11.19WS
Make menuconfig
Exit (right-click and select exit, and press Enter)
Save the Configuration
Make modules (ctrc + c compilation is not completed)

2) Compile the device driver
Cd/home/simple_new (directory where the file is extracted)

Make modules (get simple. ko)
Dmesg (view the device number major of the simple device, assuming it is 254)
Insmod simple. ko
Mknod/dev/simple c 254 0 (254 of which is shown in dmesg above)
3) Compile user operation functions

Cd/home/user

Make all
Get the executable program main
./Main
Observe printed information
Dmesg
Observe output results

4) analyze the driver and user program running
~
~
~
Search for the simple_new.zip package on the Internet.
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.