1. 安裝依賴包:c++
yum install autoconf binutils bison bzip2 flex gawk gcc gcc-c++ gettext make ncurses-devel patch unzip wget zlib-develgit
2. 下載openwrt源碼, 更新:svn
svn checkout svn://svn.openwrt.org/openwrt/trunkflex
cd trunkui
./scripts/feeds update -aip
./scripts/feeds install -aci
若update過程當中出現error: SSL certificate problem, verify that the CA cert is OK. Details。出現這樣的狀況是由於git clone默認採用SSL認證的時候,本地找不到對應證書,因此能夠經過關掉驗證來解決這一問題,
就是在git clone命令前面加上:
env GIT_SSL_NO_VERIFY=true
或者export GIT_SSL_NO_VERIFY=trueget
3. Make menuconfig配置:源碼
Target System (Atheros AR7xxx/AR9xxx)it
Target Profile (TP-LINK TL-WR841N/ND) --->
LuCI—>Collections—– <*> luci 添加Luci
4. Make V=99
在編譯過程當中可能會出現以下錯誤:
make[4]: Entering directory `/xxx/openwrt/build_dir/host/patch-2.7.1'
make[4]: *** No targets specified and no makefile found. Stop.
這是須要安裝xz。xz的安裝以下:
1. 下載xz-5.0.5.tar.bz2
2. 解壓文件。tar -jxvf xz-5.0.5.tar.bz2
3. ./configure --disable-shared
4. make -C po update-po
5. make install
安裝完成以後,將build_dir文件夾刪除,而後從新編譯openwrt