A raiz del comentario de un usuario me he acordado de un post que tenía en mente pendiente desde hace tiempo: un pequeño HowTo para compilar Zaptel o DAHDI en un equipo con Xen.
El problema que tenemos a la hora de compilar ztdummy o dahdi_dummy en Xen es la fuente de timming. En las versiones actuales de Zaptel y DAHDI el timming (cuando no tenemos tarjetas) se puede obtener de tres fuentes:
En Xen (si usamos el kernel oficial 2.6.18 parcheado) no tenemos disponibles ni la primera ni la segunda opción, pero Zaptel se cree que SÍ que tenemos acceso al RTC, y por tanto falla.
Para solucionarlo tenemos que editar el fichero ztdumy.c o dahdi_dumy.c y localizar la siguiente sección:
/*
* NOTE: (only applies to kernel 2.6)
* If using an i386 architecture without a PC real-time clock,
* the #define USE_RTC should be commented out.
*/
#if defined(__i386__) || defined(__x86_64__)
#if LINUX_VERSION_CODE >= VERSION_CODE(2,6,15)
/* The symbol hrtimer_forward is only exported as of 2.6.22: */
#if defined(CONFIG_HIGH_RES_TIMERS) && LINUX_VERSION_CODE >= VERSION_CODE(2,6,22)
#define USE_HIGHRESTIMER
#else
#define USE_RTC
#endif
#else
#if 0
#define USE_RTC
#endif
#endif
#endif
Si os fijáis el comentario ya nos indica lo que tenemos que hacer: comentar las líneas correspondientes para que no se defina el flag USE_RTC. Para ello modificamos el código anterior dejándolo así:
/*
* NOTE: (only applies to kernel 2.6)
* If using an i386 architecture without a PC real-time clock,
* the #define USE_RTC should be commented out.
*/
#if defined(__i386__) || defined(__x86_64__)
#if LINUX_VERSION_CODE >= VERSION_CODE(2,6,15)
/* The symbol hrtimer_forward is only exported as of 2.6.22: */
#if defined(CONFIG_HIGH_RES_TIMERS) && LINUX_VERSION_CODE >= VERSION_CODE(2,6,22)
#define USE_HIGHRESTIMER
#else
//#define USE_RTC
#endif
#else
#if 0
//#define USE_RTC
#endif
#endif
#endif
De esta manera, Zaptel o DAHDI compilarán sin problemas en un entorno Xen y podremos utilizar el dummy driver necesario para MeetMe o el IAX trunking.














Pingback: DAHDI 2.2 mejora el soporte en entornos virtualizados | Mi Brain-Training Personal