Project

General

Profile

GettingStarted osx » History » Version 5

blombo, 02/19/2016 10:49 PM

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