OpenWrt Kernel Module Creation Howto
OpenWrt Kernel Module Creation Howto
About OpenWrt Kernel Module Compilation
You are planning to compile a kernel module? This howto will explain what you have to do, to have your kernel module installable as an ipkg.
Enable the kernel options
Enable the kernel options you want by modifying build_mipsel/linux/.config. We are assuming, that you already had your kernel compiled once here. You can do the modification by hand or by
$ cd build_mipsel/linux
$ make menuconfig
And copy it, so your changes are not getting lost, when doing a 'make dirclean'. Here we assume that you are compiling for Broadcom chipset based devices:
$ cp .config ../../../target/linux/linux-2.4/config/brcm
Create a buildroot option
Create a buildroot option by modifying/inserting into target/linux/Config.in, e.g.
config BR2_PACKAGE_KMOD_USB_KEYBOARD
tristate "Support for USB keyboards"
default m
depends BR2_PACKAGE_KMOD_USB_CONTROLLER
Define the binary files for the kernel module
Define the binary files for the kernel module by modifying/inserting into target/linux/linux-2.4/Makefile, e.g.
$(eval $(call KMOD_template,USB_KEYBOARD,usb-kbd,\
$(MODULES_DIR)/kernel/drivers/input/input.o \
$(MODULES_DIR)/kernel/drivers/input/keybdev.o \
$(MODULES_DIR)/kernel/drivers/usb/usbkbd.o \
,CONFIG_USB_KEYB,kmod-usb-core,60,input keybdev usbkbd))
Where CONFIG_USB_KEYB is the kernel option, USB_KEYBOARD is the last part of BR2_PACKAGE_KMOD_USB_KEYBOARD and usb-kbd is part of the filename of the created ipkg.
Specify the ipkg control file
Create e.g. target/linux/control/kmod-usb-kbd.control with content similar to this:
Package: kmod-usb-kbd
Priority: optional
Section: sys
Maintainer: Markus Becker <mab@comnets.uni-bremen.de>
Source: buildroot internal
Description: Kernel Support for USB Keyboards
Compile the kernel module
Enable the kernel module with
$ make menuconfig
in TOPDIR and selecting it. Compile with
$ make dirclean && make
OpenWrt Kernel Module Creation Howto的更多相关文章
- The vboxdrv kernel module is not loaded
背景: 在没有关虚拟机的情况下, 直接关了电脑, 我的电脑系统是Centos 6 错误的提示: 在终端执行virtualbox -v 时提示 The vboxdrv kernel module is ...
- Xamarin.Android模拟器提示HAX kernel module is not Installed
Xamarin.Android模拟器提示HAX kernel module is not Installed 错误信息:emulator : ERROR : x86 emulation current ...
- HAX kernel module is not installed
dev.android.emulator.haxm 运行emulator -avd xxx来启动名为xxx的模拟器,但报如下错误: emulator: ERROR: x86 emulation cur ...
- emulator: ERROR: x86 emulation currently requires hardware acceleration!Please ensure Intel HAXM is properly installed and usable.CPU acceleration status: HAX kernel module is not installed!
Android Studio 1.0 已经放出来了,以后的Android平台开发激昂逐步从Eclipse向Android Studio迁移,为了能不落伍我也特意从Google下载了Android St ...
- Compiling a kernel module for the raspberry pi 2 via Ubuntu host
Compiling a kernel module for the raspberry pi 2 via Ubuntu host Normally compiling a kernel module ...
- Virtualbox报错------>make sure the kernel module has been loaded successfully
错误描述 很久没有用virtualbox了,今天打算在virtualbox上安装一个Ubuntu系统的时候,新建好Ubuntu后启动的时候,直接报错: Cannot access the kernel ...
- qemu 出现Could not access KVM kernel module: No such file or directory failed to initialize KVM: No such file or directory
使用qemu命令 qemu-system-x86_64 -hda image/ubuntu-test.img -cdrom ubuntu-16.04.2-server-amd64.iso -m 102 ...
- 如何处理VirtualBox启动错误消息:The vboxdrv kernel module is not loaded
我在启动minikube时,遇到如下错误消息: Starting local Kubernetes v1.10.0 cluster... Starting VM... E1010 03:27:37.9 ...
- kernel/module.c
#include <linux/errno.h>#include <linux/kernel.h>#include <asm/segment.h>#include ...
随机推荐
- Unicode与FFFE(记一个蛋疼的项目)
好久没更新博客了. 近期忙着一个项目, 还要应付各种考试就顾不上博客了. 今天遇到了一个蛋疼的问题, 通过BLE4.0与蓝牙外设通信. 按照客户给的协议文档发送的数据, 可是外设不能正确识别.折腾了一 ...
- C++模板编译模型
一:传统的编译模型 使用C/C++进行编程时,一般会使用头文件以使定义和声明分离,并使得程序以模块方式组织.将函数声明.类的定义放在头文件中,而将函数实现以及类成员函数的定义放在独立的文件中. 但是对 ...
- UI2CODE复杂背景无法识别?闲鱼工程师这样打造高准确率方案
引言: 复杂背景内容提取指的是从复杂的背景中提取出特定的内容,例如在图片中提取特定的文字,在图片中提取特定的叠加图层等等.这是一个业界难题,基于传统的图像处理的方法存在准确率和召回率的问题,没法解决语 ...
- HDU-1029_Ignatius and the Princess IV
Ignatius and the Princess IV Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32767 K (Jav ...
- PHP笔试题(11道题)详解
题目一 <?php echo -10%3; ?> 答案:-1. 考查:优先级. 因为-的优先级比%求余的优先级低, 也就是-(10%3). 2 题目二: print (int)pow(2, ...
- Laravel的请求声明周期
声明周期概述# 开始# public/index.php 文件是所有对Laravel应用程序的请求的入口点.而所有的请求都是经由你的Web服务器(Apache/Nginx) 通过配置引导到这个文件.i ...
- 修改Mariadb存储路径
大部分基于此文章操作:http://lddyw.blog.51cto.com/4151746/1684364 找个好久的资料,都打算源码安装了,最后终于更改成功了. 环境:CentOS6.6 64位虚 ...
- Java之Socket与HTTP区别
我们都知道TCP/IP协议共分四层: ① 链路层,有时也称作数据链路层或网络接口层,通常包括操作系统中的设备驱动程序和计算机中对应的网络接口卡.它们一起处理与电缆(或其他任何传输媒介)的物理接口细节. ...
- Python深入:01内存管理
在Python中,一切都是指针. 一:对象三特性 所有的Python对象都有三个特性:身份,类型和值. 身份:每一个对象都有一个唯一的身份标识,任何对象 ...
- Helm V3 新版本发布
Helm v3.0.0 Alpha 1 is coming! Helm 作为 Kubernetes 体系的包管理工具,已经逐渐成为了事实上的应用分发标准.根据 2018 年 CNCF 的一项云原生用户 ...