Project

General

Profile

Building OpenBSC » History » Version 35

csaba, 02/19/2016 10:48 PM

1 35 csaba
{{>toc}}
2 1 tec
3
4 35 csaba
h2. [[OpenBSC]] build guide
5 1 tec
6 35 csaba
7
This page will describe the entire installation process of [[OpenBSC]] under GNU/Linux.
8
9 1 tec
This tutorial is based on Debian Netinstall 5.0 but will work more or less the same with other GNU/Linux
10
distributions.
11
12
13 35 csaba
h3. Compiling + running [[OpenBSC]]
14 1 tec
15 35 csaba
16
17
h4. Dependencies
18
19
20
Installing software that [[OpenBSC]] depends upon is distribution-dependent.  On Debian (or Debian-derived) systems,
21 1 tec
you should install the following Debian packages before you start:
22 35 csaba
* libdbi0
23
* libdbi0-dev
24
* libdbd-sqlite3
25
* libortp-dev
26
* build-essential
27
* libtool
28
* autoconf
29
* automake
30
* git-core
31
* pkg-config
32 1 tec
(The list may be incomplete)
33
34
On Debian, you can install those packages with
35 35 csaba
<pre>
36 1 tec
apt-get install libdbi0-dev libdbd-sqlite3 build-essential libtool autoconf automake git-core pkg-config libortp-dev
37 35 csaba
</pre>
38 1 tec
39 35 csaba
40
h4. Building libosmocore
41
42
* Check out libosmocore from git using
43
<pre>
44 1 tec
git clone git://git.osmocom.org/libosmocore.git
45 35 csaba
</pre>
46
* Change into the right directory using
47
<pre>
48 1 tec
cd libosmocore
49 35 csaba
</pre>
50
* Rebuild the configure script using
51
<pre>
52 1 tec
autoreconf -fi
53 35 csaba
</pre>
54
* Run the configure script using
55
<pre>
56 1 tec
./configure
57 35 csaba
</pre>
58
* Build the actual software using
59
<pre>
60 1 tec
make
61 35 csaba
</pre>
62
* Install the library by using
63
<pre>
64 1 tec
make install
65 35 csaba
</pre>
66
* Don't forget ldconfig:
67
<pre>
68 34 csaba
ldconfig
69 35 csaba
</pre>
70 1 tec
71
72 35 csaba
h4. Building libosmo-abis
73
74
75
* Check out libosmo-abis from git using
76
<pre>
77 1 tec
git clone git://git.osmocom.org/libosmo-abis.git
78 35 csaba
</pre>
79
* Change into the right directory using
80
<pre>
81 17 laforge
cd libosmo-abis
82 35 csaba
</pre>
83
* Rebuild the configure script using
84
<pre>
85 19 zecke2
autoreconf -fi
86 35 csaba
</pre>
87
* Run the configure script using
88
<pre>
89 1 tec
./configure
90 35 csaba
</pre>
91
* Build the actual software using
92
<pre>
93 17 laforge
make
94 35 csaba
</pre>
95
* Install the library by using
96
<pre>
97 17 laforge
make install
98 35 csaba
</pre>
99
* Don't forget ldconfig:
100
<pre>
101 1 tec
ldconfig
102 35 csaba
</pre>
103 28 laforge
104
105 35 csaba
h4. Building libosmo-netif
106
107
108
* Check out libosmo-abis from git using
109
<pre>
110 1 tec
git clone git://git.osmocom.org/libosmo-netif.git
111 35 csaba
</pre>
112
* Change into the right directory using
113
<pre>
114 1 tec
cd libosmo-netif
115 35 csaba
</pre>
116
* Rebuild the configure script using
117
<pre>
118 1 tec
autoreconf -fi
119 35 csaba
</pre>
120
* Run the configure script using
121
<pre>
122 1 tec
./configure
123 35 csaba
</pre>
124
* Build the actual software using
125
<pre>
126 1 tec
make
127 35 csaba
</pre>
128
* Install the library by using
129
<pre>
130 1 tec
make install
131 35 csaba
</pre>
132
* Don't forget ldconfig:
133
<pre>
134 17 laforge
ldconfig
135 35 csaba
</pre>
136 18 laforge
137 35 csaba
138
h4. Building [[OpenBSC]]
139
140
* Check out [[OpenBSC]] from git using
141
<pre>
142 1 tec
git clone git://git.osmocom.org/openbsc.git
143 35 csaba
</pre>
144
* Change into the right directory using
145
<pre>
146 1 tec
cd openbsc/openbsc
147 35 csaba
</pre>
148
* Rebuild the configure script using 
149
<pre>
150 1 tec
autoreconf -i
151 35 csaba
</pre>
152
* Point [[OpenBSC]] to the installation of libosmocore.
153
<pre>
154 17 laforge
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
155 35 csaba
</pre>
156
* Run the configure script using
157
<pre>
158 3 tec
./configure
159 35 csaba
</pre>
160
* Build the actual software using
161
<pre>
162 17 laforge
make
163 35 csaba
</pre>
164 14 laforge
165 35 csaba
Congratulations, you should now have the [[OpenBSC]] programs like _[[osmo-nitb]]_, _ipaccess-config_ and others in the subdirectories of 'src/',
166 17 laforge
like
167 35 csaba
* src/ipaccess/ipaccess-config (see [[ipaccess-config]])
168
* src/ipaccess/ipaccess-find (see [[ipaccess-find]])
169
* src/osmo-nitb/osmo-nitb (see [[osmo-nitb]])
170 11 laforge
171
To proceed from here, you typically would
172 35 csaba
* set-up your BTS (see [[BS11Getting_Started]] or [[nanoBTSGetting_Started]])
173
* configure and start [[osmo-nitb]]
174 17 laforge
175 11 laforge
176 35 csaba
h4. mISDN enabled kernel in case of E1 based BTS like BS-11
177 1 tec
178
179 35 csaba
If you want to use a E1-based BTS (like the BS-11), you will need to install mISDN (or DAHDI).
180 1 tec
181 35 csaba
*If you have an IP/Ethernet based BTS (like the ip.access nanoBTS), you don't need this section!*
182 1 tec
183 35 csaba
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.
184 1 tec
185 35 csaba
First of all you will need to download the 2.6.31 Linux kernel from "Change to */usr/src/* on your [[OpenBSC]] machine.
186
<pre>
187
188 25 laforge
Unpack the archive:
189 35 csaba
<pre>
190 25 laforge
tar --bzip2 -xvf linux-2.6.31.tar.bz2
191 35 csaba
</pre>
192 25 laforge
and create a symlink to fit the Linux standard conventions: 
193 35 csaba
<pre>
194 25 laforge
ln -s linux-2.6.30 linux
195 35 csaba
</pre>
196 26 laforge
197
Now change to linux-2.6.30 typing
198 35 csaba
<pre>
199 26 laforge
cd linux-2.6.30
200 35 csaba
</pre>
201 26 laforge
202 1 tec
You are ready now to prepare for the main part:
203
204
Install some tools needed to build the kernel.
205
206 35 csaba
<pre>
207 1 tec
apt-get install libncurses5-dev kernel-package
208 35 csaba
</pre>
209 1 tec
210
Now configure the kernel modules with
211 35 csaba
<pre>
212 1 tec
make menuconfig
213 35 csaba
</pre>
214 1 tec
215 35 csaba
Include the _mISDN_ modules and _hfcmulti / hfc e1 drivers_.
216 1 tec
217 35 csaba
Save the new configuration to *.config* .
218 1 tec
219
You can now try to build the Debian kernel package:
220 35 csaba
<pre>
221 1 tec
make-kpkg linux-image --initrd --revision=openbsc01.0
222 35 csaba
</pre>
223 1 tec
224
Go a directory higher
225 35 csaba
<pre>
226 1 tec
cd ..
227 35 csaba
</pre>
228 1 tec
229
and install the new kernel package typing:
230
231 35 csaba
<pre>
232 1 tec
dpkg -i  kernelpackagename.deb
233 35 csaba
</pre>
234 1 tec
235
Now you only have to add the dslot=1 parameter for hfcmulti to load with this parameter.
236 35 csaba
Otherwise [[OpenBSC]] will talk on signalling timeslot 15 where BS11 uses 1.
237 1 tec
238 35 csaba
Simply add the following in */boot/grub/menu.lst* :
239 1 tec
240
Add this line to the "Kernel"-line
241
242 35 csaba
*hfcmulti.dslot=1*
243 1 tec
244
Save changes and reboot your machine with your new kernel.
245
246
247 35 csaba
h4. DAHDI kernel in case of E1 based BTS like BS-11
248
249
250 1 tec
This is an alternative to the mISDN drivers.  For DAHDI installation, please check with the Asterisk / DAHDI homepage.
251
252 35 csaba
<pre>
253
<pre>
254 1 tec
dchan=1
255
bchan=2-30
256 35 csaba
</pre>
257 1 tec
258 35 csaba
<pre>
259
<pre>
260 1 tec
e1_input
261
 e1_line 0 driver dahdi
262 35 csaba
</pre>
Add picture from clipboard (Maximum size: 48.8 MB)