##環境及準備 ubuntu 16.04 64bitgit
sudo apt-get update sudo apt-get install build-essential subversion git-core libncurses5-dev zlib1g-dev gawk flex quilt libssl-dev xsltproc libxml-parser-perl mercurial bzr ecj cvs unzip sudo apt-get install build-essential subversion libncurses5-dev zlib1g-dev gawk gcc-multilib flex git-core gettext libssl-dev
##下載代碼 很是慢,很是慢web
git clone git://git.openwrt.org/15.05/openwrt.git
##更新 全程聯網,也很是慢,很是慢ubuntu
cd openwrt ./script/feeds update -a ./script/feeds install -a
##配置ssh
make defconfig make prereq make menuconfig
配置選項flex
Target System (Ralink RT288x/RT3xxx) ---> Subtarget (RT3x5x/RT5350 based boards) ---> Target Profile (Asus RT-N13U) ---> LuCI ---> 1. Collections ---> -*- luci
其它配置根據須要選擇ui
##編譯 編譯過程須要下載各類包,聯網,很是慢,很是慢es5
make -j1 V=s
編譯完成後會在openwrt/bin/ramips下產生:code
openwrt-ramips-rt305x-rt-n13u-squashfs-sysupgrade.bin
##升級 webUI升級不介紹了,這裏說經過ssh升級,由於第一次升級的img沒luci,無法經過webui升級。 openwrt默認開啓ssh,帳號root,密碼admin ###ssh連接與下載xml
ssh root@192.168.8.1 scp ./openwrt-ramips-rt305x-rt-n13u-squashfs-sysupgrade.bin root@192.168.8.1:/tmp/
###升級 在ssh中執行ip
sysupgrade -v openwrt-ramips-rt305x-rt-n13u-squashfs-sysupgrade.bin
參考連接 https://wiki.openwrt.org/zh-cn/doc/howto/buildroot.exigence
https://wiki.openwrt.org/zh-cn/doc/howto/build