Project

General

Profile

Software Getting Started » History » Revision 28

Revision 27 (msuraev, 04/19/2017 10:44 AM) → Revision 28/31 (msuraev, 04/19/2017 10:51 AM)

 
 h2. [[OsmocomBB]] Getting Started Guide 


 This page will describe how to compile the firmware, the host utilities and how to use them. 
 If you haven't done so already, checkout [[PreliminaryRequirements]] 


 h3. Compiling osmocomBB 

 osmocomBB consists out of software that is intended to be run on the phone (target) and the host system. 


 h4. Dependencies for the host 


 osmocomBB requires GNU autoconf, automake, libtool, pkg-config, make and GCC to compile. 
 The name of these packages depend on the distribution used. You will also need git to access and update the sources. 
 For Debian(and Debian-like distros), these packages can be installed using: 
 <pre> 
 <code class="sh"> 
 sudo apt aptitude install libtool shtool automake autoconf git-core pkg-config make gcc 
 </code></pre> 

 For osmocomBB, as for several other osmocom projects, you will also need [[libosmocore]]. Note: Although libosmocore is included when getting osmocom-bb from the git repository, you have to install it separately. The libosmocore subtree is only used to compile the embedded ARM version of libosmocore. 


 h4. Dependencies for the target 


 To compile osmocomBB or SIMtrace for the target we *need a GNU [[toolchain]] for ARM.* 


 h4. Getting and updating the source 


 <pre> 
 <code class="sh"> 
 git clone git://git.osmocom.org/osmocom-bb.git 
 cd osmocom-bb 
 git pull --rebase 
 </code></pre> 


 h4. Building the source 

 Compiling both the target and the host code will happen with the following command. It assumes that the *arm-elf-gcc* 
 is* inside the current path._ 

 <pre> 
 <code class="sh"> 
 cd src 
 make 
 </code></pre> 

 If your GCC binary that produces ARM code is not called *arm-elf-gcc* you will need to invoke the following statement 
 and provide the basename of the toolchain with the ending *-*. 

 <pre> 
 <code class="sh"> 
 cd src 
 make -e CROSS_TOOL_PREFIX=arm-OTHER_NAME- 
 </code></pre> 

 For example after installing gcc-arm-linux-gnueabi package on Ubuntu the proper command would be 
 <pre> 
 <code class="sh"> 
 make -e CROSS_TOOL_PREFIX=arm-linux-gnueabi- 
 </code></pre> 

 If no error has occured you will have the firmware binaries in _src/target/firmware/board/compal_e88/*.bin_ that can be 
 used with the Motorola C123. You also have the binaries to run on your host in _src/host/osmocon/osmocon_, in  
 _src/host/layer23/src/misc_ and _layer23/src/mobile_. 



 h3. Running osmocomBB 

 The original bootloader of Compal and others are built in a way to load code via the serial interface. The [[osmocon]] 
 utility implements this protocol and can upload the firmware. Please refer the [[osmocon]] wiki page for details on how to use 
 it properly. 

 After the firmware has been loaded, the [[osmocon]] application will print the output of the serial console 
 and it provides a unix domain socket that another layer of software can connect to. In the case of osmocomBB 
 this higher layer software is called [[ccch_scan]] and is actually a group of binaries providing different functionality. Please 
 see [[ccch_scan]] for the details. 

Add picture from clipboard (Maximum size: 48.8 MB)