Project

General

Profile

GettingStarted osx » History » Version 2

blombo, 02/19/2016 10:48 PM

1 1 blombo
== OsmocomBB Getting Started Guide for OSX ==
2 1 blombo
3 1 blombo
This page will describe how to compile the firmware and the host utilities.
4 1 blombo
If you haven't do so already, checkout [wiki:PreliminaryRequirements]
5 1 blombo
6 1 blombo
=== Compiling osmocomBB ===
7 1 blombo
osmocomBB consists out of software that is intended to be run on the phone (target) and the host system.
8 1 blombo
9 1 blombo
==== Dependencies for the host ====
10 1 blombo
osmocomBB requires GNU autoconf, automake, libtool, pkg-config, make and GCC to compile. You will
11 1 blombo
also need to use git to access and update the sources. There should be no other depedencies. The name
12 1 blombo
of these packages depend on the distribution used. 
13 1 blombo
For OSX 10.7 Lion XCode is needed and can be downloaded from the Mac-Appstore [http://itunes.apple.com/de/app/xcode/id448457090?mt=12 here]
14 1 blombo
15 1 blombo
To have better UNIX support you need one of these alternatives:
16 1 blombo
[http://www.macports.org Macports]
17 1 blombo
[http://www.finkproject.org Fink]
18 1 blombo
[http://mxcl.github.com/homebrew Homebrew] Homebrew does currently not successfully build osmocom
19 1 blombo
20 1 blombo
For Macports:
21 1 blombo
{{{
22 1 blombo
sudo port install libtool-devel autoconf git-core pkgconfig automake17 gcc46
23 1 blombo
}}}
24 1 blombo
25 1 blombo
For Fink:
26 1 blombo
{{{
27 1 blombo
sudo fink install autoconf2.6 automake1.11 gcc46 git libtool2 pkgconfig
28 1 blombo
}}}
29 1 blombo
30 1 blombo
31 1 blombo
==== Dependencies for the target ====
32 1 blombo
33 1 blombo
To compile osmocomBB or SIMtrace for the target we need a GNU for ARM.
34 1 blombo
35 1 blombo
With Macports you can install arm-elf-gcc port command: 
36 1 blombo
{{{ 
37 1 blombo
sudo port install arm-elf-gcc
38 1 blombo
}}}
39 1 blombo
40 1 blombo
For Fink or for manual compilation go to [wiki:toolchain]
41 1 blombo
42 1 blombo
==== Getting and updating the source ====
43 1 blombo
{{{
44 1 blombo
git clone git://git.osmocom.org/osmocom-bb.git
45 1 blombo
}}}
46 1 blombo
47 1 blombo
{{{
48 1 blombo
$ cd osmocom-bb
49 1 blombo
$ git pull --rebase
50 1 blombo
}}}
51 1 blombo
52 1 blombo
==== Verify the `PATH` environment variable ====
53 1 blombo
54 1 blombo
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:
55 1 blombo
56 1 blombo
{{{
57 2 blombo
export PATH=/opt/local/bin/:/opt/local/sbin:/opt/local/bin/:/opt/local/sbin:$PATH
58 1 blombo
}}}
59 1 blombo
60 1 blombo
==== Building the source ====
61 1 blombo
Compiling both the target and the host code will happen with the following command. It assumes that the '''arm-elf-gcc'''
62 1 blombo
is inside the current path.
63 1 blombo
64 1 blombo
{{{
65 1 blombo
$ cd src
66 1 blombo
$ make
67 1 blombo
}}}
68 1 blombo
69 1 blombo
If your GCC binary that produces ARM code is not called '''arm-elf-gcc''' you will need to invoke the following statement
70 1 blombo
and provide the basename of the toolchain with the ending '''-'''.
71 1 blombo
72 1 blombo
{{{
73 1 blombo
$ cd src
74 1 blombo
$ make -e CROSS_TOOL_PREFIX=arm-OTHER_NAME-
75 1 blombo
}}}
76 1 blombo
77 1 blombo
If no error has occured you will have the firmware binaries in ''src/target/firmware/board/compal_e88/*.bin'' that can be
78 1 blombo
used with the Motorola C123. You also have the binaries to run on your host in ''src/host/osmocon/osmocon'', in 
79 1 blombo
''src/host/layer23/src/misc'' and ''layer23/src/mobile''.
Add picture from clipboard (Maximum size: 48.8 MB)