Project

General

Profile

Building OpenBSC » History » Version 31

sylvain, 02/19/2016 10:47 PM

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