Compiling: Difference between revisions

From AllStarLink Wiki
Jump to navigation Jump to search
imported>Kg7qin
m Updated build into -- removed unnecessary characters and added in how to just install binaries after a source change/update
No edit summary
 
(6 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{Warning|developers/source-install/}}
{{Obsolete}}
= Compiling AllStarLink =
= Compiling AllStarLink =


The following commands will allow you to compile AllStarLink's ASL 1.01 release.   
The following commands will allow you to compile AllStarLink's ASL 1.01+ release.   


These instructions assume you are already familiar with compiling and installing software on Linux.
These instructions assume you are already familiar with compiling and installing software on Linux.
Line 17: Line 21:
== Install requirements for building ==
== Install requirements for building ==


   apt-get install -y git build-essential linux-headers-$(uname -r) linux-source-4.9 libss7-dev wget apt-utils dahdi-source dahdi-linux aptitude tcsh gawk libusb-dev vim
   apt-get install -y git build-essential libss7-dev wget apt-utils dahdi-source dahdi-linux aptitude tcsh gawk libusb-dev vim '''libblkid-dev'''


== Get DAHDI source files ==
== Install Linux Sources and Headers ==


   wget https://github.com/KG7QIN/AllStarLink/raw/master/dahdi/dahdi-linux-complete-2.10.2%2B2.10.2.tar.gz
   apt-get install -y linux-headers-generic linux-source


== Asterisk Prereqs ==
== Install Asterisk Prereqs ==


   mkdir /etc/vpb
   mkdir /etc/vpb
Line 31: Line 35:
   apt-get install -f
   apt-get install -f


== Extract and build DAHDI ==
== Build DAHDI ==


   tar -zxf dahdi-linux-complete-2.10.2+2.10.2.tar.gz
   git clone https://github.com/AllStarLink/ASL-DAHDI-PATCHED-2.11.1.git
  cd dahdi-linux-complete-2.10.2+2.10.2/linux/drivers/dahdi/voicebus/
   cd ASL-DAHDI-PATCHED-2.11.1
 
  echo "--- GpakApi.c.orig 2018-06-09 18:54:14.205144479 -0700\n" \
  "+++ GpakApi.c 2018-06-09 18:54:28.196956036 -0700\n" \
  "@@ -1560,7 +1560,7 @@\n" \
  "    if (DspStatus != 0)\n" \
  "        return (RmmFailure);\n" \
  " \n" \
  "- for (i = 0; i < MemoryLength_Word16; i++)\n" \
  "+    for (i = 0; i < MemoryLength_Word16; i++) \n" \
  "        pDest[i] = (short int) MsgBuffer[2 + i]; \n"  > patch1
 
  patch -ful GpakApi.c patch1
 
  cd dahdi-linux-complete-2.10.2+2.10.2/tools/xpp/
  sed -i -e 's/inline /extern inline /g' echo_loader.c
 
   cd dahdi-linux-complete-2.10.2+2.10.2/
  sed -i -e 's/configure /configure CFLAGS=-Wno-error /g' Makefile
  cd tools/xpp
  sed -i -e 's/-I. -Ixtalk -Wall -Werror/-I. -Ixtalk -Wno-error/g' Makefile
  cd ../..
   make distclean
   make distclean
   make
   make MODULES_EXTRA="dahdi_dummy"
   make install
   make install MODULES_EXTRA="dahdi_dummy"
   make config
   make config


== Install GCC 4.9 to compile ASL 1.01 ==
== Install GCC 4.9 to compile ASL 1.01+ ==
   echo "deb http://ftp.us.debian.org/debian/ jessie main contrib non-free" >> /etc/apt/sources.list  
   echo "deb http://ftp.us.debian.org/debian/ jessie main contrib non-free" >> /etc/apt/sources.list  
   echo "deb-src http://ftp.us.debian.org/debian/ jessie main contrib non-free" >> /etc/apt/sources.list
   echo "deb-src http://ftp.us.debian.org/debian/ jessie main contrib non-free" >> /etc/apt/sources.list
