Hi,

On Thu, 18 Dec 2003 at 16:32, Peter Nixon wrote:

> Have you had a chance to do any further testing of Asterisk on
> Opteron?

I've just synced my patch with current CVS head and did some quick
tests with the ALSA console. The demo stuff that comes with asterisk
works fine including the IAX connection to digium. But there were some
warnings during compilation that might require a closer look.

The patch I used is attached to this email. Besides the few Makefile
tweaks needed to support AMD64, it contains one or two small fixes
needed to compile asterisk with gcc3.3 and some fixes for "make rpm".

Mark, it'd be nice if this patch made it's way into the CVS.
I hope it is small enough so it doesn't need a written disclaimer.

cu
        Reinhard
? DIFF
? asterisk-CVS_10_07_03_16_31_12-1.x86_64.rpm
? asterisk.spec
? redhat/asterisk.spec-20031218
Index: Makefile
===================================================================
RCS file: /usr/cvsroot/asterisk/Makefile,v
retrieving revision 1.65
diff -u -r1.65 Makefile
--- Makefile    6 Dec 2003 23:19:22 -0000       1.65
+++ Makefile    18 Dec 2003 15:29:54 -0000
@@ -387,13 +387,13 @@
                install $$x $(DESTDIR)$(ASTVARLIBDIR)/mohmp3 ; \
        done
        mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/INBOX
-       :> $(DESTDIR)$(ASTVARLIBDIR)/sounds/voicemail/default/1234/unavail.gsm
+       :> $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/unavail.gsm
        for x in vm-theperson digits/1 digits/2 digits/3 digits/4 vm-isunavail; do \
