Software Getting Started » History » Version 6
steve-m, 02/19/2016 10:49 PM
add link to toolchain how-to
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 | |||
5 | === Compiling osmocomBB === |
||
6 | osmocomBB consists out of software that is intended to be run on the phone (target) and the host system. |
||
7 | |||
8 | 6 | steve-m | ==== Dependencies for the host ==== |
9 | 1 | osmocomBB requires GNU autoconf, automake, libtool, pkg-config, make and GCC to compile. You will |
|
10 | also need to use git to access and update the sources. There should be no other depedencies. The name |
||
11 | of these packages depend on the distribution used. To |
||
12 | |||
13 | For Debian the package names are: |
||
14 | {{{ |
||
15 | sudo aptitude install libtool autoconf git-core pkg-config make gcc |
||
16 | }}} |
||
17 | |||
18 | ==== Depenendencies for the target ==== |
||
19 | To compile software for the target we need a GNU Toolchain for ARM. There are various pre-compiled toolchains |
||
20 | available but not all of them will produce working firmware. We will try to support all these configurations but it |
||
21 | might take a while to identify the source of a problem. |
||
22 | |||
23 | 3 | The toolchains that are known working are the [http://www.gnuarm.com GNUArm.com] ones. They provide a |
|
24 | ARM GCC 3.4 .3 for X86 [http://gnuarm.com/bu-2.15_gcc-3.4.3-c-c++-java_nl-1.12.0_gi-6.1.tar.bz2 here] and |
||
25 | a ARM GCC 4.0.2 for x86_64 [http://gnuarm.com/bu-2.16.1_gcc-4.0.2-c-c++_nl-1.14.0_gi-6.4_x86-64.tar.bz2 here]. The |
||
26 | 1 | toolchain is relocatable and be extracted in your home directory. |
|
27 | 6 | steve-m | |
28 | If you want to build your own toolchain, known to be working with OsmocomBB, see here: [wiki:GnuArmToolchain]. |
||
29 | 3 | ||
30 | An example for x86 |
||
31 | {{{ |
||
32 | $ wget http://gnuarm.com/bu-2.15_gcc-3.4.3-c-c++-java_nl-1.12.0_gi-6.1.tar.bz2 |
||
33 | $ mkdir install |
||
34 | $ cd install |
||
35 | $ tar xjf ../bu-2.15_gcc-3.4.3-c-c++-java_nl-1.12.0_gi-6.1.tar.bz2 |
||
36 | $ ls gnuarm-3.4.3/bin/arm-elf-gcc |
||
37 | }}} |
||
38 | |||
39 | 2 | ==== Getting and updating the source ==== |
|
40 | 1 | {{{ |
|
41 | git clone git://git.osmocom.org/osmocom-bb.git |
||
42 | 2 | }}} |
|
43 | |||
44 | {{{ |
||
45 | $ cd osmocom-bb.git |
||
46 | $ git pull --rebase |
||
47 | }}} |
||
48 | |||
49 | ==== Building the source ==== |
||
50 | Compiling both the target and the host code will happen with the following command. It assumes that the '''arm-elf-gcc''' |
||
51 | is inside the current path. |
||
52 | |||
53 | {{{ |
||
54 | $ cd src |
||
55 | $ make |
||
56 | }}} |
||
57 | 1 | ||
58 | 4 | If your GCC binary that produces ARM code is not called '''arm-elf-gcc''' you will need to invoke the following statement |
|
59 | and provide the basename of the toolchain with the ending '''-'''. |
||
60 | 2 | ||
61 | {{{ |
||
62 | $ cd src |
||
63 | $ make -e CROSS_TOOL_PREFIX=arm-OTHER_NAME- |
||
64 | 1 | }}} |
|
65 | 4 | ||
66 | If no error has occured you will have the firmware binaries in ''src/target/firmware/board/compal_e88/*.bin'' that can be |
||
67 | used with the Motorola C123. You also have the binaries to run on your host in ''src/host/osmocon/osmocon'', in |
||
68 | ''src/host/layer23/src/misc'' and ''layer23/src/mobile''. |
||
69 | 5 | ||
70 | |||
71 | === Running osmocomBB === |
||
72 | The original bootloader of Compal and others are built in a way to load code via the serial interface. The [wiki:osmocon] |
||
73 | utility implements this protocol and can upload the firmware. Please the [wiki:osmocon] for the details of how to use |
||
74 | it properly. |
||
75 | |||
76 | After the firmware has been loaded the [wiki:osmocon] application will print the output of the serial console |
||
77 | and it provides a unix domain socket that another layer of software can connect to. In the case of osmocomBB |
||
78 | this higher layer software is called [wiki:layer23] and is actually a group of binaries providing different functionality. Please |
||
79 | see [wiki:layer23] for the details. |