These are the steps I took to try to build the firmware:
$ git clone https://git.openwrt.org/openwrt/openwrt.git
$ git checkout v18.06.46
$ ./scripts/feeds update -a && ./scripts/feeds install -a
$ wget -O .config 'http://downloads.openwrt.org/releases/18.06.4/targets/ramips/mt7620/config.seed'
$ make defconfig
$ mkdir files/etc/config/
$ scp hplaptop:~/{firewall,network,wireless} files/etc/config/
$ IGNORE_ERRORS=1 make PROFILE=netgear_ex3700 FILES=files/ PACKAGES="ebtables ebtables-utils" -j4 V=sc
-- Installing: /home/loophole/openwrt/github/openwrt/staging_dir/host/share/cmake-3.11/Templates/TestDriver.cxx.in
-- Installing: /home/loophole/openwrt/github/openwrt/staging_dir/host/share/cmake-3.11/Templates/AppleInfo.plist
-- Installing: /home/loophole/openwrt/github/openwrt/staging_dir/host/share/cmake-3.11/Templates/CMakeVSMacros1.vsmacros
-- Installing: /home/loophole/openwrt/github/openwrt/staging_dir/host/share/cmake-3.11/Templates/MSBuild
-- Installing: /home/loophole/openwrt/github/openwrt/staging_dir/host/share/cmake-3.11/Templates/MSBuild/nasm.xml
-- Installing: /home/loophole/openwrt/github/openwrt/staging_dir/host/share/cmake-3.11/Templates/MSBuild/nasm.props.in
-- Installing: /home/loophole/openwrt/github/openwrt/staging_dir/host/share/cmake-3.11/Templates/MSBuild/nasm.targets
-- Installing: /home/loophole/openwrt/github/openwrt/staging_dir/host/share/cmake-3.11/Templates/CPackConfig.cmake.in
-- Installing: /home/loophole/openwrt/github/openwrt/staging_dir/host/doc/cmake-3.11/cmsys/Copyright.txt
-- Installing: /home/loophole/openwrt/github/openwrt/staging_dir/host/doc/cmake-3.11/cmlibrhash/COPYING
-- Installing: /home/loophole/openwrt/github/openwrt/staging_dir/host/doc/cmake-3.11/cmlibrhash/README
-- Installing: /home/loophole/openwrt/github/openwrt/staging_dir/host/doc/cmake-3.11/cmzlib/Copyright.txt
-- Installing: /home/loophole/openwrt/github/openwrt/staging_dir/host/doc/cmake-3.11/cmcurl/COPYING
-- Installing: /home/loophole/openwrt/github/openwrt/staging_dir/host/doc/cmake-3.11/cmcompress/Copyright.txt
-- Installing: /home/loophole/openwrt/github/openwrt/staging_dir/host/doc/cmake-3.11/cmliblzma/COPYING
-- Installing: /home/loophole/openwrt/github/openwrt/staging_dir/host/doc/cmake-3.11/cmlibarchive/COPYING
-- Installing: /home/loophole/openwrt/github/openwrt/staging_dir/host/doc/cmake-3.11/cmlibuv/LICENSE
-- Installing: /home/loophole/openwrt/github/openwrt/staging_dir/host/bin/ccmake
-- Installing: /home/loophole/openwrt/github/openwrt/staging_dir/host/bin/cmake
-- Installing: /home/loophole/openwrt/github/openwrt/staging_dir/host/bin/ctest
-- Installing: /home/loophole/openwrt/github/openwrt/staging_dir/host/bin/cpack
-- Installing: /home/loophole/openwrt/github/openwrt/staging_dir/host/share/cmake-3.11/include/cmCPluginAPI.h
-- Installing: /home/loophole/openwrt/github/openwrt/staging_dir/host/share/cmake-3.11/editors/vim/indent
-- Installing: /home/loophole/openwrt/github/openwrt/staging_dir/host/share/cmake-3.11/editors/vim/indent/cmake.vim
-- Installing: /home/loophole/openwrt/github/openwrt/staging_dir/host/share/cmake-3.11/editors/vim/syntax
-- Installing: /home/loophole/openwrt/github/openwrt/staging_dir/host/share/cmake-3.11/editors/vim/syntax/cmake.vim
-- Installing: /home/loophole/openwrt/github/openwrt/staging_dir/host/share/cmake-3.11/editors/emacs/cmake-mode.el
-- Installing: /home/loophole/openwrt/github/openwrt/staging_dir/host/share/aclocal/cmake.m4
-- Installing: /home/loophole/openwrt/github/openwrt/staging_dir/host/share/cmake-3.11/completions/cmake
-- Installing: /home/loophole/openwrt/github/openwrt/staging_dir/host/share/cmake-3.11/completions/cpack
-- Installing: /home/loophole/openwrt/github/openwrt/staging_dir/host/share/cmake-3.11/completions/ctest
make[4]: Leaving directory '/home/loophole/openwrt/github/openwrt/build_dir/host/cmake-3.11.4'
mkdir -p /home/loophole/openwrt/github/openwrt/staging_dir/host/stamp
touch /home/loophole/openwrt/github/openwrt/build_dir/host/cmake-3.11.4/.built
touch /home/loophole/openwrt/github/openwrt/staging_dir/host/stamp/.cmake_installed
find /home/loophole/openwrt/github/openwrt/build_dir/host/cmake-3.11.4 -mindepth 1 -maxdepth 1 -not '(' -type f -and -name '.*' -and -size 0 ')' | xargs -r rm -rf
make[3]: Leaving directory '/home/loophole/openwrt/github/openwrt/tools/cmake'
time: tools/cmake/compile#3474.38#263.30#1451.57
make[2]: Leaving directory '/home/loophole/openwrt/github/openwrt'
make[1]: *** [tools/Makefile:150: /home/loophole/openwrt/github/openwrt/staging_dir/target-mipsel_24kc_musl/stamp/.tools_compile_yyyyyyyyynyyyyynyynnyyyynyyyyyyyyyyyyyyyn
yynynnyyynnyy] Error 2
make[1]: Leaving directory '/home/loophole/openwrt/github/openwrt'
make: *** [/home/loophole/openwrt/github/openwrt/include/toplevel.mk:218: world] Error 2
arch2 openwrt $