Project

General

Profile

Building from Source » History » Revision 2

Revision 1 (laforge, 01/09/2020 10:31 PM) → Revision 2/3 (laforge, 01/09/2020 10:33 PM)

{{>toc}} 

 h1. Building from Source 

 This page is about how to build the simtrace2 firmware and host software from source. 

 {{include(cellular-infrastructure:MacroBinaryPackages)}} 

 We traditionally have built our software primarily on Debian GNU/Linux (jessie, stretch, buster) and on a variety of Ubuntu versions.    If you have problems, it is suggested you start with a tested/supported environment, or use the docker based approach listed further below. 

 h2. Classic approach on Debian/Ubuntu 

 h3. Installing packages from upstream Debian/Ubuntu 

 <pre> 
 apt-get install autotools-dev autoconf automake libtool pkg-config git \ 
                 libpcsclite-dev libnewlib-arm-none-eabi libusb-1.0-0-dev \ 
                 gcc-arm-none-eabi 
 </pre> 

 h3. Installing packages from the Osmocom Package feeds 

 You will need @libosmocore-dev@, either 
 * install it from the Osmocom package feed [[cellular-infrastructure:Binary_Packages]] (latest feed if you use a tagged version of simtrace2.git, nightly feed if you use git master of simtrace2.git) 
 ** @apt-get install libosmocore-dev@ (after you added the above-mentioned feed 
 * or build [[libosmocore:]] from source, too. 

 h2. Docker based approach 

 You can use the @debian-buster-simtrace2@ docker image, whose Dockerfile you can find at https://git.osmocom.org/docker-playground/tree/ 

 h3. Building the @debian-buster-simtrace2@ container 

 <pre> 
 $ git clone https://git.osmocom.org/docker-playground 
 $ cd docker-playground 
 $ cd debian-buster-build 
 $ make 
 [...] 
 Successfully tagged $USER/debian-buster-build:latest 
 $ cd ../debian-buster-simtrace2 
 $ make 
 [...] 
 Successfully tagged $USER/debian-buster-simtrace2:latest 
 </pre> 

 

 h3. Running the container and performing an actual build 

 h4. firmware builds For the firmware: 

 <pre> 
 $ docker run --rm -it $USER/debian-buster-simtrace2 
 osmocom@d81d29b620a7:~$ cd simtrace2/firmware 
 osmocom@d81d29b620a7:~/simtrace2/firmware$ make BOARD=qmod APP=cardem 
 [...] 
   31548         0     26028     57576      e0e8 bin/qmod-cardem-dfu.elf 
 osmocom@d81d29b620a7:~/simtrace2/firmware$  
 </pre> 

 Where 
 * @BOARD=@ specifies For the target hardware / circuit board and  
 * @APP=@ specifies the actual firmware application 

 See https://git.osmocom.org/simtrace2/tree/firmware/README.txt for more information on available targets. 

 h4. host tools build tools: 

 <pre> 
 $ docker run --rm -it $USER/debian-buster-simtrace2 
 osmocom@d81d29b620a7:~$ cd simtrace2/host 
 osmocom@d81d29b620a7:~/simtrace2/host$ autoreconf -fi && ./configure && make -j4 
 [...] 
   CCLD       simtrace2-list 
   CCLD       simtrace2-remsim-usb2udp 
   CCLD       simtrace2-remsim 
   CCLD       simtrace2-sniff 
 make[2]: Leaving directory '/home/osmocom/simtrace2/host/src' 
 Making all in contrib 
 make[2]: Entering directory '/home/osmocom/simtrace2/host/contrib' 
 make[2]: Nothing to be done for 'all'. 
 make[2]: Leaving directory '/home/osmocom/simtrace2/host/contrib' 
 make[2]: Entering directory '/home/osmocom/simtrace2/host' 
 make[2]: Nothing to be done for 'all-am'. 
 make[2]: Leaving directory '/home/osmocom/simtrace2/host' 
 make[1]: Leaving directory '/home/osmocom/simtrace2/host' 
 </pre> 
 </pre> 
Add picture from clipboard (Maximum size: 48.8 MB)