Project

General

Profile

Building OpenBSC » History » Version 17

laforge, 02/19/2016 10:47 PM
better formatting

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