How to load kernel module before another kernel module?
I have an Iomega ZIP 100 parallel port drive and need module imm to be loaded before lp module. But I don't know how to do this. Simple adding these modules in rc.conf in MODULES section in the correct order doesn't work. I also realized that udev loads lp module, but I don't know how to make udev load this module before or after other modules.
Last edited by kotyz (2007-06-24 13:58:15)
or in /etc/mkinitcpio.conf :
# MODULES
# The following modules are loaded before any boot hooks are
# run. Advanced users may wish to specify all system modules
# in this array. For instance:
# MODULES="piix ide_disk reiserfs"
MODULES=""
and make a new initrd image with mkinitcpio -g /boot/newkernel26.img ,edit menu.lst and reboot
Similar Messages
-
Can a function module call another function module
Can a function module call another function module:-
within the same function group
(ii) within different function groupsHi,
We can call function from another function. If there is a function which is like a calculator and all the operations are from different functions then we have to call the functions from the calculator function for different functions.
If all the function are from same function group, Then the data is globally available to all the functions with in the group.
Otherwise we have to declare the data definitions for each of the functions if they are in different function groups.
Yes it is possible to call a function module from another function module:-
within the same function group
(ii) within different function groups
Reward. -
How to load a plugin from another plugin?
Hi,
I'm trying to load a plugin, which is not located in the plugin-paths of After Effects from another plugin. It seems to load the aex(dll) and execute the main function fine, but afterwards it crashes immediately and I have no idea why.
This is how my pluginLoader-PlugIn looks like:
1. I created a commandHook to be able to trigger the pluginLoad from the Edit Menu
2. for the actual load of the dll I use the following commands:
AEGP_SuiteHandler suites(basic_suite);
std::string dllName = "C:/PATH/TO/plugin.aex";
// defining type and order of the arguments of the entry function
typedef A_Err (*args_type)(SPBasicSuite *pica_basicP, A_long major_versionL, A_long minor_versionL, A_long aegp_plugin_id, AEGP_GlobalRefcon *global_refconP);
args_type pluginEntryMethod = NULL;
// loading the dll(aex) and the entry function
# ifdef _WIN32
HMODULE hDLL = LoadLibrary(dllName.c_str());
if (hDLL != NULL)
pluginEntryMethod = (args_type) GetProcAddress(hDLL, "EntryPointFunc");
else
return err;
# else
void *pLib = ::dlopen(szMyLib, RTLD_LAZY);
if (pLib != NULL) {
pluginEntryMethod = (args_type)::dlsym(pLib, "EntryPointFunc");
else
return err;
# endif
if (pluginEntryMethod != NULL)
// hardcoding the plugin version
A_long mavL = 0L;
A_long mivL = 1L;
AEGP_PluginID plId;
// to get a valid plugin-id I use this command
suites.UtilitySuite3()->AEGP_RegisterWithAEGP(*globalRefcon, "nameOfPlugin", &plId);
// I create copy of the refcon and the suite
AEGP_GlobalRefcon newRefcon(*globalRefcon);
SPBasicSuite newSuite(*basic_suite);
pluginEntryMethod(&newSuite, mavL, mivL, plId, &newRefcon);
# ifdef _WIN32
FreeLibrary(hDLL);
# else
dlclose(pLib);
# endif
If I run After Effects with the debugger, the EntryFunction of the new plugin runs through without errors. But Then it crashes and stops at random positions: sometimes in the IdleHook of the newly loaded Plugin, sometimes in the MenuHook.
Does anyone have an idea, what I am doing wrong?
btw: when I copy the second plugin in the default Afx-Plugin-Folder it loads fine and seems to work correct.
Thanks for your help!
MartinOkay, unfortunately it had nothing to do with static or dynamic linking of the dependencies.
I was able to boil it down to the following problem but I'm still stuck on how to solve the situation:
The problem has to do with an invalid AEGP_GlobalRefcon of the Plugin I load:
the plugin loader:
// the load of the inner plugin..
AEGP_GlobalRefcon newRefcon; // generating a new refcon
suites.UtilitySuite5()->AEGP_RegisterWithAEGP(newRefcon, pluginName.c_str(), &plId); // gathering a plugin id
pluginEntryMethod(basic_suite, mavL, mivL, plId, &newRefcon) // calling the entry function
the loaded plugin:
A_Err EntryPointFunc(
struct SPBasicSuite *pica_basicP,
A_long major_versionL,
A_long minor_versionL,
AEGP_PluginID aegp_plugin_id,
AEGP_GlobalRefcon *global_refconP)
*global_refconP = (AEGP_GlobalRefcon) new CustomClass(pica_basicP, aegp_plugin_id); // this is where the refcon gets invalid
return err;
To gather a valid plugin id, I register the plugin and assign a new AEGP_GlobalRefcon to it, which is for instance at address 0x0001234abcd (plugin-loader line 3)
then I call the entry function(plugin-loader line 4) and the entry function creates a custom class and stores a pointer to its instance in the global_refconP pointer, which changes the address from 0x0001234abcd to 0x0a010b020c3d4.
The crash happens later, when a hook (eg IdleHook) is called, which tries to reinterpret the refconPV-pointer of the plugin (address 0x0001234abcd) to a CustomClass-instance, because the actual instance is stored at 0x0a010b020c3d4.
I reckon, that I can fix this if I either can change the global refcon of the plugin after the enty function has run or if I can get a valid plugin id before calling the entry function and doing the registration with the new refcon I got returned by the entry function of the loaded plugin.
Does anyone know how to achieve one of these two goals? -
Question on how does load balancing work on Firewall Services Module (FWSM)
Hi everyone,
I have a question about the algorithm of load balancing on Firewall Services Module (FWSM).
I understand that the FWSM supports up to three equal cost routes on the same interface for load balancing.
Please see a lower simple figure.
outside inside
--- L3 SW --+
|
MHSRP +--- FWSM ----
|
--- L3 SW --+
I am going to configure the following default routes on FWSM point to each MHSRP VIP (192.168.13.29 and 192.168.13.30) for load balancing.
route outside_1 0.0.0.0 0.0.0.0 192.168.13.29 1
route outside_1 0.0.0.0 0.0.0.0 192.168.13.30 1
However I don't know how load balancing work on FWSM.
On FWSM, load balancing work based on
Per-Destination ?
Per-Source ?
Per-Packet ?
or
Other criteria ?
Your information would be greatly appreciated.
Best Regards,Configuring "tunnel default gateway' on the concentrator allowed traffic to flow as desired through the FWSM.
FWSM is not capable of performing policy based routing, the additional static routes for the VPN load balancing caused half of the packets to be lost. As a result, it appears that the VPN concentrators will not be able to load balance. -
How to load swf files within another SWF and still maintain actionscript
Hi I was wondering how to embed an swf file inside another
swf file, If i simply import it to the stage or the library it will
become a symbol but the actionscript interactivity is lost, another
question is can I have an actionscript 2 file play within an
actionscript 3 file?
The actionscript 2 code for embedding is something like this:
don't mind the _mc titles
this.cargame_mc.onRelease = function (){
loadMovie ("Crusty Rusty's.swf", empty_mc)
empty_mc._xscale=60;
empty_mc._yscale=55;
empty_mc._x=210;
empty_mc._y=140;
Please Help its for my uni portfolio, i want to use as2, but
if i do i would lose the 3d possibility of as3, is there any way to
export an as3 file and then embed in as2, using a program or
anything? Thanks!I
I would just like to say thanks in advance because everyone
on here is so helpful!you can load an as2 file into an as3 file (using the loader
class) and the actionscript will work in both. -
How to call an App Module from another App Module?
Here are the settings for my project.
MyApplication (Application)
Model1 (Project) : Has connection settings to connect to schema1
Model2 (Project) : Has connection settings to connect to schema2
ViewController (Project) : View project
How do I call Model2 from Model1 ? I tried calling findApplicationModule but that did not work.
Can I get access to the AppModule from JNDI tree? How else can I get access to Model2 from Model1?
ThanksThis is the code that is getting called from App Module 1. The first method, test1, throws an error where as test2 is successful. Do you see any obvious errors in the code?
public String test1() {
System.out.println("This is test1");
String amDef = "org.model.service.HrService";
String config = "HrServiceLocal";
ApplicationModule am2 = (ApplicationModule ) Configuration.createRootApplicationModule(amDef,config);
HrServiceImpl am3 = (HrServiceImpl)am2;
am3.test123();
Configuration.releaseRootApplicationModule(am2, true);
//return am2;
return "test1";
Error:
Internal Server Error (Caught exception while handling request: oracle.jbo.ConfigException: JBO-33005: Configuration HrServiceLocal not found)
public String test2() {
String AMDefName = "org.model.service.HrService";
Hashtable env = new Hashtable(2);
env.put(JboContext.INITIAL_CONTEXT_FACTORY,JboContext.JBO_CONTEXT_FACTORY);
env.put(JboContext.DEPLOY_PLATFORM, JboContext.PLATFORM_LOCAL);
HrService am = null;
try {
InitialContext ic = new InitialContext(env);
ApplicationModuleHome home = (ApplicationModuleHome)ic.lookup(AMDefName);
am = (HrService)home.create();
String retString = am.test123();
System.out.println("Value from the first application module=" + retString);
catch (NamingException nex) { /* Handle the error here if you don't find it */
System.out.println("Naming exception " + nex);
Configuration.releaseRootApplicationModule(am, true);
return "test2";
successful
Thanks
Mike -
How to listen one event before another
Hello All,
In my code i m using 2 Events (selectionEvent , FocusEvent) at one object(Gallery). when i select any object in gallery , focus event comes first before Selection Event. but i want selection event shud come before Focusevent. so that i may perform some operations in widgetSelected(SelectionEvent e){...} before the method focusGained(FocusEvent e){....}
please suggest me in this direction.We'll stay in this one: [http://forums.sun.com/thread.jspa?threadID=5345923]
-
How to listen one event before another event
Hello All,
In my code i m using 2 Events (selectionEvent , FocusEvent) at one object(Gallery). when i select any object in gallery , focus event comes first before Selection Event. but i want selection event shud come before Focusevent. so that i may perform some operations in widgetSelected(SelectionEvent e){...} before the method focusGained(FocusEvent e){....}
please suggest me in this direction.You should, however, be able to write your focusGained method in such a way, that it does different things according to the selection state of your widget and your widgetSelected method in such a way, that it does different things according to the focus state of your widget.
-
Can rc.conf's MODULES detect which kernel I'm booting?
...because on one kernel I have some things compiled in that I want loaded by MODULES in another kernel.
Right now I either get "FATAL: Module not found" errors (and probably some time loss) when I specifiy the large set of modules and boot the kernel with compiled in stuff, or modules have to be loaded manually afterwards (making for an even larger time loss) when I specify the small set but launch the core kernel.
Weird setup?Cerebral wrote:
Could you not just bugger around with rc.conf, something like:
[ "$(uname -s)" = "kernel26-ARCH" ] && MODULES=(module1 module2)
[ "$(uname -s)" = "kernel26-viper" ] && MODULES=(....)
Would that work?
It seems so:
[ "$(uname -r)" = "2.6.24-zen1-20080206" ] && MODULES=(...)
worked fine, and I haven't yet tried to boot the core kernel.
Thanks a lot for all your suggestions. It should be a smoother experience now. -
How can I use system call in kernel loadable module?
Hi,
I want to use system call (shmat, mmap,...) in kernel module.
When kernel module is loaded, it cause system error (undefined symbol name 'shmat', 'mmap').
How can I use system call in kernel module ?
Thanks in advance.
david jooYou cannot use system calls in the kernel modules.
Read 'Writing Device Drivers' answerbook - it lists the set of interfaces (known as DDI/DDK) that are supposed to be used instead.
Hope this helps...
--I. -
How do I install / update a specific kernel module?
Hi
I'm trying to update an existing kernel module. I can download it and it comes with a pretty easy to use Makefile based on http://www.kernel.org/doc/Documentation … odules.txt. The Makefile installs the newly created module into /lib/modules/$kernelversion/extra. I have some questions regarding this behavior:
* The Makefile creates a *.ko whereas arch uses compressed *.ko.gz modules. Do I have to compress the built module before installing it?
* Is the default install path (/extra) right? What about the module that already exists in /kernel/drivers/xxxx? Should I leave the new one in extra and remove the old one, or just replace the old one directly (backup not withstanding)?
Regards,
canNever heard of the /extra dir in this context. AFAIK the correct way to do this is to place the updated module in /lib/modules/$kernelversion/updates (create the updates dir if it's not already there). This way, the older version remains in place, but the version in /updates takes precedence.
-
How to inform the kernel about newly installed STREAMS MODULE?
I made a copy of timod and installed the copy to /kernel/strmod
as a new module (newmod). I modified the t_open.c to make
it to use the "newmod" instead of the timod. The result of the
test is "Invalid Argument". It looks like the kernel doesn't
recognize the module "newmod". I looked throught Sun
Docs, I'm not able to find any instruction for how to
make kernel to recognize my new STREAMS module name
as the add_drv does for device drivers. Can anyone point
me to the right docs and give me some instructions for informing
the kernel about the newly installed STREAMS module?
Thanks
YuenForget my precedent post, here is what's on the configuration page of this module :
("[_]" are checkboxe)
1/ [_] Check this option if your users' DNs look like cn=jdoe,ou=Group1,cn=example,cn=com and Group1 turns out to be the group you want.)
Attribute of the DN which contains the group name:
[Single line text field to enter attribute]
(The name of the attribute which contains the group name. In the example above, it would be ou, as the DN contains the string ou=Group1 and Group1 happens to be the desired group name.
2/ [_] Groups are specified by LDAP attributes
Attribute names (one per line):
[Multi-lines text field]
(If the groups are stored in the user entries, along with the rest of their data, then enter here a list of attributes which may contain them.)
3/ [_] Groups exist as LDAP entries where a multivalued attribute contains the members' CNs
Nodes containing groups (one per line):
[Multi-lines text field]
(Enter here a list of nodes from where groups should be searched for. The module will look them up recursively from the given nodes.)
Attribute holding group members:
[Single line text field]
(Name of the multivalued attribute which holds the CNs of group members, for example: memberUid)
If someone could tell me which checkboxe I should select and what to put into fields it would be king as I really have no idea of what to enter and what to select. -
Cant find virtualbox vboxdrv (install vbox modules on custom kernel)
hi guys!
i recently installed virtualbox-ose using pacman -Sy virtualbox. it installed fine and i was able to create a vm. when i start my vm i get this error:
VirtualBox kernel driver not installed. The vboxdrv kernel module was either not loaded or /dev/vboxdrv was not created for some reason. Re-setup the kernel module by executing '/etc/init.d/vboxdrv setup' as root.
VBox status code: -1908 (VERR_VM_DRIVER_NOT_INSTALLED).
Result Code:
0x80004005
Component:
Console
Interface:
IConsole {d5a1cbda-f5d7-4824-9afe-d640c94c7dcf}
i could not find /etc/init.d/vboxdrv. when i do for a search for vboxdrv, it shows me a vobxdrv.ko and its located on my original arch kernel 2.6.25-ARCH. im using a custom kernel. how do i tell virtualbox to build the modules in my custom kernel and not on the arch kernel. i remember i had the same problem with ndiswrapper before that ndis wrapper built the ndiswrapper module on my arch kernel instead of my custom kernel. any ideas?
thanks!hi DonVla!
i dont have /usr/bin/vbox_build_module...
<<archbox>> :ls /usr/bin/v*
/usr/bin/vboxbfe /usr/bin/verve-focus /usr/bin/vlc
/usr/bin/vboxmanage /usr/bin/vi /usr/bin/vlc-config
/usr/bin/vboxsdl /usr/bin/vidiff /usr/bin/vmstat
/usr/bin/vboxsvc /usr/bin/view /usr/bin/volname
/usr/bin/vboxxpcomipcd /usr/bin/viewres /usr/bin/vorbiscomment
/usr/bin/vditool /usr/bin/vino-preferences /usr/bin/vstp
/usr/bin/vercmp /usr/bin/virtualbox /usr/bin/vte
/usr/bin/verify_krb5_conf /usr/bin/vitutor
<<archbox>>:updatedb
<<archbox>> :locate vbox
/lib/modules/2.6.25-ARCH/misc/vboxdrv.ko
/opt/qt/include/qvbox.h
/opt/qt/man/man3/qvbox.3qt.gz
/opt/qt/man/man3/qvboxlayout.3qt.gz
/usr/bin/vboxbfe
/usr/bin/vboxmanage
/usr/bin/vboxsdl
/usr/bin/vboxsvc
/usr/bin/vboxxpcomipcd
/usr/include/kvbox.h
/usr/include/Qt/q3vbox.h
/usr/include/Qt3Support/q3vbox.h
/usr/include/gtk-2.0/gtk/gtkvbox.h
/usr/include/xfce4/libxfce4panel/xfce-hvbox.h
i wonder whats the /etc/init.d/vboxdrv equivalent in arch? -
Unable to load the OCFS due to kernel version mismatch
Hi,
I am using RedHat Linux ES 3.0 and installed the OCFS successfully but, unable to load the ocfs due to OCFS version conflict with the kernel version. following message displyed when i try to load ocfs.
OCFS was built for Kernel version --> 2.4.21-4.EL
KERNEL Version --> 2.4.21-9.ELorafw3.
================== message as follows ================
load_ocfs
/sbin/insmod ocfs node_name=linuz2 ip_address=1.1.1.2
cs=1803 guid=626147BF390EFFB6609900061BC97853
comm_voting=1 ip_port=7000
Using /lib/modules/2.4.21-EL-ABI/ocfs/ocfs.o
/lib/modules/2.4.21-EL-ABI/ocfs/ocfs.o: kernel-module
version mismatch
/lib/modules/2.4.21-EL-ABI/ocfs/ocfs.o was
compiled for kernel version 2.4.21-4.EL
while this kernel is version
2.4.21-9.ELorafw3.
load_ocfs: insmod failed
================== message ends here ==================
thanks & regards,
Jagadeswar V
SingaporeI have seen that error before, try using a different ip address for your machine, I'm not sure that the one you're using ( 1.1.1.2 ) is valid. Try ip an ip address using one of the following blocks:
10.x.x.x
192.168.x.x
load_ocfs will throw that error if it just doesn't like your configuration sometimes, or if you havn't generated an ocfs.conf.
Can you ping your other node ( 1.1.1.1 I assume )? -
Loading programmers dvorak in initramfs with busybox.
Solution:
Download the keyboard map. Other keyboard maps you can usually find in "/usr/share/kbd/keymaps/"
wget https://raw.githubusercontent.com/jiangmiao/dvp/master/dvp.map
Now convert that map to the binary format that can be used with `loadkmap`. Make sure you run it with privileges, otherwise you'll get the "Couldn't get a file descriptor referring to the console" error
sudo loadkeys -b dvp.map > dvp.bmap
Now you can load that map in initramfs using `loadkmap`. I have a custom initramfs and init and here is the excerpt from it
#!/usr/bin/ash
echo "Starting the init script"
#mount things needed by this script
mount -t proc proc /proc
mount -t sysfs sysfs /sys
# and so on
echo "creating the symlinks to busybox"
/bin/busybox --install -s
echo "loading programmers dvorak"
loadkmap < dvp.bmap
Problem
I have a custom initramfs with Busybox in it. I want to load another keymap in there. Busybox has `loadkmap` utility, unfortunately it expects a binary file, so .map files don't fit in there. The goal is to load programmer's dvorak in busybox, but the problem is generic, because any ANSI .map format will not work with `loadkmap`.
The map for dvp is here: https://github.com/jiangmiao/dvp
Here it was talked about, but unfortunately the patch link is dead: http://mstempin.free.fr/index.php?2005/ … ry-keymaps
How to load a keymap in initramfs with busybox?
FTR, here is the quote from that blog post
Unfortunately, This is not a trivial task in Busybox, as it uses a special binary keymap file format for specifying the keymap to use.
The standard Linux way of handling keymaps is using the kbd utility package. This package contains most of the worldwide keyboard definitions in a keymap format. The two most usefull commands are the loadkeys and dumpkeys, which respectively loads an ASCII keymap file into the kernel's internal translation table and dumps this table to the standard output.
Unfortunately, the keymaps file format (see Linux manual (5) for keymaps) is difficult to parse ,as it requires a full lex/yacc parser to handle it :-(.
However, such a parser is included into loadkeys... And this utility also provides a -m option that generates a C-style output of the file...
After studying Busybox's binary keymap format in details, it appears to be no more than just a file dump of all key translation tables for each state (ie. plain, shifted, controlled, etc.), preceeded by a binary map of translation tables.
So, I decided to write a patch to the kbd package to add a -b option that provides a binary keymap dump capability to loadkeys. Here it is!
Last edited by SteveSapolsky (2014-12-19 12:39:13)progandy wrote:
In archlinux loadkeys from core/kbd should allow you to generate a binary keymap.
loadkeys -b /your/key.map > key.bmap
Thank you. I updated my post and added the solution.
Maybe you are looking for
-
hi everyone, i have to make a contact wizard for iphone, i have allready designed the view for contact wizard using navigation controller, there are 3 pages total which includes UITextFields, PickerView, and Table View. Now i dont know where to write
-
A while ago, I moved the mobilesync path so that it would stop trying to backup onto my C drive. However, since then I moved some folders around which I think is the source of my error. I can no longer backup my iphone It just tells me that the backu
-
Photo not showing up in Kens window.
Hello, I have been working in Imovie with pictures and video. I am almost done. I went back to do some tweaking, (change times on pictures, trans) Now some of the pictures I need to change time on do not show up in the box. Its black. I am confused b
-
Mac Book and Thunderbolt display on OSX
Since upgrading to OSX my macbook will not work properly with my Thunderbolt dispaly and keeps locking up, it feels like its a graphics issue. Are ther any fixes for this please?
-
I've run into a new issue (for me anyway) with multiclip editing. I'm working with a two-angle multiclip, editing in real time, and everything has been working fine. I walked away from the project, came back later, and suddenly the multiclip angles a