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