First find the cross-compiler tool (Toolchain)
Development snapshots
http://downloads.openwrt.org/snapshots/trunk/
The version I need is m7620
http://downloads.openwrt.org/snapshots/trunk/ramips/mt7620/
Download File openwrt-toolchain-ramips-mt7620_gcc-5.3.0_musl-1.1.15.linux-x86_64.tar.bz2
[[Email Protected]_129_51_centos openwrt]#wgethttp//downloads.openwrt.org/snapshots/trunk/ramips/mt7620/openwrt-toolchain-ramips-mt7620_gcc-5.3.0_ MUSL-1.1.15.LINUX-X86_64.TAR.BZ2[[Email Protected]_129_51_centos openwrt]#Tar-JXF openwrt-toolchain-ramips-mt7620_gcc-5.3.0_musl-1.1. the. Linux-x86_64.Tar. Bz2[[email Protected]_129_51_centos openwrt]#MVopenwrt-toolchain-ramips-mt7620_gcc-5.3.0_musl-1.1. the. linux-x86_64 toolchain[[email Protected]_129_51_centos openwrt]#wgethttp//Downloads.openwrt.org/chaos_calmer/15.05.1/ramips/mt7620/openwrt-sdk-15.05.1-ramips-mt7620_gcc-4.8-linaro_ UCLIBC-0.9.33.2.LINUX-X86_64.TAR.BZ2[[Email Protected]_129_51_centos openwrt]#Tar-JXF openwrt-sdk-15.05.1-ramips-mt7620_gcc-4.8-linaro_uclibc-0.9.33.2. Linux-x86_64.Tar. Bz2[[email Protected]_129_51_centos openwrt]#MV openwrt-sdk-15.05.1-ramips-mt7620_gcc-4.8-linaro_uclibc-0.9.33.2.linux-x86_64 SDK[[Email Protected]_129_51_centos openwrt]#Find/ -name Staging_dir/root/openwrt/sdk/staging_dir[[email protected]_129_51_centos bin]# export Staging_dir='/root/openwrt/sdk/staging_dir'[email protected]_129_51_centos bin]# Export CC=/root/openwrt/toolchain/toolchain-mipsel_24kec+dsp_gcc-5.3.0_musl-1.1. the/bin/mipsel-openwrt-linux-musl-g++
Export Cplus_include_path=/root/openwrt/sdk/build_dir/target-mipsel_24kec+dsp_uclibc-0.9.33.2/linux-ramips_ mt7620/linux-3.18.23/include/uapi/linux/can/
OpenWrt Compiling Newifi applications