openwrt-mt7688编译与烧录

OpenWrt系统已经发布了多个版本,如下:

发布时间 版本号 开发代号
2013年4月 12.09 正式版 Attitude Adjustment
2014年10月 14.07 正式版 Barrier Breaker
2015年9月 15.05 正式版 Chaos Calmer

这些版本号很长,打字费劲,黑话称之为AA、BB、CC,简洁多了。

本文的openwrt是MTK官方的OPENWRT,openwrt开源组织无法下载到,它与开源的openwrt相比更加的稳定,还有很多未上传的开源补丁。

1.      下载mtk官方MTK  openwrt---mtksdk-openwrt-3.10.14-20150311-d021c937.tar.bz2

2.      解压openwrt源码包

linux@ubuntu:~/mt7688$ tar xvfmtksdk-openwrt-3.10.14-20150311-d021c937.tar.bz2

 

linux@ubuntu:~/mt7688$ ls -l

drwxr-xr-x  7 linux linux      4096 Jul 24 16:31 mtk

-rwxrwxr-x  1 linux linux  96856663 Jul 17 09:51 mtksdk-openwrt-3.10.14-20150311-d021c937.tar.bz2

drwxrwxr-x 16 linux linux      4096 Aug 14 16:39 openwrt-3.10.14

linux@ubuntu:~/mt7688$ tar xvf mtksdk-openwrt-3.10.14-20150311-d021c937.tar.bz2


./scripts/feeds update -a

./scripts/feeds install  -a

更新安装源码包


3.      配置openwrt

在openwrt目录下,执行make menuconfig

至少拟需要选择配置三项

·        Target System (Ralink Platform)

·        Subtarget (Ralink SoC chipseries)

·        Target Profile (A specificmodel name)

配置选择见上图,不是应该选择7688吗,怎么是7628??

大家只记住选择7628吧,其他不用管了,里面的关系比较复杂!

4.      编译,编译过程中确保电脑可以上网哦!

make

Or

make V=s  # this will produce verbose log   (我在编译的过程中,不加V=s会出错,具体原因不详)

During build, the SDK will download manysource packages from Internet. So, make sure your buildhost can access the open Internet.

The first build will take hours, please bepatient. After first build, your build will be ready in minutes.

If anything goes wrong during building, use“make V=s” to see what happened.

If everything is OK, the target image willbe generated under “bin/ramips”。

 

直接make,在编译过程中会下载很多源码包,容易出现下载失败的情况,可以先执行make download下载编译需要的源码包,在执行make。中途出现缺少的源码包,手动下载并拷贝到dl目录下


5.      下载7688编译生成BIN -- openwrt-ramips-mt7628-mt7628-squashfs-sysupgrade.bin

2为通过TFTP方式刷系统固件

9为通过TFTP方式刷UBOOT

然后Y

确认路由IP 为192.168.1.1

确认电脑IP 为192.168.1.3

输入固件名openwrt-ramips-mt7628-mt7628-squashfs-sysupgrade.bin


 

OpenWrt firmware can be flashed into thetarget board using MTK bootloader option 2.

Note: Option 1 won’twork, because the image does not support initram mechanism.


After system reboot, you will see OpenWrtrunning.

6.下载前的工具配置准备

工具类:SecureCRT(含SecureFX)或Xshell(含Xftp)--串口工具

烧录相关:tftp32(用于32位系统)或tftp64(用于64位系统)

http://tftpd32.jounin.net/

硬件:

1)TTL-RS232串口+串口线,注意要3.3V串口哦,不建议使用USB 转TTL串口,因为USB转TTL串口大部分是5V。在这里面我遇到很大的一个坑,在做GPIO驱动调试的时候!这里提前指出,希望大家不要走弯路。

2)路由器 或者交换机

   虽然交换机便宜一些,但是建议还是建议使用路由器,使得你的PC,MT7688开发板在这个路由内,构建成局域网,这是下载程序的前提;

    

为了减轻每次下载前需要获取TFTP服务器,也就是WINDOWS电脑的IP,请路由器给电脑指定固定IP,不然每次TFTP的IP地址在设置前都要去查看下,太麻烦。

烧录技巧(含shell固件升级方式)---通过UBOOT进行烧录

烧录前,请把电脑IP 设置成192.168.1.100,子网掩码255.255.255.0。网关等可不设。

 根据电脑情况,启动tftpd64.exe或者tftpd32.exe。

把系统固件(如openwrt-ramips-mt7620-mtall-squashfs-sysupgrade.bin)和UBOOT固件放在TFTP软件目录下并打开tftpd64.exe,如下图。‘


打开SecureCRT,建立“快速连接”

调整为串口通讯方式,端口请根据电脑中具体情况调整,波特率57600(此为集成的UBOOT

设置参数),关掉RTS/CTS,如下图


猜你喜欢

转载自blog.csdn.net/u011057439/article/details/79292139