Differences

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

Link to this comparison view

content:meshextender:me2.0_quality_assurance [03/04/2018 15:34]
Paul Gardner-Stephen [Mesh Extender Programming Cable]
content:meshextender:me2.0_quality_assurance [06/08/2019 14:47] (current)
Thomas Wade Add my build instructions and split the build/flash process into sections
Line 2: Line 2:
  
 ===== Provisioning Procedure ===== ===== Provisioning Procedure =====
 +Complete the following sections in order to build and flash both the Serval U-Boot and OpenWRT forks to the mesh extender. This section assumes you are running Ubuntu 16.04.
  
-This procedure assumes that you have a computer running Ubuntu 16.04:+==== Building the OpenWRT-based Firmware ==== 
 +=== Prerequisites === 
 +The following tools are required to build the firmware: 
 +  * G++ 
 +  * GCC 
 +  * Git 
 +  * ncurses 
 +  * OpenSSL libraries (use 'libssl1.0-dev', newer versions are unsupported) 
 +  * zlib 
 +  * Make 
 +  * Python 2.x 
 +  * Subversion 
 +  * Unzip
  
-  - Clone the Serval Project fork of OpenWRT (https://github.com/servalproject/openwrt/tree/MeshExtender2.0), and checkout the MeshExtender2.0 branch, and then execute 'make world'. +These can be installed in one fell swoop with apt: <code>sudo apt install csh g++ gawk gcc git libncurses-dev libssl1.0-dev libz-dev make python subversion unzip</code> 
-  - Clone the Serval OpenWRT packages repository (https://github.com/servalproject/openwrt-packages), and execute make from in the auto-flash sub-directory to create the automatic flashing utility.+ 
 +=== Build process === 
 +  - Clone the Serval Project fork of OpenWRT (https://github.com/servalproject/openwrt/tree/MeshExtender2.0) 
 +  - Checkout the 'MeshExtender2.0branch 
 +  - Run the './update' script to collect and compile the firmware 
 + 
 +**NOTES** 
 +  * An internet connection is required throughout the build processas some parts may download additional repositories. 
 +  * You may get persistent errors about missing 'git' despite having it installed. A dirty fix to get past that is to edit 'include/prereq-build.mk' and comment out lines 147-148. 
 +  * If you have Perl 5.26+, you will encounter an issue while compiling Automake due to a change in how Perl handles regular expressions (discovered here: [[https://github.com/raspberrypi/noobs/issues/470#issuecomment-376256295]]). To get around it, open 'build_dir/host/automake-1.15/bin/automake.in', go to line 3883, and replace <code>$text =~ s/\${</code> with <code>$text =~ s/\$\{</code> 
 +  * Make sure you are using `libssl1.0-dev` and not a newer version, as the 'tools/mkimage' make target requires an old version 
 + 
 +==== Building U-Boot ==== 
 +=== Prerequisites === 
 +U-Boot relies on both the prerequisite packages and toolchain installed when compiling the OpenWRT-based firmware. 
 +The following additional tools are required to build U-Boot: 
 +  * Java JRE 
 + 
 +These can be installed with apt: <code>sudo apt install default-jre</code> 
 + 
 +=== Build process === 
 +  - Clone the Serval U-Boot fork (https://github.com/servalproject/u-boot_mod) 
 +  - Enter the 'u-boot-domino-2015' directory 
 +  - Open 'Makefile' in a text editor and replace line 4 with <code>export TOOLPATH=<toolchain_path></code> where '<toolchain_path>' is the absolute path to the toolchain provided in the Serval OpenWRT repository ('staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/' at the time of writing) 
 +  - Compile U-Boot with 'make' 
 +  - Copy the U-Boot binary from 'bin/uboot_for_domino.bin' to '/srv/tftp/' 
 + 
 +**NOTES** 
 +  * If the build process fails on 'fsdata.c' with an error like: <code>fsdata.c:333:1: error: expected expression before ',' token</code> Open 'u-boot/httpd/fsdata.c' with a text editor, scroll to the line in question (line 333 in this case), and remove the comma before '0 };'. 
 + 
 +==== Flashing the Firmware ==== 
 +  - Clone the Serval OpenWRT packages repository (https://github.com/servalproject/openwrt-packages) 
 +  - Enter the 'auto-flashdirectory 
 +  - Compile the auto-flash utility with 'make'
   - Setup a TFTP server to serve files from '/srv/tftp' by following the procedure at https://askubuntu.com/questions/201505/how-do-i-install-and-run-a-tftp-server   - Setup a TFTP server to serve files from '/srv/tftp' by following the procedure at https://askubuntu.com/questions/201505/how-do-i-install-and-run-a-tftp-server
-  - From in the openwrt directory, run the './update' script to compile the latest Serval-DNA, LBARD and related binaries, and have them automatically copied into /srv/tftp +  - From the Serval OpenWRT directory, run the './update' script to compile the latest Serval-DNA, LBARD and related binaries, and have them automatically copied into '/srv/tftp' 
-  - Configure an ethernet port on your computer to have the manually allocated IP address 192.168.1.2, and a netmask of 192.168.1.2 +  - Configure an Ethernet port on your computer to have the manually allocated IP address 192.168.1.2, and a netmask of 192.168.1.2 
-  - Connect a Mesh Extender Programming Cable to your computer. This will cause a USB serial port to appear, possibly /dev/ttyUSB1 if you have no others connected. +  - Connect a Mesh Extender Programming Cable to your computer. This will cause a USB serial port to appear, possibly '/dev/ttyUSB0' if you have no others connected 
-  - From the openwrt-packages/auto-flash directory, run './auto-flash /dev/ttyUSB1', replacing /dev/ttyUSB1 with the name of the serial port from the previous step.+  - From the 'auto-flashdirectory, run './auto-flash <serial_device>', where '<serial_device>' is the device you found in the previous step
  
-You can now connect a Mesh Extender via ethernet to your computer, and then connect the programming cable to the Mesh Extender.  This should cause the Mesh Extender to be automatically flashed , including upgrading uboot if required.  The process takes about 3 minutes.  +You can now connect a Mesh Extender via Ethernet to your computer, and then connect the programming cable to the Mesh Extender. This should automatically flash the Mesh Extender with the new firmware and U-Boot if required.  The process takes about 3 minutes.  
-You can program as many Mesh Extenders as you wish in this wayby simply moving first the ethernet and second the Mesh Extender programming cable to the next Mesh Extender to be flashed. +You can program as many Mesh Extenders as you wish in this way by simply moving first the Ethernet and second the Mesh Extender programming cable to the next Mesh Extender to be flashed. 
 If you modify alert.a3u and have VLC installed, it will play the audio or video file you specify in the .m3u file when the process is complete, so that you don't have to watch the screen intently the whole time. If you modify alert.a3u and have VLC installed, it will play the audio or video file you specify in the .m3u file when the process is complete, so that you don't have to watch the screen intently the whole time.
- 
-TODO: The above process does not include preparing the uboot firmware for the devices. 
  
 ===== Mesh Extender Programming Cable ===== ===== Mesh Extender Programming Cable =====
Line 79: Line 123:
   * No condensation or dust ingress at conclusion of testing.   * No condensation or dust ingress at conclusion of testing.
   * ... ?   * ... ?
-==== Certifications ====+ 
 +===== Certifications =====
  
 The ME2.0 has not yet been subjected to any certifications.  We intend to pursue Australian/New Zealand, EU and US certifications of the electronics, and IP65 or IP66 certification of the hardware. The ME2.0 has not yet been subjected to any certifications.  We intend to pursue Australian/New Zealand, EU and US certifications of the electronics, and IP65 or IP66 certification of the hardware.

Login