[asterisk-dev] compiling Dahdi on blackfin

Dan Amarandei dan.amarandei at gmail.com
Sun Nov 15 22:58:11 CST 2009


On Fri, 2009-11-13 at 04:33 -0600, asterisk-dev-request at lists.digium.com
wrote:

> Date: Fri, 13 Nov 2009 10:18:32 +0200
> From: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
> Subject: Re: [asterisk-dev] compiling Dahdi on blackfin
> To: asterisk-dev at lists.digium.com
> Message-ID: <20091113081832.GM3204 at xorcom.com>
> Content-Type: text/plain; charset=utf-8
> 
> On Thu, Nov 12, 2009 at 10:36:59PM -0500, Dan Amarandei wrote:
> > Hi everyone,
> > 
> > I am having  issues with cross compiling DAHDI on the blackfin processor and
> > Tzafrir suggested I post my question here.
> > 
> > Here is what I get when I simply run make KSRC=wherever my uClinux kernel
> >  is - right in the dahdi linux directory:
> > 
> > 
> > 
> > danamarandei at ubuntu:~/apps/BAPS2/dahdi-linux-2.2.0.2$ make
> > KSRC=~/apps/BAPS2/uClinux-dist/
> > make -C drivers/dahdi/firmware firmware-loadersmake[1]: Entering directory
> > `/home/danamarandei/apps/BAPS2/dahdi-linux-2.2.0.2/drivers/dahdi/firmware'make[1]:
> > Leaving directory
> > `/home/danamarandei/apps/BAPS2/dahdi-linux-2.2.0.2/drivers/dahdi/firmware'echo
> > Prreq runningPrreq runningmake -C
> > /home/danamarandei/apps/BAPS2/uClinux-dist/
> > SUBDIRS=/home/danamarandei/apps/BAPS2/dahdi-linux-2.2.0.2/drivers/dahdi
> > DAHDI_INCLUDE=/home/danamarandei/apps/BAPS2/dahdi-linux-2.2.0.2/include
> > DAHDI_MODULES_EXTRA=" " HOTPLUG_FIRMWARE=no modules
> > DAHDI_BUILD_ALL=mmake[1]: Entering directory
> > `/home/danamarandei/apps/BAPS2/uClinux-dist'. linux-2.6.x/.config; if [
> > "$CONFIG_MODULES" = "y" ]; then \ [ -d linux-2.6.x/modules ] || mkdir
> > linux-2.6.x/modules; \ make ARCH=blackfin   CROSS_COMPILE=bfin-uclinux- -C
> > linux-2.6.x modules; \ fimake[2]: Entering directory
> > `/home/danamarandei/apps/BAPS2/uClinux-dist/linux-2.6.x'/home/danamarandei/apps/BAPS2/dahdi-linux-2.2.0.2/drivers/dahdi/Kbuild:85:
> > CPU Architecture 'blackfin' does not support VPMADT032 or HPEC.
> > Skipping.  CC [M]
> >  /home/danamarandei/apps/BAPS2/dahdi-linux-2.2.0.2/drivers/dahdi/voicebus/voicebus.o/home/danamarandei/apps/BAPS2/dahdi-linux-2.2.0.2/drivers/dahdi/voicebus/voicebus.c:
> > In function
> > ?vb_initialize_descriptors?:/home/danamarandei/apps/BAPS2/dahdi-linux-2.2.0.2/drivers/dahdi/voicebus/voicebus.c:316:
> > warning: implicit declaration of function
> > ?pci_alloc_consistent?/home/danamarandei/apps/BAPS2/dahdi-linux-2.2.0.2/drivers/dahdi/voicebus/voicebus.c:317:
> > warning: assignment makes pointer from integer without a
> > cast/home/danamarandei/apps/BAPS2/dahdi-linux-2.2.0.2/drivers/dahdi/voicebus/voicebus.c:
> > In function
> > ?vb_initialize_tx_descriptors?:/home/danamarandei/apps/BAPS2/dahdi-linux-2.2.0.2/drivers/dahdi/voicebus/voicebus.c:336:
> > error: ?DMA_TO_DEVICE? undeclared (first use in this
> > function)/home/danamarandei/apps/BAPS2/dahdi-linux-2.2.0.2/drivers/dahdi/voicebus/voicebus.c:336:
> > error: (Each undeclared identifier is reported only
> > once/home/danamarandei/apps/BAPS2/dahdi-linux-2.2.0.2/drivers/dahdi/voicebus/voicebus.c:336:
> > error: for each function it appears
> > in.)/home/danamarandei/apps/BAPS2/dahdi-linux-2.2.0.2/drivers/dahdi/voicebus/voicebus.c:
> > In function
> > ?vb_initialize_rx_descriptors?:/home/danamarandei/apps/BAPS2/dahdi-linux-2.2.0.2/drivers/dahdi/voicebus/voicebus.c:343:
> 
> Hmm... There's no point in building voicebus for your system unless it has PCI.
> 
> > As an alternative I have copied the dahdi-linux-2.2.0.2/drivers/dahdi into
> > uClinux-dist/linux-2.6.x/drivers and added a line in
> > uClinux-dist/linux-2.6.x/drivers/Makefile like this "obj -$(CONFIG_DAHDI)
> >   +=dahdi/"  and in uClinux-dist/linux-2.6.x/drivers/Kconfig like this
> > "source "drivers/dahdi/Kconfig"". When I run make xconfig in the
> > uClinux-dist folder  Customize kernel settings now shows DAHDI support  with
> > DAHDI Echo Cancelers as a submenu, DAHDI transcoding support as the second
> > submenu, and Xorcom Astribank Support as a further option. 
> 
> The rest are disabled due to missing PCI support. See
> drivers/dahdi/Kconfig .
> 
> > I disabled
> > everything but the DAHDI transcoding support - yet when I go on to make I
> > get build errors where it looks like include folders are not there.
> 
> What error do you get, exactly?
> 
> -- 
>                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
> 
> 
> 

