Project

General

Profile

Building OpenBSC » History » Revision 35

Revision 34 (Anonymous, 02/19/2016 10:47 PM) → Revision 35/46 (Anonymous, 02/19/2016 10:48 PM)

{{>toc}} 


 h2. [[OpenBSC]] [[PageOutline]] 

 == OpenBSC build guide 


 == 

 This page will describe the entire installation process of [[OpenBSC]] OpenBSC under GNU/Linux. 

 This tutorial is based on Debian Netinstall 5.0 but will work more or less the same with other GNU/Linux 
 distributions. 


 h3. 

 === Compiling + running [[OpenBSC]] 



 h4. OpenBSC === 

 ==== Dependencies 


 ==== 

 Installing software that [[OpenBSC]] OpenBSC depends upon is distribution-dependent.    On Debian (or Debian-derived) systems, 
 you should install the following Debian packages before you start: 
 
  * libdbi0 
 
  * libdbi0-dev 
 
  * libdbd-sqlite3 
 
  * libortp-dev 
 
  * build-essential 
 
  * libtool 
 
  * autoconf 
 
  * automake 
 
  * git-core 
 
  * pkg-config 
 (The list may be incomplete) 

 On Debian, you can install those packages with 
 <pre> 
 {{{ 
 apt-get install libdbi0-dev libdbd-sqlite3 build-essential libtool autoconf automake git-core pkg-config libortp-dev 
 </pre> 


 h4. }}} 

 ==== Building libosmocore 

 ==== 
  * Check out libosmocore from git using 
 <pre> 
 {{{ 
 git clone git://git.osmocom.org/libosmocore.git 
 </pre> 
 }}} 
  * Change into the right directory using 
 <pre> 
 {{{ 
 cd libosmocore 
 </pre> 
 }}} 
  * Rebuild the configure script using 
 <pre> 
 {{{ 
 autoreconf -fi 
 </pre> 
 }}} 
  * Run the configure script using 
 <pre> 
 {{{ 
 ./configure 
 </pre> 
 }}} 
  * Build the actual software using 
 <pre> 
 {{{ 
 make 
 </pre> 
 }}} 
  * Install the library by using 
 <pre> 
 {{{ 
 make install 
 </pre> 
 }}} 
  * Don't forget ldconfig: 
 <pre> 
 {{{ 
 ldconfig 
 </pre> 


 h4. }}} 

 ==== Building libosmo-abis 


 ==== 

  * Check out libosmo-abis from git using 
 <pre> 
 {{{ 
 git clone git://git.osmocom.org/libosmo-abis.git 
 </pre> 
 }}} 
  * Change into the right directory using 
 <pre> 
 {{{ 
 cd libosmo-abis 
 </pre> 
 }}} 
  * Rebuild the configure script using 
 <pre> 
 {{{ 
 autoreconf -fi 
 </pre> 
 }}} 
  * Run the configure script using 
 <pre> 
 {{{ 
 ./configure 
 </pre> 
 }}} 
  * Build the actual software using 
 <pre> 
 {{{ 
 make 
 </pre> 
 }}} 
  * Install the library by using 
 <pre> 
 {{{ 
 make install 
 </pre> 
 }}} 
  * Don't forget ldconfig: 
 <pre> 
 {{{ 
 ldconfig 
 </pre> 


 h4. }}} 

 ==== Building libosmo-netif 


 ==== 

  * Check out libosmo-abis from git using 
 <pre> 
 {{{ 
 git clone git://git.osmocom.org/libosmo-netif.git 
 </pre> 
 }}} 
  * Change into the right directory using 
 <pre> 
 {{{ 
 cd libosmo-netif 
 </pre> 
 }}} 
  * Rebuild the configure script using 
 <pre> 
 {{{ 
 autoreconf -fi 
 </pre> 
 }}} 
  * Run the configure script using 
 <pre> 
 {{{ 
 ./configure 
 </pre> 
 }}} 
  * Build the actual software using 
 <pre> 
 {{{ 
 make 
 </pre> 
 }}} 
  * Install the library by using 
 <pre> 
 {{{ 
 make install 
 </pre> 
 }}} 
  * Don't forget ldconfig: 
 <pre> 
 {{{ 
 ldconfig 
 </pre> 


 h4. }}} 

 ==== Building [[OpenBSC]] 

 OpenBSC ==== 
  * Check out [[OpenBSC]] OpenBSC from git using 
 <pre> 
 {{{ 
 git clone git://git.osmocom.org/openbsc.git 
 </pre> 
 }}} 
  * Change into the right directory using 
 <pre> 
 {{{ 
 cd openbsc/openbsc 
 </pre> 
 }}} 
  * Rebuild the configure script using  
 <pre> 
 {{{ 
 autoreconf -i 
 </pre> 
 }}} 
  * Point [[OpenBSC]] OpenBSC to the installation of libosmocore. 
 <pre> 
 {{{ 
 export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig 
 </pre> 
 }}} 
  * Run the configure script using 
 <pre> 
 {{{ 
 ./configure 
 </pre> 
 }}} 
  * Build the actual software using 
 <pre> 
 {{{ 
 make 
 </pre> 

 }}} 

 Congratulations, you should now have the [[OpenBSC]] OpenBSC programs like _[[osmo-nitb]]_, _ipaccess-config_ ''[wiki:osmo-nitb]'', ''ipaccess-config'' and others in the subdirectories of 'src/', 
 like 
 
  * src/ipaccess/ipaccess-config (see [[ipaccess-config]]) 
 [wiki:ipaccess-config]) 
  * src/ipaccess/ipaccess-find (see [[ipaccess-find]]) 
 [wiki:ipaccess-find]) 
  * src/osmo-nitb/osmo-nitb (see [[osmo-nitb]]) [wiki:osmo-nitb]) 

 To proceed from here, you typically would 
 
  * set-up your BTS (see [[BS11Getting_Started]] [wiki:BS11/Getting_Started] or [[nanoBTSGetting_Started]]) 
 [wiki:nanoBTS/Getting_Started]) 
  * configure and start [[osmo-nitb]] 


 h4. [wiki:osmo-nitb] 

 ==== mISDN enabled kernel in case of E1 based BTS like BS-11 


 ==== 

 If you want to use a E1-based BTS (like the BS-11), you will need to install mISDN (or DAHDI). 

 *If '''If you have an IP/Ethernet based BTS (like the ip.access nanoBTS), you don't need this section!* section!''' 

 Because [[OpenBSC]]'s OpenBSC's E1 support relies on mISDN (named ISDN4Linux before) and hfcmulti as an interface to the BS11, it has to be integrated as a module into the kernel. 

 First of all you will need to download the 2.6.31 Linux kernel from "Change [http://www.kernel.org/pub/linux/kernel/v2.6/]. 

 Change to */usr/src/* '''/usr/src/''' on your [[OpenBSC]] OpenBSC machine. 
 <pre> 

 Then simply do a {{{wget [http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.31.tar.bz2]}}} 

 Unpack the archive: 
 <pre> 
 {{{ 
 tar --bzip2 -xvf linux-2.6.31.tar.bz2 
 </pre> 
 }}} 
 and create a symlink to fit the Linux standard conventions:  
 <pre> 
 {{{ 
 ln -s linux-2.6.30 linux 
 </pre> 

 }}} 

 Now change to linux-2.6.30 typing 
 <pre> 
 {{{ 
 cd linux-2.6.30 
 </pre> 

 }}} 

 You are ready now to prepare for the main part: 

 Install some tools needed to build the kernel. 

 <pre> 
 {{{ 
 apt-get install libncurses5-dev kernel-package 
 </pre> 

 }}} 

 Now configure the kernel modules with 
 <pre> 
 {{{ 
 make menuconfig 
 </pre> 

 }}} 

 Include the _mISDN_ ''mISDN'' modules and _hfcmulti ''hfcmulti / hfc e1 drivers_. drivers''. 

 Save the new configuration to *.config* '''.config''' . 

 You can now try to build the Debian kernel package: 
 <pre> 
 {{{ 
 make-kpkg linux-image --initrd --revision=openbsc01.0 
 </pre> 

 }}} 

 Go a directory higher 
 <pre> 
 {{{ 
 cd .. 
 </pre> 

 }}} 

 and install the new kernel package typing: 

 <pre> 
 {{{ 
 dpkg -i    kernelpackagename.deb 
 </pre> 

 }}} 

 Now you only have to add the dslot=1 parameter for hfcmulti to load with this parameter. 
 Otherwise [[OpenBSC]] OpenBSC will talk on signalling timeslot 15 where BS11 uses 1. 

 Simply add the following in */boot/grub/menu.lst* '''/boot/grub/menu.lst''' : 

 Add this line to the "Kernel"-line 

 *hfcmulti.dslot=1* '''hfcmulti.dslot=1''' 

 Save changes and reboot your machine with your new kernel. 


 h4. 

 ==== DAHDI kernel in case of E1 based BTS like BS-11 


 ==== 

 This is an alternative to the mISDN drivers.    For DAHDI installation, please check with the Asterisk / DAHDI homepage. 

 <pre> 
 <pre> 
 We have positively tested with a Digium TE110P card and the BS-11, using the following config in {{{/etc/dahdi/system.conf}}}: 
 {{{ 
 dchan=1 
 bchan=2-30 
 </pre> 

 <pre> 
 <pre> 
 }}} 

 In your {{{openbsc.cfg}}}, you will have to use 
 {{{ 
 e1_input 
  e1_line 0 driver dahdi 
 </pre> }}}
Add picture from clipboard (Maximum size: 48.8 MB)