当前位置:网站首页>21 openwrt kernel module changed to.Ko automatic loading
21 openwrt kernel module changed to.Ko automatic loading
2022-07-28 04:19:00 【Creator_ Ly】
openwrt There are many open source kernel modules located in package/kernel/ Next , Such as gpio-button-hotplug、mwlwifi etc. . These modules are after the file system starts , adopt autoload By insmod Loaded .
1、 Normal thinking
stay 《Openwrt add function module to package》 There are introductions in the chapter , How to add a kernel module .
The above introduction is to add a kernel Application module , And compile it into .ko Automatically loaded . If it is the module code already in the kernel , How to change it into .ko Automatically load .
There was a problem during debugging , The kernel phy Sent hotplug Premature event , This event has been issued before the file system is started , This applies to /etc/hotplug.d/phy/ The following script cannot be executed to , Cause state judgment problems .
Normal thinking ,make kernel_menuconfig take phy The configuration of is changed to m
-CONFIG_MT753X_GSW=y
+CONFIG_MT753X_GSW=m
After this modification , The module confirmation of the discovery kernel is compiled into mt753x.ko 了 , But no one will change ko Copy to the file system , In this way, there is no way to automatically load .
2、 Revise the plan
Found behind openwrt This integration method already exists , be located package/kernel/linux/modules/ Next .
stay 19.07/package/kernel/linux/modules/netdevices.mk Inside , Add the following information .
With adding a kernel package similar , Appoint ko The path of FILES, Then set the AUTOLOAD Start sequence value of .
define KernelPackage/switch-mt753x
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=MediaTek MT753x switch support
DEPENDS:=+kmod-switch-mt753x
KCONFIG:=CONFIG_MT753X_GSW
FILES:=$(LINUX_DIR)/drivers/net/phy/mtk/mt753x/mt753x.ko
AUTOLOAD:=$(call AutoLoad,43,mt753x)
endef
define KernelPackage/switch-mt753x/description
MediaTek MT753x switch support
endef
$(eval $(call KernelPackage,switch-mt753x))
After adding configuration options ,make menuconfig take switch-mt753x Module check , take make kernel_menuconfig Inside MT753X_GSW=n Uncheck it .
边栏推荐
- Campus stray cat information recording and sharing applet source code
- Kingbasees Security Guide for Jincang database -- 5.1. database transmission security
- Information system project manager (2022) - key content: Strategic Management (17)
- Information system project manager (2022) - key content: Knowledge Management (15)
- CANopen learning notes
- Power consumption: leakage power
- 【无标题】
- Applet form-2
- Machine learning 07: Bayesian learning
- 写给学生的一点建议-如何构建自己的知识体系?
猜你喜欢
![[coding and decoding] Huffman coding and decoding based on Matlab GUI [including Matlab source code 1976]](/img/af/27e3794f93166d8ecad9b42dafaf0f.png)
[coding and decoding] Huffman coding and decoding based on Matlab GUI [including Matlab source code 1976]

【无标题】

idea启动项目mvn命令终端用不了法将“mvn”项识别为 cmdlet

ftp服务器、nfs服务器的搭建和使用

Information system project manager (2022) - key content: information system integrated testing and management, project management maturity model, quantitative project management (21)

H265/HEVC名词解释-- CTU,CTB,CU,CB,TU,PU,TB,PB,LCU,Slice,Tile,Chroma,Luma,I帧,B帧,P帧

【day03】流程控制语句

What is interface testing and its testing process

Learn regular expressions (regexp)

XML file usage and parsing
随机推荐
金仓数据库KingbaseES安全指南--4 数据访问保护
cookie与Session
Fearless of side impact damage, Chery arize 8 fully protects the safety of passengers
.net upload files through boundary
月薪28K学员 自动化测试经验分享
I did these three things before the interview, and the result was actually direct
Un7.27: common commands of redis database.
Detailed explanation of string + memory function (C language)
Glusterfs file is not mounted, permission: R-S
[mathematical modeling] Based on MATLAB seismic exploration Marmousi model [including Matlab source code, 1977]
Regression - linear regression
Information system project manager (2022) - key content: information system integrated testing and management, project management maturity model, quantitative project management (21)
Virtual machine class loading mechanism
RN interface jump description
[untitled]
ServletContext、request、response
idea2022更改本地仓库,配置阿里云中央仓库
STC timer is abnormal (how to modify the initial value, the timing time is 100ms)
Applet form-2
Kingbasees Security Guide for Jincang database -- 4 data access protection