[BusyBox] insmod and multiple versions clarification

Andrew Dennison andrew.dennison at motec.com.au
Thu Nov 20 00:35:31 UTC 2003


Stewart Brodie wrote:
>
> We do not have modprobe in our box.  Neither do we have a
> modules.dep file -
> and from a brief look at the source code, the former doesn't do anything
> without the latter.
>
> Something in the kernel's build process attempts to run depmod,
> but it fails
> because it (presumably the x86 Linux binary) doesn't understand the MIPS
> Linux kernel modules.
>
> It seems that I have to find the modules myself and pass the
> names directly
> to insmod.

Or build a simple modules.dep in your build process?

A simple approach could be just to test if the file
/lib/modules/`uname -r`/misc/"${prefix}${module}".o
exists before running insmod?

>
> > ps: I think "external" modules normally go under /lib/modules/`uname
> > -r`/misc/ at least that's where I started putting my custom modules them
> > after doing some reading about this a while ago.
>
> Right, I might change our build system to put stuff in there instead then.
> One difficulty my build system has is knowing where exactly to install
> modules to.  How does it know what `uname -r` is going to be at
> run-time on
> the target?

I keep my kernels in versioned directories and tell the build process which
kernel to build against - simple and effective. I include a file called
".buildvars" in my Rules.make so I don't have to hack the makefile to build
for a different kernel. Nothing unique, just ideas borrowed from other
makefiles.

Andrew




More information about the busybox mailing list