Building from Source » History » Version 2
laforge, 01/09/2020 10:33 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 | 2 | laforge | h4. firmware builds |
50 | 1 | laforge | |
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 | 2 | laforge | Where |
61 | * @BOARD=@ specifies the target hardware / circuit board and |
||
62 | * @APP=@ specifies the actual firmware application |
||
63 | |||
64 | See https://git.osmocom.org/simtrace2/tree/firmware/README.txt for more information on available targets. |
||
65 | |||
66 | h4. host tools build |
||
67 | 1 | laforge | |
68 | <pre> |
||
69 | $ docker run --rm -it $USER/debian-buster-simtrace2 |
||
70 | osmocom@d81d29b620a7:~$ cd simtrace2/host |
||
71 | osmocom@d81d29b620a7:~/simtrace2/host$ autoreconf -fi && ./configure && make -j4 |
||
72 | [...] |
||
73 | CCLD simtrace2-list |
||
74 | CCLD simtrace2-remsim-usb2udp |
||
75 | CCLD simtrace2-remsim |
||
76 | CCLD simtrace2-sniff |
||
77 | make[2]: Leaving directory '/home/osmocom/simtrace2/host/src' |
||
78 | Making all in contrib |
||
79 | make[2]: Entering directory '/home/osmocom/simtrace2/host/contrib' |
||
80 | make[2]: Nothing to be done for 'all'. |
||
81 | make[2]: Leaving directory '/home/osmocom/simtrace2/host/contrib' |
||
82 | make[2]: Entering directory '/home/osmocom/simtrace2/host' |
||
83 | make[2]: Nothing to be done for 'all-am'. |
||
84 | make[2]: Leaving directory '/home/osmocom/simtrace2/host' |
||
85 | make[1]: Leaving directory '/home/osmocom/simtrace2/host' |
||
86 | </pre> |
||
87 | </pre> |