Cross compile asterisk for openrisc 1200

I want to cross compile asterisk-1.8 to work on embedded linux running on the openrisc 1200 cpu from I found that cpu was listed in the cases in configure.sub but after trying to cross compile him I 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, the operation 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 tests, I figure out the problem but I don’t know how to fix it:

I found that the toolchain after compilation split this in 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 use 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

hope you can help me.
thank you

the problem reside in the toolchain as I mentioned earlier in this post, because I has two toolchains installed in the same time I countred this problem, and something else, it seems like utime.h doesn’t contain an implementation for utime function.

So I redownloaded the last toolchain and installed just the uClibc and not both “uClibc” and “newlib”, and no problem with utime.h or the other headers any more. but you must replace the or32 process with or1k, because the new toolchain has this name “or1k-toochain”.