Differences between Insmod and modprobe and their usage
(the 2013-01-04 14:55:03)
The reproduced ▼
tag: insmod modprobe driver load driver repeat load insmod and modprobe area hash | category: embedded Linux |
There was a problem loading the SD card driver into the development board
/ $ modprobe hi_mci
mmc_core: exports duplicate symbol mmc_detect_change (owned by kernel)
Insmod: always insert a `/lib/modules/2.6.24 – rt1 – hi3515v100/kernel/drivers/MMC/cor
e/mmc_core.ko’: Invalid module format (-1): Exec format error
modprobe: failed to load module hi_mci
Mmc_core loads modules twice (once manually and once automatically for the kernel);
The cause of the problem has been found for a long time, and will be manually loaded later
Modprobe hi_mci was changed to insmod
Later, the relationship between modprobe and Insmod was analyzed. The reason for the error is that although both modprobe and Insmod commands can load the module, modprobe is relatively intelligent. When you use modprobe to load the module, the system will load other modules according to the dependency of the module (that is, other modules that the module depends on). As a result, the MMC_core module was loaded twice. With insmod, the system loads only one specific module, the one we want to load
Hi_mci.ko, so no more error, error resolved.
The difference between modprobe and Insmod is as follows:
(The following is excerpted from online sources)
On Linux, both modprobe and Insmod can be used to load modules, but modprobe is now generally recommended instead of Insmod.
What’s the difference between modprobe and Insmod?
1. Modprobe can solve the load module dependencies, such as the load moudleA must first load mouduleB, such as it is through the/lib/modules// modules. Dep files to find the dependencies. Insmod doesn’t solve the dependency problem.
2. Modprobe looks for modules by default under /lib/modules//, and Insmod only looks for modules in the arguments given to it (by default, in the current directory). Sometimes, insmod has its USES, for example.
Have/root/my – mod. Ko this module, CD/root /, and then use insmod my – mod. Ko (insmod/root/my – mod. Ko) can insert the module, but with modprobe my – mod. Ko (modprobe/root/my – mod. Ko) does suggest “FATAL: Ko not found”. This is because modprobe is looking for /lib/modules/ ‘uname-r’/to find Module.
Linux device drivers can be loaded in two ways, insmod and modprobe, let’s talk about the differences in their usage.
1, insmod can only load a specific device driver at a time, and the specific address of the driver is required.
insmod drv.ko
2. Modprobe can load all the dependent drivers into the kernel at one time. The address of the driver is not added, but the driver module needs to be installed as make modues_install when installing the file system. Drivers are installed in /lib/ Modules /$(uname -r)/… Under.
modprob DRV
—
modprobe and insmod are used to load the kernel module
but modprobe is more intelligent, it can be based on the module dependency to automatically load for you;
and insmod can’t do that.
— — — — — — — — — — — — — separation line — — — — — — — — — — — — — — — — — —
for example USES ipmitool this tool need to exist in the dev/ipmi0 equipment, if not you need to load the
modprobe ipmi_si
modprobe ipmi_devintf
Read data from the local KCS interface using -i open for example
ipmitol-i open sensor
You want to uninstall modules. Use the rmmod
(the 2013-01-04 14:55:03)
The reproduced ▼
tag: insmod modprobe driver load driver repeat load insmod and modprobe area hash | category: embedded Linux |
There was a problem loading the SD card driver into the development board
/ $ modprobe hi_mci
mmc_core: exports duplicate symbol mmc_detect_change (owned by kernel)
Insmod: always insert a `/lib/modules/2.6.24 – rt1 – hi3515v100/kernel/drivers/MMC/cor
e/mmc_core.ko’: Invalid module format (-1): Exec format error
modprobe: failed to load module hi_mci
Mmc_core loads modules twice (once manually and once automatically for the kernel);
The cause of the problem has been found for a long time, and will be manually loaded later
Modprobe hi_mci was changed to insmod
Later, the relationship between modprobe and Insmod was analyzed. The reason for the error is that although both modprobe and Insmod commands can load the module, modprobe is relatively intelligent. When you use modprobe to load the module, the system will load other modules according to the dependency of the module (that is, other modules that the module depends on). As a result, the MMC_core module was loaded twice. With insmod, the system loads only one specific module, the one we want to load
Hi_mci.ko, so no more error, error resolved.
The difference between modprobe and Insmod is as follows:
(The following is excerpted from online sources)
On Linux, both modprobe and Insmod can be used to load modules, but modprobe is now generally recommended instead of Insmod.
What’s the difference between modprobe and Insmod?
1. Modprobe can solve the load module dependencies, such as the load moudleA must first load mouduleB, such as it is through the/lib/modules// modules. Dep files to find the dependencies. Insmod doesn’t solve the dependency problem.
2. Modprobe looks for modules by default under /lib/modules//, and Insmod only looks for modules in the arguments given to it (by default, in the current directory). Sometimes, insmod has its USES, for example.
Have/root/my – mod. Ko this module, CD/root /, and then use insmod my – mod. Ko (insmod/root/my – mod. Ko) can insert the module, but with modprobe my – mod. Ko (modprobe/root/my – mod. Ko) does suggest “FATAL: Ko not found”. This is because modprobe is looking for /lib/modules/ ‘uname-r’/to find Module.
Linux device drivers can be loaded in two ways, insmod and modprobe, let’s talk about the differences in their usage.
1, insmod can only load a specific device driver at a time, and the specific address of the driver is required.
insmod drv.ko
2. Modprobe can load all the dependent drivers into the kernel at one time. The address of the driver is not added, but the driver module needs to be installed as make modues_install when installing the file system. Drivers are installed in /lib/ Modules /$(uname -r)/… Under.
modprob DRV
—
modprobe and insmod are used to load the kernel module
but modprobe is more intelligent, it can be based on the module dependency to automatically load for you;
and insmod can’t do that.
— — — — — — — — — — — — — separation line — — — — — — — — — — — — — — — — — —
for example USES ipmitool this tool need to exist in the dev/ipmi0 equipment, if not you need to load the
modprobe ipmi_si
modprobe ipmi_devintf
Read data from the local KCS interface using -i open for example
ipmitol-i open sensor
You want to uninstall modules. Use the rmmod
Read More:
- The usage and difference of atoi() and stoi() functions in C + +
- VirtualBox installation enhancement error “modprobe vboxguest failed”
- insmod: init_module ‘hello.ko’ failed (Exec format error)
- The difference between classnotfoundexception and NoClassDefFoundError
- C#: Analysis of the difference between write() and writeline()
- Difference between vs code user and system version
- The difference between LSTM and Gru
- The difference between problem and observables
- The difference between onready or $() and onload
- The difference between sleep() and wait() in Java
- Difference between getelementsbyname and getelementbyid
- The difference of. Pt,. PTH,. Pkl and the way to save the model
- Principle and usage of feof ()
- Usage of Python dropout
- Node.js Medium package.json The difference between devdependences and dependencies
- The difference between hive and relational database
- Parsing the difference between “R” and “RB” patterns of text files (Python)
- The difference between “?” and “?:” introduced by php7
- Visio2007 usage record
- Yield usage in Python