User Tools

Site Tools


howto:build

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
howto:build [2015/08/20 17:42]
iggy [Tasks]
howto:build [2015/09/09 21:15]
9r
Line 13: Line 13:
 ===== Tasks ===== ===== Tasks =====
  
-  * clone the rad1o firmware repository from git+==== Preparation and Build ====
  
- +  * clone the rad1o firmware repository from git <​code>​git clone https://​github.com/​rad1o/​f1rmware.git</​code>​ 
-    ​git clone https://​github.com/​rad1o/​f1rmware.git +  * If you did that already some time ago, get the latest changes:<​code>​cd f1rmware 
- +git checkout master 
-  * If you did that already some time ago, get the latest changes: +git pull</​code>​ 
- +  * install the following build requirments,​ see ''​[[https://​github.com/​rad1o/​f1rmware/​blob/​master/​doc/​build.md|doc/​build.md]]''​ for details how to install on your system:
- +
-    ​cd f1rmware +
-    git checkout master +
-    git pull +
- +
-  * install the following build requirments,​ see ''​doc/​build.md''​ for details how to install on your system:+
     * arm-gcc     * arm-gcc
     * python-yaml     * python-yaml
     * xxd     * xxd
-    * dfu-util 
     * cmake     * cmake
 +  * setup the ''​hackrf''​ and ''​libopencm3''​ submodules:<​code>​git submodule init
 +git submodule update</​code>​
 +  * build everything <​code>​make
 +cd smartflash
 +make build
 +make gather</​code>​
 +  * if that is successfull,​ all firmware files end up in ''​smartflash/​IMG''​. ​
  
-  * setup the ''​hackrf''​ and ''​libopencm3''​ submodules:+==== Flash ====
  
 +There are several methods to get the f1rmware on the rad1o. When the rad1o is booted in MSC mode (hold UP while turning it on), it appears to the computer as USB mass storage with a small FAT filesystem. You can either manually copy the files to the rad1o or use the smartflash FLASHgui to do it automatically.
  
-    git submodule init +You can also use the FLASHgui to do a complete reinstall of the rad1o, this is useful if the filesystem is broken.
-    git submodule update+
  
-  * build everything+=== Easy Method: Manual copy ===
  
 +  * Boot the rad1o in MSC-mode (joystick UP while you turn it on)
 +  * mount the device if your system does not do it automatically (your path will probably be different)<​code>​mount /dev/sdb /​media/​ABCD-1234</​code>​
 +  * copy the firmware files to the mounted device manually (your path will probably be different):<​code>​cp smartflash/​IMG/​* /​media/​ABCD-1234</​code>​
  
-    make +=== Advanced Method: With FLASHgui ===
-    cd smartflash +
-    make build+
  
-  * if that is successfull, ​all firmware files end up in ''​smartflash/​IMG''​. ​Boot the rad1o in MSC-mode (joystick UP while you turn it onand +  * install ​all requirements for FLASHgui, see ''​[[https://​github.com/​rad1o/​f1rmware/​blob/​master/​smartflash/README.md|smartflash/​README.md]]'' ​for details: 
-    * either copy them manually ​(your path will be different)+    * mtools 
 +    * perl-curses 
 +    * [[https://​github.com/rad1o/dfu-util|patched dfu-util]] ​(this is only required for the factory reset method
 +    * dosfstools ​(this is only required for the factory reset method) 
 +  * install the udev-rules <​code>​cp smartflash/​90-rad1o-flash.rules /​etc/​udev/​rules.d</​code>​ 
 +  * start the smartflash FLASHgui app: <​code>​cd smartflash 
 +make run</​code>​ 
 +  * connect a rad1o via USB to the computer and start it in MSC mode (hold UP and switch on).
  
 +FLASHgui shows a line for every connected rad1o. During the transfer, it says ''​(running))''​ and the green LED next to the USB port on the rad1o will blink. After the transfer is finished, the state changes to ''​(done)''​. After a few more seconds, the rad1o should restart and FLASHgui will report ''​(gone)''​.
  
-    cp smartflash/​IMG/​* /​media/​ABCD-1234+=== Recovery Method: factory reset with FLASHgui ===
  
-    * or have the FLASHgui ​app running ​to automatically write the files to any rad1o connected in MSC-mode+you can also use FLASHgui to do a complete reinstall of a rad1o, including ​the bootloader, CPLD and all firmware ​files
  
 +<note warning>​This will also delete your nick, highscores and any other personal info on the rad1o</​note>​
  
-    cd smartflash +  * prepare and run FLASHgui like above  
-    make run+  * connect a rad1o via USB to the computer and start it in DFU mode (hold DOWN and switch on).
  
-  * you can also use FLASHgui to do a complete reinstall of a rad1o, including ​the bootloaderCPLD and all firmware files. For this, hold the joystick DOWN during powerup. The rad1o will blink red when done.+This will first reflash ​the bootloader ​and CPLD and then write a new filesystem image to the rad1o. The led next to the headset port on the rad1o will blink red when the process is finished.
  
 ===== Result ===== ===== Result =====
  
   * a rad1o running the latest firmware from git   * a rad1o running the latest firmware from git
 +
howto/build.txt · Last modified: 2015/09/09 21:15 by 9r