[asterisk-dev] cross compile asterisk for openrisc 1200

Mohammed Essaid Mezerreg moh.essaid at gmail.com
Mon Apr 14 13:22:18 CDT 2014


hello,
I want to cross compile asterisk to work on embedded linux running on the
openrisc 1200 cpu from opencores.org. I found the cpu is recognized and his
name is listed in the cases in configure.sub but after trying to cross
compile him in encountered these problems:

the configure file stops in ncurses (so I cross compile ncurses and
mentioned the directory by using --with-ncurses).
after that the configuration stopped in libxml ( so I disabled this feature
explicitly using --disable-xmldoc), after this change the configure file
complete with success.
but after trying to execute make stopped by ascanary.c -> ascanary.o and
says :" utime.h no such file or directory) so I followed the way of a blind
and went to this file changed the <utime.h> by "utime.h" but the problem
still.

so after looking deeply and make some test I figure out the problem but I
don't know how to fix it:

I found that the toolchain after compilation split this manner:
the root file or the top directory of the toolchain in my case
/opt/openrisc/
under this directory there is a bin, include, lib and the commons
directories in all toolchains, but also there are an or32-elf and
or32-linux directories.
the problems is here:
these two directories contain the bin, include, lib and all the directories
in the parent one and after comparing between the include of or32-linux and
the include of the parent I found that the first one contain most of the
headers and files that asterisk use.

after changing the ascanary.c by replacing include <utime.h> by include
"/opt/openrisc/or32-linux/include/linux/utime.h" the make continue but
stopped in undeclared function first use in this file and this function is
one of sys/types and time.h some other files included in ascanary.c

so the conclusion I have made from all this that make and configure can't
find these headers and to be aware the checking action for utime.h in
configure gives the result "no" and the same thing with some other one
 which are not in the include of the parent directory but they are in
or32-linux's include.
I wonder if someone can help me out from this problem.

I used this to configure:
./configure --host=or32-linux CC=or32-linux-gcc CXX=or32-linux-g++
AR=or32-linux-ar AS=or32-linux-as --with-ncurses=/home/ncursess
--disable-xmldoc

and I tried to used CLAGS='-I /opt/openrisc/or32-linux/include' but no
progress.

and something else the difference the utils from or32-elf are used to
compile bare metal applications for the processor and or32-linux to compile
applications for embedded linux. you can find all the information in
opencores.org

hope you can help me.
thank you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140414/42a60cfd/attachment.html>


More information about the asterisk-dev mailing list