全過程需要聯網,最好有梯子,編譯方式有兩種
安裝依賴庫:
sudo apt-get install subversion g++ zlib1g-dev build-essential git python rsync man-db sudo apt-get install libncurses5-dev gawk gettext unzip file libssl-dev wget zip time
一、openwrt官方源碼編譯
1、下載源碼
git clone https://github.com/unigent/openwrt-3.10.14.git git版: git clone https://git.openwrt.org/openwrt/openwrt.git/
2、編譯
cd openwrt-3.10.14
./scripts/feeds update -a
./scripts/feeds install -a
3、排錯
提示找不到linux-3.10.14-p112871.tar.xz
下載https://github.com/mqmaker/linux/archive/3.10.14-p112871.tar.gz
然后轉換一下 gzip -d -c linux-3.10.14-p112871.tar.gz |xz -z - > linux-3.10.14-p112871.tar.xz
放到dl目錄
二、芯片官方SDK包編譯
1、下載SDK包
2、make menuconfig配置
3、make
排錯:
提示:找不到util-linux-2.24.1.tar.xz
解決:
下載https://www.kernel.org/pub/linux/utils/util-linux/v2.24/util-linux-2.24.1.tar.xz
放入dl目錄
提示:
ip_set_compat.h:54:2: error: #error "NETFILTER_NETLINK must be enabled: select NFACCT/NFQUEUE/LOG over NFNETLINK"
解決:
make menuconfig
完成以后,固件可以在目錄 ./bin/targets/ramips/mt76X8/ 中找到。
-
以 *-factory.bin 命名的固件是用於首次安裝。
-
以 *-sysupgrade.bin 命名的固件是用於更新已安裝的OpenWrt。