Project

General

Profile

Building OpenBSC » History » Version 20

« Previous - Version 20/45 (diff) - Next » - Current version
tec, 02/19/2016 10:47 PM


PageOutline

OpenBSC build guide

This page will describe the entire installation process of 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.

=== Compiling + running OpenBSC ===

==== Dependencies ====

Installing software that 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 * libtool * autoconf * git-core
(The list may be incomplete)

On Debian, you can install those packages with {{{
apt-get install libdbi0-dev libdbd-sqlite3 autoconf git-core
}}}

==== Building libosmocore ==== * Check out libosmocore from git using {{{
git clone git://git.osmocom.org/libosmocore.git
}}} * Change into the right directory using {{{
cd libosmocore
}}} * Rebuild the configure script using {{{
autoreconf -i
}}} * Run the configure script using {{{
./configure
}}} * Build the actual software using {{{
make
}}} * Install the library by using {{{
make install
}}}

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

Congratulations, you should now have the OpenBSC programs like ''bsc_hack'', ''ipaccess-config'' and others in the 'src/' subdirectory.

==== mISDN enabled kernel in case of BS-11 ====

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

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

Because 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 [http://www.kernel.org/pub/linux/kernel/v2.6/].

Change to '''/usr/src/''' on your OpenBSC machine.
Then simply do a {{{wget [http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.31.tar.bz2]}}}

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

Now change to linux-2.6.30 typing {{{
cd linux-2.6.30
}}}

You are ready now to prepare for the main part:

Install some tools needed to build the kernel.

{{{
apt-get install libncurses5-dev kernel-package
}}}

Now configure the kernel modules with {{{
make menuconfig
}}}

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

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

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

Go a directory higher {{{
cd ..
}}}

and install the new kernel package typing:

{{{
dpkg -i kernelpackagename.deb
}}}

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

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

Add this line to the "Kernel"-line

'''hfcmulti.dslot=1'''

Save changes and reboot your machine with your new kernel.

Add picture from clipboard (Maximum size: 48.8 MB)