I am getting about 280K of text since make keeps going and going for
some reason,
here is the last few lines:

drivers/dahdi/dahdi_dynamic.c:607: error: ‘DAHDI_LAW_MULAW’ undeclared
(first use in this function)
drivers/dahdi/dahdi_dynamic.c:608: error: ‘DAHDI_FLAG_RBS’ undeclared (first use in this function)
drivers/dahdi/dahdi_dynamic.c:615: error: dereferencing pointer to incomplete type
drivers/dahdi/dahdi_dynamic.c:615: error: dereferencing pointer to incomplete type
drivers/dahdi/dahdi_dynamic.c:615: error: dereferencing pointer to incomplete type
drivers/dahdi/dahdi_dynamic.c:616: error: dereferencing pointer to incomplete type
drivers/dahdi/dahdi_dynamic.c:616: error: ‘DAHDI_SIG_EM’ undeclared (first use in this function)
drivers/dahdi/dahdi_dynamic.c:616: error: ‘DAHDI_SIG_CLEAR’ undeclared (first use in this function)
drivers/dahdi/dahdi_dynamic.c:616: error: ‘DAHDI_SIG_FXSLS’ undeclared (first use in this function)
drivers/dahdi/dahdi_dynamic.c:617: error: ‘DAHDI_SIG_FXSKS’ undeclared (first use in this function)
drivers/dahdi/dahdi_dynamic.c:617: error: ‘DAHDI_SIG_FXSGS’ undeclared (first use in this function)
drivers/dahdi/dahdi_dynamic.c:617: error: ‘DAHDI_SIG_FXOLS’ undeclared (first use in this function)
drivers/dahdi/dahdi_dynamic.c:618: error: ‘DAHDI_SIG_FXOKS’ undeclared (first use in this function)
drivers/dahdi/dahdi_dynamic.c:618: error: ‘DAHDI_SIG_FXOGS’ undeclared (first use in this function)
drivers/dahdi/dahdi_dynamic.c:618: error: ‘DAHDI_SIG_SF’ undeclared (first use in this function)
drivers/dahdi/dahdi_dynamic.c:619: error: ‘DAHDI_SIG_DACS_RBS’ undeclared (first use in this function)
drivers/dahdi/dahdi_dynamic.c:619: error: ‘DAHDI_SIG_CAS’ undeclared (first use in this function)
drivers/dahdi/dahdi_dynamic.c:620: error: dereferencing pointer to incomplete type
drivers/dahdi/dahdi_dynamic.c:621: error: dereferencing pointer to incomplete type
drivers/dahdi/dahdi_dynamic.c:625: error: dereferencing pointer to incomplete type
drivers/dahdi/dahdi_dynamic.c:627:5: warning: "LINUX_VERSION_CODE" is not defined
drivers/dahdi/dahdi_dynamic.c:627:26: warning: "KERNEL_VERSION" is not defined
drivers/dahdi/dahdi_dynamic.c:627:40: error: missing binary operator before token "("
drivers/dahdi/dahdi_dynamic.c:632:5: warning: "LINUX_VERSION_CODE" is not defined
drivers/dahdi/dahdi_dynamic.c:632:27: warning: "KERNEL_VERSION" is not defined
drivers/dahdi/dahdi_dynamic.c:632:41: error: missing binary operator before token "("
drivers/dahdi/dahdi_dynamic.c:635: error: ‘fn’ undeclared (first use in this function)
drivers/dahdi/dahdi_dynamic.c:635: error: dereferencing pointer to incomplete type
drivers/dahdi/dahdi_dynamic.c:639: error: dereferencing pointer to incomplete type
drivers/dahdi/dahdi_dynamic.c:647: error: dereferencing pointer to incomplete type
drivers/dahdi/dahdi_dynamic.c:653: error: dereferencing pointer to incomplete type
drivers/dahdi/dahdi_dynamic.c:655: error: dereferencing pointer to incomplete type
drivers/dahdi/dahdi_dynamic.c:655: error: dereferencing pointer to incomplete type
drivers/dahdi/dahdi_dynamic.c:664: warning: implicit declaration of function ‘dahdi_register’
drivers/dahdi/dahdi_dynamic.c: In function ‘ztdynamic_ioctl’:
drivers/dahdi/dahdi_dynamic.c:697: error: storage size of ‘zds’ isn’t known
drivers/dahdi/dahdi_dynamic.c:707: error: ‘DAHDI_DYNAMIC_CREATE’ undeclared (first use in this function)
drivers/dahdi/dahdi_dynamic.c:708: warning: implicit declaration of function ‘copy_from_user’
drivers/dahdi/dahdi_dynamic.c:717: warning: implicit declaration of function ‘copy_to_user’
drivers/dahdi/dahdi_dynamic.c:720: error: ‘DAHDI_DYNAMIC_DESTROY’ undeclared (first use in this function)
drivers/dahdi/dahdi_dynamic.c:697: warning: unused variable ‘zds’
drivers/dahdi/dahdi_dynamic.c: At top level:
drivers/dahdi/dahdi_dynamic.c:732: error: ‘dahdi_dynamic_register’ redeclared as different kind of symbol
drivers/dahdi/dahdi_dynamic.c:79: error: previous declaration of ‘dahdi_dynamic_register’ was here
drivers/dahdi/dahdi_dynamic.c: In function ‘dahdi_dynamic_register’:
drivers/dahdi/dahdi_dynamic.c:736: error: dereferencing pointer to incomplete type
drivers/dahdi/dahdi_dynamic.c:739: error: dereferencing pointer to incomplete type
drivers/dahdi/dahdi_dynamic.c: At top level:
drivers/dahdi/dahdi_dynamic.c:747: error: ‘dahdi_dynamic_unregister’ redeclared as different kind of symbol
drivers/dahdi/dahdi_dynamic.c:80: error: previous declaration of ‘dahdi_dynamic_unregister’ was here
drivers/dahdi/dahdi_dynamic.c: In function ‘dahdi_dynamic_unregister’:
drivers/dahdi/dahdi_dynamic.c:756: error: dereferencing pointer to incomplete type
drivers/dahdi/dahdi_dynamic.c:756: error: dereferencing pointer to incomplete type
drivers/dahdi/dahdi_dynamic.c:758: error: dereferencing pointer to incomplete type
drivers/dahdi/dahdi_dynamic.c:762: error: dereferencing pointer to incomplete type
drivers/dahdi/dahdi_dynamic.c: In function ‘check_for_red_alarm’:
drivers/dahdi/dahdi_dynamic.c:799: error: ‘DAHDI_ALARM_RED’ undeclared (first use in this function)
drivers/dahdi/dahdi_dynamic.c: In function ‘ztdynamic_init’:
drivers/dahdi/dahdi_dynamic.c:822: warning: implicit declaration of function ‘dahdi_set_dynamic_ioctl’
make[3]: *** [drivers/dahdi/dahdi_dynamic.o] Error 1
make[2]: *** [drivers/dahdi] Error 2
  LD      lib/built-in.o
make[1]: *** [drivers] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/home/dan/apps/BAPS2/uClinux-dist/linux-2.6.x'
make: *** [linux] Error 1
dan at ubuntu:~/apps/BAPS2/uClinux-dist$


I uploaded the entire log here: http://www.opendrive.com/files/5762177_JfJF1/uClinux_compiled_w_dahdi.txt.

Thanks.






More information about the asterisk-dev mailing list