推荐环境: Ubuntu trusty / Ubuntu xenial / Debian 8
安装依赖包
sudo apt-get update
sudo apt-get install unzip libtool curl cmake gperf gawk flex bison nano \
git python-docutils gettext automake autopoint texinfo build-essential \
pkg-config zlib1g-dev libgmp3-dev libmpc-dev libmpfr-dev libncurses5-dev
克隆源码
git clone --depth=1 https://gitee.com/hanwckf/rt-n56u.git /opt/rt-n56u
#git clone --depth=1 https://github.com/hanwckf/rt-n56u.git /opt/rt-n56u
编译工具链
cd /opt/rt-n56u/toolchain-mipsel
./clean_sources
./build_toolchain_3.4.x
(可选)修改机型配置文件
nano /opt/rt-n56u/trunk/configs/templates/PSG1218.config
清理代码树并开始编译
cd /opt/rt-n56u/trunk
sudo ./clear_tree
sudo ./build_firmware_modify PSG1218
#脚本第一个参数为路由型号,在trunk/configs/templates/中
#编译好的固件在trunk/images里
网友评论
Missing variable is:
CMAKE_1.4.0_COMPILER
CMake Error: Could not find cmake module file: /opt/rt-n56u/trunk/user/ttyd/ttyd-1.4.0/CMakeFiles/2.8.12.2/CMake1.4.0Compiler.cmake
CMake Error: Could not find cmake module file: CMakeVERSIONInformation.cmake
CMake Error: Could not find cmake module file: CMake1.4.0Information.cmake
CMake Error: CMAKE_VERSION_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_1.4.0_COMPILER not set, after EnableLanguage
你好我也编译了下,报了一个模块问题,求大佬,看下,怎么解决
make[2]: Entering directory '/opt/rt-n56u/trunk/libc/uClibc-0.9.33.2'
.config:1: *** missing separator. Stop.
make[2]: Leaving directory '/opt/rt-n56u/trunk/libc/uClibc-0.9.33.2'
Makefile:19: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/opt/rt-n56u/trunk/libc'
Makefile:185: recipe for target 'libc_only' failed
make: *** [libc_only] Error 2