Project

General

Profile

GettingStarted osx » History » Version 4

blombo, 02/19/2016 10:48 PM

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