Ian FREISLICH wrote: > Dinesh Nair wrote: > > On Mon, 27 Jul 2009 14:37:34 +0200, Ian Freislich wrote: > > > I was wondering if anyone has successfully ported OSLEC to the > > > FreeBSD zaptel kernel module. > > > > zaptel-bsd trunk has it. get latest sources down, and just define > > ECHO_CAN_OSLEC in zaptel/zconfig.h > > *brilliant* This was my one-and-only reason for moving my asterisk > to linux.
Hmm. ng/ doesn't compile (needs the unit2minor patch below): brane] ~/zaptel-bsd/branches/ng # make make -C zaptel all Warning: Object directory not changed from original /usr/home/ianf/zaptel-bsd/branches/ng/zaptel cc -O2 -pipe -march=athlon64 -fno-strict-aliasing -Wall -D_KERNEL -DKLD_MODULE -nostdinc -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -c oslec_echo.c oslec_echo.c: In function 'echo_can_update': oslec_echo.c:164: error: SSE register return with SSE disabled *** Error code 1 Stop in /usr/home/ianf/zaptel-bsd/branches/ng/zaptel. *** Error code 1 Stop in /usr/home/ianf/zaptel-bsd/branches/ng. Trunk, compiles with this patch: Index: zaptel/zaptel.c =================================================================== --- zaptel/zaptel.c (revision 318) +++ zaptel/zaptel.c (working copy) @@ -244,7 +244,7 @@ while (1) { if (kthread_must_exit) { - kthread_exit(0); + kproc_exit(0); } ZAP_LOCK(toselwakeup_lock); @@ -430,8 +430,13 @@ snprintf(tmpname, 20, "%s%d", name, u); - *dev = make_dev(&zt_devsw, unit2minor(u), + *dev = make_dev(&zt_devsw, +#if __FreeBSD_version < 800062 + unit2minor(u), +#else + u, UID_ROOT, GID_WHEEL, 0600, tmpname); +#endif if(*dev) { @@ -1221,7 +1226,7 @@ ZAP_LOCK_INIT(toselwakeup_lock, "toselwakeup_lock"); kthread_must_exit = 0; - if (kthread_create(selwakeup_thread_handler, (void *)toselwakeup , &kthread, 0, 0, "zt_selwakeup_thread")) + if (kproc_create(selwakeup_thread_handler, (void *)toselwakeup, &kthread, 0, 0, "zt_selwakeup_thread")) { printf("Failed to create kthread\n"); } But, doesn't load: [brane] ~/zaptel-bsd/branches/ng # kldload zaptel kldload: can't load zaptel: Exec format error --kernel messages-- KLD zaptel.ko: depends on kernel - not available linker_load_file: Unsupported file type --- Do you have any pointers to get me going, I don't have much experience making kernel modules. Ian -- Ian Freislich _______________________________________________ --Bandwidth and Colocation Provided by http://www.api-digital.com-- Asterisk-BSD mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-bsd