03-17-2011
Quote:
Originally Posted by
Chrisdot
Hmm... so if I create simple doing nothing (or printing text to dmesg) kernel space dynamic library, save it wherever on HDD and try to use from device driver - would that work?
You're talking about kernel modules, I think. These can be loaded whenever. Make both these things, your little loader thing and the thing which uses it, both modules, and have the main thing depend on the little thing. Whenever the main module is loaded it will try to load your loader module first. It will look for it in a specific place on the hard drive (/lib/modules/kernel-version/kernel/...).
You can also manually tell the kernel to load a module file whenever with
modprobe modulename if the module's installed under /lib/..., or
insmod filename.ko to point it to a specific file.
I haven't used module dependencies myself so can't be more specific, sorry.
Quote:
Is there a way to create dynamic library in kernel space and call it from device driver?
Create a dynamic library? As in convert from source code into a module? Creating a module takes gcc and dozens of megs of kernel source, all of which happens in userspace. No.
Again though -- what you do really depends on what the contents of this mysterious "block" are and where it will be and how you must get at it. Do you have any information whatsoever on what it actually is? If not, you really don't have the information you need to write a driver.
This User Gave Thanks to Corona688 For This Post:
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I just set up an ftp server with Red Hat 5.2. I am doing the work, I'm baby stepping, but it seems like every step I get stuck. Currently, I'm trying to set up a crontab job, but I'm getting the following message: /bin/sh: /usr/bin/vi: No such file or directory. I see that vi exists in /bin/vi,... (3 Replies)
Discussion started by: kwalter
3 Replies
2. Programming
Hi-
I need the cpp call that will tell me the full path to the app I'm running in. For example, I'm running in a loaded library for either mozilla or firefox, but would like to know the full path to the executable
/usr/bin/firefox
/usr/bin/mozilla
/usr/local/firefox1_5
etc...
(For... (4 Replies)
Discussion started by: erwinfletch
4 Replies
3. Linux
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... (0 Replies)
Discussion started by: anitemp
0 Replies
4. Shell Programming and Scripting
Okay, so I have two "Hello, world!" scripts, "test.pl" and "test.sh".
#!/bin/perl -w
use strict;
print "Hello, world!\n";
#!/bin/csh
echo Hello,\ world!
When I run test.pl, it runs instantly, always. When I run test.sh, it takes anywhere between 4 and 22 seconds!
I'd like to know what... (3 Replies)
Discussion started by: acheong87
3 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I have a problem I don't understand with fuser.
I launch a simple shell script mysleep.sh:
I launch the command fuser -fu mysleep.sh but fuser doesn't return anything excepted:
mysleep:
Then I modify my script switching from #!/bin/sh to #!/bin/ksh
I launch the command fuser -fu... (4 Replies)
Discussion started by: Peuj
4 Replies
6. OS X (Apple)
Q1. I understand that /usr/local/bin means I can install/uninstall stuff in here and have any chance of messing up my original system files or effecting any other users. I created this directory myself.
But what about the directory I didn't create, namely /Users/m/bin? How is that directory... (1 Reply)
Discussion started by: michellepace
1 Replies
7. Programming
I have made an packet capture application running on intel machine, it is capturing packets with src address- 17.0.0.0 destination ip- 66.0.0.0, source port- 0, destination port- 0, and protocol- 0 what does these packets mean ?
The code written to interpreter captured bytes is given below.... (5 Replies)
Discussion started by: arunpushkar
5 Replies
8. Ubuntu
Is there any way to compile smbfs module in kernel 3.10 running Ubuntu 12.04 LTS. I did a 'make menuconfig' and it shows cifs. I found out online that smbfs is deprecated and replaced by cifs. I have an old system with kernel version 2.4 which only has smbfs (no cifs). Is it possible to compile... (1 Reply)
Discussion started by: Monil
1 Replies
9. AIX
Hi,
I am planning to install a version of Informatica on my AIX box. It requires a specific java build in pap6470_27sr2-20141101_01(SR2).
The current link for IBM 64-bit SDK for AIX®, JavaTM Technology Edition, Version 7 Release 1 has a more recent version in j7r164redist.7.1.0.75.bin.
Is... (4 Replies)
Discussion started by: meetpraveens
4 Replies
10. Shell Programming and Scripting
Some question about the usage of shell scripts:
1.) Are the commands of the base shell scripts a subset of bash commands?
2.) Assume I got a long, long script WITHOUT the first line.
How can I find out if the script was originally designed für "sh" or "bash"?
3.) How can I check a given... (3 Replies)
Discussion started by: pstein
3 Replies
LEARN ABOUT DEBIAN
shorewall-modules
SHOREWALL-MODULES(5) [FIXME: manual] SHOREWALL-MODULES(5)
NAME
modules - Shorewall file
SYNOPSIS
/usr/share/shorewall/modules
/usr/share/shorewall/helpers
DESCRIPTION
These files specify which kernel modules Shorewall will load before trying to determine your iptables/kernel's capabilities.
The modules file is used when LOAD_HELPERS_ONLY=No in shorewall.conf[1](8); the helpers file is used when LOAD_HELPERS_ONLY=Yes
Each record in the files has the following format:
loadmodule modulename [moduleoption...]
The modulename names a kernel module (without suffix). Shorewall will search for modules based on your MODULESDIR and MODULE_SUFFIX
settings in shorewall.conf[1](8). The moduleoptions are passed to modprobe (if installed) or to insmod.
The /usr/share/shorewall/modules file contains a large number of modules. Users are encouraged to copy the file to /etc/shorewall/modules
and modify the copy to load only the modules required or to use LOAD_HELPERS_ONLY=Yes..if n .sp
Note
If you build monolithic kernels and have not installed module-init-tools, then create an empty /etc/shorewall/modules file; that will
prevent Shorewall from trying to load modules at all.
EXAMPLE
loadmodule ip_conntrack_ftp ports=21,221
FILES
/usr/share/shorewall/modules
/usr/share/shorewall/helpers
/etc/shorewall/modules
/etc/shorewall/helpers
SEE ALSO
shorewall(8), shorewall-accounting(5), shorewall-actions(5), shorewall-blacklist(5), shorewall-hosts(5), shorewall_interfaces(5),
shorewall-ipsets(5), shorewall-maclist(5), shorewall-masq(5), shorewall-nat(5), shorewall-netmap(5), shorewall-params(5),
shorewall-policy(5), shorewall-providers(5), shorewall-proxyarp(5), shorewall-rtrules(5), shorewall-routestopped(5), shorewall-rules(5),
shorewall.conf(5), shorewall-secmarks(5), shorewall-tcclasses(5), shorewall-tcdevices(5), shorewall-tcrules(5), shorewall-tos(5),
shorewall-tunnels(5), shorewall-zones(5)
NOTES
1. shorewall.conf
http://www.shorewall.net/manpages/shorewall.conf.html
[FIXME: source] 06/28/2012 SHOREWALL-MODULES(5)