Module cannot be rmmod after insmod

Publisher:真情相伴Latest update time:2024-07-24 Source: elecfansKeywords:module  insmod Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1. First, ensure that the make menuconfig option is configured:

[*] Enable loadable module support  --->

[*]   Module unloading

2. The modules directory and the corresponding kernel version directory (mine is 3.8.0) are missing under lib, and the prompt is:

rmmod: chdir(/lib/modules): No such file or directory

Solution:


: ls hello.ko

hello.ko

: ls lib/

ld-uClibc-0.9.32.so libdl.so.0 libnsl.so.0 librt.so.0

ld-uClibc.so.0 libgcc_s.so libpthread-0.9.32.so libuClibc-0.9.32.so

libc.so.0             libgcc_s.so.1         libpthread.so.0       libutil-0.9.32.so

libcrypt-0.9.32.so libm-0.9.32.so libresolv-0.9.32.so libutil.so.0

libcrypt.so.0 libm.so.0 libresolv.so.0

libdl-0.9.32.so       libnsl-0.9.32.so      librt-0.9.32.so

:insmod hello.ko

:lsmod

hello 521 0 - Live0xbf014000

:rmmod hello // failed

rmmod:chdir(/lib/modules): No such file or directory

:mkdir -p lib/modules/3.8.0 //Create the corresponding directory

:lsmod

hello 521 0 - Live0xbf014000

:rmmod hello // Success

:


Keywords:module  insmod Reference address:Module cannot be rmmod after insmod

Previous article:FL2440 driver added (2): RTC (Real time clock)
Next article:FL2440 driver addition (3) LCD driver addition study notes

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号