开发内置Linux驱动程序有哪些步骤?
我的意思是我必须修改哪些文件才能在内核启动时安装驱动程序?
谢谢Gest
cd /path/to/Kernel
make menuconfig
使用箭头键突出显示 Device Drivers ,然后按Enter键
现在突出显示您想要内置的驱动程序并按 y
y
注意:只有前缀为 < > 的驱动程序才能构建为模块 . 按 Y 包括, N 排除, M modularizes功能 .
< >
Y
N
M
Also note that there are some drivers which have two states, i.e built-in or not-included, and these drivers cannot be modularized.
图例:[*]内置[]排除模块<>模块功能
例如,如果用户想要构建I2C驱动程序
设备驱动程序---->(突出显示并按Enter键)
I2C支持(突出显示并按'Y')
现在M将被_799612替换,即I2C驱动程序现在是内置的 . 立即构建内核并享受乐趣 .
如果您知道目标的正确defconfig文件以及驱动程序或子系统的配置名称,则可以直接将其添加到 /arch/xxxx(arm/sparc/..)/config/***_defconfig 中作为 CONFIG_I2C=y .
/arch/xxxx(arm/sparc/..)/config/***_defconfig
CONFIG_I2C=y
2 回答
cd /path/to/Kernel
make menuconfig
使用箭头键突出显示 Device Drivers ,然后按Enter键
现在突出显示您想要内置的驱动程序并按
y
注意:只有前缀为
< >
的驱动程序才能构建为模块 . 按Y
包括,N
排除,M
modularizes功能 .Also note that there are some drivers which have two states, i.e built-in or not-included, and these drivers cannot be modularized.
图例:[*]内置[]排除模块<>模块功能
例如,如果用户想要构建I2C驱动程序
cd /path/to/Kernel
make menuconfig
设备驱动程序---->(突出显示并按Enter键)
I2C支持(突出显示并按'Y')
现在M将被_799612替换,即I2C驱动程序现在是内置的 . 立即构建内核并享受乐趣 .
如果您知道目标的正确defconfig文件以及驱动程序或子系统的配置名称,则可以直接将其添加到
/arch/xxxx(arm/sparc/..)/config/***_defconfig
中作为CONFIG_I2C=y
.