Project

General

Profile

Building OpenBSC » History » Version 19

Anonymous, 02/19/2016 10:47 PM
hint the usage of PKG_CONFIG_PATH

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