[asterisk-dev] dahdi-linux include/ and out-of-tree modules

Tzafrir Cohen tzafrir.cohen at xorcom.com
Sun Mar 15 17:26:43 CDT 2009


Hi

dahdi-linux has several files under dahdi/include/ . user.h is the
interface exposed to userspace. The rest seem to be the rest of the
interface dahdi presents to modules.

So let's try building a module outside the tree:

The commands:

  wget http://svn.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wct1xxp.c
  echo obj-m = wct1xxp.o >Kbuild
  DAHDI_SRC="$HOME/Proj/Asterisk/Svn/dahdi-linux"
  echo "EXTRA_CFLAGS += -I$DAHDI_SRC/include" >>Kbuild
  make -C /lib/modules/`uname -r`/build M=$PWD modules

The output:

tzafrir at sweetmorn:/tmp/test$ wget http://svn.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wct1xxp.c
--2009-03-16 00:12:27--  http://svn.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wct1xxp.c
Resolving svn.digium.com... 76.164.171.226
Connecting to svn.digium.com|76.164.171.226|:80... connected.
 OK 200 תיינפ HTTP הבושת תלבקל ןיתממ ,החלשנ...
Length: 36331 (35K) [text/plain]
Saving to: `wct1xxp.c'

100%[======================================>] 36,331      37.7K/s   in 0.9s

2009-03-16 00:12:29 (37.7 KB/s) - `wct1xxp.c' saved [36331/36331]

tzafrir at sweetmorn:/tmp/test$ echo obj-m = wct1xxp.o >Kbuild
tzafrir at sweetmorn:/tmp/test$ echo "EXTRA_CFLAGS += -I$HOME/Proj/Asterisk/Svn/dahdi-linux/include" >>Kbuild
tzafrir at sweetmorn:/tmp/test$ make -C /lib/modules/`uname -r`/build M=$PWD modules
make: Entering directory `/usr/src/linux-headers-2.6.26-1-amd64'
  CC [M]  /tmp/test/wct1xxp.o
In file included from /tmp/test/wct1xxp.c:37:
/home/tzafrir/Proj/Asterisk/Svn/dahdi-linux/include/dahdi/kernel.h:39:26: error: dahdi_config.h: No such file or directory
/home/tzafrir/Proj/Asterisk/Svn/dahdi-linux/include/dahdi/kernel.h:99:19: error: ecdis.h: No such file or directory
In file included from /tmp/test/wct1xxp.c:37:
/home/tzafrir/Proj/Asterisk/Svn/dahdi-linux/include/dahdi/kernel.h:287: error: expected specifier-qualifier-list before ‘echo_can_disable_detector_state_t’
/tmp/test/wct1xxp.c: In function ‘t1xxp_rbsbits’:
/tmp/test/wct1xxp.c:562: error: ‘struct dahdi_chan’ has no member named ‘txsig’
/tmp/test/wct1xxp.c:566: error: ‘struct dahdi_chan’ has no member named ‘txsig’
/tmp/test/wct1xxp.c:569: error: ‘struct dahdi_chan’ has no member named ‘txsig’
/tmp/test/wct1xxp.c: In function ‘t1xxp_startup’:
/tmp/test/wct1xxp.c:617: error: ‘struct dahdi_chan’ has no member named ‘lin2x’
/tmp/test/wct1xxp.c:619: error: ‘struct dahdi_chan’ has no member named ‘lin2x’
/tmp/test/wct1xxp.c: In function ‘t1xxp_check_sigbits’:
/tmp/test/wct1xxp.c:971: error: ‘struct dahdi_chan’ has no member named ‘rxsig’
/tmp/test/wct1xxp.c:979: error: ‘struct dahdi_chan’ has no member named ‘rxsig’
/tmp/test/wct1xxp.c:997: error: ‘struct dahdi_chan’ has no member named ‘rxsig’
make[1]: *** [/tmp/test/wct1xxp.o] 1 הלקת
make: *** [_module_/tmp/test] 2 הלקת
make: Leaving directory `/usr/src/linux-headers-2.6.26-1-amd64'


dahdi_config.h seems to me indeed part of the interface. ecdis.h is
mostly implementation and internal to dahdi.

-- 
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen at xorcom.com
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir



More information about the asterisk-dev mailing list