Project

General

Profile

Accelerate3g5 -- unicornteam » History » Version 2

Alin, 04/10/2017 08:31 AM

1 1 Alin
h1. Accelerate3g5 -- unicornteam
2
3
Journal
4
5
2017/03/15 -- Received the package of nano3G.
6 2 Alin
7
h2. Building from source
8
* PC:Ubuntu16.04
9
* HardWare:ip.access nano3G
10
* SoftWare:Osmocom 
11
* 
12
h3.  1.1 安装交叉编译环境
13
14
<pre>
15
sudo apt-get update
16
17
mkdir osmo
18
cd osmo
19
mkdir build install src
20
wget http://bb.osmocom.org/trac/raw-attachment/wiki/GnuArmToolchain/gnu-arm-build.3.sh
21
cd src
22
wget http://ftp.gnu.org/gnu/gcc/gcc-4.8.2/gcc-4.8.2.tar.bz2
23
wget http://ftp.gnu.org/gnu/binutils/binutils-2.21.1a.tar.bz2
24
wget ftp://sources.redhat.com/pub/newlib/newlib-1.19.0.tar.gz
25
26
cd ..
27
chmod +x gnu-arm-build.3.sh
28
sudo bash gnu-arm-build.3.sh
29
</pre>
30
31
h3.  1.2 设置交叉编译环境变量
32
<pre>
33
cd install/bin
34
pwd
35
36
vi ~/./.bashrc
37
export PATH=$PATH:/home/$username(change this to your name)/osm/install/bin
38
39
#save and quit
40
source ~/.bashrc
41
</pre> 
42
43
h3. 0x02 源码编译CalypsoBTS
44
h3.  2.1 编译libosmo-dsp
45
<pre>
46
git clone git://git.osmocom.org/libosmo-dsp.git
47
cd libosmo-dsp/
48
autoreconf -i
49
./configure
50
make
51
sudo make install
52
cd ..
53
</pre>
54
55
56
h3.  2.2 编译osmocom-bb
57
58
<pre>
59
git clone git://git.osmocom.org/osmocom-bb.git trx
60
cd trx/
61
git checkout jolly/testing
62
cd src/
63
64
# It needs TX support
65
# Just uncomment 'CFLAGS += -DCONFIG_TX_ENABLE' in target/firmware/Makefile
66
67
# And make with transceiver support
68
make HOST_layer23_CONFARGS=--enable-transceiver
69
</pre>
70
71
72
h3.  2.3 安装依赖包
73
<pre>
74
sudo apt-get install sqlite3 libdbi-dev libdbd-sqlite3 libsctp-dev
75
</pre>
76
77
h3.  2.4 编译 Ortp
78
 
79
<pre>
80
wget http://download.savannah.gnu.org/releases/linphone/ortp/sources/ortp-0.22.0.tar.gz
81
tar -xvf ortp-0.22.0.tar.gz
82
cd ortp-0.22.0/
83
./configure
84
make
85
sudo make install
86
sudo ldconfig
87
cd ..
88
</pre>
89
90
91
h3.  2.5 编译libosmo-abis
92
<pre>
93
git clone git://git.osmocom.org/libosmo-abis.git
94
cd libosmo-abis
95
autoreconf -i
96
./configure
97
make
98
sudo make install
99
sudo ldconfig
100
cd ..
101
</pre>
102
103
h3.  2.6 编译libosmo-netif
104
105
<pre>
106
git clone git://git.osmocom.org/libosmo-netif.git
107
cd libosmo-netif/
108
autoreconf -i
109
./configure
110
make
111
sudo make install
112
sudo ldconfig
113
cd ..
114
</pre>
115
116
h3.  2.7 编译openbsc
117
 
118
<pre>
119
git clone git://git.osmocom.org/openbsc.git
120
cd openbsc/openbsc/
121
autoreconf -i
122
./configure
123
make
124
sudo make install
125
cd ../..
126
127
</pre>
128
129
h3.  2.8 编译osmo-bts
130
<pre>
131
git clone git://git.osmocom.org/osmo-bts.git
132
cd osmo-bts
133
autoreconf -i
134
./configure --enable-trx
135
make
136
sudo make install
137
cd ..
138
</pre> 
139
140
141
h3.  2.9 创建OpenBSC配置文件
142
<pre>
143
# Create the configuration folder if it isn't exist yet
144
mkdir ~/.osmocom
145
cd ~/.osmocom
146
touch ~/.osmocom/open-bsc.cfg
147
touch ~/.osmocom/osmo-bts.cfg
148
</pre>
149
150
151
h3.  0x03 源码编译Cellular Infrastructure
152
153
h3. 3.1 克隆源码
154
155
<pre>
156
git clone git://git.osmocom.org/libosmocore
157
git clone git://git.osmocom.org/libosmo-abis
158
git clone git://git.osmocom.org/openbsc
159
git clone git://git.osmocom.org/libosmo-netif
160
git clone git://git.osmocom.org/libosmo-sccp
161
git clone git://git.osmocom.org/libsmpp34
162
git clone git://git.osmocom.org/openggsn
163
</pre>
164
165
166
h3.  3.2 下载&执行自动编译脚本
167
<pre>
168
wget https://osmocom.org/attachments/download/2438/build_2G.sh
169
chmod 777  build_2G.sh
170
sudo bash build_2G.sh
171
</pre>
172
 
Add picture from clipboard (Maximum size: 48.8 MB)