Software Getting Started » History » Version 31
laforge, 07/25/2022 09:01 AM
gitea
1 | 1 | ||
---|---|---|---|
2 | 26 | h2. [[OsmocomBB]] Getting Started Guide |
|
3 | |||
4 | |||
5 | 1 | This page will describe how to compile the firmware, the host utilities and how to use them. |
|
6 | 26 | If you haven't done so already, checkout [[PreliminaryRequirements]] |
|
7 | 1 | ||
8 | 26 | ||
9 | h3. Compiling osmocomBB |
||
10 | |||
11 | 1 | osmocomBB consists out of software that is intended to be run on the phone (target) and the host system. |
|
12 | |||
13 | 25 | ||
14 | 26 | h4. Dependencies for the host |
|
15 | |||
16 | |||
17 | 1 | osmocomBB requires GNU autoconf, automake, libtool, pkg-config, make and GCC to compile. |
|
18 | The name of these packages depend on the distribution used. You will also need git to access and update the sources. |
||
19 | For Debian(and Debian-like distros), these packages can be installed using: |
||
20 | 26 | <pre> |
|
21 | <code class="sh"> |
||
22 | 28 | msuraev | sudo apt install libtool shtool automake autoconf git-core pkg-config make gcc |
23 | 26 | </code></pre> |
|
24 | 1 | ||
25 | 26 | For osmocomBB, as for several other osmocom projects, you will also need [[libosmocore]]. Note: Although libosmocore is included when getting osmocom-bb from the git repository, you have to install it separately. The libosmocore subtree is only used to compile the embedded ARM version of libosmocore. |
|
26 | 1 | ||
27 | |||
28 | 26 | h4. Dependencies for the target |
|
29 | 1 | ||
30 | |||
31 | 26 | To compile osmocomBB or SIMtrace for the target we *need a GNU [[toolchain]] for ARM.* |
|
32 | |||
33 | |||
34 | h4. Getting and updating the source |
||
35 | |||
36 | |||
37 | <pre> |
||
38 | <code class="sh"> |
||
39 | 31 | laforge | git clone https://gitea.osmocom.org/phone-side/osmocom-bb.git |
40 | 1 | cd osmocom-bb |
|
41 | git pull --rebase |
||
42 | 26 | </code></pre> |
|
43 | 1 | ||
44 | 20 | tsaitgaist | |
45 | 26 | h4. Building the source |
|
46 | |||
47 | Compiling both the target and the host code will happen with the following command. It assumes that the *arm-elf-gcc* |
||
48 | is* inside the current path._ |
||
49 | |||
50 | <pre> |
||
51 | <code class="sh"> |
||
52 | 4 | cd src |
|
53 | make |
||
54 | 26 | </code></pre> |
|
55 | 20 | tsaitgaist | |
56 | 26 | If your GCC binary that produces ARM code is not called *arm-elf-gcc* you will need to invoke the following statement |
|
57 | and provide the basename of the toolchain with the ending *-*. |
||
58 | 1 | ||
59 | 26 | <pre> |
|
60 | <code class="sh"> |
||
61 | 4 | cd src |
|
62 | make -e CROSS_TOOL_PREFIX=arm-OTHER_NAME- |
||
63 | 26 | </code></pre> |
|
64 | 5 | ||
65 | 30 | msuraev | For example after installing *gcc-arm-none-eabi* package on Ubuntu/Debian the proper command would be |
66 | 27 | msuraev | <pre> |
67 | <code class="sh"> |
||
68 | 29 | msuraev | make -e CROSS_TOOL_PREFIX=arm-none-eabi- |
69 | 27 | msuraev | </code></pre> |
70 | |||
71 | 26 | If no error has occured you will have the firmware binaries in _src/target/firmware/board/compal_e88/*.bin_ that can be |
|
72 | used with the Motorola C123. You also have the binaries to run on your host in _src/host/osmocon/osmocon_, in |
||
73 | _src/host/layer23/src/misc_ and _layer23/src/mobile_. |
||
74 | 5 | ||
75 | |||
76 | 26 | ||
77 | h3. Running osmocomBB |
||
78 | |||
79 | The original bootloader of Compal and others are built in a way to load code via the serial interface. The [[osmocon]] |
||
80 | utility implements this protocol and can upload the firmware. Please refer the [[osmocon]] wiki page for details on how to use |
||
81 | 1 | it properly. |
|
82 | |||
83 | 26 | After the firmware has been loaded, the [[osmocon]] application will print the output of the serial console |
|
84 | 1 | and it provides a unix domain socket that another layer of software can connect to. In the case of osmocomBB |
|
85 | 26 | this higher layer software is called [[ccch_scan]] and is actually a group of binaries providing different functionality. Please |
|
86 | see [[ccch_scan]] for the details. |