[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

woody 3.0r2 compilation programme avec kernel 2.4.26



Bonjour,

j'essaye de compiler un module C faisant partie d'un logiciel de
sauvegarde (Netvault Replicator de Bakbone software).

j'ai un kernel 2.4.26 les sources sont
dans /usr/src/kernel-source-2.4.26 

j'ai binutils installé et gcc version 2.95.4 

la compilation et lancée par un shell qui contient :

#!/bin/sh

#. /etc/sysconfig/nvr

REV=`uname -r`

CC="gcc"
GCCVERS=`echo __GNUC__.x | $CC -E -xc - | tail -n 1 | tr -d ' '`

#
# There are three different ways to build the nvr kernel module. There's
a
# 2.4 module with a 2.x compiler, which is built with regparm=0, a
module
# built with a 3.x compiler and regparm=0, and a 2.6 module, which is
built
# with regparm=3. For 2.6 kernels built with regparm=0, modify the
Makefile
# in the 3.x-regparm directory.
#
ROOTDIR="/usr/src/kernel-source-2.4.26"
CDI_BASE_DIR="/usr/netvault/replicator"
case $REV in
        2.6*)
                MODULE="$CDI_BASE_DIR/lib/nvr_dr.o"
                cd $CDI_BASE_DIR/lib/build/3.x-regparm
                MAKEARGS="-C $ROOTDIR  SUBDIRS=
$CDI_BASE_DIR/lib/build/3.x-regpam modules"
                make $MAKEARGS > makeout 2>&1 || exit 1
                mv nvr_dr.ko $MODULE
                ;;
        2.4*)
                SOURCE="cd_os_structures.c"
                MODULE="$CDI_BASE_DIR/lib/nvr_dr.o"
                CFLAGS="-DMODULE -D__KERNEL__ -I$ROOTDIR/include -I. -c
$SOURCE"
                LD="ld"
                LDFLAGS="-m elf_i386 -r -o $MODULE"

                cd $CDI_BASE_DIR/lib/build/$GCCVERS
                $CC $CFLAGS > makeout 2>&1
                $LD $LDFLAGS *.o >> makeout 2>&1
                ;;
esac

dans mon cas je passe en 2.4*)

à la sortie j'ai un module nvr_dr.o que je dois installer avec insmod.

quand je lance insmod nvr_dr.o j'ai :

nvr_dr.o: unresolved symbol prefetch
nvr_dr.o:
Hint: You are trying to load a module without a GPL compatible license
      and it has unresolved symbols.  Contact the module supplier for
      assistance, only they can help you.

j'ai bien trouvé dans les sources /include/linux/prefech.h mais j'ai
l'impression qu'au moment de la compilation il n'est pas pris en compte.

Bon comme vous pouvez le voir je ne connais rien en compilation j'ai
fait une recherche rapide sur google qui me donne des infos mais ce
n'est pas clair pour moi et je ne sais pas comment résoudre ce pb ?

Merci

Patrick







Reply to: