Asterisk on Sparc64/Linux:
After finding little information about running Asterisk on a SPARC, I thought I would share my experience and hopefully help others as well.
I plan on installing two FXO cards (X100P) to connect two business lines and use Asterisk in a small voicemail, IVR, and VOIP network. We have some people that work in remote offices that connect via a VPN, so I hope to get them set up with Cisco 7960 phones and have them connect via the VPN.
My stsem is a Sun Ultra 60 as follows:
2 x 360MHz UltraSPARC II processors
2GB RAM
18 GB SCSI HD
Extra ethernet card – Kingston KNE111TX
I originally started using Aurora Linux but after having difficulty in upgrading the system, I switched to Gentoo after seeing the link on the Operating System page.
Update:
It seems that Zaptel has not yet been ported to work for Linux/SPARC so until then, it looks like the unit will just be an Asterisk box for VOIP with no FXO connection. I’ll have to put the FXO in an x86 Linux box for now.
this is against CVS-NHEAD-07/28/04-15:58:08
and includes my install path in /opt
please apply this patch
EDIT: deleted the old patch.
this is against CVS-NHEAD-08/02/04-17:37:07
diff -r -u asterisk-VS-HEAD-20040802.orig/asterisk/Makefile asterisk-VS-HEAD-20040802/asterisk/Makefile
--- asterisk-VS-HEAD-20040802.orig/asterisk/Makefile 2004-08-01 20:48:37.000000000 +0200
+++ asterisk-VS-HEAD-20040802/asterisk/Makefile 2004-08-02 17:23:51.000000000 +0200
@@ -120,6 +120,12 @@
CFLAGS+=$(shell if uname -m | grep -q ppc; then echo "-fsigned-char"; fi)
CFLAGS+=$(shell if [ -f /usr/include/osp/osp.h ]; then echo "-DOSP_SUPPORT -I/usr/include/osp" ; fi)
+ifeq (${PROC},sparc64)
+CFLAGS=-pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG) $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE #-DMAKE_VALGRIND_HAPPY
+OPTIMIZE=-mcpu=v9 -mtune=v9 -O2 -fomit-frame-pointer -pipe
+CFLAGS+=$(OPTIMIZE)
+endif
+
ifeq (${OSARCH},FreeBSD)
OSVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk)
CFLAGS+=$(if ${OSVERSION}<500016,-D_THREAD_SAFE)
@@ -210,10 +216,18 @@
all: depend asterisk subdirs
editline/config.h:
- cd editline && unset CFLAGS LIBS && ./configure ; \
+ifeq (${PROC},sparc64)
+ cd editline && unset CFLAGS LIBS && CFLAGS="$(OPTIMIZE)" ./configure ;
+else
+ cd editline && unset CFLAGS LIBS && ./configure ;
+endif
editline/libedit.a: FORCE
+ifeq (${PROC},sparc64)
+ cd editline && unset CFLAGS LIBS && test -f config.h || CFLAGS="$(OPTIMIZE)" ./configure
+else
cd editline && unset CFLAGS LIBS && test -f config.h || ./configure
+endif
$(MAKE) -C editline libedit.a
db1-ast/libdb1.a: FORCE
diff -r -u asterisk-VS-HEAD-20040802.orig/asterisk/codecs/gsm/Makefile asterisk-VS-HEAD-20040802/asterisk/codecs/gsm/Makefile
--- asterisk-VS-HEAD-20040802.orig/asterisk/codecs/gsm/Makefile 2004-06-22 19:42:13.000000000 +0200
+++ asterisk-VS-HEAD-20040802/asterisk/codecs/gsm/Makefile 2004-08-02 17:49:36.000000000 +0200
@@ -41,11 +41,13 @@
ifneq (${PROC},x86_64)
ifneq ($(shell uname -m),ppc)
ifneq ($(shell uname -m),alpha)
+ifneq ($(shell uname -m),sparc64)
OPTIMIZE+=-march=$(PROC)
endif
endif
endif
endif
+endif
PG =
#PG = -g -pg
@@ -256,11 +258,13 @@
ifneq ($(shell uname -m), x86_64)
ifneq ($(shell uname -m), ppc)
ifneq ($(shell uname -m), alpha)
+ifneq ($(shell uname -m), sparc64)
GSM_OBJECTS+= $(SRC)/k6opt.o
endif
endif
endif
endif
+endif
TOAST_OBJECTS = $(SRC)/toast.o \
$(SRC)/toast_lin.o \
diff -r -u asterisk-VS-HEAD-20040802.orig/asterisk/codecs/lpc10/Makefile asterisk-VS-HEAD-20040802/asterisk/codecs/lpc10/Makefile
--- asterisk-VS-HEAD-20040802.orig/asterisk/codecs/lpc10/Makefile 2004-06-22 19:42:14.000000000 +0200
+++ asterisk-VS-HEAD-20040802/asterisk/codecs/lpc10/Makefile 2004-08-02 17:51:58.000000000 +0200
@@ -31,12 +31,14 @@
ifneq ($(PROC),ppc)
ifneq ($(PROC),x86_64)
ifneq ($(PROC),alpha)
+ifneq ($(PROC),sparc64)
CFLAGS+= -march=$(PROC)
endif
endif
endif
endif
endif
+endif
LIB = $(LIB_TARGET_DIR)/liblpc10.a
- UltraLinux Sparc64: UltraLinux Sparc64 general information
- Asterisk OS Platforms