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 ...
随机推荐
- 阿里云文件存储CPFS正式商业化,提供云上高性能并行文件系统
2018年3月份,阿里云推出文件存储CPFS产品.在经过近一年的上线公测后,CPFS即将迎来商业化,将为更多的客户提供云上高性能的并行文件存储. 坚如磐石的高性能计算存储 文件存储CPFS针对计算密集 ...
- Notepad++中Python脚本运行出现语法错误:IndentationError: unindent does not match any outer indentation level
使用Notepad++编辑python代码运行遇到了这个问题: IndentationError: unindent does not match any outer indentation leve ...
- C++运行时类型识别
通过运行时类型识别(RTTI),程序能够使用基类的指针或引用来检索这些指针或引用所指对象的实际派生类型. 通过下面两个操作符提供 RTTI: 1. typeid 操作符,返回指针或引用所指对象的实际类 ...
- Java练习 SDUT-3106_小鑫数数儿
小鑫数数儿 Time Limit: 1000 ms Memory Limit: 65536 KiB Problem Description 某天小鑫忽然得到了许多的数字,他很好学,老师给他布置了一个任 ...
- AtCoder Beginner Contest 078 D ABS
光做C了,做完C,就要结束了,看了看D,没看懂那操作啥意思,就扔了. 刚才看了看,突然懂了.. 就是每个人从那堆牌上边拿牌,最少拿一张,最多可以全拿走,然后手里留下最后一张拿到的,其余的都扔掉. 比如 ...
- pytorch之expand,gather,squeeze,sum,contiguous,softmax,max,argmax
目录 gather squeeze expand sum contiguous softmax max argmax gather torch.gather(input,dim,index,out=N ...
- PHP用正则批量替换Img中src内容,用正则表达式获取图片路径实现缩略图功能
PHP用正则批量替换Img中src内容,用正则表达式获取图片路径实现缩略图功能 网上很多正则表达式只能获取或者替换一个img的src内容,或者只能替换固定的字符串,要动态替换多个图片内容的试了几个小时 ...
- 深入java面向对象三:抽象类和接口(转载)
文章系转载,地址: http://blog.csdn.net/xw13106209/article/details/6923556 1.概述 一个软件设计的好坏,我想很大程度上取决于它的整体架 ...
- Python--day24--继承
A_son.__bases__查看继承的父类是哪些 A. object是所有类的祖宗,所有的类都默认继承了object类. python中可以多继承 继承与抽象,先抽象再继承: example:
- [转]在eclipse中,用maven创建一个web项目工程
1.在eclipse中用maven创建项目,右键new>>Maven Project 2.点击next继续 3.点击next继续,选择maven-archetype-webapp, 4.点 ...