openwrt 编译内核模块中的配置问题
来源:互联网 发布:在线数字抽奖软件 编辑:程序博客网 时间:2024/05/17 22:11
以 other.mk 中的iio 为例 对 KCONFIG下面的
define KernelPackage/iio-core SUBMENU:=$(OTHER_MENU) TITLE:=Industrial IO core KCONFIG:= \ CONFIG_IIO \ CONFIG_IIO_BUFFER=y \ CONFIG_IIO_KFIFO_BUF \ CONFIG_IIO_TRIGGER=y \ CONFIG_IIO_TRIGGERED_BUFFER FILES:= \ $(LINUX_DIR)/drivers/iio/industrialio.ko \ $(if $(CONFIG_IIO_TRIGGERED_BUFFER),$(LINUX_DIR)/drivers/iio/industrialio-triggered-buffer.ko) \ $(LINUX_DIR)/drivers/iio/kfifo_buf.ko AUTOLOAD:=$(call AutoLoad,55,industrialio kfifo_buf industrialio-triggered-buffer)endefdefine KernelPackage/iio-core/description The industrial I/O subsystem provides a unified framework for drivers for many different types of embedded sensors using a number of different physical interfaces (i2c, spi, etc)endef$(eval $(call KernelPackage,iio-core))
iio 跟目录下Makefile部分内容
通过make menuconfig 选中 GONFIG_IIO后,编译后,编译的内容
GONFIG_IIO :编译了 industrialio-core.c inkern.c industrialio-event.c
CONFIG_IIO_BUFFER=y : 编译了 industrialio-buffer.c
CONFIG_IIO_TRIGGER=y : 编译了 industrialio-trigger.c
上述五个文件共同编译了组件: industrialio.ko
$(LINUX_DIR)/drivers/iio/kfifo_buf.ko // 这句话使得 kfifo_buf.ko 模块编译, //但是CONFIG_IIO_KFIFO_BUF 没有选中 //说明,CONFIG_IIO_KFIFO_BUF=y对模块是否编译无影响
改变KCONFIG, 后再编译
KCONFIG:= \ CONFIG_IIO \ CONFIG_IIO_BUFFER=y \ CONFIG_IIO_KFIFO_BUF \ CONFIG_IIO_BUFFER_CB=y \ CONFIG_IIO_TRIGGER \ CONFIG_IIO_TRIGGERED_BUFFER=y \
并没有出现 industrialio-triggered-buffer.ko 模块
同时 industrialio-buffer.c 也编译了
与预期的不同,所需要看Kconfig文件中的依赖关系
## Industrial I/O subsystem configuration#menuconfig IIO tristate "Industrial I/O support" select ANON_INODES help The industrial I/O subsystem provides a unified framework for drivers for many different types of embedded sensors using a number of different physical interfaces (i2c, spi, etc).if IIOconfig IIO_BUFFER bool "Enable buffer support within IIO" help Provide core support for various buffer based data acquisition methods.if IIO_BUFFERconfig IIO_BUFFER_CBboolean "IIO callback buffer used for push in-kernel interfaces" help Should be selected by any drivers that do in-kernel push usage. That is, those where the data is pushed to the consumer.config IIO_KFIFO_BUF select IIO_TRIGGER tristate "Industrial I/O buffering based on kfifo" help A simple fifo based on kfifo. Note that this currently provides no buffer events so it is up to userspace to work out how often to read from the buffer.config IIO_TRIGGERED_BUFFER tristate select IIO_TRIGGER select IIO_KFIFO_BUF help Provides helper functions for setting up triggered buffers.endif # IIO_BUFFERconfig IIO_TRIGGER boolean "Enable triggered sampling support" help Provides IIO core support for triggers. Currently these are used to initialize capture of samples to push into buffers. The triggers are effectively a 'capture data now' interrupt.config IIO_CONSUMERS_PER_TRIGGER int "Maximum number of consumers per trigger" depends on IIO_TRIGGER default "2" help This value controls the maximum number of consumers that a given trigger may handle. Default is 2.
更改KCONFIG,重新编译:
CONFIG_IIO \ CONFIG_IIO_BUFFER \ CONFIG_IIO_KFIFO_BUF \ CONFIG_IIO_TRIGGER \ CONFIG_IIO_TRIGGERED_BUFFER
可以看到,kfifo_buf.ko 模块没有生成,是因为在Kconfig 文件中看出 IIO_TRIGGER的依赖关系
config IIO_KFIFO_BUF select IIO_TRIGGER//而 IIO_TRIGGER
但是仅仅选中 设置 CONFIG_IIO_TRIGGER=y 编译也是通不过的,重新观察发现 只有预先选中IIO_BUFFER, 才能选中_IIO_TRIGGER
if IIO_BUFFER
config IIO_BUFFER_CB
boolean “IIO callback buffer used for push in-kernel interfaces”
help
Should be selected by any drivers that do in-kernel push
usage. That is, those where the data is pushed to the consumer.
config IIO_KFIFO_BUF
select IIO_TRIGGER
tristate “Industrial I/O buffering based on kfifo”
help
A simple fifo based on kfifo. Note that this currently provides
no buffer events so it is up to userspace to work out how
often to read from the buffer.
config IIO_TRIGGERED_BUFFER
tristate
select IIO_TRIGGER
select IIO_KFIFO_BUF
help
Provides helper functions for setting up triggered buffers.
endif # IIO_BUFFER
更改KCONFIG,重新编译:
CONFIG_IIO \ CONFIG_IIO_BUFFER=y \ CONFIG_IIO_KFIFO_BUF \ CONFIG_IIO_TRIGGER=y \ CONFIG_IIO_TRIGGERED_BUFFER=y
并没有出现 industrialio-triggered-buffer.ko 模块
CONFIG_IIO_KFIFO_BUF=y 设置后,再编译还是没有出现 industrialio-triggered-buffer.ko 模块,原因待查
当选中
CONFIG_IIO_KFIFO_BUF=y 后,
$(LINUX_DIR)/drivers/iio/kfifo_buf.ko 就不需要了
- openwrt 编译内核模块中的配置问题
- 为 OPENWRT 编译额外的内核模块
- 编译内核模块问题
- openWRT内核模块加载
- Openwrt添加内核模块
- Openwrt的内核编译
- openwrt编译内核
- Openwrt的内核编译
- openwrt 内核编译纪要
- 如何使用默认配置编译需要的OpenWrt内核
- openwrt安装内核模块* satisfy_dependencies_for
- openwrt 添加自定义内核模块
- openwrt 添加自定义内核模块
- ARM-xScale 配置编译Bluetooth内核模块
- 单独编译Linux内核中的jbd模块
- 编译内核模块的Makefile中的($(KERNELRELEASE)
- OpenWRT添加模块(三)内核模块
- fedora编译openwrt模块需求
- 第6章 最简单的界面化程序——对话框
- Noip DP 总结 1
- CentOS 7安装Mysql5.6.37
- 离线赛11.3
- Hibernate注解 @Enumerated
- openwrt 编译内核模块中的配置问题
- 解决maven打包Mark invalid异常
- 递归---算法
- DirectX入门之快速开发框架
- AsyncTask基础运用(请求网络)
- android6.0以上模拟位置状态检测
- 表格标签
- 异常
- <p>标签为何不可以包含<div>标签