-               cat $(DESTDIR)$(ASTVARLIBDIR)/sounds/$$x.gsm >> 
$(DESTDIR)$(ASTVARLIBDIR)/sounds/voicemail/default/1234/unavail.gsm ; \
+               cat $(DESTDIR)$(ASTVARLIBDIR)/sounds/$$x.gsm >> 
$(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/unavail.gsm ; \
        done
-       :> $(DESTDIR)$(ASTVARLIBDIR)/sounds/voicemail/default/1234/busy.gsm
+       :> $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/busy.gsm
        for x in vm-theperson digits/1 digits/2 digits/3 digits/4 vm-isonphone; do \
-               cat $(DESTDIR)$(ASTVARLIBDIR)/sounds/$$x.gsm >> 
$(DESTDIR)$(ASTVARLIBDIR)/sounds/voicemail/default/1234/busy.gsm ; \
+               cat $(DESTDIR)$(ASTVARLIBDIR)/sounds/$$x.gsm >> 
$(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/busy.gsm ; \
        done
 
 webvmail:
@@ -416,7 +416,7 @@
 
 mailbox:
        ./addmailbox 
-       
+
 
 rpm: __rpm
 
@@ -427,12 +427,8 @@
        $(MAKE) DESTDIR=/tmp/asterisk samples ; \
        mkdir -p /tmp/asterisk/etc/rc.d/init.d ; \
        cp -f redhat/asterisk /tmp/asterisk/etc/rc.d/init.d/ ; \
-       cp -f redhat/rpmrc /tmp/asterisk/ ; \
-       cp -f redhat/rpmmacros /tmp/asterisk/ ; \
-       sed "s/Version:/Version: $(RPMVERSION)/g" redhat/asterisk.spec > 
/tmp/asterisk/asterisk.spec ; \
-       rpm --rcfile /usr/lib/rpm/rpmrc:/tmp/asterisk/rpmrc -bb 
/tmp/asterisk/asterisk.spec ; \
-       mv /tmp/asterisk/redhat/RPMS/i386/asterisk* ./ ; \
-       rm -rf /tmp/asterisk
+       sed "s/^Version:.*/Version: $(RPMVERSION)/g" redhat/asterisk.spec > 
asterisk.spec ; \
+       rpmbuild --rcfile /usr/lib/rpm/rpmrc:redhat/rpmrc -bb asterisk.spec
 
 progdocs:
        doxygen asterisk-ng-doxygen
@@ -445,7 +441,7 @@
                install -m 755 init.asterisk /etc/init.d/asterisk; \
        fi 
 
-       
+
 dont-optimize:
        $(MAKE) OPTIMIZE= K6OPT= install
 
Index: frame.c
===================================================================
RCS file: /usr/cvsroot/asterisk/frame.c,v
retrieving revision 1.22
diff -u -r1.22 frame.c
--- frame.c     4 Nov 2003 02:40:09 -0000       1.22
+++ frame.c     18 Dec 2003 15:29:54 -0000
@@ -455,7 +455,8 @@
                return RESULT_SHOWUSAGE;
 
        if (getenv("I_AM_NOT_AN_IDIOT") == NULL)
-               ast_cli(fd, "Disclaimer: this command is for informational purposes 
only.\n\tIt does not indicate anything about your configuration.\n");
+               ast_cli(fd, "Disclaimer: this command is for informational purposes 
only.\n"
+                               "\tIt does not indicate anything about your 
configuration.\n");
 
        if ((argc == 2) || (!strcasecmp(argv[1],"audio"))) {
                found = 1;
@@ -676,7 +677,6 @@
                        term_color(cn, n, COLOR_YELLOW, COLOR_BLACK, sizeof(cn)));
 
 }
-
 
 #ifdef TRACE_FRAMES
 static int show_frame_stats(int fd, int argc, char *argv[])
Index: codecs/gsm/Makefile
===================================================================
RCS file: /usr/cvsroot/asterisk/codecs/gsm/Makefile,v
retrieving revision 1.10
diff -u -r1.10 Makefile
--- codecs/gsm/Makefile 27 Oct 2003 20:00:41 -0000      1.10
+++ codecs/gsm/Makefile 18 Dec 2003 15:29:55 -0000
@@ -38,8 +38,10 @@
 ######### probably require gcc. 
 
 ifneq (${OSARCH},Darwin)
+ifneq (${PROC},x86_64)
 OPTIMIZE+=-march=$(PROC)
 endif
+endif
 
 PG =
 #PG = -g -pg
@@ -194,8 +196,10 @@
                $(SRC)/short_term.c     \
                $(SRC)/table.c
 ifeq (${OSARCH},Linux)
+ifneq (${PROC},x86_64)
 GSM_SOURCES+=  $(SRC)/k6opt.s
 endif
+endif
 
 TOAST_SOURCES = $(SRC)/toast.c                 \
                $(SRC)/toast_lin.c      \
@@ -241,7 +245,9 @@
                $(SRC)/short_term.o     \
                $(SRC)/table.o
 ifeq (${OSARCH},Linux)
+ifneq (${PROC},x86_64)
 GSM_OBJECTS+=  $(SRC)/k6opt.o
+endif
 endif
 
 TOAST_OBJECTS =        $(SRC)/toast.o          \
Index: codecs/lpc10/Makefile
===================================================================
RCS file: /usr/cvsroot/asterisk/codecs/lpc10/Makefile,v
retrieving revision 1.8
diff -u -r1.8 Makefile
--- codecs/lpc10/Makefile       27 Oct 2003 20:00:41 -0000      1.8
+++ codecs/lpc10/Makefile       18 Dec 2003 15:29:55 -0000
@@ -28,7 +28,9 @@
 #fix for PPC processors
 ifneq ($(OSARCH),Darwin)
 ifneq ($(PROC),ppc)
+ifneq ($(PROC),x86_64)
        CFLAGS+= -march=$(PROC)
+endif
 endif
 endif
 
Index: redhat/asterisk.spec
===================================================================
RCS file: /usr/cvsroot/asterisk/redhat/asterisk.spec,v
retrieving revision 1.3
diff -u -r1.3 asterisk.spec
--- redhat/asterisk.spec        21 Oct 2002 00:45:13 -0000      1.3
+++ redhat/asterisk.spec        18 Dec 2003 15:29:55 -0000
@@ -65,6 +65,8 @@
 %attr(0644,root,root)      /var/lib/asterisk/sounds/*.gsm
 %attr(0755,root,root) %dir /var/lib/asterisk/sounds/digits
 %attr(0644,root,root)      /var/lib/asterisk/sounds/digits/*.gsm
+%attr(0755,root,root) %dir /var/lib/asterisk/mohmp3
+%attr(0644,root,root)      /var/lib/asterisk/mohmp3/*
 %attr(0755,root,root) %dir /var/lib/asterisk/images
 %attr(0644,root,root)      /var/lib/asterisk/images/*
 %attr(0755,root,root) %dir /var/lib/asterisk/keys
@@ -76,7 +78,8 @@
 # Example voicemail files
 #
 %attr(0755,root,root) %dir /var/spool/asterisk
-%attr(0755,root,root) %dir /var/spool/asterisk/vm
-%attr(0755,root,root) %dir /var/spool/asterisk/vm/1234
-%attr(0755,root,root) %dir /var/spool/asterisk/vm/1234/INBOX
-%attr(0644,root,root)      /var/spool/asterisk/vm/1234/*.gsm
+%attr(0755,root,root) %dir /var/spool/asterisk/voicemail
+%attr(0755,root,root) %dir /var/spool/asterisk/voicemail/default
+%attr(0755,root,root) %dir /var/spool/asterisk/voicemail/default/1234
+%attr(0755,root,root) %dir /var/spool/asterisk/voicemail/default/1234/INBOX
+%attr(0644,root,root)      /var/spool/asterisk/voicemail/default/1234/*.gsm

Reply via email to