Building OpenBSC » History » Version 16
laforge, 02/19/2016 10:47 PM
Name changed from Debian_Getting_Started to Building_OpenBSC
1 | 14 | laforge | [[PageOutline]] |
---|---|---|---|
2 | 1 | ||
3 | == Debian HowTo == |
||
4 | |||
5 | This page will describe the entire installation process of OpenBSC under Debian Linux. |
||
6 | This tutorial is based on Debian Netinstall 5.0 but will work with other Debian versions. |
||
7 | |||
8 | 4 | To be able to access your OpenBSC machine easily from a remote Terminal, install ssh. |
|
9 | 1 | This can be easily done with "apt-get install ssh". |
|
10 | |||
11 | |||
12 | 14 | laforge | === Compiling + running OpenBSC === |
13 | |||
14 | 15 | laforge | ==== Dependencies ==== |
15 | |||
16 | You should install the following Debian packages before you start: |
||
17 | 14 | laforge | * libdbi0 |
18 | * libdbi0-dev |
||
19 | * libdbd-sqlite3 |
||
20 | * autoconf |
||
21 | * git-core |
||
22 | 1 | (The list may be incomplete) |
|
23 | |||
24 | 15 | laforge | On Debian, you can install those packages with {{{apt-get install libdbi0-dev libdbd-sqlite3 autoconf git-core}}} |
25 | 1 | ||
26 | 15 | laforge | ==== Building libosmocore ==== |
27 | 1 | * Check out libosmocore from git using {{{git clone git://git.osmocom.org/libosmocore.git}}} |
|
28 | 15 | laforge | * Change into the right directory using {{{cd libosmocore}}} |
29 | * Rebuild the configure script using {{{autoreconf -i}}} |
||
30 | * Run the configure script using {{{./configure}}} |
||
31 | * Build the actual software using {{{make}}} |
||
32 | * Install the library by using {{{make install}}} |
||
33 | |||
34 | ==== Building OpenBSC ==== |
||
35 | 14 | laforge | * Check out OpenBSC from git using {{{git clone git://bs11-abis.gnumonks.org/openbsc.git}}} |
36 | 15 | laforge | * Change into the right directory using {{{cd openbsc/openbsc}}} |
37 | * Rebuild the configure script using {{{autoreconf -i}}} |
||
38 | * Run the configure script using {{{./configure}}} |
||
39 | * Build the actual software using {{{make}}} |
||
40 | 14 | laforge | |
41 | 1 | Congratulations, you should now have the OpenBSC programs like ''bsc_hack'', ''ipaccess-config'' and others in the 'src/' subdirectory. |
|
42 | 11 | laforge | |
43 | 15 | laforge | ==== mISDN enabled kernel in case of BS-11 ==== |
44 | 6 | ||
45 | 11 | laforge | If you want to use a E1-based BTS (like the BS-11), you will need to install mISDN. |
46 | 1 | ||
47 | 11 | laforge | '''If you have an IP/Ethernet based BTS (like the ip.access nanoBTS), you don't need this section!''' |
48 | 1 | ||
49 | 12 | laforge | 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. |
50 | 1 | ||
51 | 12 | laforge | First of all you will need to download the 2.6.31 Linux kernel from [http://www.kernel.org/pub/linux/kernel/v2.6/]. |
52 | 14 | laforge | |
53 | 1 | Change to '''/usr/src/''' on your OpenBSC machine. |
|
54 | 12 | laforge | Then simply do a {{{wget [http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.31.tar.bz2]}{}} |
55 | 3 | ||
56 | 1 | Unpack the archive: {{{tar --bzip2 -xvf linux-2.6.31.tar.bz2}}} |
|
57 | and create a symlink to fit the Linux standard conventions: {{{ln -s linux-2.6.30 linux}}}.[[BR]] |
||
58 | |||
59 | Now change to linux-2.6.30 typing {{{cd linux-2.6.30}}}. |
||
60 | |||
61 | You are ready now to prepare for the main part: |
||
62 | |||
63 | Install some tools needed to build the kernel. |
||
64 | |||
65 | {{{apt-get install libncurses5-dev kernel-package}}} |
||
66 | 11 | laforge | |
67 | 3 | Now configure the kernel modules with {{{make menuconfig}}} |
|
68 | 11 | laforge | |
69 | 3 | Include the ''mISDN'' modules and ''hfcmulti /hfc e1 drivers''. |
|
70 | 1 | ||
71 | 3 | Save the new configuration to '''.config''' . |
|
72 | |||
73 | You can now try to build the Debian kernel package: {{{make-kpkg linux-image --initrd --revision=openbsc01.0}}} . |
||
74 | 11 | laforge | |
75 | 14 | laforge | Go a directory higher (cd ..) |
76 | 11 | laforge | |
77 | 13 | and install the new kernel package typing: |
|
78 | 11 | laforge | |
79 | {{{dpkg -i kernelpackagename.deb}}} |
||
80 | |||
81 | Now you only have to add the dslot=1 parameter for hfcmulti to load with this parameter. |
||
82 | Otherwise OpenBSC will talk on signalling timeslot 15 where BS11 uses 1. |
||
83 | |||
84 | Simply add the following in '''/boot/grub/menu.lst''' : |
||
85 | |||
86 | Add this line to the "Kernel"-line |
||
87 | 1 | ||
88 | '''hfcmulti.dslot=1''' |
||
89 | |||
90 | Save changes and reboot your machine with your new kernel. |