首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

OpenWRT开发环境搭建

一、安装Ubuntu系统(这个就不讲了,自己百度,最好使用14.04, 16.04会有一些莫名其妙的错误)

二、搭建开发环境

1、安装git工具(现在一般是使用git去下载源码)

2、安装依赖的库文件(一起装比较容易出现漏装,建议逐个装)

sudo apt-get install gcc g++ binutils patch bzip2 flex bison make autoconf gettext texinfo unzip sharutils ncurses-term zlib1g-dev libncurses5-dev gawk libssl-dev subversion

或者逐个安装:

sudo apt-get install gcc

sudo apt-get install g++

sudo apt-get install binutils

sudo apt-get install patch

sudo apt-get install bzip2

sudo apt-get install flex

sudo apt-get install bison

sudo apt-get install make

sudo apt-get install autoconf

sudo apt-get install gettext

sudo apt-get install texinfo

sudo apt-get install unzip

sudo apt-get install sharutils

sudo apt-get install ncurses-term

sudo apt-get install zlib1g-dev

sudo apt-get install libncurses5-dev

sudo apt-get install gawk

sudo apt-get install libssl-dev

sudo apt-get install subversion

3、下载OpenWRT源码

先创建OpenWRT目录来保存源码

mkdir OpenWRT

cd OpenWRT

git clone https://github.com/openwrt-mirror/openwrt.git (下载源码)

4、更新源码上的软件

为了使 OpenWrt 支持更多的软件,需要更新和安装其它源上面的软件

cd openwrt

./scripts/feeds update -a

./scripts/feeds install -a

5、进行OpenWRT配置

make menuconfig

1). 选择 CPU 型号

Target System -> Ralink RT288x/RT3xxx

2). 选择 CPU 子型号

Subtarget -> RT3x5x/RT5350 based boards

3). 选择具体路由器型号

Target profile -> HAME-MPR-A2

保存退出

6、编译源码

make V=99

注意:编译过程要联网哦,如果编译出错大部分都是由于网络不好。所以重新编译就OK了

烧录文件在哪? openwrt/bin/ramips/openwrt-ramips-rt305x-mpr-a2-squashfs-sysupgrade.bin

欢迎大家关注微信公众号"嵌入式软件开发交流"

  • 发表于:
  • 原文链接https://kuaibao.qq.com/s/20190817A0LCR000?refer=cp_1026
  • 腾讯「腾讯云开发者社区」是腾讯内容开放平台帐号(企鹅号)传播渠道之一,根据《腾讯内容开放平台服务协议》转载发布内容。
  • 如有侵权,请联系 cloudcommunity@tencent.com 删除。

扫码

添加站长 进交流群

领取专属 10元无门槛券

私享最新 技术干货

扫码加入开发者社群
领券
http://www.vxiaotou.com