Software Getting Started » History » Version 33
fixeria, 06/12/2024 11:41 AM
update host side dependencies
1 | 26 | h2. [[OsmocomBB]] Getting Started Guide |
|
---|---|---|---|
2 | |||
3 | |||
4 | 1 | This page will describe how to compile the firmware, the host utilities and how to use them. |
|
5 | 26 | If you haven't done so already, checkout [[PreliminaryRequirements]] |
|
6 | 1 | ||
7 | 26 | ||
8 | h3. Compiling osmocomBB |
||
9 | |||
10 | 1 | osmocomBB consists out of software that is intended to be run on the phone (target) and the host system. |
|
11 | |||
12 | h4. Dependencies for the host |
||
13 | 26 | ||
14 | 32 | fixeria | OsmocomBB requires GNU autoconf, automake, libtool, pkg-config, make and GCC to compile. |
15 | 1 | The name of these packages depend on the distribution used. You will also need git to access and update the sources. |
|
16 | 32 | fixeria | |
17 | For Debian (and Debian-like distros), these packages can be installed using: |
||
18 | |||
19 | <pre><code class="sh"> |
||
20 | $ sudo apt install libtool shtool automake autoconf git-core pkg-config make gcc |
||
21 | 1 | </code></pre> |
|
22 | |||
23 | 33 | fixeria | For Arch Linux (and Manjaro), these packages can be installed using: |
24 | |||
25 | <pre><code class="sh"> |
||
26 | $ pacman -S base-devel |
||
27 | </code></pre> |
||
28 | |||
29 | 1 | You'll also need to install the following libraries: |
|
30 | 32 | fixeria | |
31 | 1 | * [[libosmocore:]] |
|
32 | 33 | fixeria | * [[libosmo-gprs:]] and libosmo-csn1 |
33 | 32 | fixeria | * [[gapk:|libosmo-gapk]] (optional, enables voice calls) |
34 | * lua53 (optional, enables LUA scripting support) |
||
35 | * libgps (optional, enables GPS support) |
||
36 | 1 | ||
37 | 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. |
||
38 | 26 | ||
39 | 33 | fixeria | For Debian (and Debian-like distros), these libraries can be installed from the Osmocom's [[cellular-infrastructure:Nightly_Builds|nightly feed]]: |
40 | 1 | ||
41 | 33 | fixeria | <pre><code class="shell"> |
42 | # Follow the instructions on adding the Osmocom's nightly feed to @/etc/apt/sources.list.d/@ |
||
43 | $ sudo apt install libosmocore-dev libosmo-csn1-dev libosmo-gprs-rlcmac-dev libosmo-gprs-llc-dev libosmo-gprs-sndcp-dev libosmo-gprs-gmm-dev libosmo-gprs-sm-dev |
||
44 | $ sudo apt install libosmogapk-dev |
||
45 | $ sudo apt install liblua5.3-dev libgps-dev |
||
46 | </code></pre> |
||
47 | 1 | ||
48 | 33 | fixeria | For Arch Linux (and Manjaro), these packages can be installed from "AUR":https://aur.archlinux.org/: |
49 | 1 | ||
50 | 33 | fixeria | * https://aur.archlinux.org/packages/libosmocore-git |
51 | * https://aur.archlinux.org/packages/libosmo-gprs-git |
||
52 | * https://aur.archlinux.org/packages/osmo-gapk-git |
||
53 | |||
54 | <pre><code class="sh"> |
||
55 | $ pacman -S lua53 gpsd |
||
56 | </code></pre> |
||
57 | |||
58 | h4. Dependencies for the target |
||
59 | |||
60 | To compile osmocomBB for the target we need a GNU [[toolchain]] for ARM. |
||
61 | 26 | ||
62 | h4. Getting and updating the source |
||
63 | |||
64 | |||
65 | <pre> |
||
66 | <code class="sh"> |
||
67 | 31 | laforge | git clone https://gitea.osmocom.org/phone-side/osmocom-bb.git |
68 | 1 | cd osmocom-bb |
|
69 | git pull --rebase |
||
70 | 26 | </code></pre> |
|
71 | 1 | ||
72 | 20 | tsaitgaist | |
73 | 26 | h4. Building the source |
|
74 | |||
75 | Compiling both the target and the host code will happen with the following command. It assumes that the *arm-elf-gcc* |
||
76 | is* inside the current path._ |
||
77 | |||
78 | <pre> |
||
79 | <code class="sh"> |
||
80 | 4 | cd src |
|
81 | make |
||
82 | 26 | </code></pre> |
|
83 | 20 | tsaitgaist | |
84 | 26 | If your GCC binary that produces ARM code is not called *arm-elf-gcc* you will need to invoke the following statement |
|
85 | and provide the basename of the toolchain with the ending *-*. |
||
86 | 1 | ||
87 | 26 | <pre> |
|
88 | <code class="sh"> |
||
89 | 4 | cd src |
|
90 | make -e CROSS_TOOL_PREFIX=arm-OTHER_NAME- |
||
91 | 26 | </code></pre> |
|
92 | 5 | ||
93 | 30 | msuraev | For example after installing *gcc-arm-none-eabi* package on Ubuntu/Debian the proper command would be |
94 | 27 | msuraev | <pre> |
95 | <code class="sh"> |
||
96 | 29 | msuraev | make -e CROSS_TOOL_PREFIX=arm-none-eabi- |
97 | 27 | msuraev | </code></pre> |
98 | |||
99 | 26 | If no error has occured you will have the firmware binaries in _src/target/firmware/board/compal_e88/*.bin_ that can be |
|
100 | used with the Motorola C123. You also have the binaries to run on your host in _src/host/osmocon/osmocon_, in |
||
101 | _src/host/layer23/src/misc_ and _layer23/src/mobile_. |
||
102 | 5 | ||
103 | |||
104 | 26 | ||
105 | h3. Running osmocomBB |
||
106 | |||
107 | The original bootloader of Compal and others are built in a way to load code via the serial interface. The [[osmocon]] |
||
108 | utility implements this protocol and can upload the firmware. Please refer the [[osmocon]] wiki page for details on how to use |
||
109 | 1 | it properly. |
|
110 | |||
111 | 26 | After the firmware has been loaded, the [[osmocon]] application will print the output of the serial console |
|
112 | 1 | and it provides a unix domain socket that another layer of software can connect to. In the case of osmocomBB |
|
113 | 26 | this higher layer software is called [[ccch_scan]] and is actually a group of binaries providing different functionality. Please |
|
114 | see [[ccch_scan]] for the details. |