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