Project

General

Profile

Building from Source » History » Version 1

laforge, 01/09/2020 10:31 PM

1 1 laforge
{{>toc}}
2
3
h1. Building from Source
4
5
This page is about how to build the simtrace2 firmware and host software from source.
6
7
{{include(cellular-infrastructure:MacroBinaryPackages)}}
8
9
We traditionally have built our software primarily on Debian GNU/Linux (jessie, stretch, buster) and on a variety of Ubuntu versions.  If you have problems, it is suggested you start with a tested/supported environment, or use the docker based approach listed further below.
10
11
h2. Classic approach on Debian/Ubuntu
12
13
h3. Installing packages from upstream Debian/Ubuntu
14
15
<pre>
16
apt-get install autotools-dev autoconf automake libtool pkg-config git \
17
                libpcsclite-dev libnewlib-arm-none-eabi libusb-1.0-0-dev \
18
                gcc-arm-none-eabi
19
</pre>
20
21
h3. Installing packages from the Osmocom Package feeds
22
23
You will need @libosmocore-dev@, either
24
* install it from the Osmocom package feed [[cellular-infrastructure:Binary_Packages]] (latest feed if you use a tagged version of simtrace2.git, nightly feed if you use git master of simtrace2.git)
25
** @apt-get install libosmocore-dev@ (after you added the above-mentioned feed
26
* or build [[libosmocore:]] from source, too.
27
28
h2. Docker based approach
29
30
You can use the @debian-buster-simtrace2@ docker image, whose Dockerfile you can find at https://git.osmocom.org/docker-playground/tree/
31
32
h3. Building the @debian-buster-simtrace2@ container
33
34
<pre>
35
$ git clone https://git.osmocom.org/docker-playground
36
$ cd docker-playground
37
$ cd debian-buster-build
38
$ make
39
[...]
40
Successfully tagged $USER/debian-buster-build:latest
41
$ cd ../debian-buster-simtrace2
42
$ make
43
[...]
44
Successfully tagged $USER/debian-buster-simtrace2:latest
45
</pre>
46
47
h3. Running the container and performing an actual build
48
49
For the firmware:
50
51
<pre>
52
$ docker run --rm -it $USER/debian-buster-simtrace2
53
osmocom@d81d29b620a7:~$ cd simtrace2/firmware
54
osmocom@d81d29b620a7:~/simtrace2/firmware$ make BOARD=qmod APP=cardem
55
[...]
56
  31548       0   26028   57576    e0e8 bin/qmod-cardem-dfu.elf
57
osmocom@d81d29b620a7:~/simtrace2/firmware$ 
58
</pre>
59
60
For the host tools:
61
62
<pre>
63
$ docker run --rm -it $USER/debian-buster-simtrace2
64
osmocom@d81d29b620a7:~$ cd simtrace2/host
65
osmocom@d81d29b620a7:~/simtrace2/host$ autoreconf -fi && ./configure && make -j4
66
[...]
67
  CCLD     simtrace2-list
68
  CCLD     simtrace2-remsim-usb2udp
69
  CCLD     simtrace2-remsim
70
  CCLD     simtrace2-sniff
71
make[2]: Leaving directory '/home/osmocom/simtrace2/host/src'
72
Making all in contrib
73
make[2]: Entering directory '/home/osmocom/simtrace2/host/contrib'
74
make[2]: Nothing to be done for 'all'.
75
make[2]: Leaving directory '/home/osmocom/simtrace2/host/contrib'
76
make[2]: Entering directory '/home/osmocom/simtrace2/host'
77
make[2]: Nothing to be done for 'all-am'.
78
make[2]: Leaving directory '/home/osmocom/simtrace2/host'
79
make[1]: Leaving directory '/home/osmocom/simtrace2/host'
80
</pre>
81
</pre>
Add picture from clipboard (Maximum size: 48.8 MB)