Build Firmware

We usually use Debian and Ubuntu but many other distributions should also work. It is also possible to build on OSX. Building firmware directly on a Windows platform is not supported. However, if all you have available is a windows machine then we would recommend to set up a linux based virtual machine. Note: the following build was made on Ubuntu 16.04.5 LTS running 4.15.0-43 kernel.


Once you have a Linux OS running install the following prerequisite packages (some are optional):

sudo apt-get update
sudo apt-get install git git-doc subversion build-essential flex wget gawk unzip man file python2.7 zlib1g-dev libssl-dev libncurses5-dev

Get the latest sources from 8devices OpenWRT branch:

git clone -b openwrt-19.07-ar71xx-4.14 https://github.com/8devices/openwrt-8devices lima
cd lima

The easiest way is simply to execute a build script and wait until firmware will be built.

./build.sh

Building is a CPU heavy process and may take a long time depending on your CPU capabilities.

Once finished the compiled firmware image ending with lima-squashfs-sysupgrade.bin will be placed under bin/targets/ar71xx/generic/ directory.


Faster building

If you need a firmware image that contains packages that are not in the default image, but available in http://pkg.8devices.com repository - use Image Builder. No cross-compiling is required so build process is fast. The following example uses v2.10 release, we recommend using the latest available when building.

wget "http://pkg.8devices.com/carambola2/v2.10/OpenWrt-8devices-ImageBuilder-v2.10-ar71xx-generic.Linux-x86_64.tar.bz2"
tar -xjvf OpenWrt-8devices-ImageBuilder-v2.10-ar71xx-generic.Linux-x86_64.tar.bz2
cd OpenWrt-8devices-ImageBuilder-v2.10-ar71xx-generic.Linux-x86_64/
mkdir files

You may place additional files if you'd like to include them into your firmware image. Thus the mkdir files step and the additional argument FILES=files/ in our command below is optional.

For example, the following command adds luci tmux kmod-fs-ntfs packages, copies contents of files/ directory to our .bin firmware image and also removes ppp ppp-mod-pppoe kmod-pppoe kmod-pppox packages from our default firmware image:

make image PROFILE=LIMA PACKAGES="luci tmux kmod-fs-ntfs -ppp -ppp-mod-pppoe -kmod-pppoe -kmod-pppox" FILES=files/