Detailed Description: loading the flash Driver to the project in the Linux operating system

Source: Internet
Author: User

Many people are learning to enrich themselves. Recently, all of their friends are learning the Linux operating system and have encountered many problems with the Linux operating system, for example, what should I do if I want to load a flash Driver I wrote into the project and select the driver when I configure the kernel through menuconfig? It can be divided into three steps:

1. Add the flashtest. c file you wrote to the/driver/mtd/maps/directory.

2. Modify the kconfig document in the/driver/mtd/maps directory:

ConfigMTD_flashtest

Tristate "ap71flash"

Third, modify the makefile document in this directory.

Add the following content: obj-$ (CONFIG_MTD_flashtest) + = flashtest. o. When you run makemenucofnig, you will find the ap71flash option, if you have selected this option. This option is saved in the. config document. When you compile the kernel, it will read. config file. If the ap71flash option is yes, when the makefile under/driver/mtd/maps/is called, The flashtest. o is added to the kernel. To achieve your purpose.

After the driver module is loaded, create a node in the dev directory. The command is as follows:

Mknodint_ctlc980

Int_ctl indicates the device name, C indicates the character device, 98 indicates the master device number, and 0 indicates the slave device number.

Cat/proc/interrupts

Cat/proc/devices

In this way, the flash Driver is loaded into the project in the Linux operating system.

  1. Linux UNIX system learning experience
  2. Simple Theory Linux ReiserFS system analysis features and results
  3. Introduction to Linux software installation
  4. Hands-on manual: Restore Linux passwords
  5. Learn how to check whether the email system is successfully installed in Linux

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.