Project

General

Profile

Building OpenBSC » History » Version 34

Anonymous, 02/19/2016 10:47 PM

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