LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Manually change module dependencies (https://www.linuxquestions.org/questions/linux-general-1/manually-change-module-dependencies-613779/)

DeadlyMuffin 01-15-2008 03:35 PM

Manually change module dependencies
 
I'm running openslug on a Linksys NSLU2, and I'm trying to get my USB wireless dongle to work. I got it running with no problems using openwrt, but I'd like to use the slug as a printserver among other things, and openwrt doesn't seem flexible enough.

My problem is the kernel-module-ieee80211-crypt-wep package requires a crypt module and isn't finding it. (I will update this post with the exact package, module and error message, I'm currently at work). I think the problem is that the necessary module isn't listed as a dependency for kernel-module-ieee80211-crypt-wep, so it isn't loaded beforehand.

Is there some way to manually change the module dependencies or, at the very least, some way to make sure one module is loaded before another?

Thanks a lot, more specific info coming soon.

UPDATE: The error message is "ieee80211_crypt_wep: could not allocate crypto API arc4" There's a arc4 module, but I can't ensure it loads before ieee802111_crypt_wep

Emerson 01-15-2008 04:38 PM

See man depmod. Chances are you don't have that module. Which means you have to build it.

DeadlyMuffin 01-15-2008 10:20 PM

I have depmod, but it doesn't seem to change anything. It just lists dependencies.

Emerson 01-15-2008 10:52 PM

It certainly does. See man depmod. It builds modules.dep file in modules directory. What module is required? You may need to build it.

DeadlyMuffin 01-16-2008 11:30 AM

Yes, it does build the modules.dep file, but that file is regenerated every time I boot, so I can't change the dependency there. I don't see anything on the man page describing how depmod can change dependencies, it seems only to list them.

From the man page: "depmod creates a list of module dependencies, by reading each module under /lib/modules/version and determining what symbols it exports, and what symbols it needs. By default this list is written to modules.dep in the same directory."

I've got the module, and I can see from modules.dep where the dependency needs to be, I just can't change it! The module loads fine, but I don't think it's loading before ieee80211_crypt_wep

Emerson 01-16-2008 11:59 AM

I regret I cannot help much here. I build always my own kernels, I use modules only in very rare cases if I need to pass parameters to them. There is /etc/modules.autoload.d/<kernelversion> file in Gentoo to load modules at boot time. There probably is something similar in your distro, too.

DeadlyMuffin 01-16-2008 12:04 PM

I understand, I'm used to building my own kernels too. I'm a bit stuck at this point as I really can't recompile the kernel on the slug itself. I may end up going back to openwrt, as much as I'd rather not.

Emerson 01-16-2008 12:15 PM

Other thoughts:
1. Do not let depmod run at boot time, it really isn't necessary.
2. Use a custom script to load the module you need earlier than rest.

DeadlyMuffin 01-16-2008 12:21 PM

Quote:

Originally Posted by Emerson (Post 3024714)
Other thoughts:
1. Do not let depmod run at boot time, it really isn't necessary.
2. Use a custom script to load the module you need earlier than rest.

I thought of that, I just can't find out what's starting it! I'll search for a bit longer,then switch back if I can't figure it out.

Even if I can stop depmod, I'll have to re-edit modules.dep and add my changes every time I install a new module since it will be regenerated.

This is killing me because on any other computer I'd simply put arc4 into the kernel instead of as a module!


All times are GMT -5. The time now is 04:10 PM.