All of lore.kernel.org
 help / color / mirror / Atom feed
* Cross-compile kernel modules
@ 2005-02-20  9:49 Markus Westergren
  2005-02-20 14:18 ` Chris Hallinan
  0 siblings, 1 reply; 3+ messages in thread
From: Markus Westergren @ 2005-02-20  9:49 UTC (permalink / raw)
  To: linuxppc-embedded

Hi,

I'm trying to get loadable kernel modules support on a Adder development board.
The kernel is cross-compiled on an regular PC and boots fine but I can't insert
any modules into the running kernel, all I get is undefined reference for all
functions called by the module. I use the kernel module utilities (insmod,
lsmod, modprobe) supplied by BusyBox to manage the modules on the Adder board.

What am I doning wrong? Do I need to perform any aditional steps when
cross-compiling kernel modules? My cross-compile toolchain have no depmod so I
have no modules.dep file. But I only need it if a module depend on other
modules, right?

/Markus

-----------------
Markus Westergren
Biologigrand 17
907 32 Umea
SWEDEN

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Cross-compile kernel modules
  2005-02-20  9:49 Cross-compile kernel modules Markus Westergren
@ 2005-02-20 14:18 ` Chris Hallinan
  2005-02-21 10:37   ` Markus Westergren
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Hallinan @ 2005-02-20 14:18 UTC (permalink / raw)
  To: Markus Westergren; +Cc: linuxppc-embedded

On Sun, Feb 20, 2005 at 10:49:50AM +0100, Markus Westergren wrote:
> Hi,
> 
> I'm trying to get loadable kernel modules support on a Adder development board.
> The kernel is cross-compiled on an regular PC and boots fine but I can't insert
> any modules into the running kernel, all I get is undefined reference for all
> functions called by the module. I use the kernel module utilities (insmod,
> lsmod, modprobe) supplied by BusyBox to manage the modules on the Adder board.

You don't give many details, but in general the above should
work, assuming you have properly built and configured your
kernel, modules and root file system.

> What am I doning wrong? Do I need to perform any aditional steps when

Yes. You need to make sure your modules are built from the same
kernel source tree, with the same configuration as the kernel you
are booting.  Then you need to install those modules on your
target's root file system.

In general, you must do a 'make modules' followed by a 'make
modules_install' with INSTALL_MOD_PATH pointing to your target's
root file system.  The details depend on how you've built your
rootfs and your cross-development setup.  I usually mount my
rootfs image on a loop device somewhere, and point
INSTALL_MOD_PATH to it.

> cross-compiling kernel modules? My cross-compile toolchain have no depmod so I

Fix your development environment.

> have no modules.dep file. But I only need it if a module depend on other
> modules, right?

modprobe depends on modules.dep.  You can run depmod on your
target assuming you have the depmod binary for your architecture
on your target file system.

Regards,

Chris

> 
> /Markus
> 
> -----------------
> Markus Westergren
> Biologigrand 17
> 907 32 Umea
> SWEDEN
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded

-- 

Chris Hallinan
clh at net1plus d0t com - via mutt/Linux
----------------------------------

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Cross-compile kernel modules
  2005-02-20 14:18 ` Chris Hallinan
@ 2005-02-21 10:37   ` Markus Westergren
  0 siblings, 0 replies; 3+ messages in thread
From: Markus Westergren @ 2005-02-21 10:37 UTC (permalink / raw)
  To: Chris Hallinan; +Cc: Markus Westergren, linuxppc-embedded

On Sun, 20 Feb 2005, Chris Hallinan wrote:

> On Sun, Feb 20, 2005 at 10:49:50AM +0100, Markus Westergren wrote:
> > Hi,
> >
> > I'm trying to get loadable kernel modules support on a Adder development board.
> > The kernel is cross-compiled on an regular PC and boots fine but I can't insert
> > any modules into the running kernel, all I get is undefined reference for all
> > functions called by the module. I use the kernel module utilities (insmod,
> > lsmod, modprobe) supplied by BusyBox to manage the modules on the Adder board.
>
> You don't give many details, but in general the above should
> work, assuming you have properly built and configured your
> kernel, modules and root file system.
>
> > What am I doning wrong? Do I need to perform any aditional steps when
>
> Yes. You need to make sure your modules are built from the same
> kernel source tree, with the same configuration as the kernel you
> are booting.  Then you need to install those modules on your
> target's root file system.
>
> In general, you must do a 'make modules' followed by a 'make
> modules_install' with INSTALL_MOD_PATH pointing to your target's
> root file system.  The details depend on how you've built your
> rootfs and your cross-development setup.  I usually mount my
> rootfs image on a loop device somewhere, and point
> INSTALL_MOD_PATH to it.
>
> > cross-compiling kernel modules? My cross-compile toolchain have no depmod so I
>
> Fix your development environment.
>
> > have no modules.dep file. But I only need it if a module depend on other
> > modules, right?
>
> modprobe depends on modules.dep.  You can run depmod on your
> target assuming you have the depmod binary for your architecture
> on your target file system.
>
> Regards,
>
> Chris
>
> >
> > /Markus
> >
> > -----------------
> > Markus Westergren
> > Biologigrand 17
> > 907 32 Umea
> > SWEDEN
> > _______________________________________________
> > Linuxppc-embedded mailing list
> > Linuxppc-embedded@ozlabs.org
> > https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
Thanks for your reply. I got it to work by upgrading my version of BusyBox to
1.00. Had 1.00-pre3 before which is really old.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-02-21 10:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-20  9:49 Cross-compile kernel modules Markus Westergren
2005-02-20 14:18 ` Chris Hallinan
2005-02-21 10:37   ` Markus Westergren

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.