From: Chris Hallinan <clh@net1plus.com>
To: Markus Westergren <markus.westergren@biologigrand.ac>
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: Cross-compile kernel modules
Date: Sun, 20 Feb 2005 09:18:40 -0500 [thread overview]
Message-ID: <20050220141840.GC4565@net1plus.com> (raw)
In-Reply-To: <Pine.LNX.4.50.0502201034520.25626-100000@220a.licentiaten.umea.hsb.se>
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
----------------------------------
next prev parent reply other threads:[~2005-02-20 14:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-20 9:49 Cross-compile kernel modules Markus Westergren
2005-02-20 14:18 ` Chris Hallinan [this message]
2005-02-21 10:37 ` Markus Westergren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050220141840.GC4565@net1plus.com \
--to=clh@net1plus.com \
--cc=linuxppc-embedded@ozlabs.org \
--cc=markus.westergren@biologigrand.ac \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.