參考資訊:
https://gist.github.com/unity-car-tutorials/0ce692a5ecb06c656182
步驟如下:
1. 手動掛載SWAP 2GB
2. 編譯安裝coreutils(/usr/bin/install記得symlink到/usr/local/bin/install)
3. 執行如下命令
$ export GCC_VERSION="4.8.2" $ export WORKDIR="/home/nemo/Downloads/gcc-${GCC_VERSION}" $ export INSTALLDIR="/opt/gcc-${GCC_VERSION}" $ rm -rf ${WORKDIR} $ mkdir -p ${WORKDIR} $ cd $WORKDIR $ wget http://www.netgull.com/gcc/releases/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2 $ tar -xf gcc-${GCC_VERSION}.tar.bz2 $ cd gcc-${GCC_VERSION} $ ./contrib/download_prerequisites $ cd .. $ mkdir gcc-build $ cd gcc-build $ ../gcc-${GCC_VERSION}/configure --prefix=${INSTALLDIR} --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-languages=c,c++ --disable-multilib --with-arch=armv7-a --with-float=hard --with-fpu=vfpv3-d16 $ make cfns.gperf:101:1: error: 'const char* libc_name_p(const char*, unsigned int)' redeclared inline with 'gnu_inline' attribute cfns.gperf:26:14: note: 'const char* libc_name_p(const char*, unsigned int)' previously declared here cfns.gperf:26:14: warning: inline function 'const char* libc_name_p(const char*, unsigned int)' used but never defined $ vim ../gcc-4.8.2/gcc/cp/cfns.h 55: //inline 126: //inline $ make $ sudo make install