[ELDK] error building kernel modules

Wolfgang Denk wd at denx.de
Thu Mar 25 20:58:54 CET 2010


Dear Mark Little,

In message <4BABB407.9030502 at ambientcorp.com> you wrote:
>
> PC with the Denx (4.2) toolchain.  Specifically, the kernel module build 
> step errors out with the following messages:
> 
>     if [ -r System.map -a -x
>     {path_to}/denxbuild/output/default_ppc_4xx.list_install/usr/bin/depmod.pl
>     ]; then
>     {path_to}/denx_build/output/default_ppc_4xx.list_install/usr/bin/depmod.pl
>     -ae -F System.map  -b
>     {path_to}/denxbuild/output/busybox_ppc_4xx.list_install/ppc_4xx 
>     2.6.30.10; fi
>     make[1]: *** [_modinst_post] Error 1
>     make[1]: Leaving directory `{path_to}/linux-2.6-denx'
>     Finished building and installing kernel modules

Um... this is obviously NOT the exact error messages. Next time,
please post the ORIGINAL error messages without any editing. Even if
you consider the editing to be helpful, it ain't.

> and there is no modules.dep file generated.  This looks to me like an 
> incompatibility between depmod.pl and the kernel Makefile.  
> Specifically, it appears that depmod.pl expects a -r (or -s) switch 
> before the kernel version, but the versions of depmod that I see in a 
> few different flavors of linux all expect the version parameter to be 
> positional (and not specified as a target of a switch).
> 
> Can anyone provide any insight into this problem, and/or a solution for it?

The trigger of the problem was this commit:

commit 75bccd881a49d2da796ec0852158f957dc023f61
Author: Gilles Espinasse <g.esp at free.fr>
Date:   Sat Mar 7 13:57:25 2009 +0100

    kbuild: remove unused -r option for module-init-tool depmod
    
    Following a thread on busybox mailing list
    depmod -r option is ignored by module-init-tools depmod
    -r option break busybox depmod.
    
    So the best solution look to remove -r from kernel Makefile
    
    Signed-off-by: Gilles Espinasse <g.esp at free.fr>
    Signed-off-by: Sam Ravnborg <sam at ravnborg.org>


The depmod.pl as included with ELDK 4.2 (release date April 01, 2008)
obviously predates this change and still uses the - then perfectly
legal - "--release" resp. "-r" argument.


For a fix, download a recent version of the BusyBox source code (for
example here [1]) and use the included "examples/depmod.pl" script as
a replacement.

[1] http://busybox.net/downloads/busybox-1.16.0.tar.bz2

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Real Programmers always confuse Christmas and Halloween because
OCT 31 == DEC 25 !  - Andrew Rutherford (andrewr at ucs.adelaide.edu.au)


More information about the eldk mailing list