Project

General

Profile

Building OpenBSC » History » Version 39

wirelesss, 12/07/2016 01:31 PM

1 35
{{>toc}}
2 1
3 38 wirelesss
bq. *Before you consider building from source, be aware that there are [[Nightly Builds]]
4
available for Debian + Ubuntu platforms. These are recommended for normal users.*
5 1
6 38 wirelesss
7 35
h2. [[OpenBSC]] build guide
8 1
9 35
10
This page will describe the entire installation process of [[OpenBSC]] under GNU/Linux.
11
12 1
This tutorial is based on Debian Netinstall 5.0 but will work more or less the same with other GNU/Linux
13
distributions.
14
15
16 35
h3. Compiling + running [[OpenBSC]]
17 1
18 35
19
20
h4. Dependencies
21
22
23
Installing software that [[OpenBSC]] depends upon is distribution-dependent.  On Debian (or Debian-derived) systems,
24 1
you should install the following Debian packages before you start:
25 35
* libdbi0
26
* libdbi0-dev
27
* libdbd-sqlite3
28
* libortp-dev
29
* build-essential
30
* libtool
31
* autoconf
32
* automake
33
* git-core
34
* pkg-config
35 1
(The list may be incomplete)
36
37
On Debian, you can install those packages with
38 35
<pre>
39 37 msuraev
sudo apt install libdbi-dev libdbd-sqlite3 libortp-dev build-essential libtool autoconf automake git-core pkg-config libtalloc-dev libpcsclite-dev libpcap-dev
40 35
</pre>
41 1
42 37 msuraev
h4. Installation via packages
43 1
44 37 msuraev
It is always better to use your distribution's package management system for installing stuff. Only use "make install" as a last resort. For example, almost all Osmocom projects include metadata required for building .deb packages (contributions for other package systems are more than welcomed). So if you're installing OpenBSC on .deb based system (Debian, Ubuntu, Mint etc) the right way to do it is:
45
<pre>
46
git clone git://git.osmocom.org/XXX
47
cd XXX
48
dpkg-buildpackage -uc -us -tc
49
cd ..
50
sudo dpkg -i *.deb
51 35
</pre>
52 1
53 38 wirelesss
h4. Building 
54 35
55 38 wirelesss
Please follow instructions as per [https://osmocom.org/projects/cellular-infrastructure/wiki/Build_from_Source] to build following projects:
56 3
57 38 wirelesss
* libosmocore
58
* libosmo-abis
59
* libosmo-netif
60
* openbsc
61 35
62 14 laforge
63 35
Congratulations, you should now have the [[OpenBSC]] programs like _[[osmo-nitb]]_, _ipaccess-config_ and others in the subdirectories of 'src/',
64 17 laforge
like
65 35
* src/ipaccess/ipaccess-config (see [[ipaccess-config]])
66
* src/ipaccess/ipaccess-find (see [[ipaccess-find]])
67
* src/osmo-nitb/osmo-nitb (see [[osmo-nitb]])
68 11 laforge
69
To proceed from here, you typically would
70 35
* set-up your BTS (see [[BS11Getting_Started]] or [[nanoBTSGetting_Started]])
71
* configure and start [[osmo-nitb]]
72 17 laforge
73 11 laforge
74 35
h4. mISDN enabled kernel in case of E1 based BTS like BS-11
75 1
76
77 35
If you want to use a E1-based BTS (like the BS-11), you will need to install mISDN (or DAHDI).
78 1
79 35
*If you have an IP/Ethernet based BTS (like the ip.access nanoBTS), you don't need this section!*
80 1
81 35
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.
82 1
83 35
First of all you will need to download the 2.6.31 Linux kernel from "Change to */usr/src/* on your [[OpenBSC]] machine.
84
85 1
Unpack the archive:
86 39 wirelesss
87 35
<pre>
88 25 laforge
tar --bzip2 -xvf linux-2.6.31.tar.bz2
89 35
</pre>
90 25 laforge
and create a symlink to fit the Linux standard conventions: 
91 35
<pre>
92 25 laforge
ln -s linux-2.6.30 linux
93 35
</pre>
94 26 laforge
95
Now change to linux-2.6.30 typing
96 35
<pre>
97 26 laforge
cd linux-2.6.30
98 35
</pre>
99 26 laforge
100 1
You are ready now to prepare for the main part:
101
102
Install some tools needed to build the kernel.
103
104 35
<pre>
105 1
apt-get install libncurses5-dev kernel-package
106 35
</pre>
107 1
108
Now configure the kernel modules with
109 35
<pre>
110 1
make menuconfig
111 35
</pre>
112 1
113 35
Include the _mISDN_ modules and _hfcmulti / hfc e1 drivers_.
114 1
115 35
Save the new configuration to *.config* .
116 1
117
You can now try to build the Debian kernel package:
118 35
<pre>
119 1
make-kpkg linux-image --initrd --revision=openbsc01.0
120 35
</pre>
121 1
122
Go a directory higher
123 35
<pre>
124 1
cd ..
125 35
</pre>
126 1
127
and install the new kernel package typing:
128
129 35
<pre>
130 1
dpkg -i  kernelpackagename.deb
131 35
</pre>
132 1
133
Now you only have to add the dslot=1 parameter for hfcmulti to load with this parameter.
134 35
Otherwise [[OpenBSC]] will talk on signalling timeslot 15 where BS11 uses 1.
135 1
136 35
Simply add the following in */boot/grub/menu.lst* :
137 1
138
Add this line to the "Kernel"-line
139
140 35
*hfcmulti.dslot=1*
141 1
142
Save changes and reboot your machine with your new kernel.
143
144
145 35
h4. DAHDI kernel in case of E1 based BTS like BS-11
146
147
148 1
This is an alternative to the mISDN drivers.  For DAHDI installation, please check with the Asterisk / DAHDI homepage.
149
150 35
<pre>
151 1
dchan=1
152
bchan=2-30
153 35
</pre>
154
155
<pre>
156 1
e1_input
157
 e1_line 0 driver dahdi
158 35
</pre>
Add picture from clipboard (Maximum size: 48.8 MB)