Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the depmod command in Linux

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces how to use the depmod command in Linux, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, let the editor take you to understand it.

The common Linux command depmod can generate the mapping file that the module depends on. When building an embedded system, this command is needed to generate the corresponding file, which is used by modprobe.

Depmod Analysis of the dependence of loadable Modules

Syntax depmod (option) option-an or-- all: analyze all available modules;-d or debug: execute debug mode;-e: output symbols that cannot be referenced;-I: do not check the version of the symbol table;-m or system-map: use the specified symbol table file;-s or-- system-log: log errors in the system record;-v or-- verbose: display detailed information during execution -V or-- version: displays version information;-- help: displays help. Instance depmod-b / home/windsome/EMMA3PF-KernelSource-20080626/install_pos-e-F. / boot/System.map-v 2.6.18_pro500-bcm91250-mips2_fp_be-A-a/home/windsome/EMMA3PF-KernelSource-20080626/install_pos is the storage path of all modules after my make mod_install.

. / boot/System.map is generated after make linux and I copied it to this directory.

2.6.18_pro500-bcm91250-mips2_fp_be is the linux version of my build.

Examples of compiling linux procedures and executing depmod:

Genkernel.sh (at linux-2.6.18_pro500) # export INSTALL_ROOT_EMMA3PF= "/ home/windsome/EMMA3PF-KernelSource-20080626/install_pos" export INSTALL_MOD_EMMA3PF= "/ home/windsome/EMMA3PF-KernelSource-20080626/install_pos" rm / home/windsome/EMMA3PF-KernelSource-20080626/install_pos/lib-rf rm / home/windsome/EMMA3PF-KernelSource-20080626/install_pos/boot/*-rf cd make make modules_install cp vmlinux System.map / Home/windsome/EMMA3PF-KernelSource-20080626/install_pos/boot/-p cd / home/windsome/EMMA3PF-KernelSource-20080626/install_pos depmod-b / home/windsome/EMMA3PF-KernelSource-20080626/install_pos-e-F. / boot/System.map-v 2.6.18_pro500-bcm91250-mips2_fp_be-A-an other uses:

In the linux desktop system, when you compile a new driver, in order to be able to load the module with modprobe, you need to copy the module to the / lib/modules / 2.6.31-20-generic directory, and then run sudo depmod-a to write the module information to the modules.dep, modules.dep.bin, modules.alias.bin, modules.alias and modules.pcimap files.

For example, I compiled a new wifi driver r8192se_pci.ko, copied it to / lib/modules/2.6.31-20-generic/wireless, then ran depmod-a to / lib/modules/2.6.31-20-generic, and then I could run modprobe r8192se_pci in any directory.

Thank you for reading this article carefully. I hope the article "how to use depmod commands in Linux" shared by the editor will be helpful to everyone. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report