GettingStarted osx » History » Version 1
Anonymous, 02/19/2016 10:48 PM
Initial version
1 | 1 | == OsmocomBB Getting Started Guide for OSX == |
|
---|---|---|---|
2 | |||
3 | This page will describe how to compile the firmware and the host utilities. |
||
4 | If you haven't do so already, checkout [wiki:PreliminaryRequirements] |
||
5 | |||
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 | ==== Dependencies for the host ==== |
||
10 | 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. |
||
13 | 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 | |||
15 | To have better UNIX support you need one of these alternatives: |
||
16 | [http://www.macports.org Macports] |
||
17 | [http://www.finkproject.org Fink] |
||
18 | [http://mxcl.github.com/homebrew Homebrew] Homebrew does currently not successfully build osmocom |
||
19 | |||
20 | For Macports: |
||
21 | {{{ |
||
22 | sudo port install libtool-devel autoconf git-core pkgconfig automake17 gcc46 |
||
23 | }}} |
||
24 | |||
25 | For Fink: |
||
26 | {{{ |
||
27 | sudo fink install autoconf2.6 automake1.11 gcc46 git libtool2 pkgconfig |
||
28 | }}} |
||
29 | |||
30 | |||
31 | ==== Dependencies for the target ==== |
||
32 | |||
33 | To compile osmocomBB or SIMtrace for the target we need a GNU for ARM. |
||
34 | |||
35 | With Macports you can install arm-elf-gcc port command: |
||
36 | {{{ |
||
37 | sudo port install arm-elf-gcc |
||
38 | }}} |
||
39 | |||
40 | For Fink or for manual compilation go to [wiki:toolchain] |
||
41 | |||
42 | ==== Getting and updating the source ==== |
||
43 | {{{ |
||
44 | git clone git://git.osmocom.org/osmocom-bb.git |
||
45 | }}} |
||
46 | |||
47 | {{{ |
||
48 | $ cd osmocom-bb |
||
49 | $ git pull --rebase |
||
50 | }}} |
||
51 | |||
52 | ==== Verify the `PATH` environment variable ==== |
||
53 | |||
54 | 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 | |||
56 | {{{ |
||
57 | export $PATH:$HOME/install/gnuarm-3.4.3/bin |
||
58 | }}} |
||
59 | |||
60 | ==== Building the source ==== |
||
61 | Compiling both the target and the host code will happen with the following command. It assumes that the '''arm-elf-gcc''' |
||
62 | is inside the current path. |
||
63 | |||
64 | {{{ |
||
65 | $ cd src |
||
66 | $ make |
||
67 | }}} |
||
68 | |||
69 | If your GCC binary that produces ARM code is not called '''arm-elf-gcc''' you will need to invoke the following statement |
||
70 | and provide the basename of the toolchain with the ending '''-'''. |
||
71 | |||
72 | {{{ |
||
73 | $ cd src |
||
74 | $ make -e CROSS_TOOL_PREFIX=arm-OTHER_NAME- |
||
75 | }}} |
||
76 | |||
77 | If no error has occured you will have the firmware binaries in ''src/target/firmware/board/compal_e88/*.bin'' that can be |
||
78 | used with the Motorola C123. You also have the binaries to run on your host in ''src/host/osmocon/osmocon'', in |
||
79 | ''src/host/layer23/src/misc'' and ''layer23/src/mobile''. |