1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
<chapter id="chapter_building">
|
3
|
<title>Getting and Building the Software</title>
|
4
|
<section id="building_intros">
|
5
|
<title>Building software</title>
|
6
|
<para>There are three parts that can be built. It is the firmware
|
7
|
for the SIMtrace hardware, the SIMtrace software and the modified
|
8
|
version of wireshark. All of these have different source trees and
|
9
|
dependencies.</para>
|
10
|
</section>
|
11
|
|
12
|
<section id="building_simtrace">
|
13
|
<title>Building SIMtrace</title>
|
14
|
|
15
|
<section id="libosmocore">
|
16
|
<title>Building the Osmocom libosmocore library</title>
|
17
|
<screen>
|
18
|
$ <command>git</command> clone https://gitea.osmocom.org/osmocom/libosmocore
|
19
|
$ <command>cd</command> libosmocore
|
20
|
$ <command>autoreconf</command> --install --force
|
21
|
$ <command>./configure</command>
|
22
|
$ <command>sudo</command> <command>make</command> install
|
23
|
</screen>
|
24
|
</section>
|
25
|
|
26
|
<section id="libusb">
|
27
|
<title>Installing libusb</title>
|
28
|
<para>You will need to install the libusb header files
|
29
|
to be able to compile <command>simtrace</command>.</para>
|
30
|
</section>
|
31
|
|
32
|
<section id="simtrace">
|
33
|
<title>Building <command>simtrace</command></title>
|
34
|
<screen>
|
35
|
$ wget https://api.opensuse.org/public/source/home:zecke23/simtrace/simtrace_0.0.1.tar.gz
|
36
|
$ tar xzf simtrace_0.0.1.tar.gz
|
37
|
$ cd simtrace-0.0.1
|
38
|
$ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig make
|
39
|
cc `pkg-config --cflags libosmocore` -o main.o -c main.c
|
40
|
cc `pkg-config --cflags libosmocore` -o usb_helper.o -c usb_helper.c
|
41
|
cc `pkg-config --cflags libosmocore` -o usb.o -c usb.c
|
42
|
cc `pkg-config --cflags libosmocore` -o apdu_split.o -c apdu_split.c
|
43
|
cc -o simtrace main.o usb_helper.o usb.o apdu_split.o -lusb `pkg-config --libs libosmocore` -losmocore
|
44
|
</screen>
|
45
|
</section>
|
46
|
</section>
|
47
|
|
48
|
<section id="building_wireshark">
|
49
|
<title>Building Wireshark</title>
|
50
|
<para>SIMtrace provides a patch against <command>wireshark</command>
|
51
|
version 1.6. It is the easiest to checkout a copy using the 1.6 branch
|
52
|
of wireshark and applying the <filename>simcard.patch</filename> on top
|
53
|
of it. And then use the usual way of building wireshark</para>
|
54
|
|
55
|
<section id="getting_wireshark">
|
56
|
<title>Getting Wireshark</title>
|
57
|
<screen>
|
58
|
$ svn co https://anonsvn.wireshark.org/wireshark/trunk-1.6 wireshark-1.6
|
59
|
...
|
60
|
A wireshark-1.6/isprint.h
|
61
|
U wireshark-1.6
|
62
|
Checked out revision 38543.
|
63
|
</screen>
|
64
|
</section>
|
65
|
|
66
|
<section id="getting_simcard.patch">
|
67
|
<title>SIMCard patch</title>
|
68
|
<para>You will need to download and apply the patch.</para>
|
69
|
<screen>
|
70
|
$ cd wireshark-1.6
|
71
|
$ wget http://cgit.osmocom.org/cgit/simtrace/tree/wireshark/simcard-for-wireshark-1.6.patch
|
72
|
$ cat ../simcard-for-wireshark-1.6.patch | patch -p 0
|
73
|
patching file epan/dissectors/packet-gsm_sim.c
|
74
|
patching file epan/dissectors/packet-gsmtap.c
|
75
|
patching file epan/dissectors/Makefile.common
|
76
|
</screen>
|
77
|
</section>
|
78
|
|
79
|
<section id="building_and_installing">
|
80
|
<title>Building and Installing</title>
|
81
|
<screen>
|
82
|
$ autoreconf --install
|
83
|
$ ./configure
|
84
|
$ make
|
85
|
...
|
86
|
$ sudo ./wireshark
|
87
|
</screen>
|
88
|
</section>
|
89
|
</section>
|
90
|
</chapter>
|