Search for device overview in Linux

Source: Internet
Author: User

In Linux, find the device overview in Linux, and find out which modules are required. To find a driver that has been bound to a device, follow these steps: www.2cto.com 1. Find the file corresponding to the device in the sysfs class folder. For example, network devices are listed in/sys/class/net, and tty devices are listed in/sys/class/tty. The search for other devices is similar. 2. Track sysfs to find the module name that controls the device. It is usually displayed in/sys/class/class_name/device_name/device/driver/module and can be displayed using readlink and basename programs. $ Basename 'readlink/sys/class/class_name/device_name/device/driver/module' // do not use */module/; otherwise, the error readlink reads the actual file name in the soft connection. Www.2cto.com $ ln-s reallyname softlink $ readlink softlink gets reallyname3. Use find and grep to find the fields prefixed with CONFIG _ used to build the module in the kernel Makefile. $ Find-type f-name Makefile | xargs grep module_name4. Search for this value in the kernel Configuration System and start the driver at the corresponding position in the menu.

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.