ubuntu编译openwrt

 

全过程需要联网,最好有梯子,编译方式有两种

安装依赖库:

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。
posted @ 2020-11-18 14:53  凡尘夫子  阅读(960)  评论(0编辑  收藏  举报