常见挂载命令如下: lsmod查看某个模块是否安装,比如8723的模块wlan.ko root@imx6qsabresd:~# lsmod | grep "wlan" wlan 1298093 0 root@imx6qsabresd:~# lsmod Module Size Used by wlan 1298093 0 mxc_dcic 6544 0 modinfo 显示模块信息 root@imx6qsabresd:~# modinfo wlan filename: /lib/modules/4.1.15-dirty/kernel/drivers/net/wireless/rtl8723bu/wlan.ko version: v5.2.17.1_26947.20180307_COEX20180201-6f52 author: Realtek Semiconductor Corp. description: Realtek Wireless Lan Driver license: GPL srcversion: A521C177A5CC6BD34703563 alias: usb:v0BDApB720d*dc*dsc*dp*icFFiscFFipFFin* depends: intree: Y vermagic: 4.1.15-dirty SMP preempt mod_unload modversions ARMv7 p2v8 parm: rtw_ips_mode:The default IPS mode (int) parm: rtw_lps_level:The default LPS level (int) ... ...(内容较多,此处省略) rmmod 卸载模块,但是内核会认为卸载模块不安全,可以添加命令强制卸载。 root@imx6qsabresd:~# rmmod wlan.ko [ 1510.613435] usbcore: deregistering inte**ce driver rtl8723bu insmod 加载模块,需要指定完整的路径和模块名字 模块依赖及路径信息,这样子才可以成功加载需要模块。查看模块依赖关系可用modinfo查看 root@imx6qsabresd:~# insmod /lib/modules/wlan.ko [ 1670.739544] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready [ 1670.747868] usbcore: registered new inte**ce driver rtl8723bu 编译内核后加载板子自带的wlan.ko可能报错,例如 root@imx6qsabresd:/lib/modules# insmod wlan.ko [683971.524736] wlan: disagrees about version of symbol skb_pull [683971.530524] wlan: Unknown symbol skb_pull (err -22) [683971.536521] wlan: disagrees about version of symbol netif_napi_del [683971.542819] wlan: Unknown symbol netif_napi_del (err -22) [683971.548497] wlan: disagrees about version of symbol __cfg80211_alloc_event_skb [683971.555863] wlan: Unknown symbol __cfg80211_alloc_event_skb (err -22) [683971.562431] wlan: disagrees about version of symbol wiphy_register [683971.568981] wlan: Unknown symbol wiphy_register (err -22) [683971.574580] wlan: disagrees about version of symbol nla_put ... ...(内容较多,此处省略) 是由于重新编译了内核,而内核模块没有重新编译,导致无法找到一些模块的标志。 解决方法: 重新编译一遍内核模块,保持与当前板子上的内核版本一致即可。 |
|小黑屋| 飞凌嵌入式 ( 冀ICP备12004394号-1 )
GMT+8, 2024-12-22 19:07
Powered by Discuz! X3.4
© 2001-2013 Comsenz Inc.