Line 69: Line 52:
== Build Asterisk for ASL ==
== Build Asterisk for ASL ==


  git clone https://github.com/AllStarLink/Asterisk
   cd Asterisk/asterisk
   cd Asterisk/asterisk
  '''./bootstrap.sh'''
   make distclean
   make distclean
   ./configure CXX=g++-4.9 CC=gcc-4.9 <code>LDFLAGS="-zmuldefs -lasound" CFLAGS="-Wno-unused -Wno-all -Wno-int-conversion"</code>
   ./configure CXX=g++-4.9 CC=gcc-4.9 <code>LDFLAGS="-zmuldefs -lasound" CFLAGS="-Wno-unused -Wno-all -Wno-int-conversion"</code>

Latest revision as of 23:04, 23 October 2024

Legacy Version - This page is about a legacy version of AllStarLink. See https://allstarlink.github.io/developers/source-install/
Obsolete - This page has obsolete information that is likely no longer relevant and will be deleted.

Compiling AllStarLink

The following commands will allow you to compile AllStarLink's ASL 1.01+ release.

These instructions assume you are already familiar with compiling and installing software on Linux.

Note: These instructions are currently a Work In Progress. You are going to have to resolve dependency issues yourself if you follow them.

You will also need to have cloned the main AllStarLink repo at https://github.com/AllStarLink/Asterisk

DO NOT BLINDLY RUN THE COMMANDS HERE WITHOUT UNDERSTANDING WHAT THEY DO!!

This is for more advanced users. If you are a novice user at building software in a Linux environment or only prefer/can use plug and play/turnkey setups THEN THIS IS NOT FOR YOU TO TRY!

DO NOT TRY THIS ON A RASPBERRY PI UNLESS YOU KNOW HOW TO RESOLVE KERNEL SOURCE/DEPENDENCY ISSUES -- OTHERWISE YOU RUN THE RISK OF BLOWING UP YOUR SYSTEM!!

Install requirements for building

 apt-get install -y git build-essential libss7-dev wget apt-utils dahdi-source dahdi-linux aptitude tcsh gawk libusb-dev vim libblkid-dev

Install Linux Sources and Headers

 apt-get install -y linux-headers-generic linux-source

Install Asterisk Prereqs

 mkdir /etc/vpb
 apt-get build-dep asterisk -y
 apt-get purge -y libopenr2-3 libopenr2-dev
 dpkg --configure -a
 apt-get install -f

Build DAHDI

 git clone https://github.com/AllStarLink/ASL-DAHDI-PATCHED-2.11.1.git
 cd ASL-DAHDI-PATCHED-2.11.1
 make distclean
 make MODULES_EXTRA="dahdi_dummy"
 make install MODULES_EXTRA="dahdi_dummy"
 make config

Install GCC 4.9 to compile ASL 1.01+

 echo "deb http://ftp.us.debian.org/debian/ jessie main contrib non-free" >> /etc/apt/sources.list 
 echo "deb-src http://ftp.us.debian.org/debian/ jessie main contrib non-free" >> /etc/apt/sources.list
 apt-get update
 apt-get install -y gcc-4.9 g++-4.9

Build Asterisk for ASL

 git clone https://github.com/AllStarLink/Asterisk
 cd Asterisk/asterisk
 ./bootstrap.sh
 make distclean
 ./configure CXX=g++-4.9 CC=gcc-4.9 LDFLAGS="-zmuldefs -lasound" CFLAGS="-Wno-unused -Wno-all -Wno-int-conversion"
 make menuselect.makeopts 
 menuselect/menuselect --enable app_rpt --enable chan_beagle --enable chan_tlb --enable chan_usrp --enable chan_rtpdir --enable chan_usbradio --enable chan_simpleusb --enable chan_echolink --enable app_gps --enable chan_voter --enable radio-tune-menu --enable simpleusb-tune-menu menuselect.makeopts 

You will be taken to the main menuselect screen. Press ESC and "S" to save

 make
 make install

You can optionally install the sample Asterisk config files

 make samples

Note: If you have made any changes and just wish to update the binaries without going through the entire install run:

 make bininstall

Final

There is no guarantee this will work for you. Your mileage may vary.