******************************* How to build the open source part of the firmware # Modas Firmware 2.12r uses kernel 4.9.240 Get Kubuntu: https://kubuntu.org/getkubuntu/ Version Kubuntu 18.04.1 LTS - 64Bit: http://cdimage.ubuntu.com/kubuntu/releases/18.04/release/kubuntu-18.04.1-desktop-amd64.iso Default installation # sudo apt-get update # sudo apt-get upgrade Packages for virtualbox (In my example case) # sudo apt-get install build-essential gcc make perl dkms Installed virtualbox additions # sudo apt-get install mc libncurses5-dev build-essential subversion libncurses5-dev zlib1g-dev gawk gcc-multilib flex git gettext mc libssl1.0-dev Build OpenWRT: # mkdir ~/Source # mkdir ~/Source/OpenWRT # wget http://download.modas.com/Source/OpenWRT_3.tar.bz2 # wget http://download.modas.com/Source/dl.zip # wget http://download.modas.com/Source/AddPatches.zip # tar jxf OpenWRT_3.tar.bz2 -C ~/Source/OpenWRT # unzip dl.zip -d ~/Source/OpenWRT/dl # unzip AddPatches.zip -d ~/Source/AddPatches # cd ~/Source/OpenWRT # git apply ~/Source/AddPatches/git-version-check-fix.patch # cp ~/Source/AddPatches/tools_automake_patches_010-automake-port-to-Perl-5.22-and-later.patch ~/Source/OpenWRT/tools/automake/patches/ # cp ~/Source/AddPatches/0002-Add-compiler-gcc7.h-header-file.patch ~/Source/OpenWRT/tools/mkimage/patches/ # cp ~/Source/AddPatches/960-gcc-libc-name-p.patch ~/Source/OpenWRT/toolchain/gcc/patches/4.8-linaro/ # make OpenWRT is build completely. Build Linux-Kernel: # sudo apt-get install gcc-arm-linux-gnueabi lzop u-boot-tools # mkdir ~/Source/TargetFS # mkdir ~/Source/Linux # cd ~/Source/ # wget http://download.modas.com/Source/Linux_4.9.240.tar.bz2 # tar jxf Linux_4.9.240.tar.bz2 -C ~/Source/Linux # cd ~/Source/Linux # make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- O=./build INSTALL_MOD_PATH=~/Source/TargetFS mrproper # cp config.Modas build/.config # make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- O=./build INSTALL_MOD_PATH=~/Source/TargetFS # make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- O=./build INSTALL_MOD_PATH=~/Source/TargetFS modules_install # mkimage -A arm -O linux -T kernel -C none -a 10008000 -e 10008000 -d ~/Source/Linux/build/arch/arm/boot/zImage ~/Source/uImage Module-Part for filesystem is in ~/Source/TargetFS and Kernel ready for the cpu is ~/Source/uImage *******************************