Project

General

Profile

Building OpenBSC » History » Version 35

Anonymous, 02/19/2016 10:48 PM

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