openwrt 内核源码搭建和编译
1. 安装虚拟机
ubuntu镜像地址
ubuntu解压可用
我使用的共享文件夹传输文件,也可以选择其他方式。因为网上教学很多,这里就不再说安装ubuntu的详细过程。
编译内核虚拟机硬盘空间至少30G大小。
2. 下载源码
openwrt-hiwooya-master内核源码
toolchain-mipsel交叉编译工具链
openwrt-hiwooya-dl软件包
3. 安装需要的组件
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 subversion
sudo apt-get install libncurses5-dev
sudo apt-get install ncurses-term
sudo apt-get install zlib1g-dev
sudo apt-get install gawk
sudo apt-get install asciidoc
sudo apt-get install libz-dev
sudo apt-get install libssl-dev
4. 编译openwrt-hiwooya-master
4.1 复制代码到/home/目录
cp openwrt-hiwooya-master /home/openwrt-hiwooya-master -rf
cd /home/openwrt-hiwooya-master
4.2 复制dl到源码顶层目录
tar jxvf dl.tar.bz2 -C /home/openwrt-hiwooya-master/
4.2 配置
cp config-HIWOOYA16128 .config
make menuconfig
4.3 编译
make V=99
最后编译出来的固件存放在/home/openwrt-hiwooya-master/bin/ramips/openwrt-ramips-mt7688-HIWOOYA1664-squashfs-sysupgrade.bin。