Compiling openwrt in the office takes a long time, for two reasons.
One is the office network environment is bad, often disconnected do not say, many websites often do not connect, not hit 404 is the DNS resolution failure and so on.
Second, the first time to compile openwrt need to download a large number of files from the Internet, such as Build_dir under the file is more than 3.4G.
[Email protected]:~/openwrt_mtk/openwrt-2.6.36$ du-sh build_dir/
3.4G build_dir/
[email protected]:~/openwrt_mtk/openwrt-2.6.36$ ls./build_dir
Host
target-mipsel_24kec+dsp_uclibc-0.9.33.2
toolchain-mipsel_24kec+dsp_gcc-4.6-linaro_uclibc-0.9.33.2
Have to do a simple and rough compilation script: always compile until successful.
#! /bin/bash# compile to the end script: always compile until successful # Create log file logname=log_$ (date +%y%m%d) touch logname# compile make clean# bind error output 2 to correct output 1 and send the correct output to $ Lognamemake v=s > ${logname} 2>&1while [' Echo $? '! = 0]; Do make v=s >> ${logname} 2>&1done
OpenWrt compiling the script to the end