These are the build instructions to rebuild the open source components for Cubis.

Please note: rebuilding the source code and reinstalling the resulting programs onto the device are not supported by our technical support department! Installing modified software will void warranty!

The instructions below have been tested on following Linux distributions:
 * xubuntu 14.04 i386
 * xubuntu 16.04 i386
 * xubuntu 18.04 i386

Prerequisite:
 * 32 bit Linux OS (see above)

To rebuild the software you will need to follow the following steps:

1. Install the following packages:

 * gcc 
 * make
 * tar
 * bzip2
 * perl

2. Make sure that bash is the default sh

ls -l /bin/sh
/bin/sh should point to bash.

If not:

For Debian based OS:

 sudo dpkg-reconfigure dash
   Use dash as the default system shell (/bin/sh)?    =>  Select No and press enter.

For other OS execute the following commands as root

 rm -f /bin/sh
 ln -s bash /bin/sh

3. Type the following commands to start the build:

sudo mkdir /tftpboot
sudo chmod 777 /tftpboot
cd ./source
export HOSTNAME=$HOSTNAME
make

4. After the build you will be able to find the built binaries in ./build//source/labpro-cubis-firmaware-gpl/images and ./build/source/labpro-cubis-firmaware-gpl/romfs
