[Asterisk-Users] ztdummy on gentoo 2005.1

Tzafrir Cohen tzafrir at cohens.org.il
Thu Feb 9 08:34:02 MST 2006


On Thu, Feb 09, 2006 at 09:10:26AM -0600, Miguel wrote:
> Tzafrir Cohen wrote:
> 
> >On Wed, Feb 08, 2006 at 07:10:16PM -0600, Miguel wrote:
> > 
> >
> >>Hi i followed this instructions for installing ztdummy on a 2.6 kernel 
> >>(taken from 
> >>http://www.voip-info.org/wiki/index.php?page=Asterisk+timer+ztdummy
> >>
> >>)
> >>
> >>cd /usr/src/zaptel
> >>
> >>  * READ /usr/src/zaptel/README.udev and follow the steps
> >>  * check modules on: /etc/sysconfig/zaptel> if you have no digium
> >>    hardware comment out all modeules except ztdummy.
> >>
> >>- make linux26
> >>- make install
> >>- Reboot to make udev changes take effect
> >>   
> >>
> >
> >Why reboot? Shouldn't it take effect immidietly for new devices?
> > 
> >
> I dont know, i just followed the instructions :-)
> 
> > 
> >
> >>voip zaptel-1.2.3 # modprobe ztdummy
> >>FATAL: Error inserting ztdummy 
> >>(/lib/modules/2.6.12-gentoo-r10/misc/ztdummy.o): Invalid module format
> >>FATAL: Error running install command for ztdummy
> >>   
> >>
> >
> >ztdummy.o shouldn't have been copied in the first place, though.
> >
> >Could you please give a more detailed log of what happened in 'make
> >linux26' and 'make install'?
> >
> > 
> >
> 
> sure, this the log result:
> 
> Makefile:204: target `ztdummy.o' given more than once in the same rule.

Something is bad. Did you edit Makefile?

> cc -I. -O4 -g -Wall -DBUILDING_TONEZONE    -DSTANDALONE_ZAPATA 
> -DZAPTEL_CONFIG=\"/etc/zaptel.conf\"   -c -o gendigits.o gendigits.c
> cc -o gendigits gendigits.o -lm
> ./gendigits
> cc -I. -O4 -g -Wall -DBUILDING_TONEZONE    -DSTANDALONE_ZAPATA 
> -DZAPTEL_CONFIG=\"/etc/zaptel.conf\"    makefw.c   -o makefw
> ./makefw tormenta2.rbt tor2fw > tor2fw.h
> Loaded 69900 bytes from file
> ./makefw pciradio.rbt radfw > radfw.h
> Loaded 42096 bytes from file
> ZAPTELVERSION="" build_tools/make_version_h > version.h.tmp
> if cmp -s version.h.tmp version.h ; then echo; else \
>    mv version.h.tmp version.h ; \
> fi
> 
> rm -f version.h.tmp
> cc -I. -O4 -g -Wall -DBUILDING_TONEZONE    -DSTANDALONE_ZAPATA 
> -DZAPTEL_CONFIG=\"/etc/zaptel.conf\"   -c -o ztcfg.o ztcfg.c
> cc -c -fPIC -I. -O4 -g -Wall -DBUILDING_TONEZONE    -DSTANDALONE_ZAPATA 
> -DZAPTEL_CONFIG=\"/etc/zaptel.conf\" -DBUILDING_TONEZONE -o zonedata.lo 
> zonedata.c
> cc -c -fPIC -I. -O4 -g -Wall -DBUILDING_TONEZONE    -DSTANDALONE_ZAPATA 
> -DZAPTEL_CONFIG=\"/etc/zaptel.conf\" -DBUILDING_TONEZONE -o tonezone.lo 
> tonezone.c
> ar rcs libtonezone.a zonedata.lo tonezone.lo
> cc -o ztcfg ztcfg.o libtonezone.a -lm
> cc -I. -O4 -g -Wall -DBUILDING_TONEZONE    -DSTANDALONE_ZAPATA 
> -DZAPTEL_CONFIG=\"/etc/zaptel.conf\"   -c -o torisatool.o torisatool.c
> cc -o torisatool torisatool.o
> cc -I. -O4 -g -Wall -DBUILDING_TONEZONE    -DSTANDALONE_ZAPATA 
> -DZAPTEL_CONFIG=\"/etc/zaptel.conf\"   -c -o ztmonitor.o ztmonitor.c
> cc -o ztmonitor ztmonitor.o
> cc -o ztspeed.o -c ztspeed.c
> cc -o ztspeed ztspeed.o
> cc -I. -O4 -g -Wall -DBUILDING_TONEZONE    -DSTANDALONE_ZAPATA 
> -DZAPTEL_CONFIG=\"/etc/zaptel.conf\"    zttest.c   -o zttest
> cc -I. -O4 -g -Wall -DBUILDING_TONEZONE    -DSTANDALONE_ZAPATA 
> -DZAPTEL_CONFIG=\"/etc/zaptel.conf\"   -c -o fxotune.o fxotune.c
> cc -o fxotune fxotune.o -lm
> /lib/modules/2.6.12-gentoo-r10/build
> make -C /lib/modules/2.6.12-gentoo-r10/build 
> SUBDIRS=/usr/local/src/zaptel-1.2.3 modules
> make[1]: Entering directory `/usr/src/linux-2.6.12-gentoo-r10'
> /usr/local/src/zaptel-1.2.3/Makefile:204: target `ztdummy.o' given more 
> than once in the same rule.
>  CC [M]  /usr/local/src/zaptel-1.2.3/ztdummy.o
>  Building modules, stage 2.
>  MODPOST
> *** Warning: "zt_transmit" [/usr/local/src/zaptel-1.2.3/ztdummy.ko] 
> undefined!
> *** Warning: "zt_receive" [/usr/local/src/zaptel-1.2.3/ztdummy.ko] 
> undefined!
> *** Warning: "zt_unregister" [/usr/local/src/zaptel-1.2.3/ztdummy.ko] 
> undefined!
> *** Warning: "zt_register" [/usr/local/src/zaptel-1.2.3/ztdummy.ko] 
> undefined!

Something is wrong. Not sure exactly what.

Now the overly-complicated "install" target's script springs into action
and manages to install the .o file into the modules dir. Funny, don't
you think?

>  CC      /usr/local/src/zaptel-1.2.3/ztdummy.mod.o
>  LD [M]  /usr/local/src/zaptel-1.2.3/ztdummy.ko
> make[1]: Leaving directory `/usr/src/linux-2.6.12-gentoo-r10'
> cc -shared -Wl,-soname,libtonezone.so.1.0 -lm -o libtonezone.so 
> zonedata.lo tonezone.lo
> install -m 444 udev/zaptel.rules-combined /etc/udev/rules.d/zaptel.rules
> install -D -m 755 ztcfg /sbin/ztcfg
> if [ -f sethdlc-new ]; then \
>    install -D -m 755 sethdlc-new /sbin/sethdlc; \
> elif [ -f sethdlc ]; then \
>    install -D -m 755 sethdlc /sbin/sethdlc ; \
> fi
> if [ -f zttool ]; then install -D -m 755 zttool /sbin/zttool; fi
> if [ -f zaptel.ko ]; then \
>    for x in ztdummy.ko ztdummy.ko; do \
>        rm -f /lib/modules/2.6.12-gentoo-r10/extra/$x ; \
>    done; \
>    make -C /lib/modules/2.6.12-gentoo-r10/build 
> SUBDIRS=/usr/local/src/zaptel-1.2.3 INSTALL_MOD_PATH= 
> INSTALL_MOD_DIR=misc modules_install; \
>    if ! [ -f wcfxsusb.ko ]; then \
>        rm -f /lib/modules/2.6.12-gentoo-r10/misc/wcfxsusb.ko; \
>    fi; \
>    rm -f /lib/modules/2.6.12-gentoo-r10/misc/wcfxs.ko; \
> else \
>    for x in ztdummy.o ztdummy.o; do \
>        install -D -m 644 $x /lib/modules/2.6.12-gentoo-r10/misc/$x ; \
>    done; \
>    if ! [ -f wcfxsusb.o ]; then \
>        rm -f /lib/modules/2.6.12-gentoo-r10/misc/wcfxsusb.o; \
>    fi; \
>    rm -f /lib/modules/2.6.12-gentoo-r10/misc/wcfxs.o; \
> fi
> install -D -m 755 libtonezone.so /usr/lib/libtonezone.so.1.0
> [ `id -u` = 0 ] && /sbin/ldconfig || :
> rm -f /usr/lib/libtonezone.so
> ln -sf libtonezone.so.1.0 \
>    /usr/lib/libtonezone.so.1
> ln -sf libtonezone.so.1.0 \
>    /usr/lib/libtonezone.so
> if [ -x /usr/sbin/sestatus ] && (/usr/sbin/sestatus | grep "SELinux 
> status:" | grep -q "enabled") ; then restorecon -v 
> /usr/lib/libtonezone.so; fi
> install -D -m 644 zaptel.h /usr/include/linux/zaptel.h
> install -D -m 644 torisa.h /usr/include/linux/torisa.h
> install -D -m 644 tonezone.h /usr/include/tonezone.h
> install -m 644 doc/ztcfg.8 /usr/share/man/man8
> install -m 644 doc/zttool.8 /usr/share/man/man8
> if [ -n "/etc/modules.d/zaptel" ]; then \
>    if [ -f /etc/modules.d/zaptel ]; then mv -f /etc/modules.d/zaptel 
> /etc/modules.d/zaptel.bak ; fi; \
>    cat /etc/modules.d/zaptel.bak | grep -v "alias char-major-250" | \
>    grep -v "post-install torisa /sbin/ztcfg" | \
>    grep -v "post-install wcfxsusb /sbin/ztcfg" | \
>    grep -v "alias wctdm" | \
>    grep -v "post-install wctdm /sbin/ztcfg" > /etc/modules.d/zaptel; \
>    if ! grep "options torisa" /etc/modules.d/zaptel; then \
>        echo "options torisa base=0xd0000" >> /etc/modules.d/zaptel; \
>    fi; \
>    if ! grep "alias char-major-196" /etc/modules.d/zaptel; then \
>        echo "alias char-major-196 torisa" >> /etc/modules.d/zaptel; \
>    fi; \
>    for x in ztdummy ztdummy; do \
>        if ! grep -q "post-install $x" /etc/modules.d/zaptel; then \
>            if ! grep -q "install $x " /etc/modules.d/zaptel; then \
>                if [ "$x" != "zaptel" ] ; then \
>                    if [ -f zaptel.ko ]; then echo "install $x 
> /sbin/modprobe --ignore-install $x && /sbin/ztcfg" >> 
> /etc/modules.d/zaptel; \
>                    else echo "post-install $x /sbin/ztcfg" >> 
> /etc/modules.d/zaptel; \
>                    fi; \
>                fi; \
>            fi; \
>        fi; \
>    done; \
>    if ! grep "ias wcfxs" /etc/modules.d/zaptel; then \
>        echo "alias wcfxs wctdm" >> /etc/modules.d/zaptel; \
>    fi; \
>    if ! grep "alias wct2xxp" /etc/modules.d/zaptel; then \
>        echo "alias wct2xxp wct4xxp" >> /etc/modules.d/zaptel; \
>    fi; \
> fi
> options torisa base=0xd0000
> alias char-major-196 torisa
> if [ -d /etc/modutils ]; then \
>    /sbin/update-modules ; \
> fi
> [ `id -u` = 0 ] && /sbin/depmod -a 2.6.12-gentoo-r10 || :
> [ -f /etc/zaptel.conf ] || install -D -m 644 zaptel.conf.sample 
> /etc/zaptel.conf
> 
> thanks in advance
> ---
> Miguel
> 
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
> 
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
Tzafrir Cohen         | tzafrir at jbr.cohens.org.il | VIM is
http://tzafrir.org.il |                           | a Mutt's  
tzafrir at cohens.org.il |                           |  best
ICQ# 16849755         |                           | friend




More information about the asterisk-users mailing list