Software Getting Started » History » Version 17
Anonymous, 02/19/2016 10:49 PM
Name changed from GettingStarted to Software/GettingStarted
1 | 1 | == OsmocomBB Getting Started Guide == |
|
---|---|---|---|
2 | |||
3 | This page will describe how to compile the firmware, the host utilities and how to use them. |
||
4 | 10 | If you haven't do so already, checkout [wiki:PreliminaryRequirements] |
|
5 | 1 | ||
6 | === Compiling osmocomBB === |
||
7 | osmocomBB consists out of software that is intended to be run on the phone (target) and the host system. |
||
8 | |||
9 | 6 | steve-m | ==== Dependencies for the host ==== |
10 | 1 | osmocomBB requires GNU autoconf, automake, libtool, pkg-config, make and GCC to compile. You will |
|
11 | also need to use git to access and update the sources. There should be no other depedencies. The name |
||
12 | of these packages depend on the distribution used. To |
||
13 | |||
14 | For Debian the package names are: |
||
15 | {{{ |
||
16 | 8 | sudo aptitude install libtool shtool autoconf git-core pkg-config make gcc |
|
17 | 1 | }}} |
|
18 | |||
19 | 9 | ==== Dependencies for the target ==== |
|
20 | 1 | ||
21 | 15 | tsaitgaist | To compile osmocomBB or SIMtrace for the target we need a GNU [wiki:toolchain] for ARM. |
22 | 13 | ||
23 | 2 | ==== Getting and updating the source ==== |
|
24 | 1 | {{{ |
|
25 | git clone git://git.osmocom.org/osmocom-bb.git |
||
26 | 2 | }}} |
|
27 | |||
28 | {{{ |
||
29 | 8 | $ cd osmocom-bb |
|
30 | 1 | $ git pull --rebase |
|
31 | 9 | }}} |
|
32 | |||
33 | ==== Verify the `PATH` environment variable ==== |
||
34 | |||
35 | Please ensure that the cross-compiler is available in your `PATH`, for example by adding the following command to your shell's startup script (e.g. `.bashrc`) or typing it in the terminal you use to build: |
||
36 | |||
37 | {{{ |
||
38 | export $PATH:$HOME/install/gnuarm-3.4.3/bin |
||
39 | 2 | }}} |
|
40 | |||
41 | 11 | Or on Ubuntu you might want to try: |
|
42 | |||
43 | {{{ |
||
44 | export PATH=$PATH:$HOME/install/gnuarm-3.4.3/bin |
||
45 | }}} |
||
46 | |||
47 | 12 | (presuming it's in your home directory, if you have changed to root it probably wont be :)) |
|
48 | 2 | ==== Building the source ==== |
|
49 | Compiling both the target and the host code will happen with the following command. It assumes that the '''arm-elf-gcc''' |
||
50 | is inside the current path. |
||
51 | |||
52 | {{{ |
||
53 | $ cd src |
||
54 | $ make |
||
55 | }}} |
||
56 | 1 | ||
57 | 4 | If your GCC binary that produces ARM code is not called '''arm-elf-gcc''' you will need to invoke the following statement |
|
58 | and provide the basename of the toolchain with the ending '''-'''. |
||
59 | 2 | ||
60 | {{{ |
||
61 | $ cd src |
||
62 | $ make -e CROSS_TOOL_PREFIX=arm-OTHER_NAME- |
||
63 | 1 | }}} |
|
64 | 4 | ||
65 | If no error has occured you will have the firmware binaries in ''src/target/firmware/board/compal_e88/*.bin'' that can be |
||
66 | used with the Motorola C123. You also have the binaries to run on your host in ''src/host/osmocon/osmocon'', in |
||
67 | ''src/host/layer23/src/misc'' and ''layer23/src/mobile''. |
||
68 | 5 | ||
69 | |||
70 | === Running osmocomBB === |
||
71 | The original bootloader of Compal and others are built in a way to load code via the serial interface. The [wiki:osmocon] |
||
72 | utility implements this protocol and can upload the firmware. Please the [wiki:osmocon] for the details of how to use |
||
73 | it properly. |
||
74 | |||
75 | After the firmware has been loaded the [wiki:osmocon] application will print the output of the serial console |
||
76 | and it provides a unix domain socket that another layer of software can connect to. In the case of osmocomBB |
||
77 | 16 | this higher layer software is called [wiki:ccch_scan] and is actually a group of binaries providing different functionality. Please |
|
78 | see [wiki:ccch_scan] for the details. |