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