WNDR4300v2 固件编译
1.从官网下载源码
找到其中 WNDR4300v2的源码,我使用的是WNDR4300v2-gpl_src_V1.0.0.32.zip
2.安装 ubuntu 10.04.3
根据其文件中的说明下载ubuntu 10.04.3 http://old-releases.ubuntu.com/releases/10.04.3/ubuntu-10.04.3-server-amd64.iso
* This package has been built successfully on Ubuntu 10.04.3 (Server) with gcc 4.1.3. * Compiling this package on platforms other than Ubuntu 10.04.3 may have unexpected results.
3.修改apt源/etc/apt/sources.list
deb http://mirrors.ustc.edu.cn/ubuntu-old-releases/ubuntu/ lucid main restricted universe multiverse deb-src http://mirrors.ustc.edu.cn/ubuntu-old-releases/ubuntu/ lucid main restricted universe multiverse deb http://mirrors.ustc.edu.cn/ubuntu-old-releases/ubuntu/ lucid-security main restricted universe multiverse deb-src http://mirrors.ustc.edu.cn/ubuntu-old-releases/ubuntu/ lucid-security main restricted universe multiverse deb http://mirrors.ustc.edu.cn/ubuntu-old-releases/ubuntu/ lucid-updates main restricted universe multiverse deb-src http://mirrors.ustc.edu.cn/ubuntu-old-releases/ubuntu/ lucid-updates main restricted universe multiverse deb http://mirrors.ustc.edu.cn/ubuntu-old-releases/ubuntu/ lucid-backports main restricted universe multiverse deb-src http://mirrors.ustc.edu.cn/ubuntu-old-releases/ubuntu/ lucid-backports main restricted universe multiverse ## Not recommended # deb http://mirrors.ustc.edu.cn/ubuntu-old-releases/ubuntu/ lucid-proposed main restricted universe multiverse # deb-src http://mirrors.ustc.edu.cn/ubuntu-old-releases/ubuntu/ lucid-proposed main restricted universe multiverse
4.安装依赖程序和库
apt-get update
apt-get install libncurses5-dev zlib1g-dev gawk flex patch git-core g++ subversion zip automake
5.解压源码包
unzip WNDR4300v2-V1.0.0.32_gpl_src.zip bzip2 -d WNDR4300v2-V1.0.0.32_gpl_src.tar.gz.bz2 tar -zxf WNDR4300v2-V1.0.0.32_gpl_src.tar.gz bzip2 -d toolchain.tar.gz.bz2 tar -zxf toolchain.tar.gz -C WNDR4300v2-V1.0.0.32_gpl_src
6.编译工具链
cd WNDR4300v2-V1.0.0.32_gpl_src cp configs/defconfig-wndr4300v2 .config GIT_HOME=`pwd`/git_home make prepare V=99
7.编译固件
GIT_HOME=`pwd`/git_home make V=99