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