Sponsored Content
Operating Systems Linux How to convert Linux Kernel built-in module into a loadable module Post 302245343 by anitemp on Friday 10th of October 2008 01:33:20 AM
Old 10-10-2008
How to convert Linux Kernel built-in module into a loadable module

Hi all,

I am working on USB data monitoring on Fedora Core 9. Kernel 2.6.25 has a built-in module (the one that isn't loadable, but compiles and links statically with the kernel during compilation) to snoop USB data. It is in <kernel_source_code>/drivers/usb/mon/.

I need to know if I can somehow convert 'usb_mon' into a loadable module since I am making changes in this code I need to recompile the kernel and boot my linux after every change. I'm familiar device driver programming on kernel 2.4 but I am not sure about kernel 2.6 (though the things look similar here).

Thanks for looking into my post.
(Also please re-direct me to any other similar post if available)

-anitemp!
 

10 More Discussions You Might Find Interesting

1. Linux

Making Socket System Call From Linux Kernel Module?

Hi Everyone! How can we make a socket() system call from a linux module executing in kernel space? If any one knows, kindly tell me. It will be great. I want to use the socket interface in linux kernel space for sending raw packets over the network. Hamayun (0 Replies)
Discussion started by: mian_m_hamayun
0 Replies

2. Solaris

Apache on Solaris10 configured with loadable module support?

I have Apache 2 webserver as delivered with the Solaris 10 installation. How to verify if Apache is configured with loadable module support? Or if needs to be recompiled with loadable module support. (2 Replies)
Discussion started by: kavera
2 Replies

3. SuSE

max number of slabs per kernel module (kernel 2.6.17, suse)

Hi All, Is there a max number of slabs that can be used per kernel module? I'm having a tough time finding out that kind of information, but the array 'node_zonelists' (mmzone.h) has a size of 5. I just want to avoid buffer overruns and other bad stuff. Cheers, Brendan (4 Replies)
Discussion started by: Brendan Kennedy
4 Replies

4. UNIX for Dummies Questions & Answers

Linux kernel module parameters

Hi, Does anyone know if it is possible to know the current value of a kernel module parameters after the module is loaded. Are the values of the parameters advertised at some /proc or /sys location ? The only thing I know is modinfo, that actually looks a the module .ko and gives a... (3 Replies)
Discussion started by: macL
3 Replies

5. Shell Programming and Scripting

Can't locate loadable object for module GD in @INC

I am trying to use the GD module on a on Unix Solaris environment machine by including gd.pm from a temporary location but I am receiving the following error: perl -w polyline.pl > imageoutput.png Can't locate loadable object for module GD in @INC (@INC contains:... (1 Reply)
Discussion started by: wadhwa.pooja
1 Replies

6. Programming

can a linux kernel module call libc functions?

can a linux kernel module call libc functions, such as printf(), strcpy(), etc...? (9 Replies)
Discussion started by: vistastar
9 Replies

7. Programming

Make cannot generate .ko linux kernel module

cannot generate .ko file on my linux, although it can generate module.symvers. But when I copy .c file and Makefile to another linux computer, there's no problem. The strange thing is: make is successfuly executed, and returned 0; make output: make -C /lib/modules/2.6.18-92.el5xen/build ... (4 Replies)
Discussion started by: vistastar
4 Replies

8. UNIX for Advanced & Expert Users

Get pointer for existing device class (struct class) in Linux kernel module

Hi all! I am trying to register a device in an existing device class, but I am having trouble getting the pointer to an existing class. I can create a class in a module, get the pointer to it and then use it to register the device with: *cl = class_create(THIS_MODULE, className);... (0 Replies)
Discussion started by: hdaniel@ualg.pt
0 Replies

9. Linux

Unload kernel module at boot time (Debian Wheezy 7.2, 3.2.0-4-686-pae kernel)

Hi everyone, I am trying to prevent the ehci_hcd kernel module to load at boot time. Here's what I've tried so far: 1) Add the following line to /etc/modprobe.d/blacklist.conf (as suggested here): 2) Blacklisted the module by adding the following string to 3) Tried to blacklist the module... (0 Replies)
Discussion started by: gacanepa
0 Replies

10. Shell Programming and Scripting

Can't locate loadable object for module IO::Tty

I am getting this error: Can't locate loadable object for module IO::Tty in @INC (@INC contains: /production/79p/perl5/lib/site_perl/5.28.0/x86_64-linux /production/79p/perl5/lib/site_perl/5.28.0 /production/79p/perl5/lib/5.28.0/x86_64-linux /production/79p/perl5/lib/5.28.0... (2 Replies)
Discussion started by: mrn6430
2 Replies
usbmodules(8)							Linux USB Utilities						     usbmodules(8)

NAME
usbmodules - List kernel driver modules available for a plugged in USB device SYNOPSIS
usbmodules [--device /proc/bus/bus/NNN/NNN] [--check modulename] [--help] [--mapfile pathname] [--version pathname] DESCRIPTION
usbmodules lists driver modules that may be able to manage interfaces on currently plugged in USB devices. usbmodules may be used by /sbin/hotplug or one of its agents (normally /etc/hotplug/usb.agent) when USB devices are "hot plugged" into the system. This can be done by the following Bourne shell syntax: for module in $(usbmodules --device $DEVICE) ; do modprobe -s -k "$module" done The DEVICE environment variable is passed from the kernel to /sbin/hotplug during USB hotplugging if the kernel was configured using usbde- vfs. usbmodules currently requires usbdevfs to operate. When a USB device is removed from the system, the Linux kernel will decrement a usage count on USB driver module. If this count drops to zero (i.e., there are no clients for the USB device driver), then the modprobe -r process that is normally configured to run from cron every few minutes will eventually remove the unneeded module. OPTIONS
--check modulename Instead of listing the relevant modules, just exit with code 0 (success) if the given module's exported USB ID patterns matches. Otherwise, return failure. usbmodules emits no output either way. --device /proc/bus/usb/MMM/NNN Selects which device usbmodules will examine. The argument is currently mandatory. --help, -h Print a help message --mapfile /etc/hotplug/usb.handmap Use the specified file instead of the /lib/modules/.../modules.usbmap file corresponding to the running kernel. --version Identifies the version of usbutils this tool was built with. FILES
/lib/modules/<kernel-version>/modules.usbmap This file is automatically generated by depmod, versions 2.4.2 and later, and is used by usbmodules to determine which modules cor- respond to which USB ID's. /proc/bus/usb An optional interface to USB devices provided by Linux kernels with versions of the 2.4 USB support. Contains per-bus subdirectories with per-device files (offering a usermode driver API as well as access to device and configuration descriptors), a devices file containing a list of all USB devices, and a drivers file listing USB device drivers known to the USB subsystem. SEE ALSO
lsusb(8), http://linux-hotplug.sourceforge.net AUTHOR
usbmodules was written by Adam J. Richter <adam@yggdrasil.com>, and is based partly on lsusb, which was written by Thomas Sailer <sailer@ife.ee.ethz.ch>. COPYRIGHT
usbmodules is copyright 2000, Yggdrasil Computing, Incorporated, and copyright 1999, Thomas Sailer. usbmodules may may be copied under the terms and conditions of version 2 of the GNU General Public License as published by the Free Software Foundation (Cambrige, Massachusetts, United States of America). usbutils-0.8 12 June 2001 usbmodules(8)
All times are GMT -4. The time now is 12:04 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy