MT7628 研习(一)---- 编译环境搭建、编译Uboot、编译openwrt
前言
开发板为hiwooya——MT7628(现已下架),仅供参考学习
一、编译环境搭建
1. 安装虚拟机Vmare
2. 运行Ubntu 16.04
二、编译Uboot
1. 下载源码
method 1:
a. 安装git
sudo apt-get install git
b. 拉取资源
git clone https://github.com/hi-wooya/u-boot-hiwooya.git
method 2:
直接访问网址下载:https://github.com/hi-wooya/u-boot-hiwooya.git
2. 进入文件目录
cd u-boot-hiwooya-master
3. 解压交叉编译工具链
$ sudo tar xvfj buildroot-gcc342.tar.bz2 -C /opt/
4. 图形界面配置参数
$ make clean
$ make menuconfig
注: make clean:清除上次的make命令所产生的object文件(后缀为“.o”的文件)及可执行文件
make configure 报错
a. 检查是否安装了lincurses-5-dev库
b. 若已安装,可能因为终端窗口过小引起,调大窗口即可解决
5. 编译U-boot源码
make
a. make 报错 tools
安装libssl-dev即可
sudo apt-get install libssl-dev
b. make 报错fsdata.c
fsdata.c的226行多了 , 引起错误,修改文件源码
三、编译Openwrt
1.下载源码
git clone https://github.com/hi-wooya/openwrt-hiwooya.git
2.安装第三方软件包
./scripts/feeds update -a
./scripts/feeds install -a
3.使用官方配置文件
cp config-HIWOOYA16128 .config
4.图形界面配置参数
make menuconfig
5.编译OpenWrt
make V=99
编译过程常见错误
a. server certificate verification failed
解决方法:
export GIT_SSL_NO_VERIFY=1
b. gnutls_handshake() failed:error in the pull function
解决办法:
apt-get -y install build-essential nghttp2 libnghttp2-dev libssl-dev
c. github.com xxxxx:error-connection refused
解决办法:
将对应文件的makefile的下载源由 git 改为 https
总结
编译环境搭建需要安装VMware和Unbantu16.04、Uboot和openwrt编译过程容易出现未知的问题