I followed the steps from docs Overview - GL.iNet Docs with minor changes.

$ sudo apt-get update

$ sudo apt-get install subversion build-essential git-core libncurses5-dev zlib1g-dev gawk flex quilt libssl-dev xsltproc libxml-parser-perl mercurial bzr ecj cvs unzip git wget ####I’m in Fedora 24 but I’ve not had any problem installing dependencies####

$ git clone GitHub - domino-team/openwrt-cc: openwrt CC with Domino/GL patches

$ cd openwrt-cc

$ vi feeds.conf.default ####remove “;for-15.05” of feeds to point master branch of openwrt packages#####

$ ./scripts/feeds update -a

$ ./scripts/feeds install -a

$ vi feeds/packages/net/tor/Makefile ####Point to last version of tor in package (PKG_VERSION:=0.2.8.9 PKG_RELEASE:=1 PKG_MD5SUM:=e1f8bc2b2e2b365fc916388304e5e40d)#####

$ make menuconfig

…choose your compile target ####Subtarget: Generic devices with NAND flash; Target Profile: GL-AR300M NAND### and packages ###select tor package as include in image####

$ make