Upgrading from zaptel to dahdi

I am trying to upgrade a trixbox 2.6.2.2. unit to use dahdi. I have a new digium A4AF00 card that requires dahdi. Here is the output I get when trying to use make:

[trixbox1.localdomain dahdi-linux-complete-2.10.2+2.10.2]# make
make -C linux all
make[1]: Entering directory /root/dahdi-linux-complete-2.10.2+2.10.2/linux' make -C drivers/dahdi/firmware firmware-loaders make[2]: Entering directory/root/dahdi-linux-complete-2.10.2+2.10.2/linux/drivers/dahdi/firmware’
make[2]: Leaving directory /root/dahdi-linux-complete-2.10.2+2.10.2/linux/drivers/dahdi/firmware' make -C /lib/modules/2.6.18-128.1.10.el5/build SUBDIRS=/root/dahdi-linux-complete-2.10.2+2.10.2/linux/drivers/dahdi DAHDI_INCLUDE=/root/dahdi-linux-complete-2.10.2+2.10.2/linux/include DAHDI_MODULES_EXTRA=" " HOTPLUG_FIRMWARE=yes modules DAHDI_BUILD_ALL=m make[2]: Entering directory/usr/src/kernels/2.6.18-128.1.10.el5-i686’
CC [M] /root/dahdi-linux-complete-2.10.2+2.10.2/linux/drivers/dahdi/wcxb_spi.o
/root/dahdi-linux-complete-2.10.2+2.10.2/linux/drivers/dahdi/wcxb_spi.c: In function ‘wcxb_spi_sync’:
/root/dahdi-linux-complete-2.10.2+2.10.2/linux/drivers/dahdi/wcxb_spi.c:382: error: implicit declaration of function ‘try_wait_for_completion’
make[3]: *** [/root/dahdi-linux-complete-2.10.2+2.10.2/linux/drivers/dahdi/wcxb_spi.o] Error 1
make[2]: *** [module/root/dahdi-linux-complete-2.10.2+2.10.2/linux/drivers/dahdi] Error 2
make[2]: Leaving directory /usr/src/kernels/2.6.18-128.1.10.el5-i686' make[1]: *** [modules] Error 2 make[1]: Leaving directory/root/dahdi-linux-complete-2.10.2+2.10.2/linux’
make: *** [all] Error 2
[trixbox1.localdomain dahdi-linux-complete-2.10.2+2.10.2]#

Any suggestions? I am very new to linux

Thanks

That error is because trixbox has installed a really old kernel. If you cannot update your kernel, or your distro to AsteriskNow, you might be able to change the code so that the newer version of DAHDI compiles / installs.

Looking at the following section of include/dahdi/kernel.h:

#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 27)

#  ifndef RHEL_RELEASE_VERSION
/* I'm not sure which 5.x release this was backported into. */
static inline int try_wait_for_completion(struct completion *x)
{
        unsigned long flags;
        int ret = 1;

        spin_lock_irqsave(&x->wait.lock, flags);
        if (!x->done)
                ret = 0;
        else
                x->done--;
        spin_unlock_irqrestore(&x->wait.lock, flags);
        return ret;
}
#endif

change the that says “# ifndef RHEL_RELEASE_VERSION” to “# if 1” so that the backported version of try_wait_for_completion is used.

But still…you’ll probably have much more success if you can update to a newer distribution.