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